froala-editor
Advanced tools
Comparing version 3.0.0-rc.2 to 3.0.0
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],n):n(e.FroalaEditor)}(this,function(i){"use strict";(i=i&&i.hasOwnProperty("default")?i["default"]:i).PLUGINS.align=function(l){var a=l.$;return{apply:function(e){var n=l.selection.element();if(a(n).parents(".fr-img-caption").length)a(n).css("text-align",e);else{l.selection.save(),l.html.wrap(!0,!0,!0,!0),l.selection.restore();for(var t=l.selection.blocks(),i=0;i<t.length;i++)a(t[i]).css("text-align",e).removeClass("fr-temp-div"),""===a(t[i]).attr("class")&&a(t[i]).removeAttr("class"),""===a(t[i]).attr("style")&&a(t[i]).removeAttr("style");l.selection.save(),l.html.unwrap(),l.selection.restore()}},refresh:function(e){var n=l.selection.blocks();if(n.length){var t=l.helpers.getAlignment(a(n[0]));e.find("> *").first().replaceWith(l.icon.create("align-"+t))}},refreshOnShow:function(e,n){var t=l.selection.blocks();if(t.length){var i=l.helpers.getAlignment(a(t[0]));n.find('a.fr-command[data-param1="'+i+'"]').addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function(e){var n=l.selection.blocks();if(n.length){var t=l.helpers.getAlignment(a(n[0]));"align"+(t=t.charAt(0).toUpperCase()+t.slice(1))===e.attr("data-cmd")&&e.addClass("fr-active")}}}},i.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),i.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),i.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),i.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">',n=i.COMMANDS.align.options;for(var t in n)n.hasOwnProperty(t)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align" data-param1="'+t+'" title="'+this.language.translate(n[t])+'">'+this.icon.create("align-"+t)+'<span class="fr-sr-only">'+this.language.translate(n[t])+"</span></a></li>");return e+="</ul>"},callback:function(e,n){this.align.apply(n)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,n){this.align.refreshOnShow(e,n)},plugin:"align"}),i.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"}),i.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"}),i.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"}),i.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"})}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],n):n(e.FroalaEditor)}(this,function(i){"use strict";(i=i&&i.hasOwnProperty("default")?i["default"]:i).PLUGINS.align=function(l){var a=l.$;return{apply:function r(e){var n=l.selection.element();if(a(n).parents(".fr-img-caption").length)a(n).css("text-align",e);else{l.selection.save(),l.html.wrap(!0,!0,!0,!0),l.selection.restore();for(var t=l.selection.blocks(),i=0;i<t.length;i++)a(t[i]).css("text-align",e).removeClass("fr-temp-div"),""===a(t[i]).attr("class")&&a(t[i]).removeAttr("class"),""===a(t[i]).attr("style")&&a(t[i]).removeAttr("style");l.selection.save(),l.html.unwrap(),l.selection.restore()}},refresh:function i(e){var n=l.selection.blocks();if(n.length){var t=l.helpers.getAlignment(a(n[0]));e.find("> *").first().replaceWith(l.icon.create("align-"+t))}},refreshOnShow:function o(e,n){var t=l.selection.blocks();if(t.length){var i=l.helpers.getAlignment(a(t[0]));n.find('a.fr-command[data-param1="'+i+'"]').addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function s(e){var n=l.selection.blocks();if(n.length){var t=l.helpers.getAlignment(a(n[0]));"align"+(t=t.charAt(0).toUpperCase()+t.slice(1))===e.attr("data-cmd")&&e.addClass("fr-active")}}}},i.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),i.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),i.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),i.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),i.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">',n=i.COMMANDS.align.options;for(var t in n)n.hasOwnProperty(t)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align" data-param1="'+t+'" title="'+this.language.translate(n[t])+'">'+this.icon.create("align-"+t)+'<span class="fr-sr-only">'+this.language.translate(n[t])+"</span></a></li>");return e+="</ul>"},callback:function(e,n){this.align.apply(n)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,n){this.align.refreshOnShow(e,n)},plugin:"align"}),i.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"}),i.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"}),i.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"}),i.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"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(u){"use strict";u=u&&u.hasOwnProperty("default")?u["default"]:u,Object.assign(u.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),u.PLUGINS.charCounter=function(n){var r,e=n.$;function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length}function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===u.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb&&n.$second_tb.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char"+n.id),r.removeData().remove(),r=null}))},count:o}}}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),i.PLUGINS.charCounter=function(n){var r,e=n.$;function o(){return(n.el.textContent||"").replace(/\u200B/g,"").length}function t(t){if(n.opts.charCounterMax<0)return!0;if(o()<n.opts.charCounterMax)return!0;var e=t.which;return!(!n.keys.ctrlKey(t)&&n.keys.isCharacter(e)||e===i.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),n.events.trigger("charCounter.exceeded"),!1)}function a(t){return n.opts.charCounterMax<0?t:e("<div>").html(t).text().length+o()<=n.opts.charCounterMax?t:(n.events.trigger("charCounter.exceeded"),"")}function c(){if(n.opts.charCounterCount){var t=o()+(0<n.opts.charCounterMax?"/"+n.opts.charCounterMax:"");r.text("".concat(n.language.translate("Characters")," : ").concat(t)),n.opts.toolbarBottom&&r.css("margin-bottom",n.$tb.outerHeight(!0));var e=n.$wp.get(0).offsetWidth-n.$wp.get(0).clientWidth;0<=e&&("rtl"==n.opts.direction?r.css("margin-left",e):r.css("margin-right",e))}}return{_init:function u(){return!!n.$wp&&!!n.opts.charCounterCount&&((r=e(document.createElement("span")).attr("class","fr-counter")).css("bottom",n.$wp.css("border-bottom-width")),n.$second_tb&&n.$second_tb.append(r),n.events.on("keydown",t,!0),n.events.on("paste.afterCleanup",a),n.events.on("keyup contentChanged input",function(){n.events.trigger("charCounter.update")}),n.events.on("charCounter.update",c),n.events.trigger("charCounter.update"),void n.events.on("destroy",function(){e(n.o_win).off("resize.char"+n.id),r.removeData().remove(),r=null}))},count:o}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.codeBeautifier=function(){var e,t,n,i,F={};function k(i,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};e=e||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,s=e.indent_char||" ",_=e.selector_separator_newline===undefined||e.selector_separator_newline,a=e.end_with_newline!==undefined&&e.end_with_newline,o=e.newline_between_rules===undefined||e.newline_between_rules,l=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(s="\t",r=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var h,c=/^\s+$/,u=-1,p=0;function d(){return(h=i.charAt(++u))||""}function f(e){var t,n=u;return e&&E(),t=i.charAt(u+1)||"",u=n-1,d(),t}function T(e){for(var t=u;d();)if("\\"===h)d();else{if(-1!==e.indexOf(h))break;if("\n"===h)break}return i.substring(t,u+1)}function E(){for(var e="";c.test(f());)d(),e+=h;return e}function g(){var e="";for(h&&c.test(h)&&(e=h);c.test(d());)e+=h;return e}function x(e){var t=u;for(e="/"===f(),d();d();){if(!e&&"*"===h&&"/"===f()){d();break}if(e&&"\n"===h)return i.substring(t,u)}return i.substring(t,u)+h}function w(e){return i.substring(u-e.length,u).toLowerCase()===e}function K(){for(var e=0,t=u+1;t<i.length;t++){var n=i.charAt(t);if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(" "===n||"}"===n)return!1}return!1}var R=i.match(/^[\t ]*/)[0],m=new Array(r+1).join(s),b=0,v=0;for(var S,A,k={"{":function(e){k.singleSpace(),y.push(e),k.newLine()},"}":function(e){k.newLine(),y.push(e),k.newLine()},_lastCharWhitespace:function(){return c.test(y[y.length-1])},newLine:function(e){y.length&&(e||"\n"===y[y.length-1]||k.trim(),y.push("\n"),R&&y.push(R))},singleSpace:function(){y.length&&!k._lastCharWhitespace()&&y.push(" ")},preserveSingleSpace:function(){isAfterSpace&&k.singleSpace()},trim:function(){for(;k._lastCharWhitespace();)y.pop()}},y=[],O=!1,N=!1,D=!1,C="",L="";;){var I=-1!==g().indexOf("\n");if(L=C,!(C=h))break;if("/"===h&&"*"===f()){var V=0===b;(I||V)&&k.newLine(),y.push(x()),k.newLine(),V&&k.newLine(!0)}else if("/"===h&&"/"===f())I||"{"===L||k.trim(),k.singleSpace(),y.push(x()),k.newLine();else if("@"===h){k.preserveSingleSpace(),y.push(h);var P=(void 0,S=u,A=T(": , {}()[]/='\""),u=S-1,d(),A);P.match(/[ :]$/)&&(d(),P=T(": ").replace(/\s$/,""),y.push(P),k.singleSpace()),(P=P.replace(/\s$/,""))in t&&(v+=1,P in n&&(D=!0))}else"#"===h&&"{"===f()?(k.preserveSingleSpace(),y.push(T("}"))):"{"===h?"}"===f(!0)?(E(),d(),k.singleSpace(),y.push("{}"),k.newLine(),o&&0===b&&k.newLine(!0)):(b++,R+=m,k["{"](h),D?(D=!1,O=v<b):O=v<=b):"}"===h?(b--,R=R.slice(0,-r),k["}"](h),N=O=!1,v&&v--,o&&0===b&&k.newLine(!0)):":"===h?(E(),!O&&!D||w("&")||K()?":"===f()?(d(),y.push("::")):y.push(":"):(N=!0,y.push(":"),k.singleSpace())):'"'===h||"'"===h?(k.preserveSingleSpace(),y.push(T(h))):" "===h?(N=!1,y.push(h),k.newLine()):"("===h?w("url")?(y.push(h),E(),d()&&(")"!==h&&'"'!==h&&"'"!==h?y.push(T(")")):u--)):(p++,k.preserveSingleSpace(),y.push(h),E()):")"===h?(y.push(h),p--):","===h?(y.push(h),E(),_&&!N&&p<1?k.newLine():k.singleSpace()):("]"===h||("["===h?k.preserveSingleSpace():"="===h?(E(),h="="):k.preserveSingleSpace()),y.push(h))}var B="";return R&&(B+=R),B+=y.join("").replace(/[\r\n\t ]+$/,""),a&&(B+="\n"),"\n"!=l&&(B=B.replace(/[\n]/g,l)),B}function $(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function Q(e){return e.replace(/^\s+|\s+$/g,"")}function y(e,t){return new r(e,t).beautify()}e=F,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",n=new RegExp("["+t+"]"),i=new RegExp("["+t+"\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|"+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&&n.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&&i.test(String.fromCharCode(e))))};var L={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(i,e){var _,r,s,a,o,l,h,c,u,t,n,p,d,f=[],T="";function E(e,t){var n=0;return e&&(n=e.indentation_level,!_.just_added_newline()&&e.line_indent_level>n&&(n=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:n,line_indent_level:e?e.line_indent_level:n,start_line_index:_.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function(){O();var e=L.Expression;if("["===a.text){if("TK_WORD"===o||")"===c.last_text)return"TK_RESERVED"===o&&$(c.last_text,s.line_starters)&&(_.space_before_token=!0),v(e),m(),b(),void(d.space_in_paren&&(_.space_before_token=!0));e=L.ArrayLiteral,S(c.mode)&&("["!==c.last_text&&(","!==c.last_text||"]"!==l&&"}"!==l)||d.keep_array_indentation||K())}else"TK_RESERVED"===o&&"for"===c.last_text?e=L.ForInitializer:"TK_RESERVED"===o&&$(c.last_text,["if","while"])&&(e=L.Conditional);" "===c.last_text||"TK_START_BLOCK"===o?K():"TK_END_EXPR"===o||"TK_START_EXPR"===o||"TK_END_BLOCK"===o||"."===c.last_text?w(a.wanted_newline):"TK_RESERVED"===o&&"("===a.text||"TK_WORD"===o||"TK_OPERATOR"===o?"TK_RESERVED"===o&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===l?d.space_after_anon_function&&(_.space_before_token=!0):"TK_RESERVED"!==o||!$(c.last_text,s.line_starters)&&"catch"!==c.last_text||d.space_before_conditional&&(_.space_before_token=!0):_.space_before_token=!0;"("===a.text&&"TK_RESERVED"===o&&"await"===c.last_word&&(_.space_before_token=!0);"("===a.text&&("TK_EQUALS"!==o&&"TK_OPERATOR"!==o||y()||w());v(e),m(),d.space_in_paren&&(_.space_before_token=!0);b()},TK_END_EXPR:function(){for(;c.mode===L.Statement;)k();c.multiline_frame&&w("]"===a.text&&S(c.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==o||d.space_in_empty_paren?_.space_before_token=!0:(_.trim(),_.space_before_token=!1));"]"===a.text&&d.keep_array_indentation?(m(),k()):(k(),m());_.remove_redundant_indentation(u),c.do_while&&u.mode===L.Conditional&&(u.mode=L.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function(){var e=D(1),t=D(2);t&&(":"===t.text&&$(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||$(e.text,["get","set"])&&$(t.type,["TK_WORD","TK_RESERVED"]))?$(l,["class","interface"])?v(L.BlockStatement):v(L.ObjectLiteral):v(L.BlockStatement);var n=!e.comments_before.length&&"}"===e.text&&"function"===c.last_word&&"TK_END_EXPR"===o;"expand"===d.brace_style||"none"===d.brace_style&&a.wanted_newline?"TK_OPERATOR"!==o&&(n||"TK_EQUALS"===o||"TK_RESERVED"===o&&N(c.last_text)&&"else"!==c.last_text)?_.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==o&&"TK_START_EXPR"!==o?"TK_START_BLOCK"===o?K():_.space_before_token=!0:S(u.mode)&&","===c.last_text&&("}"===l?_.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function(){for(;c.mode===L.Statement;)k();var e="TK_START_BLOCK"===o;"expand"===d.brace_style?e||K():e||(S(c.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function(){O()&&(_.space_before_token=!1);for(;c.mode===L.Statement&&!c.if_block&&!c.do_block;)k();m()},TK_STRING:function(){O()?_.space_before_token=!0:"TK_RESERVED"===o||"TK_WORD"===o?_.space_before_token=!0:"TK_COMMA"===o||"TK_START_EXPR"===o||"TK_EQUALS"===o||"TK_OPERATOR"===o?y()||w():K();m()},TK_EQUALS:function(){O();c.declaration_statement&&(c.declaration_assignment=!0);_.space_before_token=!0,m(),_.space_before_token=!0},TK_OPERATOR:function(){O();if("TK_RESERVED"===o&&N(c.last_text))return _.space_before_token=!0,void m();if("*"===a.text&&"TK_DOT"===o)return void m();if(":"===a.text&&c.in_case)return c.case_body=!0,b(),m(),K(),void(c.in_case=!1);if("::"===a.text)return void m();"TK_OPERATOR"===o&&w();var e=!0,t=!0;$(a.text,["--","++","!","~"])||$(a.text,["-","+"])&&($(o,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||$(c.last_text,s.line_starters)||","===c.last_text)?(t=e=!1,!a.wanted_newline||"--"!==a.text&&"++"!==a.text||K(!1,!0)," "===c.last_text&&A(c.mode)&&(e=!0),"TK_RESERVED"===o?e=!0:"TK_END_EXPR"===o?e=!("]"===c.last_text&&("--"===a.text||"++"===a.text)):"TK_OPERATOR"===o&&(e=$(a.text,["--","-","++","+"])&&$(c.last_text,["--","-","++","+"]),$(a.text,["+","-"])&&$(c.last_text,["--","++"])&&(t=!0)),c.mode!==L.BlockStatement&&c.mode!==L.Statement||"{"!==c.last_text&&" "!==c.last_text||K()):":"===a.text?0===c.ternary_depth?e=!1:c.ternary_depth-=1:"?"===a.text?c.ternary_depth+=1:"*"===a.text&&"TK_RESERVED"===o&&"function"===c.last_text&&(t=e=!1);_.space_before_token=_.space_before_token||e,m(),_.space_before_token=t},TK_COMMA:function(){if(c.declaration_statement)return A(c.parent.mode)&&(c.declaration_assignment=!1),m(),void(c.declaration_assignment?K(c.declaration_assignment=!1,!0):(_.space_before_token=!0,d.comma_first&&w()));m(),c.mode===L.ObjectLiteral||c.mode===L.Statement&&c.parent.mode===L.ObjectLiteral?(c.mode===L.Statement&&k(),K()):(_.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function(){if(_.raw)return _.add_raw_token(a),void(a.directives&&"end"===a.directives.preserve&&(d.test_output_raw||(_.raw=!1)));if(a.directives)return K(!1,!0),m(),"start"===a.directives.preserve&&(_.raw=!0),void K(!1,!0);if(!F.newline.test(a.text)&&!a.wanted_newline)return _.space_before_token=!0,m(),void(_.space_before_token=!0);var e,t=function(e){var t;e=e.replace(/\x0d/g,"");var n=[];t=e.indexOf("\n");for(;-1!==t;)n.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&n.push(e);return n}(a.text),n=!1,i=!1,r=a.whitespace_before,s=r.length;K(!1,!0),1<t.length&&(!function(e,t){for(var n=0;n<e.length;n++){var i=Q(e[n]);if(i.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(t.slice(1),r)&&(i=!0):n=!0);for(m(t[0]),e=1;e<t.length;e++)K(!1,!0),n?m(" "+t[e].replace(/^\s+/g,"")):i&&t[e].length>s?m(t[e].substring(s)):_.add_token(t[e]);K(!1,!0)},TK_COMMENT:function(){a.wanted_newline?K(!1,!0):_.trim(!0);_.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function(){O();"TK_RESERVED"===o&&N(c.last_text)?_.space_before_token=!0:w(")"===c.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function(){m(),"\n"===a.text[a.text.length-1]&&K()},TK_EOF:function(){for(;c.mode===L.Statement;)k()}},d={},(e=e||{}).braces_on_own_line!==undefined&&(d.brace_style=e.braces_on_own_line?"expand":"collapse"),d.brace_style=e.brace_style?e.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=e.indent_size?parseInt(e.indent_size,10):4,d.indent_char=e.indent_char?e.indent_char:" ",d.eol=e.eol?e.eol:"\n",d.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,d.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,d.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),d.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,d.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,d.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,d.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,d.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,d.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,d.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,d.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),d.e4x=e.e4x!==undefined&&e.e4x,d.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,d.comma_first=e.comma_first!==undefined&&e.comma_first,d.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),e.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),h="";0<d.indent_size;)h+=d.indent_char,d.indent_size-=1;var g=0;if(i&&i.length){for(;" "===i.charAt(g)||"\t"===i.charAt(g);)T+=i.charAt(g),g+=1;i=i.substring(g)}function x(e){var t=e.newlines;if(d.keep_array_indentation&&S(c.mode))for(var n=0;n<t;n+=1)K(0<n);else if(d.max_preserve_newlines&&t>d.max_preserve_newlines&&(t=d.max_preserve_newlines),d.preserve_newlines&&1<e.newlines){K();for(var i=1;i<t;i+=1)K(!0)}p[(a=e).type]()}function w(e){if(e=e!==undefined&&e,!_.just_added_newline())if(d.preserve_newlines&&a.wanted_newline||e)K(!1,!0);else if(d.wrap_line_length){_.current_line.get_character_count()+a.text.length+(_.space_before_token?1:0)>=d.wrap_line_length&&K(!1,!0)}}function K(e,t){if(!t&&" "!==c.last_text&&","!==c.last_text&&"="!==c.last_text&&"TK_OPERATOR"!==o)for(;c.mode===L.Statement&&!c.if_block&&!c.do_block;)k();_.add_new_line(e)&&(c.multiline_frame=!0)}function R(){_.just_added_newline()&&(d.keep_array_indentation&&S(c.mode)&&a.wanted_newline?(_.current_line.push(a.whitespace_before),_.space_before_token=!1):_.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function m(e){_.raw?_.add_raw_token(a):(d.comma_first&&"TK_COMMA"===o&&_.just_added_newline()&&","===_.previous_line.last()&&(_.previous_line.pop(),R(),_.add_token(","),_.space_before_token=!0),e=e||a.text,R(),_.add_token(e))}function b(){c.indentation_level+=1}function v(e){c?(t.push(c),u=c):u=E(null,e),c=E(u,e)}function S(e){return e===L.ArrayLiteral}function A(e){return $(e,[L.Expression,L.ForInitializer,L.Conditional])}function k(){0<t.length&&(u=c,c=t.pop(),u.mode===L.Statement&&_.remove_redundant_indentation(u))}function y(){return c.parent.mode===L.ObjectLiteral&&c.mode===L.Statement&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===o&&$(c.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===o&&$(c.last_text,["const","let","const"])&&"TK_WORD"===a.type||"TK_RESERVED"===o&&"do"===c.last_text||"TK_RESERVED"===o&&"return"===c.last_text&&!a.wanted_newline||"TK_RESERVED"===o&&"else"===c.last_text&&("TK_RESERVED"!==a.type||"if"!==a.text)||"TK_END_EXPR"===o&&(u.mode===L.ForInitializer||u.mode===L.Conditional)||"TK_WORD"===o&&c.mode===L.BlockStatement&&!c.in_case&&"--"!==a.text&&"++"!==a.text&&"function"!==l&&"TK_WORD"!==a.type&&"TK_RESERVED"!==a.type||c.mode===L.ObjectLiteral&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===o&&$(c.last_text,["get","set"])))&&(v(L.Statement),b(),"TK_RESERVED"===o&&$(c.last_text,["const","let","const"])&&"TK_WORD"===a.type&&(c.declaration_statement=!0),y()||w("TK_RESERVED"===a.type&&$(a.text,["do","for","if","while"])),!0)}function N(e){return $(e,["case","return","do","if","throw","else"])}function D(e){var t=r+(e||0);return t<0||t>=f.length?null:f[t]}function C(){("TK_RESERVED"===a.type&&c.mode!==L.ObjectLiteral&&$(a.text,["set","get"])&&(a.type="TK_WORD"),"TK_RESERVED"===a.type&&c.mode===L.ObjectLiteral)&&(":"===D(1).text&&(a.type="TK_WORD"));if(O()||!a.wanted_newline||A(c.mode)||"TK_OPERATOR"===o&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===o||!d.preserve_newlines&&"TK_RESERVED"===o&&$(c.last_text,["const","let","const","set","get"])||K(),c.do_block&&!c.do_while){if("TK_RESERVED"===a.type&&"while"===a.text)return _.space_before_token=!0,m(),_.space_before_token=!0,void(c.do_while=!0);K(),c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==a.type||"else"!==a.text){for(;c.mode===L.Statement;)k();c.if_block=!1,c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===a.type&&("case"===a.text||"default"===a.text&&c.in_case_statement))return K(),(c.case_body||d.jslint_happy)&&(0<c.indentation_level&&(!c.parent||c.indentation_level>c.parent.indentation_level)&&(c.indentation_level-=1),c.case_body=!1),m(),c.in_case=!0,void(c.in_case_statement=!0);if("TK_RESERVED"===a.type&&"function"===a.text&&(($(c.last_text,["}"," "])||_.just_added_newline()&&!$(c.last_text,["[","{",":","=",","]))&&(_.just_added_blankline()||a.comments_before.length||(K(),K(!0))),"TK_RESERVED"===o||"TK_WORD"===o?"TK_RESERVED"===o&&$(c.last_text,["get","set","new","return","export","async"])?_.space_before_token=!0:"TK_RESERVED"===o&&"default"===c.last_text&&"export"===l?_.space_before_token=!0:K():"TK_OPERATOR"===o||"="===c.last_text?_.space_before_token=!0:(c.multiline_frame||!A(c.mode)&&!S(c.mode))&&K()),"TK_COMMA"!==o&&"TK_START_EXPR"!==o&&"TK_EQUALS"!==o&&"TK_OPERATOR"!==o||y()||w(),"TK_RESERVED"===a.type&&$(a.text,["function","get","set"]))return m(),void(c.last_word=a.text);(n="NONE","TK_END_BLOCK"===o?"TK_RESERVED"===a.type&&$(a.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&a.wanted_newline?n="NEWLINE":(n="SPACE",_.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===o&&c.mode===L.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===o&&A(c.mode)?n="SPACE":"TK_STRING"===o?n="NEWLINE":"TK_RESERVED"===o||"TK_WORD"===o||"*"===c.last_text&&"function"===l?n="SPACE":"TK_START_BLOCK"===o?n="NEWLINE":"TK_END_EXPR"===o&&(_.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===a.type&&$(a.text,s.line_starters)&&")"!==c.last_text&&(n="else"===c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===a.type&&$(a.text,["else","catch","finally"]))?"TK_END_BLOCK"!==o||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&a.wanted_newline?K():(_.trim(!0),"}"!==_.current_line.last()&&K(),_.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===o&&N(c.last_text)?_.space_before_token=!0:"TK_END_EXPR"!==o?"TK_START_EXPR"===o&&"TK_RESERVED"===a.type&&$(a.text,["const","let","const"])||":"===c.last_text||("TK_RESERVED"===a.type&&"if"===a.text&&"else"===c.last_text?_.space_before_token=!0:K()):"TK_RESERVED"===a.type&&$(a.text,s.line_starters)&&")"!==c.last_text&&K():c.multiline_frame&&S(c.mode)&&","===c.last_text&&"}"===l?K():"SPACE"===n&&(_.space_before_token=!0);m(),c.last_word=a.text,"TK_RESERVED"===a.type&&"do"===a.text&&(c.do_block=!0),"TK_RESERVED"===a.type&&"if"===a.text&&(c.if_block=!0)}o="TK_START_BLOCK",l="",(_=new I(h,T)).raw=d.test_output_raw,t=[],v(L.BlockStatement),this.beautify=function(){var e,t;for(s=new V(i,d,h),f=s.tokenize(),r=0;e=D();){for(var n=0;n<e.comments_before.length;n++)x(e.comments_before[n]);x(e),l=c.last_text,o=e.type,c.last_text=e.text,r+=1}return t=_.get_code(),d.end_with_newline&&(t+="\n"),"\n"!=d.eol&&(t=t.replace(/[\n]/g,d.eol)),t}}function s(t){var n=0,i=-1,r=[],s=!0;this.set_indent=function(e){n=t.baseIndentLength+e*t.indent_length,i=e},this.get_character_count=function(){return n},this.is_empty=function(){return s},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),n+=e.length,s=!1},this.pop=function(){var e=null;return s||(e=r.pop(),n-=e.length,s=0===r.length),e},this.remove_indent=function(){0<i&&(i-=1,n-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),n-=1;s=0===r.length},this.toString=function(){var e="";return this._empty||(0<=i&&(e=t.indent_cache[i]),e+=r.join("")),e}}function I(t,n){n=n||"",this.indent_cache=[n],this.baseIndentLength=n.length,this.indent_length=t.length,this.raw=!1;var i=[];this.baseIndentString=n,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 s(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.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 i.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<i.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!==L.ForInitializer&&e.mode!==L.Conditional)for(var t=e.start_line_index,n=i.length;t<n;)i[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,n);e&&1<i.length&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=1<i.length?i[i.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===i.length||i[i.length-2].is_empty())}}var Y=function(e,t,n,i,r,s){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=i||"",this.parent=null,this.directives=null};function V(S,A,e){var k="\n\r\t ".split(""),y=/[0-9]/,O=/[01234567]/,N=/[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 C,L,I,V,P,B,j=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),M=/([\s\S]*?)((?:\*\/)|$)/g,U=/([^\n\r\u2028\u2029]*)/g,W=/\/\* beautify( \w+[:]\w+)+ \*\//g,z=/ (\w+)[:](\w+)/g,G=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,X=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function _(){var e,t,n=[];if(C=0,L="",B<=P)return["","TK_EOF"];t=V.length?V[V.length-1]:new Y("TK_START_BLOCK","{");var i=S.charAt(P);for(P+=1;$(i,k);){if(F.newline.test(i)?"\n"===i&&"\r"===S.charAt(P-2)||(C+=1,n=[]):n.push(i),B<=P)return["","TK_EOF"];i=S.charAt(P),P+=1}if(n.length&&(L=n.join("")),y.test(i)){var r=!0,s=!0,_=y;for("0"===i&&P<B&&/[Xxo]/.test(S.charAt(P))?(s=r=!1,i+=S.charAt(P),P+=1,_=/[o]/.test(S.charAt(P))?O:N):(i="",P-=1);P<B&&_.test(S.charAt(P));)i+=S.charAt(P),P+=1,r&&P<B&&"."===S.charAt(P)&&(i+=S.charAt(P),P+=1,r=!1),s&&P<B&&/[Ee]/.test(S.charAt(P))&&(i+=S.charAt(P),(P+=1)<B&&/[+-]/.test(S.charAt(P))&&(i+=S.charAt(P),P+=1),r=s=!1);return[i,"TK_WORD"]}if(F.isIdentifierStart(S.charCodeAt(P-1))){if(P<B)for(;F.isIdentifierChar(S.charCodeAt(P))&&(i+=S.charAt(P),(P+=1)!==B););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&$(t.text,["set","get"])||!$(i,j)?[i,"TK_WORD"]:"in"===i?[i,"TK_OPERATOR"]:[i,"TK_RESERVED"]}if("("===i||"["===i)return[i,"TK_START_EXPR"];if(")"===i||"]"===i)return[i,"TK_END_EXPR"];if("{"===i)return[i,"TK_START_BLOCK"];if("}"===i)return[i,"TK_END_BLOCK"];if(" "===i)return[i,"TK_SEMICOLON"];if("/"===i){var a="";if("*"===S.charAt(P)){P+=1,M.lastIndex=P;var o=M.exec(S);a="/*"+o[0],P+=o[0].length;var l=function(e){if(!e.match(W))return null;var t={};z.lastIndex=0;for(var n=z.exec(e);n;)t[n[1]]=n[2],n=z.exec(e);return t}(a);return l&&"start"===l.ignore&&(G.lastIndex=P,a+=(o=G.exec(S))[0],P+=o[0].length),[a=a.replace(F.lineBreak,"\n"),"TK_BLOCK_COMMENT",l]}if("/"===S.charAt(P)){P+=1,U.lastIndex=P;var h=U.exec(S);return a="//"+h[0],P+=h[0].length,[a,"TK_COMMENT"]}}if("`"===i||"'"===i||'"'===i||("/"===i||A.e4x&&"<"===i&&S.slice(P-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&$(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&$(t.parent.text,["if","while","for"])||$(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var c=i,u=!1,p=!1;if(e=i,"/"===c)for(var d=!1;P<B&&(u||d||S.charAt(P)!==c)&&!F.newline.test(S.charAt(P));)e+=S.charAt(P),u?u=!1:(u="\\"===S.charAt(P),"["===S.charAt(P)?d=!0:"]"===S.charAt(P)&&(d=!1)),P+=1;else if(A.e4x&&"<"===c){var f=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,T=S.slice(P-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),P+=m-1,[T=T.replace(F.lineBreak,"\n"),"TK_STRING"]}}else for(;P<B&&(u||S.charAt(P)!==c&&("`"===c||!F.newline.test(S.charAt(P))));)(u||"`"===c)&&F.newline.test(S.charAt(P))?("\r"===S.charAt(P)&&"\n"===S.charAt(P+1)&&(P+=1),e+="\n"):e+=S.charAt(P),u?("x"!==S.charAt(P)&&"u"!==S.charAt(P)||(p=!0),u=!1):u="\\"===S.charAt(P),P+=1;if(p&&A.unescape_strings&&(e=function(e){var t,n=!1,i="",r=0,s="",_=0;for(;n||r<e.length;)if(t=e.charAt(r),r++,n){if(n=!1,"x"===t)s=e.substr(r,2),r+=2;else{if("u"!==t){i+="\\"+t;continue}s=e.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(_=parseInt(s,16))&&_<32){i+="x"===t?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===t&&126<_&&_<=255)return e;i+=String.fromCharCode(_)}}else"\\"===t?n=!0:i+=t;return i}(e)),P<B&&S.charAt(P)===c&&(e+=c,P+=1,"/"===c))for(;P<B&&F.isIdentifierStart(S.charCodeAt(P));)e+=S.charAt(P),P+=1;return[e,"TK_STRING"]}if("#"===i){if(0===V.length&&"!"===S.charAt(P)){for(e=i;P<B&&"\n"!==i;)e+=i=S.charAt(P),P+=1;return[Q(e)+"\n","TK_UNKNOWN"]}var b="#";if(P<B&&y.test(S.charAt(P))){for(;b+=i=S.charAt(P),(P+=1)<B&&"#"!==i&&"="!==i;);return"#"===i||("["===S.charAt(P)&&"]"===S.charAt(P+1)?(b+="[]",P+=2):"{"===S.charAt(P)&&"}"===S.charAt(P+1)&&(b+="{}",P+=2)),[b,"TK_WORD"]}}if("<"===i&&("?"===S.charAt(P)||"%"===S.charAt(P))){X.lastIndex=P-1;var v=X.exec(S);if(v)return i=v[0],P+=i.length-1,[i=i.replace(F.lineBreak,"\n"),"TK_STRING"]}if("<"===i&&"\x3c!--"===S.substring(P-1,P+3)){for(P+=3,i="\x3c!--";!F.newline.test(S.charAt(P))&&P<B;)i+=S.charAt(P),P++;return I=!0,[i,"TK_COMMENT"]}if("-"===i&&I&&"--\x3e"===S.substring(P-1,P+2))return I=!1,P+=2,["--\x3e","TK_COMMENT"];if("."===i)return[i,"TK_DOT"];if($(i,D)){for(;P<B&&$(i+S.charAt(P),D)&&(i+=S.charAt(P),!(B<=(P+=1))););return","===i?[i,"TK_COMMA"]:"="===i?[i,"TK_EQUALS"]:[i,"TK_OPERATOR"]}return[i,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,n;B=S.length,P=0,I=!1,V=[];for(var i=null,r=[],s=[];!t||"TK_EOF"!==t.type;){for(n=_(),e=new Y(n[1],n[0],C,L);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=n[2]),s.push(e),n=_(),e=new Y(n[1],n[0],C,L);s.length&&(e.comments_before=s,s=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(i),i=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&i&&("]"===e.text&&"["===i.text||")"===e.text&&"("===i.text||"}"===e.text&&"{"===i.text)&&(e.parent=i.parent,i=r.pop()),V.push(e),t=e}return V}}return{run:function(e,t){function _(e){return e.replace(/\s+$/g,"")}var n,i,r,T,s,a,E,o,l,g,x,w,h,c;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),i=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),T=t.indent_char===undefined?" ":t.indent_char,a=t.brace_style===undefined?"collapse":t.brace_style,s=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),E=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"],o=t.preserve_newlines===undefined||t.preserve_newlines,l=o?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,g=t.indent_handlebars!==undefined&&t.indent_handlebars,x=t.wrap_attributes===undefined?"auto":t.wrap_attributes,w=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,h=t.end_with_newline!==undefined&&t.end_with_newline,c=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&&(T="\t",r=1),(n=new function(){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=i,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:c,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])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);)o&&"\n"===e&&this.newlines<=l&&(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(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)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="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var h=0;h<w;h++)r.push(T)}for(var c=0;c<r.length;c++)if(" "===r[c]){a=!1;break}}if(g&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(t=this.pos-1,n="<"),g&&!n&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(g&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(g&&"{"===n&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("</"+f+">",d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(f),this.tag_type="SCRIPT"):"style"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search("text/css"))?e||(this.record_tag(f),this.tag_type="STYLE"):"!"===f.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===f.charAt(0)?(this.retrieve_tag(f.substring(1)),this.tag_type="END"):(this.record_tag(f),"html"!=f.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(f,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=o,this.line_char_count=l),r.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==n[n.length-1]||-1==t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!")?(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(e,r));return i},this.get_token=function(){var e;if("TK_TAG_SCRIPT"===this.last_token||"TK_TAG_STYLE"===this.last_token){var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]}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_"+this.tag_type]:void 0},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 n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s<this.indent_size;s++)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]=_(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=e.replace(/^\s+/g,"")),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=_(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,T,r,s,a);;){var u=n.get_token();if(n.token_text=u[0],n.token_type=u[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var p=n.token_text.match(/\w+/)[0],d=null;n.output.length&&(d=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===d||d[1]!=p&&!n.Utils.in_array(d[1],E))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z-]+)/i);f&&n.Utils.in_array(f[1],E)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var K=n.token_text,R=void 0,m=1;"TK_SCRIPT"===n.token_type?R=y:"TK_STYLE"===n.token_type&&(R=k),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-n.indent_level);var b=n.get_full_indent(m);if(R)K=R(K.replace(/^\s*/,b),t);else{var v=K.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,S=n.get_full_indent(m-v);K=K.replace(/^\s*/,b).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}K&&(n.print_token_raw(K),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var A=n.output.join("").replace(/[\r\n\t ]+$/,"");return h&&(A+="\n"),A}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.codeBeautifier=function(){var e,t,n,i,Q={};function y(i,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};e=e||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,s=e.indent_char||" ",_=e.selector_separator_newline===undefined||e.selector_separator_newline,a=e.end_with_newline!==undefined&&e.end_with_newline,o=e.newline_between_rules===undefined||e.newline_between_rules,l=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(s="\t",r=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var h,c=/^\s+$/,u=-1,p=0;function d(){return(h=i.charAt(++u))||""}function f(e){var t,n=u;return e&&E(),t=i.charAt(u+1)||"",u=n-1,d(),t}function T(e){for(var t=u;d();)if("\\"===h)d();else{if(-1!==e.indexOf(h))break;if("\n"===h)break}return i.substring(t,u+1)}function E(){for(var e="";c.test(f());)d(),e+=h;return e}function g(){var e="";for(h&&c.test(h)&&(e=h);c.test(d());)e+=h;return e}function x(e){var t=u;for(e="/"===f(),d();d();){if(!e&&"*"===h&&"/"===f()){d();break}if(e&&"\n"===h)return i.substring(t,u)}return i.substring(t,u)+h}function w(e){return i.substring(u-e.length,u).toLowerCase()===e}function K(){for(var e=0,t=u+1;t<i.length;t++){var n=i.charAt(t);if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(" "===n||"}"===n)return!1}return!1}var R=i.match(/^[\t ]*/)[0],m=new Array(r+1).join(s),b=0,v=0;for(var S,A,k={"{":function(e){k.singleSpace(),y.push(e),k.newLine()},"}":function(e){k.newLine(),y.push(e),k.newLine()},_lastCharWhitespace:function(){return c.test(y[y.length-1])},newLine:function(e){y.length&&(e||"\n"===y[y.length-1]||k.trim(),y.push("\n"),R&&y.push(R))},singleSpace:function(){y.length&&!k._lastCharWhitespace()&&y.push(" ")},preserveSingleSpace:function(){isAfterSpace&&k.singleSpace()},trim:function(){for(;k._lastCharWhitespace();)y.pop()}},y=[],O=!1,N=!1,D=!1,C="",L="";;){var I=-1!==g().indexOf("\n");if(L=C,!(C=h))break;if("/"===h&&"*"===f()){var V=0===b;(I||V)&&k.newLine(),y.push(x()),k.newLine(),V&&k.newLine(!0)}else if("/"===h&&"/"===f())I||"{"===L||k.trim(),k.singleSpace(),y.push(x()),k.newLine();else if("@"===h){k.preserveSingleSpace(),y.push(h);var P=(void 0,S=u,A=T(": , {}()[]/='\""),u=S-1,d(),A);P.match(/[ :]$/)&&(d(),P=T(": ").replace(/\s$/,""),y.push(P),k.singleSpace()),(P=P.replace(/\s$/,""))in t&&(v+=1,P in n&&(D=!0))}else"#"===h&&"{"===f()?(k.preserveSingleSpace(),y.push(T("}"))):"{"===h?"}"===f(!0)?(E(),d(),k.singleSpace(),y.push("{}"),k.newLine(),o&&0===b&&k.newLine(!0)):(b++,R+=m,k["{"](h),O=D?(D=!1,v<b):v<=b):"}"===h?(b--,R=R.slice(0,-r),k["}"](h),N=O=!1,v&&v--,o&&0===b&&k.newLine(!0)):":"===h?(E(),!O&&!D||w("&")||K()?":"===f()?(d(),y.push("::")):y.push(":"):(N=!0,y.push(":"),k.singleSpace())):'"'===h||"'"===h?(k.preserveSingleSpace(),y.push(T(h))):" "===h?(N=!1,y.push(h),k.newLine()):"("===h?w("url")?(y.push(h),E(),d()&&(")"!==h&&'"'!==h&&"'"!==h?y.push(T(")")):u--)):(p++,k.preserveSingleSpace(),y.push(h),E()):")"===h?(y.push(h),p--):","===h?(y.push(h),E(),_&&!N&&p<1?k.newLine():k.singleSpace()):("]"===h||("["===h?k.preserveSingleSpace():"="===h?(E(),h="="):k.preserveSingleSpace()),y.push(h))}var B="";return R&&(B+=R),B+=y.join("").replace(/[\r\n\t ]+$/,""),a&&(B+="\n"),"\n"!=l&&(B=B.replace(/[\n]/g,l)),B}function Y(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function H(e){return e.replace(/^\s+|\s+$/g,"")}function O(e,t){return new r(e,t).beautify()}e=Q,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",n=new RegExp("["+t+"]"),i=new RegExp("["+t+"\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|"+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&&n.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&&i.test(String.fromCharCode(e))))};var Z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(i,e){var l,r,s,h,_,a,o,c,u,t,n,p,d,f=[],T="";function E(e,t){var n=0;return e&&(n=e.indentation_level,!l.just_added_newline()&&e.line_indent_level>n&&(n=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:n,line_indent_level:e?e.line_indent_level:n,start_line_index:l.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var e=Z.Expression;if("["===h.text){if("TK_WORD"===_||")"===c.last_text)return"TK_RESERVED"===_&&Y(c.last_text,s.line_starters)&&(l.space_before_token=!0),v(e),m(),b(),void(d.space_in_paren&&(l.space_before_token=!0));e=Z.ArrayLiteral,S(c.mode)&&("["!==c.last_text&&(","!==c.last_text||"]"!==a&&"}"!==a)||d.keep_array_indentation||K())}else"TK_RESERVED"===_&&"for"===c.last_text?e=Z.ForInitializer:"TK_RESERVED"===_&&Y(c.last_text,["if","while"])&&(e=Z.Conditional);" "===c.last_text||"TK_START_BLOCK"===_?K():"TK_END_EXPR"===_||"TK_START_EXPR"===_||"TK_END_BLOCK"===_||"."===c.last_text?w(h.wanted_newline):"TK_RESERVED"===_&&"("===h.text||"TK_WORD"===_||"TK_OPERATOR"===_?"TK_RESERVED"===_&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===a?d.space_after_anon_function&&(l.space_before_token=!0):"TK_RESERVED"!==_||!Y(c.last_text,s.line_starters)&&"catch"!==c.last_text||d.space_before_conditional&&(l.space_before_token=!0):l.space_before_token=!0;"("===h.text&&"TK_RESERVED"===_&&"await"===c.last_word&&(l.space_before_token=!0);"("===h.text&&("TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w());v(e),m(),d.space_in_paren&&(l.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;c.mode===Z.Statement;)k();c.multiline_frame&&w("]"===h.text&&S(c.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==_||d.space_in_empty_paren?l.space_before_token=!0:(l.trim(),l.space_before_token=!1));"]"===h.text&&d.keep_array_indentation?(m(),k()):(k(),m());l.remove_redundant_indentation(u),c.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function V(){var e=D(1),t=D(2);t&&(":"===t.text&&Y(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(e.text,["get","set"])&&Y(t.type,["TK_WORD","TK_RESERVED"]))?Y(a,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!e.comments_before.length&&"}"===e.text&&"function"===c.last_word&&"TK_END_EXPR"===_;"expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?"TK_OPERATOR"!==_&&(n||"TK_EQUALS"===_||"TK_RESERVED"===_&&N(c.last_text)&&"else"!==c.last_text)?l.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==_&&"TK_START_EXPR"!==_?"TK_START_BLOCK"===_?K():l.space_before_token=!0:S(u.mode)&&","===c.last_text&&("}"===a?l.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;c.mode===Z.Statement;)k();var e="TK_START_BLOCK"===_;"expand"===d.brace_style?e||K():e||(S(c.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(l.space_before_token=!1);for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();m()},TK_STRING:function j(){O()?l.space_before_token=!0:"TK_RESERVED"===_||"TK_WORD"===_?l.space_before_token=!0:"TK_COMMA"===_||"TK_START_EXPR"===_||"TK_EQUALS"===_||"TK_OPERATOR"===_?y()||w():K();m()},TK_EQUALS:function M(){O();c.declaration_statement&&(c.declaration_assignment=!0);l.space_before_token=!0,m(),l.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===_&&N(c.last_text))return l.space_before_token=!0,void m();if("*"===h.text&&"TK_DOT"===_)return void m();if(":"===h.text&&c.in_case)return c.case_body=!0,b(),m(),K(),void(c.in_case=!1);if("::"===h.text)return void m();"TK_OPERATOR"===_&&w();var e=!0,t=!0;Y(h.text,["--","++","!","~"])||Y(h.text,["-","+"])&&(Y(_,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(c.last_text,s.line_starters)||","===c.last_text)?(t=e=!1,!h.wanted_newline||"--"!==h.text&&"++"!==h.text||K(!1,!0)," "===c.last_text&&A(c.mode)&&(e=!0),"TK_RESERVED"===_?e=!0:"TK_END_EXPR"===_?e=!("]"===c.last_text&&("--"===h.text||"++"===h.text)):"TK_OPERATOR"===_&&(e=Y(h.text,["--","-","++","+"])&&Y(c.last_text,["--","-","++","+"]),Y(h.text,["+","-"])&&Y(c.last_text,["--","++"])&&(t=!0)),c.mode!==Z.BlockStatement&&c.mode!==Z.Statement||"{"!==c.last_text&&" "!==c.last_text||K()):":"===h.text?0===c.ternary_depth?e=!1:c.ternary_depth-=1:"?"===h.text?c.ternary_depth+=1:"*"===h.text&&"TK_RESERVED"===_&&"function"===c.last_text&&(t=e=!1);l.space_before_token=l.space_before_token||e,m(),l.space_before_token=t},TK_COMMA:function W(){if(c.declaration_statement)return A(c.parent.mode)&&(c.declaration_assignment=!1),m(),void(c.declaration_assignment?K(c.declaration_assignment=!1,!0):(l.space_before_token=!0,d.comma_first&&w()));m(),c.mode===Z.ObjectLiteral||c.mode===Z.Statement&&c.parent.mode===Z.ObjectLiteral?(c.mode===Z.Statement&&k(),K()):(l.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(l.raw)return l.add_raw_token(h),void(h.directives&&"end"===h.directives.preserve&&(d.test_output_raw||(l.raw=!1)));if(h.directives)return K(!1,!0),m(),"start"===h.directives.preserve&&(l.raw=!0),void K(!1,!0);if(!Q.newline.test(h.text)&&!h.wanted_newline)return l.space_before_token=!0,m(),void(l.space_before_token=!0);var e,t=function _(e){var t;e=e.replace(/\x0d/g,"");var n=[];t=e.indexOf("\n");for(;-1!==t;)n.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&n.push(e);return n}(h.text),n=!1,i=!1,r=h.whitespace_before,s=r.length;K(!1,!0),1<t.length&&(!function a(e,t){for(var n=0;n<e.length;n++){var i=H(e[n]);if(i.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function o(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(t.slice(1),r)&&(i=!0):n=!0);for(m(t[0]),e=1;e<t.length;e++)K(!1,!0),n?m(" "+t[e].replace(/^\s+/g,"")):i&&t[e].length>s?m(t[e].substring(s)):l.add_token(t[e]);K(!1,!0)},TK_COMMENT:function G(){h.wanted_newline?K(!1,!0):l.trim(!0);l.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:w(")"===c.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===h.text[h.text.length-1]&&K()},TK_EOF:function $(){for(;c.mode===Z.Statement;)k()}},d={},(e=e||{}).braces_on_own_line!==undefined&&(d.brace_style=e.braces_on_own_line?"expand":"collapse"),d.brace_style=e.brace_style?e.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=e.indent_size?parseInt(e.indent_size,10):4,d.indent_char=e.indent_char?e.indent_char:" ",d.eol=e.eol?e.eol:"\n",d.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,d.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,d.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),d.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,d.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,d.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,d.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,d.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,d.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,d.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,d.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),d.e4x=e.e4x!==undefined&&e.e4x,d.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,d.comma_first=e.comma_first!==undefined&&e.comma_first,d.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),e.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0<d.indent_size;)o+=d.indent_char,d.indent_size-=1;var g=0;if(i&&i.length){for(;" "===i.charAt(g)||"\t"===i.charAt(g);)T+=i.charAt(g),g+=1;i=i.substring(g)}function x(e){var t=e.newlines;if(d.keep_array_indentation&&S(c.mode))for(var n=0;n<t;n+=1)K(0<n);else if(d.max_preserve_newlines&&t>d.max_preserve_newlines&&(t=d.max_preserve_newlines),d.preserve_newlines&&1<e.newlines){K();for(var i=1;i<t;i+=1)K(!0)}p[(h=e).type]()}function w(e){if(e=e!==undefined&&e,!l.just_added_newline())if(d.preserve_newlines&&h.wanted_newline||e)K(!1,!0);else if(d.wrap_line_length){l.current_line.get_character_count()+h.text.length+(l.space_before_token?1:0)>=d.wrap_line_length&&K(!1,!0)}}function K(e,t){if(!t&&" "!==c.last_text&&","!==c.last_text&&"="!==c.last_text&&"TK_OPERATOR"!==_)for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();l.add_new_line(e)&&(c.multiline_frame=!0)}function R(){l.just_added_newline()&&(d.keep_array_indentation&&S(c.mode)&&h.wanted_newline?(l.current_line.push(h.whitespace_before),l.space_before_token=!1):l.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function m(e){l.raw?l.add_raw_token(h):(d.comma_first&&"TK_COMMA"===_&&l.just_added_newline()&&","===l.previous_line.last()&&(l.previous_line.pop(),R(),l.add_token(","),l.space_before_token=!0),e=e||h.text,R(),l.add_token(e))}function b(){c.indentation_level+=1}function v(e){u=c?(t.push(c),c):E(null,e),c=E(u,e)}function S(e){return e===Z.ArrayLiteral}function A(e){return Y(e,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0<t.length&&(u=c,c=t.pop(),u.mode===Z.Statement&&l.remove_redundant_indentation(u))}function y(){return c.parent.mode===Z.ObjectLiteral&&c.mode===Z.Statement&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type||"TK_RESERVED"===_&&"do"===c.last_text||"TK_RESERVED"===_&&"return"===c.last_text&&!h.wanted_newline||"TK_RESERVED"===_&&"else"===c.last_text&&("TK_RESERVED"!==h.type||"if"!==h.text)||"TK_END_EXPR"===_&&(u.mode===Z.ForInitializer||u.mode===Z.Conditional)||"TK_WORD"===_&&c.mode===Z.BlockStatement&&!c.in_case&&"--"!==h.text&&"++"!==h.text&&"function"!==a&&"TK_WORD"!==h.type&&"TK_RESERVED"!==h.type||c.mode===Z.ObjectLiteral&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"])))&&(v(Z.Statement),b(),"TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type&&(c.declaration_statement=!0),y()||w("TK_RESERVED"===h.type&&Y(h.text,["do","for","if","while"])),!0)}function N(e){return Y(e,["case","return","do","if","throw","else"])}function D(e){var t=r+(e||0);return t<0||t>=f.length?null:f[t]}function C(){("TK_RESERVED"===h.type&&c.mode!==Z.ObjectLiteral&&Y(h.text,["set","get"])&&(h.type="TK_WORD"),"TK_RESERVED"===h.type&&c.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(h.type="TK_WORD"));if(O()||!h.wanted_newline||A(c.mode)||"TK_OPERATOR"===_&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===_||!d.preserve_newlines&&"TK_RESERVED"===_&&Y(c.last_text,["const","let","const","set","get"])||K(),c.do_block&&!c.do_while){if("TK_RESERVED"===h.type&&"while"===h.text)return l.space_before_token=!0,m(),l.space_before_token=!0,void(c.do_while=!0);K(),c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==h.type||"else"!==h.text){for(;c.mode===Z.Statement;)k();c.if_block=!1,c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===h.type&&("case"===h.text||"default"===h.text&&c.in_case_statement))return K(),(c.case_body||d.jslint_happy)&&(!function e(){0<c.indentation_level&&(!c.parent||c.indentation_level>c.parent.indentation_level)&&(c.indentation_level-=1)}(),c.case_body=!1),m(),c.in_case=!0,void(c.in_case_statement=!0);if("TK_RESERVED"===h.type&&"function"===h.text&&((Y(c.last_text,["}"," "])||l.just_added_newline()&&!Y(c.last_text,["[","{",":","=",","]))&&(l.just_added_blankline()||h.comments_before.length||(K(),K(!0))),"TK_RESERVED"===_||"TK_WORD"===_?"TK_RESERVED"===_&&Y(c.last_text,["get","set","new","return","export","async"])?l.space_before_token=!0:"TK_RESERVED"===_&&"default"===c.last_text&&"export"===a?l.space_before_token=!0:K():"TK_OPERATOR"===_||"="===c.last_text?l.space_before_token=!0:(c.multiline_frame||!A(c.mode)&&!S(c.mode))&&K()),"TK_COMMA"!==_&&"TK_START_EXPR"!==_&&"TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w(),"TK_RESERVED"===h.type&&Y(h.text,["function","get","set"]))return m(),void(c.last_word=h.text);(n="NONE","TK_END_BLOCK"===_?"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?n="NEWLINE":(n="SPACE",l.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===_&&c.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===_&&A(c.mode)?n="SPACE":"TK_STRING"===_?n="NEWLINE":"TK_RESERVED"===_||"TK_WORD"===_||"*"===c.last_text&&"function"===a?n="SPACE":"TK_START_BLOCK"===_?n="NEWLINE":"TK_END_EXPR"===_&&(l.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&(n="else"===c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"]))?"TK_END_BLOCK"!==_||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?K():(l.trim(!0),"}"!==l.current_line.last()&&K(),l.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:"TK_END_EXPR"!==_?"TK_START_EXPR"===_&&"TK_RESERVED"===h.type&&Y(h.text,["const","let","const"])||":"===c.last_text||("TK_RESERVED"===h.type&&"if"===h.text&&"else"===c.last_text?l.space_before_token=!0:K()):"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&K():c.multiline_frame&&S(c.mode)&&","===c.last_text&&"}"===a?K():"SPACE"===n&&(l.space_before_token=!0);m(),c.last_word=h.text,"TK_RESERVED"===h.type&&"do"===h.text&&(c.do_block=!0),"TK_RESERVED"===h.type&&"if"===h.text&&(c.if_block=!0)}_="TK_START_BLOCK",a="",(l=new q(o,T)).raw=d.test_output_raw,t=[],v(Z.BlockStatement),this.beautify=function(){var e,t;for(s=new ee(i,d,o),f=s.tokenize(),r=0;e=D();){for(var n=0;n<e.comments_before.length;n++)x(e.comments_before[n]);x(e),a=c.last_text,_=e.type,c.last_text=e.text,r+=1}return t=l.get_code(),d.end_with_newline&&(t+="\n"),"\n"!=d.eol&&(t=t.replace(/[\n]/g,d.eol)),t}}function s(t){var n=0,i=-1,r=[],s=!0;this.set_indent=function(e){n=t.baseIndentLength+e*t.indent_length,i=e},this.get_character_count=function(){return n},this.is_empty=function(){return s},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),n+=e.length,s=!1},this.pop=function(){var e=null;return s||(e=r.pop(),n-=e.length,s=0===r.length),e},this.remove_indent=function(){0<i&&(i-=1,n-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),n-=1;s=0===r.length},this.toString=function(){var e="";return this._empty||(0<=i&&(e=t.indent_cache[i]),e+=r.join("")),e}}function q(t,n){n=n||"",this.indent_cache=[n],this.baseIndentLength=n.length,this.indent_length=t.length,this.raw=!1;var i=[];this.baseIndentString=n,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 s(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.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 i.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<i.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==Z.ForInitializer&&e.mode!==Z.Conditional)for(var t=e.start_line_index,n=i.length;t<n;)i[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,n);e&&1<i.length&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=1<i.length?i[i.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===i.length||i[i.length-2].is_empty())}}var J=function J(e,t,n,i,r,s){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=i||"",this.parent=null,this.directives=null};function ee(k,y,e){var O="\n\r\t ".split(""),N=/[0-9]/,D=/[01234567]/,C=/[0123456789abcdefABCDEF]/,L="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function _(){var e,t,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];t=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,_=N;for("0"===i&&j<M&&/[Xxo]/.test(k.charAt(j))?(s=r=!1,i+=k.charAt(j),j+=1,_=/[o]/.test(k.charAt(j))?D:C):(i="",j-=1);j<M&&_.test(k.charAt(j));)i+=k.charAt(j),j+=1,r&&j<M&&"."===k.charAt(j)&&(i+=k.charAt(j),j+=1,r=!1),s&&j<M&&/[Ee]/.test(k.charAt(j))&&(i+=k.charAt(j),(j+=1)<M&&/[+-]/.test(k.charAt(j))&&(i+=k.charAt(j),j+=1),r=s=!1);return[i,"TK_WORD"]}if(Q.isIdentifierStart(k.charCodeAt(j-1))){if(j<M)for(;Q.isIdentifierChar(k.charCodeAt(j))&&(i+=k.charAt(j),(j+=1)!==M););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&Y(t.text,["set","get"])||!Y(i,U)?[i,"TK_WORD"]:"in"===i?[i,"TK_OPERATOR"]:[i,"TK_RESERVED"]}if("("===i||"["===i)return[i,"TK_START_EXPR"];if(")"===i||"]"===i)return[i,"TK_END_EXPR"];if("{"===i)return[i,"TK_START_BLOCK"];if("}"===i)return[i,"TK_END_BLOCK"];if(" "===i)return[i,"TK_SEMICOLON"];if("/"===i){var a="";if("*"===k.charAt(j)){j+=1,W.lastIndex=j;var o=W.exec(k);a="/*"+o[0],j+=o[0].length;var l=function S(e){if(!e.match(G))return null;var t={};X.lastIndex=0;for(var n=X.exec(e);n;)t[n[1]]=n[2],n=X.exec(e);return t}(a);return l&&"start"===l.ignore&&(F.lastIndex=j,a+=(o=F.exec(k))[0],j+=o[0].length),[a=a.replace(Q.lineBreak,"\n"),"TK_BLOCK_COMMENT",l]}if("/"===k.charAt(j)){j+=1,z.lastIndex=j;var h=z.exec(k);return a="//"+h[0],j+=h[0].length,[a,"TK_COMMENT"]}}if("`"===i||"'"===i||'"'===i||("/"===i||y.e4x&&"<"===i&&k.slice(j-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&Y(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&Y(t.parent.text,["if","while","for"])||Y(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var c=i,u=!1,p=!1;if(e=i,"/"===c)for(var d=!1;j<M&&(u||d||k.charAt(j)!==c)&&!Q.newline.test(k.charAt(j));)e+=k.charAt(j),u?u=!1:(u="\\"===k.charAt(j),"["===k.charAt(j)?d=!0:"]"===k.charAt(j)&&(d=!1)),j+=1;else if(y.e4x&&"<"===c){var f=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j<M&&(u||k.charAt(j)!==c&&("`"===c||!Q.newline.test(k.charAt(j))));)(u||"`"===c)&&Q.newline.test(k.charAt(j))?("\r"===k.charAt(j)&&"\n"===k.charAt(j+1)&&(j+=1),e+="\n"):e+=k.charAt(j),u=u?("x"!==k.charAt(j)&&"u"!==k.charAt(j)||(p=!0),!1):"\\"===k.charAt(j),j+=1;if(p&&y.unescape_strings&&(e=function A(e){var t,n=!1,i="",r=0,s="",_=0;for(;n||r<e.length;)if(t=e.charAt(r),r++,n){if(n=!1,"x"===t)s=e.substr(r,2),r+=2;else{if("u"!==t){i+="\\"+t;continue}s=e.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(_=parseInt(s,16))&&_<32){i+="x"===t?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===t&&126<_&&_<=255)return e;i+=String.fromCharCode(_)}}else"\\"===t?n=!0:i+=t;return i}(e)),j<M&&k.charAt(j)===c&&(e+=c,j+=1,"/"===c))for(;j<M&&Q.isIdentifierStart(k.charCodeAt(j));)e+=k.charAt(j),j+=1;return[e,"TK_STRING"]}if("#"===i){if(0===B.length&&"!"===k.charAt(j)){for(e=i;j<M&&"\n"!==i;)e+=i=k.charAt(j),j+=1;return[H(e)+"\n","TK_UNKNOWN"]}var b="#";if(j<M&&N.test(k.charAt(j))){for(;b+=i=k.charAt(j),(j+=1)<M&&"#"!==i&&"="!==i;);return"#"===i||("["===k.charAt(j)&&"]"===k.charAt(j+1)?(b+="[]",j+=2):"{"===k.charAt(j)&&"}"===k.charAt(j+1)&&(b+="{}",j+=2)),[b,"TK_WORD"]}}if("<"===i&&("?"===k.charAt(j)||"%"===k.charAt(j))){$.lastIndex=j-1;var v=$.exec(k);if(v)return i=v[0],j+=i.length-1,[i=i.replace(Q.lineBreak,"\n"),"TK_STRING"]}if("<"===i&&"\x3c!--"===k.substring(j-1,j+3)){for(j+=3,i="\x3c!--";!Q.newline.test(k.charAt(j))&&j<M;)i+=k.charAt(j),j++;return P=!0,[i,"TK_COMMENT"]}if("-"===i&&P&&"--\x3e"===k.substring(j-1,j+2))return P=!1,j+=2,["--\x3e","TK_COMMENT"];if("."===i)return[i,"TK_DOT"];if(Y(i,L)){for(;j<M&&Y(i+k.charAt(j),L)&&(i+=k.charAt(j),!(M<=(j+=1))););return","===i?[i,"TK_COMMA"]:"="===i?[i,"TK_EQUALS"]:[i,"TK_OPERATOR"]}return[i,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,n;M=k.length,j=0,P=!1,B=[];for(var i=null,r=[],s=[];!t||"TK_EOF"!==t.type;){for(n=_(),e=new J(n[1],n[0],I,V);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=n[2]),s.push(e),n=_(),e=new J(n[1],n[0],I,V);s.length&&(e.comments_before=s,s=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(i),i=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&i&&("]"===e.text&&"["===i.text||")"===e.text&&"("===i.text||"}"===e.text&&"{"===i.text)&&(e.parent=i.parent,i=r.pop()),B.push(e),t=e}return B}}return{run:function N(e,t){function _(e){return e.replace(/\s+$/g,"")}var n,i,r,T,s,a,E,o,l,g,x,w,h,c;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),i=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),T=t.indent_char===undefined?" ":t.indent_char,a=t.brace_style===undefined?"collapse":t.brace_style,s=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),E=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"],o=t.preserve_newlines===undefined||t.preserve_newlines,l=o?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,g=t.indent_handlebars!==undefined&&t.indent_handlebars,x=t.wrap_attributes===undefined?"auto":t.wrap_attributes,w=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,h=t.end_with_newline!==undefined&&t.end_with_newline,c=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&&(T="\t",r=1),(n=new function k(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=i,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:c,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])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);)o&&"\n"===e&&this.newlines<=l&&(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(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)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="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var h=0;h<w;h++)r.push(T)}for(var c=0;c<r.length;c++)if(" "===r[c]){a=!1;break}}if(g&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(t=this.pos-1,n="<"),g&&!n&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(g&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(g&&"{"===n&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("</"+f+">",d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(f),this.tag_type="SCRIPT"):"style"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search("text/css"))?e||(this.record_tag(f),this.tag_type="STYLE"):"!"===f.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===f.charAt(0)?(this.retrieve_tag(f.substring(1)),this.tag_type="END"):(this.record_tag(f),"html"!=f.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(f,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=o,this.line_char_count=l),r.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==n[n.length-1]||-1==t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!")?(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(e,r));return i},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_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+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 n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s<this.indent_size;s++)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]=_(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=_(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,T,r,s,a);;){var u=n.get_token();if(n.token_text=u[0],n.token_type=u[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var p=n.token_text.match(/\w+/)[0],d=null;n.output.length&&(d=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===d||d[1]!=p&&!n.Utils.in_array(d[1],E))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z-]+)/i);f&&n.Utils.in_array(f[1],E)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var K=n.token_text,R=void 0,m=1;"TK_SCRIPT"===n.token_type?R=O:"TK_STYLE"===n.token_type&&(R=y),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-n.indent_level);var b=n.get_full_indent(m);if(R)K=R(K.replace(/^\s*/,b),t);else{var v=K.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,S=n.get_full_indent(m-v);K=K.replace(/^\s*/,b).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}K&&(n.print_token_raw(K),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var A=n.output.join("").replace(/[\r\n\t ]+$/,"");return h&&(A+="\n"),A}}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"]}),e.PLUGINS.codeView=function(l){var d,c,f=l.$;function h(){return l.$box.hasClass("fr-code-view")}function p(){return c?c.getValue():d.val()}function u(){h()&&(c&&c.setSize(null,l.opts.height?l.opts.height:"auto"),l.opts.heightMin||l.opts.height?l.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",l.opts.heightMin||l.opts.height):l.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var g,m=!1;function b(){h()&&l.events.trigger("blur")}function v(){h()&&m&&l.events.trigger("focus")}function n(e){d||(!function(){d=f('<textarea class="fr-code" tabIndex="-1">'),l.$wp.append(d),d.attr("dir",l.opts.direction),l.$box.hasClass("fr-basic")||(g=f('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'+(l.helpers.isMobile()?"":" fr-desktop")+'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>'),l.$box.append(g),l.events.bindClick(l.$box,"a.html-switch",function(){l.events.trigger("commands.before",["html"]),M(!1),l.events.trigger("commands.after",["html"])}));var e=function(){return!h()};l.events.on("buttons.refresh",e),l.events.on("copy",e,!0),l.events.on("cut",e,!0),l.events.on("paste",e,!0),l.events.on("destroy",w,!0),l.events.on("html.set",function(){h()&&M(!0)}),l.events.on("codeView.update",u),l.events.on("codeView.toggle",function(){l.$box.hasClass("fr-code-view")&&M()}),l.events.on("form.submit",function(){h()&&(l.html.set(p()),l.events.trigger("contentChanged",[],!0))},!0)}(),!c&&l.opts.codeMirror?((c=l.opts.codeMirror.fromTextArea(d.get(0),l.opts.codeMirrorOptions)).on("blur",b),c.on("focus",v)):(l.events.$on(d,"keydown keyup change input",function(){l.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height=this.scrollHeight+"px")}),l.events.$on(d,"blur",b),l.events.$on(d,"focus",v))),l.undo.saveStep(),l.html.cleanEmptyTags(),l.html.cleanWhiteTags(!0),l.core.hasFocus()&&(l.core.isEmpty()||(l.selection.save(),l.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),l.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=l.html.get(!1,!0);l.$el.find("span.fr-tmp").remove(),l.$box.toggleClass("fr-code-view",!0);var r,o,n=!1;if(l.core.hasFocus()&&(n=!0,l.events.disableBlur(),l.$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"),l.codeBeautifier&&(t=l.codeBeautifier.run(t,l.opts.codeBeautifierOptions)),c){r=t.indexOf("FROALA-SM"),(o=t.indexOf("FROALA-EM"))<r?r=o:o-=9;var s=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,r).length-t.substring(0,r).replace(/\n/g,"").length,i=t.substring(0,o).length-t.substring(0,o).replace(/\n/g,"").length;r=t.substring(0,r).length-t.substring(0,t.substring(0,r).lastIndexOf("\n")+1).length,o=t.substring(0,o).length-t.substring(0,t.substring(0,o).lastIndexOf("\n")+1).length,c.setSize(null,l.opts.height?l.opts.height:"auto"),l.opts.heightMin&&l.$box.find(".CodeMirror-scroll").css("min-height",l.opts.heightMin),c.setValue(t),m=!n,c.focus(),m=!0,c.setSelection({line:s,ch:r},{line:i,ch:o}),c.refresh(),c.clearHistory()}else{r=t.indexOf("FROALA-SM"),o=t.indexOf("FROALA-EM")-9,l.opts.heightMin&&d.css("min-height",l.opts.heightMin),l.opts.height&&d.css("height",l.opts.height),l.opts.heightMax&&d.css("max-height",l.opts.height||l.opts.heightMax),d.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var a=f(l.o_doc).scrollTop();m=!n,d.focus(),m=!0,d.get(0).setSelectionRange(r,o),f(l.o_doc).scrollTop(a)}l.$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 l.opts.codeViewKeepActiveButtons.indexOf(f(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!l.helpers.isMobile()&&l.opts.toolbarInline&&l.toolbar.hide()}function M(e){void 0===e&&(e=!h());var t,r,o=l.$tb.find('.fr-command[data-cmd="html"]');e?(l.popups.hideAll(),n(o)):(l.$box.toggleClass("fr-code-view",!1),t=o,r=p(),l.html.set(r),l.$el.blur(),l.$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(t).removeClass("fr-disabled").attr("aria-disabled",!1),t.removeClass("fr-active").attr("aria-pressed",!1),l.selection.setAtStart(l.el),l.selection.restore(),l.placeholder.refresh(),l.undo.saveStep())}function w(){h()&&M(!1),c&&c.toTextArea(),d.val("").removeData().remove(),d=null,g&&(g.remove(),g=null)}return{_init:function(){if(l.events.on("focus",function(){var e;l.opts.toolbarContainer&&(e=l.$tb.find('.fr-command[data-cmd="html"]'),h()?(l.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return l.opts.codeViewKeepActiveButtons.indexOf(f(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(l.$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)))}),!l.$wp)return!1},toggle:M,isActive:h,get:p}},e.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),e.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"]}),e.PLUGINS.codeView=function(d){var c,f,h=d.$;function p(){return d.$box.hasClass("fr-code-view")}function u(){return f?f.getValue():c.val()}function g(){p()&&(f&&f.setSize(null,d.opts.height?d.opts.height:"auto"),d.opts.heightMin||d.opts.height?d.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",d.opts.heightMin||d.opts.height):d.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var m,b=!1;function v(){p()&&d.events.trigger("blur")}function M(){p()&&b&&d.events.trigger("focus")}function o(e){c||(!function l(){c=h('<textarea class="fr-code" tabIndex="-1">'),d.$wp.append(c),c.attr("dir",d.opts.direction),d.$box.hasClass("fr-basic")||(m=h('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'+(d.helpers.isMobile()?"":" fr-desktop")+'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>'),d.$box.append(m),d.events.bindClick(d.$box,"a.html-switch",function(){d.events.trigger("commands.before",["html"]),w(!1),d.events.trigger("commands.after",["html"])}));var e=function e(){return!p()};d.events.on("buttons.refresh",e),d.events.on("copy",e,!0),d.events.on("cut",e,!0),d.events.on("paste",e,!0),d.events.on("destroy",x,!0),d.events.on("html.set",function(){p()&&w(!0)}),d.events.on("codeView.update",g),d.events.on("codeView.toggle",function(){d.$box.hasClass("fr-code-view")&&w()}),d.events.on("form.submit",function(){p()&&(d.html.set(u()),d.events.trigger("contentChanged",[],!0))},!0)}(),!f&&d.opts.codeMirror?((f=d.opts.codeMirror.fromTextArea(c.get(0),d.opts.codeMirrorOptions)).on("blur",v),f.on("focus",M)):(d.events.$on(c,"keydown keyup change input",function(){d.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height=this.scrollHeight+"px")}),d.events.$on(c,"blur",v),d.events.$on(c,"focus",M))),d.undo.saveStep(),d.html.cleanEmptyTags(),d.html.cleanWhiteTags(!0),d.core.hasFocus()&&(d.core.isEmpty()||(d.selection.save(),d.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),d.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var t=d.html.get(!1,!0);d.$el.find("span.fr-tmp").remove(),d.$box.toggleClass("fr-code-view",!0);var r,o,n=!1;if(d.core.hasFocus()&&(n=!0,d.events.disableBlur(),d.$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"),d.codeBeautifier&&(t=d.codeBeautifier.run(t,d.opts.codeBeautifierOptions)),f){r=t.indexOf("FROALA-SM"),(o=t.indexOf("FROALA-EM"))<r?r=o:o-=9;var s=(t=t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,r).length-t.substring(0,r).replace(/\n/g,"").length,i=t.substring(0,o).length-t.substring(0,o).replace(/\n/g,"").length;r=t.substring(0,r).length-t.substring(0,t.substring(0,r).lastIndexOf("\n")+1).length,o=t.substring(0,o).length-t.substring(0,t.substring(0,o).lastIndexOf("\n")+1).length,f.setSize(null,d.opts.height?d.opts.height:"auto"),d.opts.heightMin&&d.$box.find(".CodeMirror-scroll").css("min-height",d.opts.heightMin),f.setValue(t),b=!n,f.focus(),b=!0,f.setSelection({line:s,ch:r},{line:i,ch:o}),f.refresh(),f.clearHistory()}else{r=t.indexOf("FROALA-SM"),o=t.indexOf("FROALA-EM")-9,d.opts.heightMin&&c.css("min-height",d.opts.heightMin),d.opts.height&&c.css("height",d.opts.height),d.opts.heightMax&&c.css("max-height",d.opts.height||d.opts.heightMax),c.val(t.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var a=h(d.o_doc).scrollTop();b=!n,c.focus(),b=!0,c.get(0).setSelectionRange(r,o),h(d.o_doc).scrollTop(a)}d.$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 d.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!0),e.addClass("fr-active").attr("aria-pressed",!0),!d.helpers.isMobile()&&d.opts.toolbarInline&&d.toolbar.hide()}function w(e){void 0===e&&(e=!p());var t=d.$tb.find('.fr-command[data-cmd="html"]');e?(d.popups.hideAll(),o(t)):(d.$box.toggleClass("fr-code-view",!1),function r(e){var t=u();d.html.set(t),d.$el.blur(),d.$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),d.selection.setAtStart(d.el),d.selection.restore(),d.placeholder.refresh(),d.undo.saveStep()}(t))}function x(){p()&&w(!1),f&&f.toTextArea(),c.val("").removeData().remove(),c=null,m&&(m.remove(),m=null)}return{_init:function e(){if(d.events.on("focus",function(){d.opts.toolbarContainer&&function t(){var e=d.$tb.find('.fr-command[data-cmd="html"]');p()?(d.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(e).filter(function(){return d.opts.codeViewKeepActiveButtons.indexOf(h(this).data("cmd"))<0}).addClass("fr-disabled").attr("aria-disabled",!1),e.addClass("fr-active").attr("aria-pressed",!1)):(d.$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))}()}),!d.$wp)return!1},toggle:w,isActive:p,get:u}},e.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),e.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(o.FroalaEditor)}(this,function(k){"use strict";k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(k.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","|","-"]}),k.PLUGINS.colors=function(g){var E=g.$,n='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(g.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(g.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(g.language.translate("OK"),"</button></div></div>");function l(o){for(var t="text"===o?g.opts.colorsText:g.opts.colorsBackground,r='<div class="fr-color-set fr-'.concat(o,'-color fr-selected-set">'),e=0;e<t.length;e++)0!==e&&e%g.opts.colorsStep==0&&(r+="<br>"),"REMOVE"!==t[e]?r+='<span class="fr-command fr-select-color" style="background:'.concat(t[e],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(o,'Color" \n data-param1="').concat(t[e],'"><span class="fr-sr-only"> ').concat(g.language.translate("Color")).concat(t[e]," \n </span></span>"):r+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(o,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(g.language.translate("Clear Formatting"),'">').concat(g.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(g.language.translate("Clear Formatting")," </span></span>");return r+"</div>"}function s(o){var t,r=g.popups.get("".concat(o,"Color.picker")),e=E(g.selection.element());t="background"===o?"background-color":"color";var a=r.find(".fr-".concat(o,"-color .fr-select-color"));for(a.find(".fr-selected-color").remove(),a.removeClass("fr-active-item"),a.not('[data-param1="REMOVE"]').attr("aria-selected",!1);e.get(0)!==g.el;){if("transparent"!==e.css(t)&&"rgba(0, 0, 0, 0)"!==e.css(t)){var c=r.find(".fr-".concat(o,'-color .fr-select-color[data-param1="').concat(g.helpers.RGBToHex(e.css(t)),'"]'));c.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),c.addClass("fr-active-item").attr("aria-selected",!0);break}e=e.parent()}!function(o){var t=g.popups.get("".concat(o,"Color.picker")),r=t.find(".fr-".concat(o,"-color .fr-active-item")).attr("data-param1"),e=t.find(".fr-color-hex-layer input");r||(r="");e.length&&E(e.val(r).input).trigger("change")}(o)}function e(o){"REMOVE"!==o?g.format.applyStyle("background-color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("background-color"),g.popups.hide("backgroundColor.picker")}function a(o){"REMOVE"!==o?g.format.applyStyle("color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("color"),g.popups.hide("textColor.picker")}return{showColorsPopup:function(o){var t=g.$tb.find('.fr-command[data-cmd="'.concat(o,'"]')),r=g.popups.get("".concat(o,".picker"));if(r||(r=function(o){var t="";g.opts.toolbarInline&&0<g.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(g.button.buildList(g.opts.colorsButtons),"\n </div>"));var r,e="";"textColor"===o?(g.opts.colorsHEXInput&&(e=n.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(g.id)).replace(/\[COMMAND\]/g,"customTextColor")),r={buttons:t,text_colors:l("text"),custom_color:e}):(g.opts.colorsHEXInput&&(e=n.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(g.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),r={buttons:t,background_colors:l("background"),custom_color:e});var C,b,a=g.popups.create("".concat(o,".picker"),r);return C=a,b="".concat(o,".picker"),g.events.on("popup.tab",function(o){var t=E(o.currentTarget);if(!g.popups.isVisible(b)||!t.is("span"))return!0;var r=o.which,e=!0;if(k.KEYCODE.TAB===r){var a=C.find(".fr-buttons");e=!g.accessibility.focusToolbar(a,!!o.shiftKey)}else if(k.KEYCODE.ARROW_UP===r||k.KEYCODE.ARROW_DOWN===r||k.KEYCODE.ARROW_LEFT===r||k.KEYCODE.ARROW_RIGHT===r){if(t.is("span.fr-select-color")){var c=t.parent().find("span.fr-select-color"),n=c.index(t),l=g.opts.colorsStep,s=Math.floor(c.length/l),i=n%l,p=Math.floor(n/l),u=p*l+i,d=s*l;k.KEYCODE.ARROW_UP===r?u=((u-l)%d+d)%d:k.KEYCODE.ARROW_DOWN===r?u=(u+l)%d:k.KEYCODE.ARROW_LEFT===r?u=((u-1)%d+d)%d:k.KEYCODE.ARROW_RIGHT===r&&(u=(u+1)%d);var f=E(c.get(u));g.events.disableBlur(),f.focus(),e=!1}}else k.KEYCODE.ENTER===r&&(g.button.exec(t),e=!1);return!1===e&&(o.preventDefault(),o.stopPropagation()),e},!0),a}(o)),!r.hasClass("fr-active"))if(g.popups.setContainer("".concat(o,".picker"),g.$tb),s("textColor"===o?"text":"background"),t.isVisible()){var e=g.button.getPosition(t),a=e.left,c=e.top;g.popups.show("".concat(o,".picker"),a,c,t.outerHeight())}else g.position.forSelection(r),g.popups.show("".concat(o,".picker"))},background:e,customColor:function(o){var t=g.popups.get("".concat(o,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var r=t.val();"background"===o?e(r):a(r)}},text:a,back:function(){g.popups.hide("textColor.picker"),g.popups.hide("backgroundColor.picker"),g.toolbar.showInline()}}},k.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),k.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")}}),k.RegisterCommand("applytextColor",{undo:!0,callback:function(o,t){this.colors.text(t)}}),k.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),k.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),k.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")}}),k.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(o,t){this.colors.background(t)}}),k.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),k.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),k.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),k.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"})}); | ||
!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(o.FroalaEditor)}(this,function(k){"use strict";k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(k.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","|","-"]}),k.PLUGINS.colors=function(g){var E=g.$,l='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n '.concat(g.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n type="text" placeholder="').concat(g.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(g.language.translate("OK"),"</button></div></div>");function s(o){for(var t="text"===o?g.opts.colorsText:g.opts.colorsBackground,r='<div class="fr-color-set fr-'.concat(o,'-color fr-selected-set">'),e=0;e<t.length;e++)0!==e&&e%g.opts.colorsStep==0&&(r+="<br>"),"REMOVE"!==t[e]?r+='<span class="fr-command fr-select-color" style="background:'.concat(t[e],';" \n tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(o,'Color" \n data-param1="').concat(t[e],'"><span class="fr-sr-only"> ').concat(g.language.translate("Color")).concat(t[e]," \n </span></span>"):r+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(o,'Color"\n tabIndex="-1" role="button" data-param1="REMOVE" \n title="').concat(g.language.translate("Clear Formatting"),'">').concat(g.icon.create("remove"),' \n <span class="fr-sr-only"> ').concat(g.language.translate("Clear Formatting")," </span></span>");return r+"</div>"}function i(o){var t,r=g.popups.get("".concat(o,"Color.picker")),e=E(g.selection.element());t="background"===o?"background-color":"color";var a=r.find(".fr-".concat(o,"-color .fr-select-color"));for(a.find(".fr-selected-color").remove(),a.removeClass("fr-active-item"),a.not('[data-param1="REMOVE"]').attr("aria-selected",!1);e.get(0)!==g.el;){if("transparent"!==e.css(t)&&"rgba(0, 0, 0, 0)"!==e.css(t)){var c=r.find(".fr-".concat(o,'-color .fr-select-color[data-param1="').concat(g.helpers.RGBToHex(e.css(t)),'"]'));c.append('<span class="fr-selected-color" aria-hidden="true">\uf00c</span>'),c.addClass("fr-active-item").attr("aria-selected",!0);break}e=e.parent()}!function n(o){var t=g.popups.get("".concat(o,"Color.picker")),r=t.find(".fr-".concat(o,"-color .fr-active-item")).attr("data-param1"),e=t.find(".fr-color-hex-layer input");r||(r="");e.length&&E(e.val(r).input).trigger("change")}(o)}function e(o){"REMOVE"!==o?g.format.applyStyle("background-color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("background-color"),g.popups.hide("backgroundColor.picker")}function a(o){"REMOVE"!==o?g.format.applyStyle("color",g.helpers.HEXtoRGB(o)):g.format.removeStyle("color"),g.popups.hide("textColor.picker")}return{showColorsPopup:function p(o){var t=g.$tb.find('.fr-command[data-cmd="'.concat(o,'"]')),r=g.popups.get("".concat(o,".picker"));if(r||(r=function n(o){var t="";g.opts.toolbarInline&&0<g.opts.colorsButtons.length&&(t+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n '.concat(g.button.buildList(g.opts.colorsButtons),"\n </div>"));var r,e="";r="textColor"===o?(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(g.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:t,text_colors:s("text"),custom_color:e}):(g.opts.colorsHEXInput&&(e=l.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(g.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:t,background_colors:s("background"),custom_color:e});var a=g.popups.create("".concat(o,".picker"),r);return function c(C,b){g.events.on("popup.tab",function(o){var t=E(o.currentTarget);if(!g.popups.isVisible(b)||!t.is("span"))return!0;var r=o.which,e=!0;if(k.KEYCODE.TAB===r){var a=C.find(".fr-buttons");e=!g.accessibility.focusToolbar(a,!!o.shiftKey)}else if(k.KEYCODE.ARROW_UP===r||k.KEYCODE.ARROW_DOWN===r||k.KEYCODE.ARROW_LEFT===r||k.KEYCODE.ARROW_RIGHT===r){if(t.is("span.fr-select-color")){var c=t.parent().find("span.fr-select-color"),n=c.index(t),l=g.opts.colorsStep,s=Math.floor(c.length/l),i=n%l,p=Math.floor(n/l),u=p*l+i,d=s*l;k.KEYCODE.ARROW_UP===r?u=((u-l)%d+d)%d:k.KEYCODE.ARROW_DOWN===r?u=(u+l)%d:k.KEYCODE.ARROW_LEFT===r?u=((u-1)%d+d)%d:k.KEYCODE.ARROW_RIGHT===r&&(u=(u+1)%d);var f=E(c.get(u));g.events.disableBlur(),f.focus(),e=!1}}else k.KEYCODE.ENTER===r&&(g.button.exec(t),e=!1);return!1===e&&(o.preventDefault(),o.stopPropagation()),e},!0)}(a,"".concat(o,".picker")),a}(o)),!r.hasClass("fr-active"))if(g.popups.setContainer("".concat(o,".picker"),g.$tb),i("textColor"===o?"text":"background"),t.isVisible()){var e=g.button.getPosition(t),a=e.left,c=e.top;g.popups.show("".concat(o,".picker"),a,c,t.outerHeight())}else g.position.forSelection(r),g.popups.show("".concat(o,".picker"))},background:e,customColor:function c(o){var t=g.popups.get("".concat(o,"Color.picker")).find(".fr-color-hex-layer input");if(t.length){var r=t.val();"background"===o?e(r):a(r)}},text:a,back:function o(){g.popups.hide("textColor.picker"),g.popups.hide("backgroundColor.picker"),g.toolbar.showInline()}}},k.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),k.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")}}),k.RegisterCommand("applytextColor",{undo:!0,callback:function(o,t){this.colors.text(t)}}),k.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),k.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),k.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")}}),k.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(o,t){this.colors.background(t)}}),k.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),k.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),k.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),k.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(m){"use strict";m=m&&m.hasOwnProperty("default")?m["default"]:m,Object.assign(m.DEFAULTS,{dragInline:!0}),m.PLUGINS.draggable=function(f){var g,d=f.$;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]),d(e.target).hasClass("fr-draggable")?(f.undo.canDo()||f.undo.saveStep(),f.opts.dragInline?f.$el.attr("contenteditable",!0):f.$el.attr("contenteditable",!1),f.opts.toolbarInline&&f.toolbar.hide(),d(e.target).addClass("fr-dragging"),f.browser.msie||f.browser.edge||f.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}function p(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||f.node.isElement(e)))}function v(e,t,r){if(f.opts.iframe){var n=f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-top")),a=f.helpers.getPX(f.$wp.find(".fr-iframe").css("padding-left"));e+=f.$iframe.offset().top+n,t+=f.$iframe.offset().left+a}g.offset().top!==e&&g.css("top",e),g.offset().left!==t&&g.css("left",t),g.width()!==r&&g.css("width",r)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",f.opts.dragInline?function(){for(var e=null,t=0;t<m.INSTANCES.length;t++)if((e=m.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||!f.browser.msie&&!f.browser.edge||e.preventDefault():(e.preventDefault(),function(e){var t=f.doc.elementFromPoint(e.originalEvent.pageX-f.win.pageXOffset,e.originalEvent.pageY-f.win.pageYOffset);if(!p(t)){for(var r=0,n=t;!p(n)&&n===t&&0<e.originalEvent.pageY-f.win.pageYOffset-r;)r++,n=f.doc.elementFromPoint(e.originalEvent.pageX-f.win.pageXOffset,e.originalEvent.pageY-f.win.pageYOffset-r);(!p(n)||g&&0===f.$el.find(n).length&&n!==g.get(0))&&(n=null);for(var a=0,o=t;!p(o)&&o===t&&e.originalEvent.pageY-f.win.pageYOffset+a<d(f.doc).height();)a++,o=f.doc.elementFromPoint(e.originalEvent.pageX-f.win.pageXOffset,e.originalEvent.pageY-f.win.pageYOffset+a);(!p(o)||g&&0===f.$el.find(o).length&&o!==g.get(0))&&(o=null),t=null===o&&n?n:o&&null===n?o:o&&n?r<a?n:o:null}if(d(t).hasClass("fr-drag-helper"))return;if(t&&!f.node.isBlock(t)&&(t=f.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=d(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=d(t).parents("UL, OL").get(0)),t&&!d(t).hasClass("fr-drag-helper")){var i;g||(m.$draggable_helper||(m.$draggable_helper=d(document.createElement("div")).attr("class","fr-drag-helper")),g=m.$draggable_helper,f.events.on("shared.destroy",function(){g.html("").removeData().remove(),g=null},!0)),i=e.originalEvent.pageY<d(t).offset().top+d(t).outerHeight()/2;var l=d(t),s=0;i||0!==l.next().length?(i||(l=l.next()),"before"===g.data("fr-position")&&l.is(g.data("fr-tag"))||(0<l.prev().length&&(s=parseFloat(l.prev().css("margin-bottom"))||0),s=Math.max(s,parseFloat(l.css("margin-top"))||0),v(l.offset().top-s/2-f.$box.offset().top,l.offset().left-f.win.pageXOffset-f.$box.offset().left,l.width()),g.data("fr-position","before"))):"after"===g.data("fr-position")&&l.is(g.data("fr-tag"))||(s=parseFloat(l.css("margin-bottom"))||0,v(l.offset().top+d(t).height()+s/2-f.$box.offset().top,l.offset().left-f.win.pageXOffset-f.$box.offset().left,l.width()),g.data("fr-position","after")),g.data("fr-tag",l),g.addClass("fr-visible"),f.$box.append(g)}else g&&0<f.$box.find(g).length&&g.removeClass("fr-visible")}(e))}function r(e){e.originalEvent.dataTransfer.dropEffect="move",f.opts.dragInline||e.preventDefault()}function n(e){f.$el.attr("contenteditable",!0);var t=f.$el.find(".fr-dragging");g&&g.hasClass("fr-visible")&&f.$box.find(g).length?a(e):t.length&&(e.preventDefault(),e.stopPropagation()),g&&f.$box.find(g).length&&g.removeClass("fr-visible"),t.removeClass("fr-dragging")}function a(e){var t,r;f.$el.attr("contenteditable",!0);for(var n=0;n<m.INSTANCES.length;n++)if((t=m.INSTANCES[n].$el.find(".fr-dragging")).length){r=m.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),g&&g.hasClass("fr-visible")&&f.$box.find(g).length)g.data("fr-tag")[g.data("fr-position")]('<span class="fr-marker"></span>'),g.removeClass("fr-visible");else if(!1===f.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=f.events.chainTrigger("element.beforeDrop",t)))return!1;var a=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(a=t.parent()),f.core.isEmpty())f.events.focus();else f.$el.find(".fr-marker").replaceWith(m.MARKERS),f.selection.restore();if(r===f||f.undo.canDo()||f.undo.saveStep(),f.core.isEmpty())f.$el.html(a);else{var o=f.markers.insert();0===a.find(o).length?d(o).replaceWith(a):0===t.find(o).length&&d(o).replaceWith(t),t.after(m.MARKERS),f.selection.restore()}return f.popups.hideAll(),f.selection.save(),f.$el.find(f.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(f.opts.htmlAllowedEmptyTags.join(",")).remove(),f.html.wrap(),f.html.fillEmptyBlocks(),f.selection.restore(),f.undo.saveStep(),f.opts.iframe&&f.size.syncIframe(),r!==f&&(r.popups.hideAll(),r.$el.find(r.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),r.html.wrap(),r.html.fillEmptyBlocks(),r.undo.saveStep(),r.events.trigger("element.dropped"),r.opts.iframe&&r.size.syncIframe()),f.events.trigger("element.dropped",[a]),!1}g&&g.removeClass("fr-visible"),f.undo.canDo()||f.undo.saveStep(),setTimeout(function(){f.undo.saveStep()},0)}function o(e){if(e&&"DIV"===e.tagName&&f.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"),r=0;r<t.length;r++)t[r].parentNode.removeChild(t[r])}return{_init:function(){f.opts.enter===m.ENTER_BR&&(f.opts.dragInline=!0),f.events.on("dragstart",e,!0),f.events.on("dragover",t,!0),f.events.on("dragenter",r,!0),f.events.on("document.dragend",n,!0),f.events.on("document.drop",n,!0),f.events.on("drop",a,!0),f.events.on("html.processGet",o)}}}}); | ||
!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(c){"use strict";c=c&&c.hasOwnProperty("default")?c["default"]:c,Object.assign(c.DEFAULTS,{dragInline:!0}),c.PLUGINS.draggable=function(g){var d,p=g.$;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]),p(e.target).hasClass("fr-draggable")?(g.undo.canDo()||g.undo.saveStep(),g.opts.dragInline?g.$el.attr("contenteditable",!0):g.$el.attr("contenteditable",!1),g.opts.toolbarInline&&g.toolbar.hide(),p(e.target).addClass("fr-dragging"),g.browser.msie||g.browser.edge||g.selection.clear(),void e.originalEvent.dataTransfer.setData("text","Froala")):(e.preventDefault(),!1))}function v(e){return!(e&&("HTML"===e.tagName||"BODY"===e.tagName||g.node.isElement(e)))}function m(e,t,r){if(g.opts.iframe){var n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),a=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));e+=g.$iframe.offset().top+n,t+=g.$iframe.offset().left+a}d.offset().top!==e&&d.css("top",e),d.offset().left!==t&&d.css("left",t),d.width()!==r&&d.css("width",r)}function t(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline?function r(){for(var e=null,t=0;t<c.INSTANCES.length;t++)if((e=c.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||!g.browser.msie&&!g.browser.edge||e.preventDefault():(e.preventDefault(),function f(e){var t=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset);if(!v(t)){for(var r=0,n=t;!v(n)&&n===t&&0<e.originalEvent.pageY-g.win.pageYOffset-r;)r++,n=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset-r);(!v(n)||d&&0===g.$el.find(n).length&&n!==d.get(0))&&(n=null);for(var a=0,o=t;!v(o)&&o===t&&e.originalEvent.pageY-g.win.pageYOffset+a<p(g.doc).height();)a++,o=g.doc.elementFromPoint(e.originalEvent.pageX-g.win.pageXOffset,e.originalEvent.pageY-g.win.pageYOffset+a);(!v(o)||d&&0===g.$el.find(o).length&&o!==d.get(0))&&(o=null),t=null===o&&n?n:o&&null===n?o:o&&n?r<a?n:o:null}if(p(t).hasClass("fr-drag-helper"))return!1;if(t&&!g.node.isBlock(t)&&(t=g.node.blockParent(t)),t&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(t.tagName)&&(t=p(t).parents("table").get(0)),t&&0<=["LI"].indexOf(t.tagName)&&(t=p(t).parents("UL, OL").get(0)),t&&!p(t).hasClass("fr-drag-helper")){var i;d||(c.$draggable_helper||(c.$draggable_helper=p(document.createElement("div")).attr("class","fr-drag-helper")),d=c.$draggable_helper,g.events.on("shared.destroy",function(){d.html("").removeData().remove(),d=null},!0)),i=e.originalEvent.pageY<p(t).offset().top+p(t).outerHeight()/2;var l=p(t),s=0;i||0!==l.next().length?(i||(l=l.next()),"before"===d.data("fr-position")&&l.is(d.data("fr-tag"))||(0<l.prev().length&&(s=parseFloat(l.prev().css("margin-bottom"))||0),s=Math.max(s,parseFloat(l.css("margin-top"))||0),m(l.offset().top-s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),d.data("fr-position","before"))):"after"===d.data("fr-position")&&l.is(d.data("fr-tag"))||(s=parseFloat(l.css("margin-bottom"))||0,m(l.offset().top+p(t).height()+s/2-g.$box.offset().top,l.offset().left-g.win.pageXOffset-g.$box.offset().left,l.width()),d.data("fr-position","after")),d.data("fr-tag",l),d.addClass("fr-visible"),g.$box.append(d)}else d&&0<g.$box.find(d).length&&d.removeClass("fr-visible")}(e))}function r(e){e.originalEvent.dataTransfer.dropEffect="move",g.opts.dragInline||e.preventDefault()}function n(e){g.$el.attr("contenteditable",!0);var t=g.$el.find(".fr-dragging");d&&d.hasClass("fr-visible")&&g.$box.find(d).length?a(e):t.length&&(e.preventDefault(),e.stopPropagation()),d&&g.$box.find(d).length&&d.removeClass("fr-visible"),t.removeClass("fr-dragging")}function a(e){var t,r;g.$el.attr("contenteditable",!0);for(var n=0;n<c.INSTANCES.length;n++)if((t=c.INSTANCES[n].$el.find(".fr-dragging")).length){r=c.INSTANCES[n];break}if(t.length){if(e.preventDefault(),e.stopPropagation(),d&&d.hasClass("fr-visible")&&g.$box.find(d).length)d.data("fr-tag")[d.data("fr-position")]('<span class="fr-marker"></span>'),d.removeClass("fr-visible");else if(!1===g.markers.insertAtPoint(e.originalEvent))return!1;if(t.removeClass("fr-dragging"),!1===(t=g.events.chainTrigger("element.beforeDrop",t)))return!1;var a=t;if(t.parent().is("A")&&1===t.parent().get(0).childNodes.length&&(a=t.parent()),g.core.isEmpty())g.events.focus();else g.$el.find(".fr-marker").replaceWith(c.MARKERS),g.selection.restore();if(r===g||g.undo.canDo()||g.undo.saveStep(),g.core.isEmpty())g.$el.html(a);else{var o=g.markers.insert();0===a.find(o).length?p(o).replaceWith(a):0===t.find(o).length&&p(o).replaceWith(t),t.after(c.MARKERS),g.selection.restore()}return g.popups.hideAll(),g.selection.save(),g.$el.find(g.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(g.opts.htmlAllowedEmptyTags.join(",")).remove(),g.html.wrap(),g.html.fillEmptyBlocks(),g.selection.restore(),g.undo.saveStep(),g.opts.iframe&&g.size.syncIframe(),r!==g&&(r.popups.hideAll(),r.$el.find(r.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),r.html.wrap(),r.html.fillEmptyBlocks(),r.undo.saveStep(),r.events.trigger("element.dropped"),r.opts.iframe&&r.size.syncIframe()),g.events.trigger("element.dropped",[a]),!1}d&&d.removeClass("fr-visible"),g.undo.canDo()||g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0)}function o(e){if(e&&"DIV"===e.tagName&&g.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"),r=0;r<t.length;r++)t[r].parentNode.removeChild(t[r])}return{_init:function i(){g.opts.enter===c.ENTER_BR&&(g.opts.dragInline=!0),g.events.on("dragstart",e,!0),g.events.on("dragover",t,!0),g.events.on("dragenter",r,!0),g.events.on("document.dragend",n,!0),g.events.on("document.drop",n,!0),g.events.on("drop",a,!0),g.events.on("html.processGet",o)}}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{editInPopup:!1}),t.MODULES.editInPopup=function(n){function e(){n.events.$on(n.$el,n._mouseup,function(){setTimeout(function(){var t,e;e=n.popups.get("text.edit"),t="INPUT"===n.el.tagName?n.$el.attr("placeholder"):n.$el.text(),e.find("input").val(t).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(){var t;n.opts.editInPopup&&(t={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",t),e())},update:function(){var t=n.popups.get("text.edit").find("input").val();0===t.length&&(t=n.opts.placeholderText),"INPUT"===n.el.tagName?n.$el.attr("placeholder",t):n.$el.text(t),n.events.trigger("contentChanged"),n.popups.hide("text.edit")}}},t.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{editInPopup:!1}),t.MODULES.editInPopup=function(i){function t(){i.events.$on(i.$el,i._mouseup,function(){setTimeout(function(){!function n(){var t,e=i.popups.get("text.edit");t="INPUT"===i.el.tagName?i.$el.attr("placeholder"):i.$el.text(),e.find("input").val(t).trigger("change"),i.popups.setContainer("text.edit",i.$sc),i.popups.show("text.edit",i.$el.offset().left+i.$el.outerWidth()/2,i.$el.offset().top+i.$el.outerHeight(),i.$el.outerHeight())}()},10)})}return{_init:function n(){i.opts.editInPopup&&(function e(){var t={edit:'<div id="fr-text-edit-'.concat(i.id,'" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(i.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(i.language.translate("Update"),"</button></div></div>")};i.popups.create("text.edit",t)}(),t())},update:function e(){var t=i.popups.get("text.edit").find("input").val();0===t.length&&(t=i.opts.placeholderText),"INPUT"===i.el.tagName?i.$el.attr("placeholder",t):i.$el.text(t),i.events.trigger("contentChanged"),i.popups.hide("text.edit")}}},t.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,c){"object"==typeof exports&&"undefined"!=typeof module?c(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],c):c(e.FroalaEditor)}(this,function(S){"use strict";S=S&&S.hasOwnProperty("default")?S["default"]:S,Object.assign(S.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(S.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:"Soccer Ball"},{code:"26bd",desc:"Balloon"},{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-1f1f1",desc:"Pakistan Flag"},{code:"1f1f5-1f1f2",desc:"Poland Flag"},{code:"1f1f5-1f1f3",desc:"St. Pierre & Miquelon Flag"},{code:"1f1f5-1f1f9",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:"1f1e6-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:"1f1ee-1f1f9",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}),S.PLUGINS.emoticons=function(m){var C=m.$,n=m.opts.emoticonsSet,t=n&&n[0],s="";function a(){if(!m.selection.isCollapsed())return!1;var e=m.selection.element(),c=m.selection.endElement();if(e&&m.node.hasClass(e,"fr-emoticon"))return e;if(c&&m.node.hasClass(c,"fr-emoticon"))return c;var d=m.selection.ranges(0),o=d.startContainer;if(o.nodeType==Node.ELEMENT_NODE&&0<o.childNodes.length&&0<d.startOffset){var a=o.childNodes[d.startOffset-1];if(m.node.hasClass(a,"fr-emoticon"))return a}return!1}function f(){var e,c,a,d,o,s,f,i;return"".concat((d=n,o=t,'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat((s=d,f=o,i="",s.forEach(function(e){var c={image:e.code.toLowerCase()},d={elementClass:e.id===f.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(c.image,'.svg"/>'):"&#x".concat(c.image,";")};i+='<button class="fr-command fr-btn '.concat(d.elementClass," ").concat(d.emoticonsUnicodeClass,'" \n title="').concat(d.title,'" data-cmd="').concat(d.dataCmd,'" data-param1="').concat(d.dataParam1,'">\n ').concat(d.image," </button>")}),i),"\n </div>")),"\n ").concat((e=t,'\n <div class="fr-icon-container fr-emoticon-container">\n '.concat((c=e,a="",c.emoticons.forEach(function(e){var c=e.code.split("-").reduce(function(e,c){return e?e+"‍&#x"+c.toLowerCase()+";":"&#x"+c.toLowerCase()+";"},""),d={image:e.code.toLowerCase(),compiledCode:e.uCode?e.uCode:c},o={dataParam1:e.code.toLowerCase(),dataParam2:d.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(d.image,'.svg"/>'):"".concat(d.compiledCode),desc:m.language.translate(e.desc)};a+='<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(o.dataParam1,'" \n data-param2="').concat(o.dataParam2,'" title="').concat(o.title,'" >\n ').concat(o.image,'<span class="fr-sr-only">').concat(o.desc," </span></span>")}),a),"\n </div>\n ")),"\n ").concat(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(){var e=function(){for(var e=m.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),c=0;c<e.length;c++)e[c].className+=" fr-deletable"};e(),m.events.on("html.set",e),m.events.on("keydown",function(e){if(m.keys.isCharacter(e.which)&&m.selection.inEditor()){var c=m.selection.ranges(0),d=a();m.node.hasClass(d,"fr-emoticon-img")&&d&&(0===c.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore())}}),m.events.on("keyup",function(e){for(var c=m.el.querySelectorAll(".fr-emoticon"),d=0;d<c.length;d++)"undefined"!=typeof c[d].textContent&&0===c[d].textContent.replace(/\u200B/gi,"").length&&C(c[d]).remove();if(!(e.which>=S.KEYCODE.ARROW_LEFT&&e.which<=S.KEYCODE.ARROW_DOWN)){var o=a();m.node.hasClass(o,"fr-emoticon-img")&&(C(o).append(S.MARKERS),m.selection.restore())}})},insert:function(e,c){var d=a(),o=m.selection.ranges(0);d?(0===o.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):0<o.startOffset&&m.selection.element()===d&&o.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore(),m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?" ":e,"</span> ").concat(S.MARKERS),!0)):m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?" ":e,"</span> "),!0)},setEmoticonCategory:function(c){t=n.filter(function(e){return e.id===c})[0],m.popups.get("emoticons").html(s+f())},showEmoticonsPopup:function(){var e=m.popups.get("emoticons");if(e||(e=function(){m.opts.toolbarInline&&0<m.opts.emoticonsButtons.length&&(s='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(m.button.buildList(m.opts.emoticonsButtons),"</div>"));var h,e={buttons:s,custom_layer:f()},c=m.popups.create("emoticons",e);return h=c,m.events.on("popup.tab",function(e){var c=C(e.currentTarget);if(!m.popups.isVisible("emoticons")||!c.is("span, a"))return!0;var d,o,a,s=e.which;if(S.KEYCODE.TAB==s){if(c.is("span.fr-emoticon")&&e.shiftKey||c.is("a")&&!e.shiftKey){var f=h.find(".fr-buttons");d=!m.accessibility.focusToolbar(f,!!e.shiftKey)}if(!1!==d){var i=h.find("span.fr-emoticon:focus").first().concat(h.findVisible(" div.fr-tabs").first().concat(h.find("a")));c.is("span.fr-emoticon")&&(i=i.not("span.fr-emoticon:not(:focus)")),o=i.index(c),o=e.shiftKey?((o-1)%i.length+i.length)%i.length:(o+1)%i.length,a=i.get(o),m.events.disableBlur(),a.focus(),d=!1}}else if(S.KEYCODE.ARROW_UP==s||S.KEYCODE.ARROW_DOWN==s||S.KEYCODE.ARROW_LEFT==s||S.KEYCODE.ARROW_RIGHT==s){if(c.is("span.fr-emoticon")){var n=c.parent().find("span.fr-emoticon");o=n.index(c);var t=m.opts.emoticonsStep,l=Math.floor(n.length/t),r=o%t,F=Math.floor(o/t),g=F*t+r,u=l*t;S.KEYCODE.ARROW_UP==s?g=((g-t)%u+u)%u:S.KEYCODE.ARROW_DOWN==s?g=(g+t)%u:S.KEYCODE.ARROW_LEFT==s?g=((g-1)%u+u)%u:S.KEYCODE.ARROW_RIGHT==s&&(g=(g+1)%u),a=C(n.get(g)),m.events.disableBlur(),a.focus(),d=!1}}else S.KEYCODE.ENTER==s&&(c.is("a")?c[0].click():m.button.exec(c),d=!1);return!1===d&&(e.preventDefault(),e.stopPropagation()),d},!0),c}()),!e.hasClass("fr-active")){m.popups.refresh("emoticons"),m.popups.setContainer("emoticons",m.$tb);var c=m.$tb.find('.fr-command[data-cmd="emoticons"]'),d=m.button.getPosition(c),o=d.left,a=d.top;m.popups.show("emoticons",o,a,c.outerHeight())}},back:function(){m.popups.hide("emoticons"),m.toolbar.showInline()}}},S.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),S.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"}),S.RegisterCommand("insertEmoticon",{callback:function(e,c,d){this.emoticons.insert(d,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(c,".svg"):null),this.popups.hide("emoticons")}}),S.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,c){this.emoticons.setEmoticonCategory(c)}}),S.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),S.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}})}); | ||
!function(e,c){"object"==typeof exports&&"undefined"!=typeof module?c(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],c):c(e.FroalaEditor)}(this,function(S){"use strict";S=S&&S.hasOwnProperty("default")?S["default"]:S,Object.assign(S.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(S.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:"Soccer Ball"},{code:"26bd",desc:"Balloon"},{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-1f1f1",desc:"Pakistan Flag"},{code:"1f1f5-1f1f2",desc:"Poland Flag"},{code:"1f1f5-1f1f3",desc:"St. Pierre & Miquelon Flag"},{code:"1f1f5-1f1f9",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:"1f1e6-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:"1f1ee-1f1f9",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}),S.PLUGINS.emoticons=function(m){var C=m.$,a=m.opts.emoticonsSet,s=a&&a[0],f="";function i(){if(!m.selection.isCollapsed())return!1;var e=m.selection.element(),c=m.selection.endElement();if(e&&m.node.hasClass(e,"fr-emoticon"))return e;if(c&&m.node.hasClass(c,"fr-emoticon"))return c;var d=m.selection.ranges(0),o=d.startContainer;if(o.nodeType==Node.ELEMENT_NODE&&0<o.childNodes.length&&0<d.startOffset){var a=o.childNodes[d.startOffset-1];if(m.node.hasClass(a,"fr-emoticon"))return a}return!1}function n(){return"".concat(function o(e,c){return'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function d(e,o){var a="";return e.forEach(function(e){var c={image:e.code.toLowerCase()},d={elementClass:e.id===o.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(c.image,'.svg"/>'):"&#x".concat(c.image,";")};a+='<button class="fr-command fr-btn '.concat(d.elementClass," ").concat(d.emoticonsUnicodeClass,'" \n title="').concat(d.title,'" data-cmd="').concat(d.dataCmd,'" data-param1="').concat(d.dataParam1,'">\n ').concat(d.image," </button>")}),a}(e,c),"\n </div>")}(a,s),"\n ").concat(function d(e){return'\n <div class="fr-icon-container fr-emoticon-container">\n '.concat(function c(e){var a="";return e.emoticons.forEach(function(e){var c=e.code.split("-").reduce(function(e,c){return e?e+"‍&#x"+c.toLowerCase()+";":"&#x"+c.toLowerCase()+";"},""),d={image:e.code.toLowerCase(),compiledCode:e.uCode?e.uCode:c},o={dataParam1:e.code.toLowerCase(),dataParam2:d.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(d.image,'.svg"/>'):"".concat(d.compiledCode),desc:m.language.translate(e.desc)};a+='<span class="fr-command fr-emoticon fr-icon" role="button" \n data-cmd="insertEmoticon" data-param1="'.concat(o.dataParam1,'" \n data-param2="').concat(o.dataParam2,'" title="').concat(o.title,'" >\n ').concat(o.image,'<span class="fr-sr-only">').concat(o.desc," </span></span>")}),a}(e),"\n </div>\n ")}(s),"\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 d=function d(){for(var e=m.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),c=0;c<e.length;c++)e[c].className+=" fr-deletable"};d(),m.events.on("html.set",d),m.events.on("keydown",function(e){if(m.keys.isCharacter(e.which)&&m.selection.inEditor()){var c=m.selection.ranges(0),d=i();m.node.hasClass(d,"fr-emoticon-img")&&d&&(0===c.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore())}}),m.events.on("keyup",function(e){for(var c=m.el.querySelectorAll(".fr-emoticon"),d=0;d<c.length;d++)"undefined"!=typeof c[d].textContent&&0===c[d].textContent.replace(/\u200B/gi,"").length&&C(c[d]).remove();if(!(e.which>=S.KEYCODE.ARROW_LEFT&&e.which<=S.KEYCODE.ARROW_DOWN)){var o=i();m.node.hasClass(o,"fr-emoticon-img")&&(C(o).append(S.MARKERS),m.selection.restore())}})},insert:function t(e,c){var d=i(),o=m.selection.ranges(0);d?(0===o.startOffset&&m.selection.element()===d?C(d).before(S.MARKERS+S.INVISIBLE_SPACE):0<o.startOffset&&m.selection.element()===d&&o.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&C(d).after(S.INVISIBLE_SPACE+S.MARKERS),m.selection.restore(),m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?" ":e,"</span> ").concat(S.MARKERS),!0)):m.html.insert('<span class="fr-emoticon fr-deletable'.concat(c?" fr-emoticon-img":"",'"').concat(c?' style="background: url('.concat(c,');"'):"",">").concat(c?" ":e,"</span> "),!0)},setEmoticonCategory:function d(c){s=a.filter(function(e){return e.id===c})[0],function e(){m.popups.get("emoticons").html(f+n())}()},showEmoticonsPopup:function l(){var e=m.popups.get("emoticons");if(e||(e=function s(){m.opts.toolbarInline&&0<m.opts.emoticonsButtons.length&&(f='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(m.button.buildList(m.opts.emoticonsButtons),"</div>"));var e={buttons:f,custom_layer:n()},c=m.popups.create("emoticons",e);return function d(h){m.events.on("popup.tab",function(e){var c=C(e.currentTarget);if(!m.popups.isVisible("emoticons")||!c.is("span, a"))return!0;var d,o,a,s=e.which;if(S.KEYCODE.TAB==s){if(c.is("span.fr-emoticon")&&e.shiftKey||c.is("a")&&!e.shiftKey){var f=h.find(".fr-buttons");d=!m.accessibility.focusToolbar(f,!!e.shiftKey)}if(!1!==d){var i=h.find("span.fr-emoticon:focus").first().concat(h.findVisible(" div.fr-tabs").first().concat(h.find("a")));c.is("span.fr-emoticon")&&(i=i.not("span.fr-emoticon:not(:focus)")),o=i.index(c),o=e.shiftKey?((o-1)%i.length+i.length)%i.length:(o+1)%i.length,a=i.get(o),m.events.disableBlur(),a.focus(),d=!1}}else if(S.KEYCODE.ARROW_UP==s||S.KEYCODE.ARROW_DOWN==s||S.KEYCODE.ARROW_LEFT==s||S.KEYCODE.ARROW_RIGHT==s){if(c.is("span.fr-emoticon")){var n=c.parent().find("span.fr-emoticon");o=n.index(c);var t=m.opts.emoticonsStep,l=Math.floor(n.length/t),r=o%t,F=Math.floor(o/t),g=F*t+r,u=l*t;S.KEYCODE.ARROW_UP==s?g=((g-t)%u+u)%u:S.KEYCODE.ARROW_DOWN==s?g=(g+t)%u:S.KEYCODE.ARROW_LEFT==s?g=((g-1)%u+u)%u:S.KEYCODE.ARROW_RIGHT==s&&(g=(g+1)%u),a=C(n.get(g)),m.events.disableBlur(),a.focus(),d=!1}}else S.KEYCODE.ENTER==s&&(c.is("a")?c[0].click():m.button.exec(c),d=!1);return!1===d&&(e.preventDefault(),e.stopPropagation()),d},!0)}(c),c}()),!e.hasClass("fr-active")){m.popups.refresh("emoticons"),m.popups.setContainer("emoticons",m.$tb);var c=m.$tb.find('.fr-command[data-cmd="emoticons"]'),d=m.button.getPosition(c),o=d.left,a=d.top;m.popups.show("emoticons",o,a,c.outerHeight())}},back:function c(){m.popups.hide("emoticons"),m.toolbar.showInline()}}},S.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),S.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"}),S.RegisterCommand("insertEmoticon",{callback:function(e,c,d){this.emoticons.insert(d,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(c,".svg"):null),this.popups.hide("emoticons")}}),S.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,c){this.emoticons.setEmoticonCategory(c)}}),S.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),S.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{entities:""'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦"}),e.PLUGINS.entities=function(i){var n,o,l=i.$;function t(e){var a=e.textContent;if(a.match(n)){for(var r="",t=0;t<a.length;t++)o[a[t]]?r+=o[a[t]]:r+=a[t];e.textContent=r}}function u(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var a=i.node.contents(e),r=0;r<a.length;r++)a[r].nodeType===Node.TEXT_NODE?t(a[r]):u(a[r]);return e.nodeType===Node.TEXT_NODE&&t(e),!1}function c(e){return 0===e.length?"":i.clean.exec(e,u).replace(/\&/g,"&")}return{_init:function(){i.opts.htmlSimpleAmpersand||(i.opts.entities=i.opts.entities+"&");var e=l(document.createElement("div")).html(i.opts.entities).text(),a=i.opts.entities.split(";");o={},n="";for(var r=0;r<e.length;r++){var t=e.charAt(r);o[t]=a[r]+";",n+="\\"+t+(r<e.length-1?"|":"")}n=new RegExp("("+n+")","g"),i.events.on("html.get",c,!0)}}}}); | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{entities:""'¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿŒœŠšŸƒˆ˜ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρςστυφχψωϑϒϖ   ‌‍‎‏–—‘’‚“”„†‡•…‰′″‹›‾⁄€ℑ℘ℜ™ℵ←↑→↓↔↵⇐⇑⇒⇓⇔∀∂∃∅∇∈∉∋∏∑−∗√∝∞∠∧∨∩∪∫∴∼≅≈≠≡≤≥⊂⊃⊄⊆⊇⊕⊗⊥⋅⌈⌉⌊⌋⟨⟩◊♠♣♥♦"}),e.PLUGINS.entities=function(i){var n,o,l=i.$;function t(e){var a=e.textContent;if(a.match(n)){for(var r="",t=0;t<a.length;t++)o[a[t]]?r+=o[a[t]]:r+=a[t];e.textContent=r}}function u(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var a=i.node.contents(e),r=0;r<a.length;r++)a[r].nodeType===Node.TEXT_NODE?t(a[r]):u(a[r]);return e.nodeType===Node.TEXT_NODE&&t(e),!1}function c(e){return 0===e.length?"":i.clean.exec(e,u).replace(/\&/g,"&")}return{_init:function s(){i.opts.htmlSimpleAmpersand||(i.opts.entities=i.opts.entities+"&");var e=l(document.createElement("div")).html(i.opts.entities).text(),a=i.opts.entities.split(";");o={},n="";for(var r=0;r<e.length;r++){var t=e.charAt(r);o[t]=a[r]+";",n+="\\"+t+(r<e.length-1?"|":"")}n=new RegExp("("+n+")","g"),i.events.on("html.get",c,!0)}}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(k){"use strict";k=k&&k.hasOwnProperty("default")?k["default"]:k,Object.assign(k.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(k.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),k.PLUGINS.file=function(f){var r,l=f.$,p="https://i.froala.com/upload",d=2,u=3,c=4,v=5,g=6,i={};function h(){var e=f.popups.get("file.insert");e||(e=T()),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(),o(f.language.translate("Uploading"),0)}function a(e){var t=f.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&&(f.events.focus(),f.popups.hide("file.insert")))}function o(e,t){var i=f.popups.get("file.insert");if(i){var r=i.find(".fr-file-progress-bar-layer");r.find("h3").text(e+(t?" "+t+"%":"")),r.removeClass("fr-error"),t?(r.find("div").removeClass("fr-indeterminate"),r.find("div > span").css("width",t+"%")):r.find("div").addClass("fr-indeterminate")}}function b(e,t,i){f.edit.on(),f.events.focus(!0),f.selection.restore(),f.opts.fileUseSelectedText&&f.selection.text().length&&(t=f.selection.text()),f.html.insert('<a href="'+e+'" target="_blank" id="fr-inserted-file" class="fr-file">'+t+"</a>");var r=f.$el.find("#fr-inserted-file");r.removeAttr("id"),f.popups.hide("file.insert"),f.undo.saveStep(),w(),f.events.trigger("file.inserted",[r,i])}function m(e){var t=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(f.opts.fileUploadToS3)if(201===t){var a=function(e){try{var t=l(e).find("Location").text(),i=l(e).find("Key").text();return!1===f.events.trigger("file.uploadedToS3",[t,i,e],!0)?(f.edit.on(),!1):t}catch(r){return S(c,e),!1}}(r);a&&b(a,e,i||r)}else S(c,i||r);else if(200<=t&&t<300){var n=function(e){try{if(!1===f.events.trigger("file.uploaded",[e],!0))return f.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(S(d,e),!1)}catch(i){return S(c,e),!1}}(o);n&&b(n.link,e,i||o)}else S(u,i||o)}catch(s){S(c,i||o)}}function y(){S(c,this.response||this.responseText||this.responseXML)}function U(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;o(f.language.translate("Uploading"),t)}}function S(e,t){f.edit.on(),function(e){h();var t=f.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),f.events.disableBlur(),i.focus()}(f.language.translate("Something went wrong. Please try again.")),f.events.trigger("file.error",[{code:e,message:i[e]},t])}function C(){f.edit.on(),a(!0)}function n(e){if(void 0!==e&&0<e.length){if(!1===f.events.trigger("file.beforeUpload",[e]))return!1;var t,i=e[0];if((null===f.opts.fileUploadURL||f.opts.fileUploadURL===p)&&!f.opts.fileUploadToS3)return s=i,(l=new FileReader).onload=function(){for(var e=l.result,t=atob(l.result.split(",")[1]),i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));e=window.URL.createObjectURL(new Blob([new Uint8Array(i)],{type:s.type})),f.file.insert(e,s.name,null)},h(),l.readAsDataURL(s),!1;if(i.size>f.opts.fileMaxSize)return S(v),!1;if(f.opts.fileAllowedTypes.indexOf("*")<0&&f.opts.fileAllowedTypes.indexOf(i.type.replace(/file\//g,""))<0)return S(g),!1;if(f.drag_support.formdata&&(t=f.drag_support.formdata?new FormData:null),t){var r;if(!1!==f.opts.fileUploadToS3)for(r in t.append("key",f.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",i.type),f.opts.fileUploadToS3.params)f.opts.fileUploadToS3.params.hasOwnProperty(r)&&t.append(r,f.opts.fileUploadToS3.params[r]);for(r in f.opts.fileUploadParams)f.opts.fileUploadParams.hasOwnProperty(r)&&t.append(r,f.opts.fileUploadParams[r]);t.append(f.opts.fileUploadParam,i);var o=f.opts.fileUploadURL;f.opts.fileUploadToS3&&(o=f.opts.fileUploadToS3.uploadURL?f.opts.fileUploadToS3.uploadURL:"https://"+f.opts.fileUploadToS3.region+".amazonaws.com/"+f.opts.fileUploadToS3.bucket);var a=f.core.getXHR(o,f.opts.fileUploadMethod);a.onload=function(){m.call(a,i.name)},a.onerror=y,a.upload.onprogress=U,a.onabort=C,h();var n=f.popups.get("file.insert");n&&(n.off("abortUpload"),n.on("abortUpload",function(){4!==a.readyState&&a.abort()})),a.send(t)}}var s,l}function s(){a()}function T(e){if(e)return f.popups.onHide("file.insert",s),!0;var t;f.opts.fileUpload||f.opts.fileInsertButtons.splice(f.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'+f.button.buildList(f.opts.fileInsertButtons)+"</div>";var i="";f.opts.fileUpload&&(i='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'+f.id+'"><strong>'+f.language.translate("Drop file")+"</strong><br>("+f.language.translate("or click")+')<div class="fr-form"><input type="file" name="'+f.opts.fileUploadParam+'" accept="'+(0<=f.opts.fileAllowedTypes.indexOf("*")?"/":"")+f.opts.fileAllowedTypes.join(", ").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-'+f.id+'" role="button"></div></div>');var r,o={buttons:t,upload_layer:i,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>'},a=f.popups.create("file.insert",o);return r=a,f.events.$on(r,"dragover dragenter",".fr-file-upload-layer",function(){return l(this).addClass("fr-drop"),!1},!0),f.events.$on(r,"dragleave dragend",".fr-file-upload-layer",function(){return l(this).removeClass("fr-drop"),!1},!0),f.events.$on(r,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),l(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(r.data("instance")||f).file.upload(t.files)},!0),f.helpers.isIOS()&&f.events.$on(r,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){l(this).trigger("click")}),f.events.$on(r,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=r.data("instance")||f;e.events.disableBlur(),r.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}l(this).val("")},!0),a}function e(e){f.node.hasClass(e,"fr-file")}function t(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var i=t.files[0];if(i&&"undefined"!=typeof i.type){if(i.type.indexOf("image")<0){if(!f.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;f.markers.remove(),f.markers.insertAtPoint(e.originalEvent),f.$el.find(".fr-marker").replaceWith(k.MARKERS),f.popups.hideAll();var r=f.popups.get("file.insert");return r||(r=T()),f.popups.setContainer("file.insert",f.$sc),f.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),h(),n(t.files),e.preventDefault(),e.stopPropagation(),!1}}else i.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function w(){var e,t=Array.prototype.slice.call(f.el.querySelectorAll("a.fr-file")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("href"));if(r)for(e=0;e<r.length;e++)i.indexOf(r[e].getAttribute("href"))<0&&f.events.trigger("file.unlink",[r[e]]);r=t}return i[1]="File cannot be loaded from the passed link.",i[d]="No link in upload response.",i[u]="Error during file upload.",i[c]="Parsing response failed.",i[v]="File is too large.",i[g]="File file type is invalid.",i[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function(){f.events.on("drop",t),f.events.$on(f.$win,"keydown",function(e){var t=e.which,i=f.popups.get("file.insert");i&&t===k.KEYCODE.ESC&&i.trigger("abortUpload")}),f.events.on("destroy",function(){var e=f.popups.get("file.insert");e&&e.trigger("abortUpload")}),f.events.on("link.beforeRemove",e),f.$wp&&(w(),f.events.on("contentChanged",w)),T(!0)},showInsertPopup:function(){var e=f.$tb.find('.fr-command[data-cmd="insertFile"]'),t=f.popups.get("file.insert");if(t||(t=T()),a(),!t.hasClass("fr-active"))if(f.popups.refresh("file.insert"),f.popups.setContainer("file.insert",f.$tb),e.isVisible){var i=f.button.getPosition(e),r=i.left,o=i.top;f.popups.show("file.insert",r,o,e.outerHeight())}else f.position.forSelection(t),f.popups.show("file.insert")},upload:n,insert:b,back:function(){f.events.disableBlur(),f.selection.restore(),f.events.enableBlur(),f.popups.hide("file.insert"),f.toolbar.showInline()},hideProgressBar:a}},k.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),k.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"}),k.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),k.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"))}}),k.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})}); | ||
!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(x){"use strict";x=x&&x.hasOwnProperty("default")?x["default"]:x,Object.assign(x.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(x.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),x.PLUGINS.file=function(p){var r,d=p.$,l="https://i.froala.com/upload",u=2,c=3,v=4,f=5,g=6,i={};function h(){var e=p.popups.get("file.insert");e||(e=T()),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(),o(p.language.translate("Uploading"),0)}function n(e){var t=p.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&&(p.events.focus(),p.popups.hide("file.insert")))}function o(e,t){var i=p.popups.get("file.insert");if(i){var r=i.find(".fr-file-progress-bar-layer");r.find("h3").text(e+(t?" "+t+"%":"")),r.removeClass("fr-error"),t?(r.find("div").removeClass("fr-indeterminate"),r.find("div > span").css("width",t+"%")):r.find("div").addClass("fr-indeterminate")}}function b(e,t,i){p.edit.on(),p.events.focus(!0),p.selection.restore(),p.opts.fileUseSelectedText&&p.selection.text().length&&(t=p.selection.text()),p.html.insert('<a href="'+e+'" target="_blank" id="fr-inserted-file" class="fr-file">'+t+"</a>");var r=p.$el.find("#fr-inserted-file");r.removeAttr("id"),p.popups.hide("file.insert"),p.undo.saveStep(),k(),p.events.trigger("file.inserted",[r,i])}function m(e){var t=this.status,i=this.response,r=this.responseXML,o=this.responseText;try{if(p.opts.fileUploadToS3)if(201===t){var n=function s(e){try{var t=d(e).find("Location").text(),i=d(e).find("Key").text();return!1===p.events.trigger("file.uploadedToS3",[t,i,e],!0)?(p.edit.on(),!1):t}catch(r){return S(v,e),!1}}(r);n&&b(n,e,i||r)}else S(v,i||r);else if(200<=t&&t<300){var a=function l(e){try{if(!1===p.events.trigger("file.uploaded",[e],!0))return p.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(S(u,e),!1)}catch(i){return S(v,e),!1}}(o);a&&b(a.link,e,i||o)}else S(c,i||o)}catch(f){S(v,i||o)}}function y(){S(v,this.response||this.responseText||this.responseXML)}function U(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;o(p.language.translate("Uploading"),t)}}function S(e,t){p.edit.on(),function r(e){h();var t=p.popups.get("file.insert").find(".fr-file-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),p.events.disableBlur(),i.focus()}(p.language.translate("Something went wrong. Please try again.")),p.events.trigger("file.error",[{code:e,message:i[e]},t])}function C(){p.edit.on(),n(!0)}function a(e){if(void 0!==e&&0<e.length){if(!1===p.events.trigger("file.beforeUpload",[e]))return!1;var t,i=e[0];if((null===p.opts.fileUploadURL||p.opts.fileUploadURL===l)&&!p.opts.fileUploadToS3)return function s(o){var n=new FileReader;n.onload=function(){for(var e=n.result,t=atob(n.result.split(",")[1]),i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));e=window.URL.createObjectURL(new Blob([new Uint8Array(i)],{type:o.type})),p.file.insert(e,o.name,null)},h(),n.readAsDataURL(o)}(i),!1;if(i.size>p.opts.fileMaxSize)return S(f),!1;if(p.opts.fileAllowedTypes.indexOf("*")<0&&p.opts.fileAllowedTypes.indexOf(i.type.replace(/file\//g,""))<0)return S(g),!1;if(p.drag_support.formdata&&(t=p.drag_support.formdata?new FormData:null),t){var r;if(!1!==p.opts.fileUploadToS3)for(r in t.append("key",p.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",i.type),p.opts.fileUploadToS3.params)p.opts.fileUploadToS3.params.hasOwnProperty(r)&&t.append(r,p.opts.fileUploadToS3.params[r]);for(r in p.opts.fileUploadParams)p.opts.fileUploadParams.hasOwnProperty(r)&&t.append(r,p.opts.fileUploadParams[r]);t.append(p.opts.fileUploadParam,i);var o=p.opts.fileUploadURL;p.opts.fileUploadToS3&&(o=p.opts.fileUploadToS3.uploadURL?p.opts.fileUploadToS3.uploadURL:"https://"+p.opts.fileUploadToS3.region+".amazonaws.com/"+p.opts.fileUploadToS3.bucket);var n=p.core.getXHR(o,p.opts.fileUploadMethod);n.onload=function(){m.call(n,i.name)},n.onerror=y,n.upload.onprogress=U,n.onabort=C,h();var a=p.popups.get("file.insert");a&&(a.off("abortUpload"),a.on("abortUpload",function(){4!==n.readyState&&n.abort()})),n.send(t)}}}function s(){n()}function T(e){if(e)return p.popups.onHide("file.insert",s),!0;var t;p.opts.fileUpload||p.opts.fileInsertButtons.splice(p.opts.fileInsertButtons.indexOf("fileUpload"),1),t='<div class="fr-buttons fr-tabs">'+p.button.buildList(p.opts.fileInsertButtons)+"</div>";var i="";p.opts.fileUpload&&(i='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'+p.id+'"><strong>'+p.language.translate("Drop file")+"</strong><br>("+p.language.translate("or click")+')<div class="fr-form"><input type="file" name="'+p.opts.fileUploadParam+'" accept="'+(0<=p.opts.fileAllowedTypes.indexOf("*")?"/":"")+p.opts.fileAllowedTypes.join(", ").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-'+p.id+'" role="button"></div></div>');var r={buttons:t,upload_layer:i,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>'},o=p.popups.create("file.insert",r);return function n(i){p.events.$on(i,"dragover dragenter",".fr-file-upload-layer",function(){return d(this).addClass("fr-drop"),!1},!0),p.events.$on(i,"dragleave dragend",".fr-file-upload-layer",function(){return d(this).removeClass("fr-drop"),!1},!0),p.events.$on(i,"drop",".fr-file-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),d(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;t&&t.files&&(i.data("instance")||p).file.upload(t.files)},!0),p.helpers.isIOS()&&p.events.$on(i,"touchstart",'.fr-file-upload-layer input[type="file"]',function(){d(this).trigger("click")}),p.events.$on(i,"change",'.fr-file-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||p;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.file.upload(this.files)}d(this).val("")},!0)}(o),o}function t(e){p.node.hasClass(e,"fr-file")}function w(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var i=t.files[0];if(i&&"undefined"!=typeof i.type){if(i.type.indexOf("image")<0){if(!p.opts.fileUpload)return e.preventDefault(),e.stopPropagation(),!1;p.markers.remove(),p.markers.insertAtPoint(e.originalEvent),p.$el.find(".fr-marker").replaceWith(x.MARKERS),p.popups.hideAll();var r=p.popups.get("file.insert");return r||(r=T()),p.popups.setContainer("file.insert",p.$sc),p.popups.show("file.insert",e.originalEvent.pageX,e.originalEvent.pageY),h(),a(t.files),e.preventDefault(),e.stopPropagation(),!1}}else i.type.indexOf("image")<0&&(e.preventDefault(),e.stopPropagation())}}function k(){var e,t=Array.prototype.slice.call(p.el.querySelectorAll("a.fr-file")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("href"));if(r)for(e=0;e<r.length;e++)i.indexOf(r[e].getAttribute("href"))<0&&p.events.trigger("file.unlink",[r[e]]);r=t}return i[1]="File cannot be loaded from the passed link.",i[u]="No link in upload response.",i[c]="Error during file upload.",i[v]="Parsing response failed.",i[f]="File is too large.",i[g]="File file type is invalid.",i[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function P(){!function e(){p.events.on("drop",w),p.events.$on(p.$win,"keydown",function(e){var t=e.which,i=p.popups.get("file.insert");i&&t===x.KEYCODE.ESC&&i.trigger("abortUpload")}),p.events.on("destroy",function(){var e=p.popups.get("file.insert");e&&e.trigger("abortUpload")})}(),p.events.on("link.beforeRemove",t),p.$wp&&(k(),p.events.on("contentChanged",k)),T(!0)},showInsertPopup:function A(){var e=p.$tb.find('.fr-command[data-cmd="insertFile"]'),t=p.popups.get("file.insert");if(t||(t=T()),n(),!t.hasClass("fr-active"))if(p.popups.refresh("file.insert"),p.popups.setContainer("file.insert",p.$tb),e.isVisible){var i=p.button.getPosition(e),r=i.left,o=i.top;p.popups.show("file.insert",r,o,e.outerHeight())}else p.position.forSelection(t),p.popups.show("file.insert")},upload:a,insert:b,back:function e(){p.events.disableBlur(),p.selection.restore(),p.events.enableBlur(),p.popups.hide("file.insert"),p.toolbar.showInline()},hideProgressBar:n}},x.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),x.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"}),x.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),x.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"))}}),x.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"}),e.PLUGINS.fontFamily=function(i){var o=i.$;function r(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return o(this).grep(t,function(e){return 0<e.length})}function f(e,t){for(var n=0;n<e.length;n++)for(var a=0;a<t.length;a++)if(e[n].toLowerCase()===t[a].toLowerCase())return[n,a];return null}function n(){var e=r(o(i.selection.element()).css("font-family")),t=[];for(var n in i.opts.fontFamily)if(i.opts.fontFamily.hasOwnProperty(n)){var a=f(e,r(n));a&&t.push([n,a])}return 0===t.length?null:(t.sort(function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n}),t[0][0])}return{apply:function(e){i.format.applyStyle("font-family",e)},refreshOnShow:function(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'+n()+'"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function(e){if(i.opts.fontFamilySelection){var t=o(i.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(i.opts.fontFamily[n()]||t[0]||i.language.translate(i.opts.fontFamilyDefaultSelection))}}}},e.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 n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'+n+'" style="font-family: '+n+'" title="'+t[n]+'">'+t[n]+"</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"}),e.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"}),e.PLUGINS.fontFamily=function(i){var o=i.$;function r(e){var t=e.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return o(this).grep(t,function(e){return 0<e.length})}function f(e,t){for(var n=0;n<e.length;n++)for(var a=0;a<t.length;a++)if(e[n].toLowerCase()===t[a].toLowerCase())return[n,a];return null}function n(){var e=r(o(i.selection.element()).css("font-family")),t=[];for(var n in i.opts.fontFamily)if(i.opts.fontFamily.hasOwnProperty(n)){var a=f(e,r(n));a&&t.push([n,a])}return 0===t.length?null:(t.sort(function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n}),t[0][0])}return{apply:function t(e){i.format.applyStyle("font-family",e)},refreshOnShow:function a(e,t){t.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),t.find('.fr-command[data-param1="'+n()+'"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function l(e){if(i.opts.fontFamilySelection){var t=o(i.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");e.find("> span").text(i.opts.fontFamily[n()]||t[0]||i.language.translate(i.opts.fontFamilyDefaultSelection))}}}},e.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 n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'+n+'" style="font-family: '+n+'" title="'+t[n]+'">'+t[n]+"</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"}),e.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),t.PLUGINS.fontSize=function(o){var i=o.$;return{apply:function(t){o.format.applyStyle("font-size",t)},refreshOnShow:function(t,e){var n=i(o.selection.element()).css("font-size");"pt"===o.opts.fontSizeUnit&&(n=Math.round(72*parseFloat(n,10)/96)+"pt"),e.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),e.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function(t){if(o.opts.fontSizeSelection){var e=o.helpers.getPX(i(o.selection.element()).css("font-size"));"pt"===o.opts.fontSizeUnit&&(e=Math.round(72*parseFloat(e,10)/96)+"pt"),t.find("> span").text(e)}}}},t.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(t){return t.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(t){return t.opts.fontSizeDefaultSelection},html:function(){for(var t='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.fontSize,n=0;n<e.length;n++){var o=e[n];t+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'+o+this.opts.fontSizeUnit+'" title="'+o+'">'+o+"</a></li>"}return t+="</ul>"},callback:function(t,e){this.fontSize.apply(e)},refresh:function(t){this.fontSize.refresh(t)},refreshOnShow:function(t,e){this.fontSize.refreshOnShow(t,e)},plugin:"fontSize"}),t.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),t.PLUGINS.fontSize=function(o){var i=o.$;return{apply:function e(t){o.format.applyStyle("font-size",t)},refreshOnShow:function f(t,e){var n=i(o.selection.element()).css("font-size");"pt"===o.opts.fontSizeUnit&&(n=Math.round(72*parseFloat(n,10)/96)+"pt"),e.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),e.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function n(t){if(o.opts.fontSizeSelection){var e=o.helpers.getPX(i(o.selection.element()).css("font-size"));"pt"===o.opts.fontSizeUnit&&(e=Math.round(72*parseFloat(e,10)/96)+"pt"),t.find("> span").text(e)}}}},t.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(t){return t.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(t){return t.opts.fontSizeDefaultSelection},html:function(){for(var t='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.fontSize,n=0;n<e.length;n++){var o=e[n];t+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'+o+this.opts.fontSizeUnit+'" title="'+o+'">'+o+"</a></li>"}return t+="</ul>"},callback:function(t,e){this.fontSize.apply(e)},refresh:function(t){this.fontSize.refresh(t)},refreshOnShow:function(t,e){this.fontSize.refreshOnShow(t,e)},plugin:"fontSize"}),t.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(t.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),t.PLUGINS.forms=function(s){var i,r=s.$;function t(t){t.preventDefault(),s.selection.clear(),r(this).data("mousedown",!0)}function e(t){r(this).data("mousedown")&&(t.stopPropagation(),r(this).removeData("mousedown"),p(i=this)),t.preventDefault()}function o(){s.$el.find("input, textarea, button").removeData("mousedown")}function n(){r(this).removeData("mousedown")}function u(){return i||null}function p(t){var e=s.popups.get("forms.edit");e||(e=function(){var t="";0<s.opts.formEditButtons.length&&(t='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formEditButtons),"</div>"));var e={buttons:t},o=s.popups.create("forms.edit",e);return s.$wp&&s.events.$on(s.$wp,"scroll.link-edit",function(){u()&&s.popups.isVisible("forms.edit")&&p(u())}),o}());var o=r(i=t);s.popups.refresh("forms.edit"),s.popups.setContainer("forms.edit",s.$sc);var n=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();s.popups.show("forms.edit",n,a,o.outerHeight())}function a(){var t=s.popups.get("forms.update"),e=u();if(e){var o=r(e);o.is("button")?t.find('input[type="text"][name="text"]').val(o.text()):t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function f(){i=null}function d(t){if(t)return s.popups.onRefresh("forms.update",a),s.popups.onHide("forms.update",f),!0;var e="";1<=s.opts.formUpdateButtons.length&&(e='<div class="fr-buttons">'.concat(s.button.buildList(s.opts.formUpdateButtons),"</div>"));var o=0,n={buttons:e,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(++o,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(++o,'" type="button">').concat(s.language.translate("Update"),"</button></div></div>")};return s.popups.create("forms.update",n)}return{_init:function(){s.events.$on(s.$el,s._mousedown,"input, textarea, button",t),s.events.$on(s.$el,s._mouseup,"input, textarea, button",e),s.events.$on(s.$el,"touchmove","input, textarea, button",n),s.events.$on(s.$el,s._mouseup,o),s.events.$on(s.$win,s._mouseup,o),d(!0),s.events.$on(s.$el,"submit","form",function(t){return t.preventDefault(),!1})},updateInput:function(){var t=s.popups.get("forms.update"),e=u();if(e){var o=r(e),n=t.find('input[type="text"][name="text"]').val()||"";n.length&&(o.is("button")?o.text(n):o.attr("placeholder",n)),s.popups.hide("forms.update"),p(e)}},getInput:u,applyStyle:function(t,e,o){void 0===e&&(e=s.opts.formStyles),void 0===o&&(o=s.opts.formMultipleStyles);var n=u();if(!n)return!1;if(!o){var a=Object.keys(e);a.splice(a.indexOf(t),1),r(n).removeClass(a.join(" "))}r(n).toggleClass(t)},showUpdatePopup:function(){var t=u();if(t){var e=r(t),o=s.popups.get("forms.update");o||(o=d()),s.popups.isVisible("forms.update")||s.popups.refresh("forms.update"),s.popups.setContainer("forms.update",s.$sc);var n=e.offset().left+e.outerWidth()/2,a=e.offset().top+e.outerHeight();s.popups.show("forms.update",n,a,e.outerHeight())}},showEditPopup:p,back:function(){s.events.disableBlur(),s.selection.restore(),s.events.enableBlur();var t=u();t&&s.$wp&&("BUTTON"===t.tagName&&s.selection.restore(),p(t))}}},t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),t.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),t.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list">',e=this.opts.formStyles;for(var o in e)e.hasOwnProperty(o)&&(t+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(o,'">').concat(this.language.translate(e[o]),"</a></li>"));return t+="</ul>"},callback:function(t,e){var o=this.forms.getInput();o&&(this.forms.applyStyle(e),this.forms.showEditPopup(o))},refreshOnShow:function(t,e){var o=this.$,n=this.forms.getInput();if(n){var a=o(n);e.find(".fr-command").each(function(){var t=o(this).data("param1");o(this).toggleClass("fr-active",a.hasClass(t))})}}}),t.DefineIcon("inputEdit",{NAME:"edit"}),t.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),t.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(t.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),t.PLUGINS.forms=function(i){var r,u=i.$;function e(t){t.preventDefault(),i.selection.clear(),u(this).data("mousedown",!0)}function o(t){u(this).data("mousedown")&&(t.stopPropagation(),u(this).removeData("mousedown"),f(r=this)),t.preventDefault()}function n(){i.$el.find("input, textarea, button").removeData("mousedown")}function a(){u(this).removeData("mousedown")}function p(){return r||null}function f(t){var e=i.popups.get("forms.edit");e||(e=function s(){var t="";0<i.opts.formEditButtons.length&&(t='<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formEditButtons),"</div>"));var e={buttons:t},o=i.popups.create("forms.edit",e);return i.$wp&&i.events.$on(i.$wp,"scroll.link-edit",function(){p()&&i.popups.isVisible("forms.edit")&&f(p())}),o}());var o=u(r=t);i.popups.refresh("forms.edit"),i.popups.setContainer("forms.edit",i.$sc);var n=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();i.popups.show("forms.edit",n,a,o.outerHeight())}function s(){var t=i.popups.get("forms.update"),e=p();if(e){var o=u(e);o.is("button")?t.find('input[type="text"][name="text"]').val(o.text()):t.find('input[type="text"][name="text"]').val(o.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function d(){r=null}function l(t){if(t)return i.popups.onRefresh("forms.update",s),i.popups.onHide("forms.update",d),!0;var e="";1<=i.opts.formUpdateButtons.length&&(e='<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formUpdateButtons),"</div>"));var o=0,n={buttons:e,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(++o,' "></div>\n <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(i.language.translate("Update"),"</button></div></div>")};return i.popups.create("forms.update",n)}return{_init:function c(){!function t(){i.events.$on(i.$el,i._mousedown,"input, textarea, button",e),i.events.$on(i.$el,i._mouseup,"input, textarea, button",o),i.events.$on(i.$el,"touchmove","input, textarea, button",a),i.events.$on(i.$el,i._mouseup,n),i.events.$on(i.$win,i._mouseup,n),l(!0)}(),i.events.$on(i.$el,"submit","form",function(t){return t.preventDefault(),!1})},updateInput:function m(){var t=i.popups.get("forms.update"),e=p();if(e){var o=u(e),n=t.find('input[type="text"][name="text"]').val()||"";n.length&&(o.is("button")?o.text(n):o.attr("placeholder",n)),i.popups.hide("forms.update"),f(e)}},getInput:p,applyStyle:function v(t,e,o){void 0===e&&(e=i.opts.formStyles),void 0===o&&(o=i.opts.formMultipleStyles);var n=p();if(!n)return!1;if(!o){var a=Object.keys(e);a.splice(a.indexOf(t),1),u(n).removeClass(a.join(" "))}u(n).toggleClass(t)},showUpdatePopup:function h(){var t=p();if(t){var e=u(t),o=i.popups.get("forms.update");o||(o=l()),i.popups.isVisible("forms.update")||i.popups.refresh("forms.update"),i.popups.setContainer("forms.update",i.$sc);var n=e.offset().left+e.outerWidth()/2,a=e.offset().top+e.outerHeight();i.popups.show("forms.update",n,a,e.outerHeight())}},showEditPopup:f,back:function b(){i.events.disableBlur(),i.selection.restore(),i.events.enableBlur();var t=p();t&&i.$wp&&("BUTTON"===t.tagName&&i.selection.restore(),f(t))}}},t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),t.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),t.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list">',e=this.opts.formStyles;for(var o in e)e.hasOwnProperty(o)&&(t+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(o,'">').concat(this.language.translate(e[o]),"</a></li>"));return t+="</ul>"},callback:function(t,e){var o=this.forms.getInput();o&&(this.forms.applyStyle(e),this.forms.showEditPopup(o))},refreshOnShow:function(t,e){var o=this.$,n=this.forms.getInput();if(n){var a=o(n);e.find(".fr-command").each(function(){var t=o(this).data("param1");o(this).toggleClass("fr-active",a.hasClass(t))})}}}),t.DefineIcon("inputEdit",{NAME:"edit"}),t.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),t.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),t.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.fullscreen=function(r){var t,o,s,n,i=r.$;function a(){return r.$box.hasClass("fr-fullscreen")}function e(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(f,250),!1;t=r.helpers.scrollTop(),r.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),r.helpers.isMobile()&&(r.$tb.data("parent",r.$tb.parent()),r.$box.prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy"))),o=r.opts.height,s=r.opts.heightMax,n=r.opts.zIndex,r.opts.height=r.o_win.innerHeight-(r.opts.toolbarInline?0:r.$tb.outerHeight()+(r.$second_tb?r.$second_tb.outerHeight():0)),r.opts.zIndex=2147483641,r.opts.heightMax=null,r.size.refresh(),r.opts.toolbarInline&&r.toolbar.showInline();for(var e=r.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&r.$box.prepend(r.$tb),r.events.trigger("charCounter.update"),r.events.trigger("codeView.update"),r.$win.trigger("scroll")}function l(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(f,250),!1;r.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),r.$tb.data("parent")&&r.$tb.data("parent").prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")),r.opts.height=o,r.opts.heightMax=s,r.opts.zIndex=n,r.size.refresh(),i(r.o_win).scrollTop(t),r.opts.toolbarInline&&r.toolbar.showInline(),r.events.trigger("charCounter.update"),r.opts.toolbarSticky&&r.opts.toolbarStickyOffset&&(r.opts.toolbarBottom?r.$tb.css("bottom",r.opts.toolbarStickyOffset).data("bottom",r.opts.toolbarStickyOffset):r.$tb.css("top",r.opts.toolbarStickyOffset).data("top",r.opts.toolbarStickyOffset));for(var e=r.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&i(r.opts.toolbarContainer).append(r.$tb),i(r.o_win).trigger("scroll"),r.events.trigger("codeView.update")}function f(){a()?l():e(),c(r.$tb.find('.fr-command[data-cmd="fullscreen"]')),r.refresh.moreText(r.$tb.find('.fr-command[data-cmd="moreText"]')),r.refresh.moreParagraph(r.$tb.find('.fr-command[data-cmd="moreParagraph"]')),r.refresh.moreRich(r.$tb.find('.fr-command[data-cmd="moreRich"]')),r.refresh.moreMisc(r.$tb.find('.fr-command[data-cmd="moreMisc"]'))}function c(e){var t=a();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?r.icon.create("fullscreenCompress"):r.icon.create("fullscreen"))}return{_init:function(){if(!r.$wp)return!1;r.events.$on(i(r.o_win),"resize",function(){a()&&(l(),e())}),r.events.on("toolbar.hide",function(){if(a()&&r.helpers.isMobile())return!1}),r.events.on("position.refresh",function(){if(r.helpers.isIOS())return!a()}),r.events.on("destroy",function(){a()&&l()},!0)},toggle:f,refresh:c,isActive:a}},e.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"}),e.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),e.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.fullscreen=function(r){var t,o,s,n,i=r.$;function a(){return r.$box.hasClass("fr-fullscreen")}function e(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(f,250),!1;t=r.helpers.scrollTop(),r.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),r.helpers.isMobile()&&(r.$tb.data("parent",r.$tb.parent()),r.$box.prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy"))),o=r.opts.height,s=r.opts.heightMax,n=r.opts.zIndex,r.opts.height=r.o_win.innerHeight-(r.opts.toolbarInline?0:r.$tb.outerHeight()+(r.$second_tb?r.$second_tb.outerHeight():0)),r.opts.zIndex=2147483641,r.opts.heightMax=null,r.size.refresh(),r.opts.toolbarInline&&r.toolbar.showInline();for(var e=r.$box.parent();!e.first().is("body");)e.addClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&r.$box.prepend(r.$tb),r.events.trigger("charCounter.update"),r.events.trigger("codeView.update"),r.$win.trigger("scroll")}function l(){if(r.helpers.isIOS()&&r.core.hasFocus())return r.$el.blur(),setTimeout(f,250),!1;r.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),r.$tb.data("parent")&&r.$tb.data("parent").prepend(r.$tb),r.$tb.data("sticky-dummy")&&r.$tb.after(r.$tb.data("sticky-dummy")),r.opts.height=o,r.opts.heightMax=s,r.opts.zIndex=n,r.size.refresh(),i(r.o_win).scrollTop(t),r.opts.toolbarInline&&r.toolbar.showInline(),r.events.trigger("charCounter.update"),r.opts.toolbarSticky&&r.opts.toolbarStickyOffset&&(r.opts.toolbarBottom?r.$tb.css("bottom",r.opts.toolbarStickyOffset).data("bottom",r.opts.toolbarStickyOffset):r.$tb.css("top",r.opts.toolbarStickyOffset).data("top",r.opts.toolbarStickyOffset));for(var e=r.$box.parent();!e.first().is("body");)e.removeClass("fr-fullscreen-wrapper"),e=e.parent();r.opts.toolbarContainer&&i(r.opts.toolbarContainer).append(r.$tb),i(r.o_win).trigger("scroll"),r.events.trigger("codeView.update")}function f(){a()?l():e(),c(r.$tb.find('.fr-command[data-cmd="fullscreen"]')),r.refresh.moreText(r.$tb.find('.fr-command[data-cmd="moreText"]')),r.refresh.moreParagraph(r.$tb.find('.fr-command[data-cmd="moreParagraph"]')),r.refresh.moreRich(r.$tb.find('.fr-command[data-cmd="moreRich"]')),r.refresh.moreMisc(r.$tb.find('.fr-command[data-cmd="moreMisc"]'))}function c(e){var t=a();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?r.icon.create("fullscreenCompress"):r.icon.create("fullscreen"))}return{_init:function d(){if(!r.$wp)return!1;r.events.$on(i(r.o_win),"resize",function(){a()&&(l(),e())}),r.events.on("toolbar.hide",function(){if(a()&&r.helpers.isMobile())return!1}),r.events.on("position.refresh",function(){if(r.helpers.isIOS())return!a()}),r.events.on("destroy",function(){a()&&l()},!0)},toggle:f,refresh:c,isActive:a}},e.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"}),e.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),e.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"}]}]}),e.PLUGINS.help=function(n){var a,o=n.$,s="help";return{_init:function(){},show:function(){if(!a){var e="<h4>"+n.language.translate("Shortcuts")+"</h4>",t=function(){for(var e='<div class="fr-help-modal">',t=0;t<n.opts.helpSets.length;t++){var l=n.opts.helpSets[t],a="<table>";a+="<thead><tr><th>"+n.language.translate(l.title)+"</th></tr></thead>",a+="<tbody>";for(var o=0;o<l.commands.length;o++){var s=l.commands[o];a+="<tr>",a+="<td>"+n.language.translate(s.desc)+"</td>",a+="<td>"+s.val.replace("OSkey",n.helpers.isMac()?"⌘":"Ctrl+")+"</td>",a+="</tr>"}e+=a+="</tbody></table>"}return e+="</div>"}(),l=n.modals.create(s,e,t);a=l.$modal,n.events.$on(o(n.o_win),"resize",function(){n.modals.resize(s)})}n.modals.show(s),n.modals.resize(s)},hide:function(){n.modals.hide(s)}}},e.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),e.RegisterShortcut(e.KEYCODE.SLASH,"help",null,"/"),e.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.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"}]}]}),e.PLUGINS.help=function(d){var a,o=d.$,s="help";return{_init:function e(){},show:function c(){if(!a){var e="<h4>"+d.language.translate("Shortcuts")+"</h4>",t=function n(){for(var e='<div class="fr-help-modal">',t=0;t<d.opts.helpSets.length;t++){var l=d.opts.helpSets[t],a="<table>";a+="<thead><tr><th>"+d.language.translate(l.title)+"</th></tr></thead>",a+="<tbody>";for(var o=0;o<l.commands.length;o++){var s=l.commands[o];a+="<tr>",a+="<td>"+d.language.translate(s.desc)+"</td>",a+="<td>"+s.val.replace("OSkey",d.helpers.isMac()?"⌘":"Ctrl+")+"</td>",a+="</tr>"}e+=a+="</tbody></table>"}return e+="</div>"}(),l=d.modals.create(s,e,t);a=l.$modal,d.events.$on(o(d.o_win),"resize",function(){d.modals.resize(s)})}d.modals.show(s),d.modals.resize(s)},hide:function t(){d.modals.hide(s)}}},e.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),e.RegisterShortcut(e.KEYCODE.SLASH,"help",null,"/"),e.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(z){"use strict";if(z=z&&z.hasOwnProperty("default")?z["default"]:z,Object.assign(z.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),z.PLUGINS.imageManager=function(s){var g,l,r,n,i,d,o,m,f,c,u,p=s.$,h="image_manager",e=10,v=11,M=12,b=13,w=14,C=15,t=21,L=22,D={};function y(){var e=p(window).outerWidth();return e<768?2:e<1200?3:4}function P(){i.empty();for(var e=0;e<u;e++)i.append('<div class="fr-list-column"></div>')}function I(){if(f<o.length&&(i.outerHeight()<=r.outerHeight()+s.opts.imageManagerScrollOffset||r.scrollTop()+s.opts.imageManagerScrollOffset>i.outerHeight()-r.outerHeight())){m++;for(var e=s.opts.imageManagerPageSize*(m-1);e<Math.min(o.length,s.opts.imageManagerPageSize*m);e++)a(o[e])}}function a(n){var i=new Image,o=p(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+c++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");R(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var t=p(document.createElement("img"));if(n.thumb)t.attr("src",n.thumb);else{if(O(w,n),!n.url)return O(C,n),!1;t.attr("src",n.url)}if(n.url&&t.attr("data-url",n.url),n.tag)if(l.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),l.find(".fr-modal-tags").show(),0<=n.tag.indexOf(",")){for(var e=n.tag.split(","),a=0;a<e.length;a++)e[a]=e[a].trim(),0===d.find('a[title="'+e[a]+'"]').length&&d.append('<a role="button" title="'+e[a]+'">'+e[a]+"</a>");t.attr("data-tag",e.join())}else 0===d.find('a[title="'+n.tag.trim()+'"]').length&&d.append('<a role="button" title="'+n.tag.trim()+'">'+n.tag.trim()+"</a>"),t.attr("data-tag",n.tag.trim());for(var r in n.name&&t.attr("alt",n.name),n)n.hasOwnProperty(r)&&"thumb"!==r&&"url"!==r&&"tag"!==r&&t.attr("data-"+r,n[r]);o.append(t).append(p(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(p(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),d.find(".fr-selected-tag").each(function(e,a){k(t,a.text)||o.hide()}),t.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),f++,E(T(parseInt(t.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),R(!1),f%s.opts.imageManagerPageSize==0&&I()}),s.events.trigger("imageManager.imageLoaded",[t])},i.onerror=function(){f++,o.remove(),E(T(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),O(e,n),f%s.opts.imageManagerPageSize==0&&I()},i.src=n.thumb||n.url,S().append(o)}function S(){var r,n;return i.find(".fr-list-column").each(function(e,a){var t=p(a);0===e?(n=t.outerHeight(),r=t):t.outerHeight()<n&&(n=t.outerHeight(),r=t)}),r}function T(e){e===undefined&&(e=0);for(var a=[],t=c-1;e<=t;t--){var r=i.find(".fr-image-"+t);r.length&&(a.push(r),p(document.createElement("div")).attr("id","fr-image-hidden-container").append(r),i.find(".fr-image-"+t).remove())}return a}function E(e){for(var a=e.length-1;0<=a;a--)S().append(e[a])}function R(e){if(e===undefined&&(e=!0),!g.isVisible())return!0;var a=y();if(a!==u){u=a;var t=T();P(),E(t)}s.modals.resize(h),e&&I()}function U(e){var a={},t=e.data();for(var r in t)t.hasOwnProperty(r)&&"url"!==r&&"tag"!==r&&(a[r]=t[r]);return a}function x(e){var a=p(e.currentTarget).siblings("img"),t=g.data("instance")||s,r=g.data("current-image");if(s.modals.hide(h),t.image.showProgressBar(),r)r.data("fr-old-src",r.attr("src")),r.trigger("click");else{t.events.focus(!0),t.selection.restore();var n=t.position.getBoundingRect(),i=n.left+n.width/2+p(s.doc).scrollLeft(),o=n.top+n.height+p(s.doc).scrollTop();t.popups.setContainer("image.insert",s.$sc),t.popups.show("image.insert",i,o)}t.image.insert(a.data("url"),!1,U(a),r)}function H(e){var n=p(e.currentTarget).siblings("img"),a=s.language.translate("Are you sure? Image will be deleted.");confirm(a)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[n])&&(n.parent().addClass("fr-image-deleting"),p(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:n.attr("src")},U(n)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imageDeleted",[e]);var r=T(parseInt(n.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);n.parent().remove(),E(r),g.find("#fr-modal-tags > a").each(function(){0===g.find('#fr-image-list [data-tag*="'+p(this).text()+'"]').length&&p(this).removeClass("fr-selected-tag").hide()}),_(),R(!0)},fail:function(e){O(t,e.response||e.responseText)}})):O(L))}function O(e,a){10<=e&&e<20?n.hide():20<=e&&e<30&&p(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:D[e]},a])}function q(){var e=l.find(".fr-modal-head-line").outerHeight(),a=d.outerHeight();l.toggleClass("fr-show-tags"),l.hasClass("fr-show-tags")?(l.css("height",e+a),r.css("marginTop",e+a),d.find("a").css("opacity",1)):(l.css("height",e),r.css("marginTop",e),d.find("a").css("opacity",0))}function _(){var e=d.find(".fr-selected-tag");0<e.length?(i.find("img").parents().show(),e.each(function(e,r){i.find("img").each(function(e,a){var t=p(a);k(t,r.text)||t.parent().hide()})})):i.find("img").parents().show(),E(T()),I()}function j(e){e.preventDefault();var a=p(e.currentTarget);a.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&a.siblings("a").removeClass("fr-selected-tag"),_()}function k(e,a){for(var t=(e.attr("data-tag")||"").split(","),r=0;r<t.length;r++)if(t[r]===a)return!0;return!1}return D[e]="Image cannot be loaded from the passed link.",D[v]="Error during load images request.",D[M]="Missing imageManagerLoadURL option.",D[b]="Parsing load response failed.",D[w]="Missing image thumb.",D[C]="Missing image URL.",D[t]="Error during delete image request.",D[L]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function(){if(!g){var e,a='<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(z.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="'+s.language.translate("Loading")+'.." src="'+s.opts.imageManagerPreloader+'" style="display: none;">':'<span class="fr-preloader" id="fr-preloader" style="display: none;">'+s.language.translate("Loading")+"</span>",e+='<div class="fr-image-list" id="fr-image-list"></div>';var t=s.modals.create(h,a,e);g=t.$modal,l=t.$head,r=t.$body}g.data("current-image",s.image.get()),s.modals.show(h),n||(n=g.find("#fr-preloader"),i=g.find("#fr-image-list"),d=g.find("#fr-modal-tags"),u=y(),P(),l.css("height",l.find(".fr-modal-head-line").outerHeight()),s.events.$on(p(s.o_win),"resize",function(){R(!!o)}),s.events.bindClick(i,".fr-insert-img",x),s.events.bindClick(i,".fr-delete-img",H),s.helpers.isMobile()&&(s.events.bindClick(i,"div.fr-image-container",function(e){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),p(e.currentTarget).addClass("fr-mobile-selected")}),g.on(s._mousedown,function(){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),g.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),g.on(s._mousedown,"*",function(){s.events.disableBlur()}),r.on("scroll",I),s.events.bindClick(g,"button#fr-modal-more-"+s.sid,q),s.events.bindClick(d,"a",j)),function(){n.show(),i.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?p(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,dataType:"json",crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imagesLoaded",[e]),function(e,a){try{i.find(".fr-list-column").empty(),c=f=m=0,o=e,I()}catch(t){O(b,a)}}(e,t.response),n.hide()},fail:function(e){O(v,e.response||e.responseText)}}):O(M)}()},hide:function(){s.modals.hide(h)}}},!z.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");z.DEFAULTS.imageInsertButtons.push("imageManager"),z.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),z.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),z.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),z.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"})}); | ||
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],a):a(e.FroalaEditor)}(this,function(A){"use strict";if(A=A&&A.hasOwnProperty("default")?A["default"]:A,Object.assign(A.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),A.PLUGINS.imageManager=function(s){var g,l,i,o,d,m,f,c,u,p,h,v=s.$,M="image_manager",e=10,b=11,w=12,C=13,L=14,D=15,t=21,r=22,n={};function y(){var e=v(window).outerWidth();return e<768?2:e<1200?3:4}function P(){d.empty();for(var e=0;e<h;e++)d.append('<div class="fr-list-column"></div>')}function I(){if(u<f.length&&(d.outerHeight()<=i.outerHeight()+s.opts.imageManagerScrollOffset||i.scrollTop()+s.opts.imageManagerScrollOffset>d.outerHeight()-i.outerHeight())){c++;for(var e=s.opts.imageManagerPageSize*(c-1);e<Math.min(f.length,s.opts.imageManagerPageSize*c);e++)a(f[e])}}function a(n){var i=new Image,o=v(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+p++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");R(!1),i.onload=function(){o.height(Math.floor(o.width()/i.width*i.height));var t=v(document.createElement("img"));if(n.thumb)t.attr("src",n.thumb);else{if(O(L,n),!n.url)return O(D,n),!1;t.attr("src",n.url)}if(n.url&&t.attr("data-url",n.url),n.tag)if(l.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),l.find(".fr-modal-tags").show(),0<=n.tag.indexOf(",")){for(var e=n.tag.split(","),a=0;a<e.length;a++)e[a]=e[a].trim(),0===m.find('a[title="'+e[a]+'"]').length&&m.append('<a role="button" title="'+e[a]+'">'+e[a]+"</a>");t.attr("data-tag",e.join())}else 0===m.find('a[title="'+n.tag.trim()+'"]').length&&m.append('<a role="button" title="'+n.tag.trim()+'">'+n.tag.trim()+"</a>"),t.attr("data-tag",n.tag.trim());for(var r in n.name&&t.attr("alt",n.name),n)n.hasOwnProperty(r)&&"thumb"!==r&&"url"!==r&&"tag"!==r&&t.attr("data-"+r,n[r]);o.append(t).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"))),m.find(".fr-selected-tag").each(function(e,a){k(t,a.text)||o.hide()}),t.on("load",function(){o.removeClass("fr-empty"),o.height("auto"),u++,E(T(parseInt(t.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),R(!1),u%s.opts.imageManagerPageSize==0&&I()}),s.events.trigger("imageManager.imageLoaded",[t])},i.onerror=function(){u++,o.remove(),E(T(parseInt(o.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),O(e,n),u%s.opts.imageManagerPageSize==0&&I()},i.src=n.thumb||n.url,S().append(o)}function S(){var r,n;return d.find(".fr-list-column").each(function(e,a){var t=v(a);0===e?(n=t.outerHeight(),r=t):t.outerHeight()<n&&(n=t.outerHeight(),r=t)}),r}function T(e){e===undefined&&(e=0);for(var a=[],t=p-1;e<=t;t--){var r=d.find(".fr-image-"+t);r.length&&(a.push(r),v(document.createElement("div")).attr("id","fr-image-hidden-container").append(r),d.find(".fr-image-"+t).remove())}return a}function E(e){for(var a=e.length-1;0<=a;a--)S().append(e[a])}function R(e){if(e===undefined&&(e=!0),!g.isVisible())return!0;var a=y();if(a!==h){h=a;var t=T();P(),E(t)}s.modals.resize(M),e&&I()}function U(e){var a={},t=e.data();for(var r in t)t.hasOwnProperty(r)&&"url"!==r&&"tag"!==r&&(a[r]=t[r]);return a}function x(e){var a=v(e.currentTarget).siblings("img"),t=g.data("instance")||s,r=g.data("current-image");if(s.modals.hide(M),t.image.showProgressBar(),r)r.data("fr-old-src",r.attr("src")),r.trigger("click");else{t.events.focus(!0),t.selection.restore();var n=t.position.getBoundingRect(),i=n.left+n.width/2+v(s.doc).scrollLeft(),o=n.top+n.height+v(s.doc).scrollTop();t.popups.setContainer("image.insert",s.$sc),t.popups.show("image.insert",i,o)}t.image.insert(a.data("url"),!1,U(a),r)}function H(e){var i=v(e.currentTarget).siblings("img"),a=s.language.translate("Are you sure? Image will be deleted.");confirm(a)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[i])&&(i.parent().addClass("fr-image-deleting"),v(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:i.attr("src")},U(i)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imageDeleted",[e]);var r=T(parseInt(i.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);i.parent().remove(),E(r),function n(){g.find("#fr-modal-tags > a").each(function(){0===g.find('#fr-image-list [data-tag*="'+v(this).text()+'"]').length&&v(this).removeClass("fr-selected-tag").hide()}),_()}(),R(!0)},fail:function(e){O(t,e.response||e.responseText)}})):O(r))}function O(e,a){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:n[e]},a])}function q(){var e=l.find(".fr-modal-head-line").outerHeight(),a=m.outerHeight();l.toggleClass("fr-show-tags"),l.hasClass("fr-show-tags")?(l.css("height",e+a),i.css("marginTop",e+a),m.find("a").css("opacity",1)):(l.css("height",e),i.css("marginTop",e),m.find("a").css("opacity",0))}function _(){var e=m.find(".fr-selected-tag");0<e.length?(d.find("img").parents().show(),e.each(function(e,r){d.find("img").each(function(e,a){var t=v(a);k(t,r.text)||t.parent().hide()})})):d.find("img").parents().show(),E(T()),I()}function j(e){e.preventDefault();var a=v(e.currentTarget);a.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&a.siblings("a").removeClass("fr-selected-tag"),_()}function k(e,a){for(var t=(e.attr("data-tag")||"").split(","),r=0;r<t.length;r++)if(t[r]===a)return!0;return!1}return n[e]="Image cannot be loaded from the passed link.",n[b]="Error during load images request.",n[w]="Missing imageManagerLoadURL option.",n[C]="Parsing load response failed.",n[L]="Missing image thumb.",n[D]="Missing image URL.",n[t]="Error during delete image request.",n[r]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function z(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function G(){if(!g){var e,a='<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(A.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="'+s.language.translate("Loading")+'.." src="'+s.opts.imageManagerPreloader+'" style="display: none;">':'<span class="fr-preloader" id="fr-preloader" style="display: none;">'+s.language.translate("Loading")+"</span>",e+='<div class="fr-image-list" id="fr-image-list"></div>';var t=s.modals.create(M,a,e);g=t.$modal,l=t.$head,i=t.$body}g.data("current-image",s.image.get()),s.modals.show(M),o||function r(){o=g.find("#fr-preloader"),d=g.find("#fr-image-list"),m=g.find("#fr-modal-tags"),h=y(),P(),l.css("height",l.find(".fr-modal-head-line").outerHeight()),s.events.$on(v(s.o_win),"resize",function(){R(!!f)}),s.events.bindClick(d,".fr-insert-img",x),s.events.bindClick(d,".fr-delete-img",H),s.helpers.isMobile()&&(s.events.bindClick(d,"div.fr-image-container",function(e){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),v(e.currentTarget).addClass("fr-mobile-selected")}),g.on(s._mousedown,function(){g.find(".fr-mobile-selected").removeClass("fr-mobile-selected")})),g.on(s._mousedown+" "+s._mouseup,function(e){e.stopPropagation()}),g.on(s._mousedown,"*",function(){s.events.disableBlur()}),i.on("scroll",I),s.events.bindClick(g,"button#fr-modal-more-"+s.sid,q),s.events.bindClick(m,"a",j)}(),function n(){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,dataType:"json",crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,a,t){s.events.trigger("imageManager.imagesLoaded",[e]),function r(e,a){try{d.find(".fr-list-column").empty(),p=u=c=0,f=e,I()}catch(t){O(C,a)}}(e,t.response),o.hide()},fail:function(e){O(b,e.response||e.responseText)}}):O(w)}()},hide:function $(){s.modals.hide(M)}}},!A.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");A.DEFAULTS.imageInsertButtons.push("imageManager"),A.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),A.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),A.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),A.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(ye){"use strict";function we(e){return(we="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)}ye=ye&&ye.hasOwnProperty("default")?ye["default"]:ye,Object.assign(ye.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(ye.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,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}),ye.PLUGINS.image=function(g){var d,l,f,p,o,a,c=g.$,m="https://i.froala.com/upload",t=!1,i=1,u=2,h=3,v=4,b=5,y=6,r={};function w(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),d&&e.val(d.attr("src")),e.trigger("change")}function n(){var e=g.popups.get("image.edit");if(e||(e=U()),e){var t=ve();be()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();d.hasClass("fr-uploading")?I():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function C(){P()}function e(){for(var e,t,a="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),i=0;i<a.length;i++){var r=c(a[i]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(t=r).parents(".fr-img-caption").length&&(t=t.parents(".fr-img-caption").first()),t.hasClass("fr-dii")||t.hasClass("fr-dib")||(t.addClass("fr-fi"+de(t)[0]),t.addClass("fr-di"+ce(t)[0]),t.css("margin",""),t.css("float",""),t.css("display",""),t.css("z-index",""),t.css("position",""),t.css("overflow",""),t.css("vertical-align",""))),g.opts.imageTextNear||(0<r.parents(".fr-img-caption").length?r.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):r.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=r).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),ge(e,e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":de(e)),e.removeClass("fr-dib fr-dii fr-fir fr-fil")),g.opts.iframe&&r.on("load",g.size.syncIframe)}}function A(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),c(a[t]).toggleClass("fr-draggable",g.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&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;g.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!g.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[c(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[c(a[t])])}o=a}function E(){if(l||function(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){c("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=c(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(s("nw")+s("ne")+s("sw")+s("se")),g.shared.$img_overlay=c(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,c(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(c(g.o_win),"resize",function(){d&&!d.hasClass("fr-uploading")?oe(!0):d&&(E(),me(),I(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",R),g.events.$on(c(e),g._mousemove,D),g.events.$on(c(e.defaultView||e.parentWindow),g._mouseup,x),g.events.$on(p,"mouseleave",x);var i=1,r=null,n=0;g.events.on("keydown",function(e){if(d){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==ye.KEYCODE.EQUALS||g.browser.mozilla&&a==ye.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=Q.call(this,e,1,1,i):(a==ye.KEYCODE.HYPHEN||g.browser.mozilla&&a==ye.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=Q.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=ye.KEYCODE.ENTER||(d.before("<br>"),k(d)),r=a,n=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!d)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=ve();be()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;g.opts.iframe&&(r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function s(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function S(e){be()?d.parents(".fr-img-caption").css("width",e):d.css("width",e)}function R(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}r&&i.frameElement&&(t+=g.helpers.getPX(c(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=c(this)).data("start-x",t),f.data("start-width",d.width()),f.data("start-height",d.height());var n=d.width();if(g.opts.imageResizeWithPercent){var s=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=(n/c(s).outerWidth()*100).toFixed(2)+"%"}S(n),p.show(),g.popups.hideAll(),pe()}function D(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&d){if(e.preventDefault(),g.$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 i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var n=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=((r+i)/c(n).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(r=Math.round(r)),S(r+"%"),(t=be()?(g.helpers.getPX(d.parents(".fr-img-caption").css("width"))/c(n).outerWidth()*100).toFixed(2):(g.helpers.getPX(d.css("width"))/c(n).outerWidth()*100).toFixed(2))===r||g.opts.imageRoundPercent||S(t+"%"),d.css("height","").removeAttr("height")}else r+i>=g.opts.imageMinWidth&&(S(r+i),t=be()?g.helpers.getPX(d.parents(".fr-img-caption").css("width")):g.helpers.getPX(d.css("width"))),t!==r+i&&S(t),((d.attr("style")||"").match(/(^height:)|(; *height:)/)||d.attr("height"))&&(d.css("height",f.data("start-height")*d.width()/f.data("start-width")),d.removeAttr("height"));E(),g.events.trigger("image.resize",[he()])}}function x(e){if(!g.core.sameInstance(l))return!0;if(f&&d){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),E(),n(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[he()])}}function $(e,t,a){g.edit.on(),d&&d.addClass("fr-error"),function(e){I();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}(g.language.translate("Something went wrong. Please try again.")),!d&&a&&J(a),g.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function U(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){d&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),n())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function I(e){var t=g.popups.get("image.insert");if(t||(t=G()),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(),d){var a=ve();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,r=a.offset().top+a.height();g.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&O(g.language.translate("Uploading"),0)}function P(e){var t=g.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||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&d){var a=d;oe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function O(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" "+t+"%":"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width",t+"%")):i.find("div").addClass("fr-indeterminate")}}function k(e){se.call(e.get(0))}function N(){var e=c(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),k(e),g.events.trigger("image.loaded",[e])}function B(s,e,o,l,f){g.edit.off(),O(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$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 i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")&&e.removeAttr(n.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-"+t,o[t]);e.on("load",N),e.attr("src",s),g.edit.on(),A(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=M(s,o,N),A(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){$(i)},I(g.language.translate("Loading image")),t.src=s}function T(e){O(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,r=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var n=function(e){try{var t=c(e).find("Location").text(),a=c(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return $(v,e),!1}}(i);n&&B(n,!1,[],e,a||i)}else $(v,a||i,e);else if(200<=t&&t<300){var s=function(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:($(u,e),!1)}catch(a){return $(v,e),!1}}(r);s&&B(s.link,!1,s,e,a||r)}else $(h,a||r,e)}catch(o){$(v,a||r,e)}}function _(){$(v,this.response||this.responseText||this.responseXML)}function L(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;O(g.language.translate("Uploading"),t)}}function M(e,t,a){var i,r=c(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-"+i+'="'+t[i]+'"',r.attr("data-str"+i,t[i]));var n=g.opts.imageDefaultWidth;n&&"auto"!=n&&(n=g.opts.imageResizeWithPercent?"100%":n+"px"),r.attr("style",n?"width: "+n+";":""),ge(r,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(r)):g.$el.append(r),g.selection.clear(),r}function z(){g.edit.on(),P(!0)}function K(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==m)&&!g.opts.imageUploadToS3)return s=i,o=t||d,(l=new FileReader).onload=function(){var e=l.result;if(l.result.indexOf("svg+xml")<0){for(var t=atob(l.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:s.type})),g.image.insert(e,!1,null,o)}},I(),l.readAsDataURL(s),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return $(b),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return $(y),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var r;if(!1!==g.opts.imageUploadToS3)for(r in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadToS3.params[r]);for(r in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadParams[r]);a.append(g.opts.imageUploadParam,i,i.name);var n=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(n=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://"+g.opts.imageUploadToS3.region+".amazonaws.com/"+g.opts.imageUploadToS3.bucket),function(t,a,e,r){function n(){var e=c(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),k(e),E(),I(),g.edit.off(),t.onload=function(){T.call(t,e)},t.onerror=_,t.upload.onprogress=L,t.onabort=z,c(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),oe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",n),r.on("error",function(){n(),c(this).off("error")}),g.edit.on(),g.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):M(e,null,n)},s.readAsDataURL(e)}(g.core.getXHR(n,g.opts.imageUploadMethod),a,i,t||d)}}var s,o,l}function Y(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function W(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(ye.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=G()),g.popups.setContainer("image.insert",g.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().top+s,r+=g.$iframe.offset().left+o}return g.popups.show("image.insert",r,n),I(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(oe(!0),K(t.files)):$(y),e.preventDefault(),e.stopPropagation(),!1}}}function G(e){if(e)return g.popups.onRefresh("image.insert",w),g.popups.onHide("image.insert",C),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=g.button.buildList(g.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'+r+"</div>");var n=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=n&&(t=" fr-active",0<=s&&s<n&&(t=""),o='<div class="fr-image-upload-layer'+t+' fr-layer" id="fr-image-upload-layer-'+g.id+'"><strong>'+g.language.translate("Drop image")+"</strong><br>("+g.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+g.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+g.id+'" role="button"></div></div>');var l="";0<=s&&(t=" fr-active",0<=n&&n<s&&(t=""),l='<div class="fr-image-by-url-layer'+t+' fr-layer" id="fr-image-by-url-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+g.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">'+g.language.translate("Insert")+"</button></div></div>");var f,p={buttons:i,upload_layer:o,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<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",p)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){d&&g.popups.isVisible("image.insert")&&me()}),f=a,g.events.$on(f,"dragover dragenter",".fr-image-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),g.events.$on(f,"dragleave dragend",".fr-image-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),g.events.$on(f,"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=f.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(f,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0),g.events.$on(f,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=f.data("instance")||g;e.events.disableBlur(),f.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,d)}c(this).val("")},!0),a}function V(){d&&g.popups.get("image.alt").find("input").val(d.attr("alt")||"").trigger("change")}function H(){var e=g.popups.get("image.alt");e||(e=X()),P(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=ve();be()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function X(e){if(e)return g.popups.onRefresh("image.alt",V),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageAltButtons)+"</div>",alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+g.id+'" type="text" placeholder="'+g.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">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){d&&g.popups.isVisible("image.alt")&&H()}),a}function F(){var e=g.popups.get("image.size");if(d)if(be()){var t=d.parent();t.get(0).style.width||(t=d.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(d.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(d.get(0).style.height).trigger("change")}function j(){var e=g.popups.get("image.size");e||(e=q()),P(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=ve();be()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function q(e){if(e)return g.popups.onRefresh("image.size",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageSizeButtons)+"</div>",size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+g.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+g.id+'" type="text" name="width" placeholder="'+g.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+g.id+'" type="text" name="height" placeholder="'+g.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">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){d&&g.popups.isVisible("image.size")&&j()}),a}function Q(e,t,a,i){return e.pageX=t,R.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),D.call(this,e),x.call(this,e),++i}function J(e){(e=e||ve())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),ue(),oe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(ye.MARKERS),c(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(ye.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function Z(e){var t=e.which;if(d&&(t==ye.KEYCODE.BACKSPACE||t==ye.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),J(),!1;if(d&&t==ye.KEYCODE.ESC){var a=d;return oe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(d&&(t==ye.KEYCODE.ARROW_LEFT||t==ye.KEYCODE.ARROW_RIGHT)){var i=d.get(0);return oe(!0),t==ye.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}return d&&t===ye.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),oe(!0),!1):d&&t!=ye.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0}function ee(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.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 i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ee(i[r])}function te(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;d=c(e),E(),n(),me(),I(),d.on("load",function(){E(),I(),c(this).off("load")});for(var t=c(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));K([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],d)}function ae(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),c(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ge(c(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))te(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){te(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/"+e)},a.src=(0===i.src.indexOf("blob:")?"":g.opts.imageCORSProxy+"/")+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),c(i).remove(),g.selection.restore()):c(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function ie(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'+t+'"'+(a?' style="width: '+a+';"':"")+">");var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&ge(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function re(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=e.clipboardData.types.indexOf("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 i=t,(r=new FileReader).onload=ie,r.readAsDataURL(i),!1}var i,r}function ne(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function se(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&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<ye.INSTANCES.length;t++)ye.INSTANCES[t]!=g&&ye.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),d=c(this),ue(),E(),n(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function oe(e){d&&(le||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),d=null,pe(),f=null,p&&p.hide())}r[i]="Image cannot be loaded from the passed link.",r[u]="No link in upload response.",r[h]="Error during file upload.",r[v]="Parsing response failed.",r[b]="File is too large.",r[y]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var le=!(r[8]="Image file is corrupted.");function fe(){le=!0}function pe(){le=!1}function ge(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi"+a[0]),t&&e.addClass("fr-di"+t[0])):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*g.opts.imageDefaultMargin+"px)",textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:g.opts.imageDefaultMargin+"px auto",textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function de(e){if(void 0===e&&(e=ve()),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 ce(e){void 0===e&&(e=ve());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 me(){var e=g.popups.get("image.insert");e||(e=G()),g.popups.isVisible("image.insert")||(P(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=ve();be()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function ue(){if(d){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(d.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function he(){return d}function ve(){return be()?d.parents(".fr-img-caption").first():d}function be(){return!!d&&0<d.parents(".fr-img-caption").length}return{_init:function(){var i;g.events.$on(g.$el,g._mousedown,"IMG"==g.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;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.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(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?k(c(t)):a&&"IMG"==a.tagName&&k(c(a))}},!0),g.events.on("drop",W),g.events.on("element.beforeDrop",Y),g.events.on("mousedown window.mousedown",fe),g.events.on("window.touchmove",pe),g.events.on("mouseup window.mouseup",function(){if(d)return oe(),!1;pe()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&oe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){oe(!(t=!1))}),g.events.on("modals.hide",function(){d&&(ue(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&k(d)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===ye.ENTER_BR?e.after("<br>"):c(g.node.blockParent(e.get(0))).after("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">"))}),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',se),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",Z,!0),g.events.on("keyup",function(e){if(d&&e.which==ye.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=c(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(c(e).after(c.FE.INVISIBLE_SPACE+c.FE.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",Z),g.events.on("toolbar.esc",function(){if(d){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=d;oe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(d)return!1},!0),g.events.on("window.cut window.copy",function(e){if(d&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=ve();be()?(t.before(ye.START_MARKER),t.after(ye.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(ue(),g.paste.saveCopiedText(d.get(0).outerHTML,d.attr("alt"))),"copy"==e.type?setTimeout(function(){k(d)}):(oe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!d)return!0;var t=e.which;t==ye.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==ye.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(c(g.o_win),"keydown",function(e){var t=e.which;if(d&&t==ye.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;d&&d.hasClass("fr-uploading")&&t==ye.KEYCODE.ESC&&d.trigger("abortUpload")}),g.events.on("destroy",function(){d&&d.hasClass("fr-uploading")&&d.trigger("abortUpload")}),g.events.on("paste.before",re),g.events.on("paste.beforeCleanup",ne),g.events.on("paste.after",ae),g.events.on("html.set",e),g.events.on("html.inserted",e),e(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ee),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||c(i[e]).width(),a=i[e].style.height||c(i[e]).height();t&&i[e].setAttribute("width",(""+t).replace(/px/,"")),a&&i[e].setAttribute("height",(""+a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(A(),g.events.on("contentChanged",A)),g.events.$on(c(g.o_win),"orientationchange.image",function(){setTimeout(function(){d&&k(d)},100)}),U(!0),G(!0),q(!0),X(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return J(e),!1})},showInsertPopup:function(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=G()),P(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,r=a.top;g.popups.show("image.insert",i,r,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function(e){var t,a,i=g.popups.get("image.insert");if(d||g.opts.toolbarInline){if(d){var r=ve();be()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(g.opts.toolbarBottom?10:n.outerHeight()-10)}!d&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-"+e+"-layer").addClass("fr-active"),g.popups.show("image.insert",t,a,d?d.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){I(),O(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?K([new Blob([this.response],{type:this.response.type||"image/png"})],d):$(i)},a.onerror=function(){B(t,!0,[],d)},a.open("GET",g.opts.imageCORSProxy+"/"+t,!0),a.responseType="blob",a.send()}else B(t,!0,[],d);e.val(""),e.blur()}},align:function(e){var t=ve();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ge(t,ce(),e),ue(),E(),n(),g.selection.clear()},refreshAlign:function(e){d&&e.find("> *").first().replaceWith(g.icon.create("image-align-"+de()))},refreshAlignOnShow:function(e,t){d&&t.find('.fr-command[data-param1="'+de()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function(e){var t=ve();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ge(t,e,de()),ue(),E(),n(),g.selection.clear()},refreshDisplayOnShow:function(e,t){d&&t.find('.fr-command[data-param1="'+ce()+'"]').addClass("fr-active").attr("aria-selected",!0)},replace:me,back:function(){d?(g.events.disableBlur(),c(".fr-popup input:focus").blur(),k(d)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:he,getEl:ve,insert:B,showProgressBar:I,remove:J,hideProgressBar:P,applyStyle:function(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!d)return!1;var i=ve();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==we(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),k(d)},showAltPopup:H,showSizePopup:j,setAlt:function(e){if(d){var t=g.popups.get("image.alt");d.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),k(d)}},setSize:function(e,t){if(d){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;d.removeAttr("width").removeAttr("height"),e.match(i)?d.css("width",e):d.css("width",""),t.match(i)?d.css("height",t):d.css("height",""),be()&&(d.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?d.parents(".fr-img-caption").css("width",e):d.parents(".fr-img-caption").css("width",""),t.match(i)?d.parents(".fr-img-caption").css("height",t):d.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),k(d)}},toggleCaption:function(){var e;if(d&&!be()){var t,a;(e=d).parent().is("a")&&(e=d.parent()),e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var i=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":d.width()+"px";e.wrap("<span "+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+d.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span>'),e.wrap('<span class="fr-img-wrap"></span>'),d.after('<span class="fr-inner"'+(g.browser.mozilla?"":' contenteditable="true"')+">"+ye.START_MARKER+g.language.translate("Image Caption")+ye.END_MARKER+"</span>"),d.removeAttr("class").removeAttr("style").removeAttr("width"),d.parents(".fr-img-caption").css("width",i),oe(!0),g.selection.restore()}else e=ve(),d.insertAfter(e),d.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),k(d)},hasCaption:be,exitEdit:oe,edit:k}},ye.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),ye.RegisterShortcut(ye.KEYCODE.P,"insertImage",null,"P"),ye.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"}),ye.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),ye.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)}}),ye.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),ye.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)}}),ye.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"))}}),ye.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),ye.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)}}),ye.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),ye.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ye.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ye.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),ye.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ye.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=ye.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="'+a+'" title="'+this.language.translate(t[a])+'">'+this.icon.create("image-align-"+a)+'<span class="fr-sr-only">'+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)}}),ye.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),ye.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),ye.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),ye.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),ye.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),ye.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"))}}),ye.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),ye.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),ye.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 i=t[a];"object"==we(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+a+'">'+this.language.translate(i)+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&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)})}}),ye.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),ye.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),ye.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),ye.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),ye.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),ye.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),ye.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),ye.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())}})}); | ||
!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(Te){"use strict";function _e(e){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Te=Te&&Te.hasOwnProperty("default")?Te["default"]:Te,Object.assign(Te.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(Te.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,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}),Te.PLUGINS.image=function(g){var d,l,f,p,o,a,c=g.$,s="https://i.froala.com/upload",t=!1,i=1,m=2,u=3,h=4,v=5,b=6,r={};function y(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),d&&e.val(d.attr("src")),e.trigger("change")}function n(){var e=g.popups.get("image.edit");if(e||(e=P()),e){var t=ye();we()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();d.hasClass("fr-uploading")?O():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function w(){k()}function C(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":me(e);ce(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function A(){for(var e,t="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=c(t[a]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi"+me(e)[0]),e.addClass("fr-di"+ue(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",""))),g.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&C(i),g.opts.iframe&&i.on("load",g.size.syncIframe)}}function E(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),c(a[t]).toggleClass("fr-draggable",g.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&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;g.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!g.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[c(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[c(a[t])])}o=a}function S(){if(l||function s(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){c("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=c(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(R("nw")+R("ne")+R("sw")+R("se")),g.shared.$img_overlay=c(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,c(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(c(g.o_win),"resize",function(){d&&!d.hasClass("fr-uploading")?fe(!0):d&&(S(),he(),O(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",x),g.events.$on(c(e),g._mousemove,$),g.events.$on(c(e.defaultView||e.parentWindow),g._mouseup,U),g.events.$on(p,"mouseleave",U);var i=1,r=null,n=0;g.events.on("keydown",function(e){if(d){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==Te.KEYCODE.EQUALS||g.browser.mozilla&&a==Te.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=Z.call(this,e,1,1,i):(a==Te.KEYCODE.HYPHEN||g.browser.mozilla&&a==Te.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=Z.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=Te.KEYCODE.ENTER||(d.before("<br>"),B(d)),r=a,n=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!d)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=ye();we()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;g.opts.iframe&&(r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function D(e){we()?d.parents(".fr-img-caption").css("width",e):d.css("width",e)}function x(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}r&&i.frameElement&&(t+=g.helpers.getPX(c(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=c(this)).data("start-x",t),f.data("start-width",d.width()),f.data("start-height",d.height());var n=d.width();if(g.opts.imageResizeWithPercent){var s=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=(n/c(s).outerWidth()*100).toFixed(2)+"%"}D(n),p.show(),g.popups.hideAll(),de()}function $(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&d){if(e.preventDefault(),g.$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 i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var n=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=((r+i)/c(n).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(r=Math.round(r)),D(r+"%"),(t=we()?(g.helpers.getPX(d.parents(".fr-img-caption").css("width"))/c(n).outerWidth()*100).toFixed(2):(g.helpers.getPX(d.css("width"))/c(n).outerWidth()*100).toFixed(2))===r||g.opts.imageRoundPercent||D(t+"%"),d.css("height","").removeAttr("height")}else r+i>=g.opts.imageMinWidth&&(D(r+i),t=we()?g.helpers.getPX(d.parents(".fr-img-caption").css("width")):g.helpers.getPX(d.css("width"))),t!==r+i&&D(t),((d.attr("style")||"").match(/(^height:)|(; *height:)/)||d.attr("height"))&&(d.css("height",f.data("start-height")*d.width()/f.data("start-width")),d.removeAttr("height"));S(),g.events.trigger("image.resize",[be()])}}function U(e){if(!g.core.sameInstance(l))return!0;if(f&&d){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),S(),n(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[be()])}}function I(e,t,a){g.edit.on(),d&&d.addClass("fr-error"),function i(e){O();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}(g.language.translate("Something went wrong. Please try again.")),!d&&a&&ee(a),g.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function P(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){d&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),n())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function O(e){var t=g.popups.get("image.insert");if(t||(t=H()),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(),d){var a=ye();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,r=a.offset().top+a.height();g.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&N(g.language.translate("Uploading"),0)}function k(e){var t=g.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||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&d){var a=d;fe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function N(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" "+t+"%":"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width",t+"%")):i.find("div").addClass("fr-indeterminate")}}function B(e){le.call(e.get(0))}function T(){var e=c(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),B(e),g.events.trigger("image.loaded",[e])}function _(s,e,o,l,f){g.edit.off(),N(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$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 i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")&&e.removeAttr(n.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-"+t,o[t]);e.on("load",T),e.attr("src",s),g.edit.on(),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=K(s,o,T),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){I(i)},O(g.language.translate("Loading image")),t.src=s}function L(e){N(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,r=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var n=function o(e){try{var t=c(e).find("Location").text(),a=c(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return I(h,e),!1}}(i);n&&_(n,!1,[],e,a||i)}else I(h,a||i,e);else if(200<=t&&t<300){var s=function l(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(m,e),!1)}catch(a){return I(h,e),!1}}(r);s&&_(s.link,!1,s,e,a||r)}else I(u,a||r,e)}catch(f){I(h,a||r,e)}}function M(){I(h,this.response||this.responseText||this.responseXML)}function z(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;N(g.language.translate("Uploading"),t)}}function K(e,t,a){var i,r=c(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-"+i+'="'+t[i]+'"',r.attr("data-str"+i,t[i]));var n=g.opts.imageDefaultWidth;n&&"auto"!=n&&(n=g.opts.imageResizeWithPercent?"100%":n+"px"),r.attr("style",n?"width: "+n+";":""),ce(r,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(r)):g.$el.append(r),g.selection.clear(),r}function Y(){g.edit.on(),k(!0)}function W(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==s)&&!g.opts.imageUploadToS3)return function o(r,n){var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),g.image.insert(e,!1,null,n)}},O(),s.readAsDataURL(r)}(i,t||d),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return I(v),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(b),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var r;if(!1!==g.opts.imageUploadToS3)for(r in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadToS3.params[r]);for(r in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadParams[r]);a.append(g.opts.imageUploadParam,i,i.name);var n=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(n=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://"+g.opts.imageUploadToS3.region+".amazonaws.com/"+g.opts.imageUploadToS3.bucket),function l(t,a,e,r){function n(){var e=c(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),B(e),S(),O(),g.edit.off(),t.onload=function(){L.call(t,e)},t.onerror=M,t.upload.onprogress=z,t.onabort=Y,c(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),fe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",n),r.on("error",function(){n(),c(this).off("error")}),g.edit.on(),g.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):K(e,null,n)},s.readAsDataURL(e)}(g.core.getXHR(n,g.opts.imageUploadMethod),a,i,t||d)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function V(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(Te.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=H()),g.popups.setContainer("image.insert",g.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().top+s,r+=g.$iframe.offset().left+o}return g.popups.show("image.insert",r,n),O(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(fe(!0),W(t.files)):I(b),e.preventDefault(),e.stopPropagation(),!1}}}function H(e){if(e)return g.popups.onRefresh("image.insert",y),g.popups.onHide("image.insert",w),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=g.button.buildList(g.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'+r+"</div>");var n=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=n&&(t=" fr-active",0<=s&&s<n&&(t=""),o='<div class="fr-image-upload-layer'+t+' fr-layer" id="fr-image-upload-layer-'+g.id+'"><strong>'+g.language.translate("Drop image")+"</strong><br>("+g.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+g.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+g.id+'" role="button"></div></div>');var l="";0<=s&&(t=" fr-active",0<=n&&n<s&&(t=""),l='<div class="fr-image-by-url-layer'+t+' fr-layer" id="fr-image-by-url-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+g.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">'+g.language.translate("Insert")+"</button></div></div>");var f={buttons:i,upload_layer:o,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<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",f)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){d&&g.popups.isVisible("image.insert")&&he()}),function p(i){g.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),g.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),g.events.$on(i,"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=i.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0),g.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||g;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,d)}c(this).val("")},!0)}(a),a}function X(){d&&g.popups.get("image.alt").find("input").val(d.attr("alt")||"").trigger("change")}function F(){var e=g.popups.get("image.alt");e||(e=j()),k(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=ye();we()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function j(e){if(e)return g.popups.onRefresh("image.alt",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageAltButtons)+"</div>",alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+g.id+'" type="text" placeholder="'+g.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">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){d&&g.popups.isVisible("image.alt")&&F()}),a}function q(){var e=g.popups.get("image.size");if(d)if(we()){var t=d.parent();t.get(0).style.width||(t=d.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(d.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(d.get(0).style.height).trigger("change")}function Q(){var e=g.popups.get("image.size");e||(e=J()),k(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=ye();we()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function J(e){if(e)return g.popups.onRefresh("image.size",q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageSizeButtons)+"</div>",size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+g.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+g.id+'" type="text" name="width" placeholder="'+g.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+g.id+'" type="text" name="height" placeholder="'+g.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">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){d&&g.popups.isVisible("image.size")&&Q()}),a}function Z(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),$.call(this,e),U.call(this,e),++i}function ee(e){(e=e||ye())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),ve(),fe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(Te.MARKERS),c(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(Te.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function te(e){var t=e.which;if(d&&(t==Te.KEYCODE.BACKSPACE||t==Te.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),ee(),!1;if(d&&t==Te.KEYCODE.ESC){var a=d;return fe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(!d||t!=Te.KEYCODE.ARROW_LEFT&&t!=Te.KEYCODE.ARROW_RIGHT)return d&&t===Te.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),fe(!0),!1):d&&t!=Te.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=d.get(0);return fe(!0),t==Te.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}function ae(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.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 i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ae(i[r])}function ie(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;d=c(e),S(),n(),he(),O(),d.on("load",function(){S(),O(),c(this).off("load")});for(var t=c(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));W([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],d)}function re(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),c(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),ce(c(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))ie(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){ie(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/"+e)},a.src=(0===i.src.indexOf("blob:")?"":g.opts.imageCORSProxy+"/")+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),c(i).remove(),g.selection.restore()):c(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function ne(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'+t+'"'+(a?' style="width: '+a+';"':"")+">");var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&ce(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function se(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=e.clipboardData.types.indexOf("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 i(e){var t=new FileReader;t.onload=ne,t.readAsDataURL(e)}(t),!1}}function oe(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function le(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&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<Te.INSTANCES.length;t++)Te.INSTANCES[t]!=g&&Te.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),d=c(this),ve(),S(),n(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function fe(e){d&&(function t(){return pe}()||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),d=null,de(),f=null,p&&p.hide())}r[i]="Image cannot be loaded from the passed link.",r[m]="No link in upload response.",r[u]="Error during file upload.",r[h]="Parsing response failed.",r[v]="File is too large.",r[b]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var pe=!(r[8]="Image file is corrupted.");function ge(){pe=!0}function de(){pe=!1}function ce(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi"+a[0]),t&&e.addClass("fr-di"+t[0])):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*g.opts.imageDefaultMargin+"px)",textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:g.opts.imageDefaultMargin+"px auto",textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function me(e){if(void 0===e&&(e=ye()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function ue(e){void 0===e&&(e=ye());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function he(){var e=g.popups.get("image.insert");e||(e=H()),g.popups.isVisible("image.insert")||(k(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=ye();we()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function ve(){if(d){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(d.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function be(){return d}function ye(){return we()?d.parents(".fr-img-caption").first():d}function we(){return!!d&&0<d.parents(".fr-img-caption").length}return{_init:function Ce(){var i;(function e(){g.events.$on(g.$el,g._mousedown,"IMG"==g.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;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.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(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?B(c(t)):a&&"IMG"==a.tagName&&B(c(a))}},!0),g.events.on("drop",V),g.events.on("element.beforeDrop",G),g.events.on("mousedown window.mousedown",ge),g.events.on("window.touchmove",de),g.events.on("mouseup window.mouseup",function(){if(d)return fe(),!1;de()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&fe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){fe(!(t=!1))}),g.events.on("modals.hide",function(){d&&(ve(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&B(d)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===Te.ENTER_BR?e.after("<br>"):c(g.node.blockParent(e.get(0))).after("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">"))})})(),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',le),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",te,!0),g.events.on("keyup",function(e){if(d&&e.which==Te.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=c(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(c(e).after(c.FE.INVISIBLE_SPACE+c.FE.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",te),g.events.on("toolbar.esc",function(){if(d){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=d;fe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(d)return!1},!0),g.events.on("window.cut window.copy",function(e){if(d&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=ye();we()?(t.before(Te.START_MARKER),t.after(Te.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(ve(),g.paste.saveCopiedText(d.get(0).outerHTML,d.attr("alt"))),"copy"==e.type?setTimeout(function(){B(d)}):(fe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!d)return!0;var t=e.which;t==Te.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==Te.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(c(g.o_win),"keydown",function(e){var t=e.which;if(d&&t==Te.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;d&&d.hasClass("fr-uploading")&&t==Te.KEYCODE.ESC&&d.trigger("abortUpload")}),g.events.on("destroy",function(){d&&d.hasClass("fr-uploading")&&d.trigger("abortUpload")}),g.events.on("paste.before",se),g.events.on("paste.beforeCleanup",oe),g.events.on("paste.after",re),g.events.on("html.set",A),g.events.on("html.inserted",A),A(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ae),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||c(i[e]).width(),a=i[e].style.height||c(i[e]).height();t&&i[e].setAttribute("width",(""+t).replace(/px/,"")),a&&i[e].setAttribute("height",(""+a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(E(),g.events.on("contentChanged",E)),g.events.$on(c(g.o_win),"orientationchange.image",function(){setTimeout(function(){d&&B(d)},100)}),P(!0),H(!0),J(!0),j(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return ee(e),!1})},showInsertPopup:function Ae(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=H()),k(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,r=a.top;g.popups.show("image.insert",i,r,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function Ee(e){var t,a,i=g.popups.get("image.insert");if(d||g.opts.toolbarInline){if(d){var r=ye();we()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(g.opts.toolbarBottom?10:n.outerHeight()-10)}!d&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-"+e+"-layer").addClass("fr-active"),g.popups.show("image.insert",t,a,d?d.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function Se(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function Re(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:W,insertByURL:function De(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),N(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?W([new Blob([this.response],{type:this.response.type||"image/png"})],d):I(i)},a.onerror=function(){_(t,!0,[],d)},a.open("GET",g.opts.imageCORSProxy+"/"+t,!0),a.responseType="blob",a.send()}else _(t,!0,[],d);e.val(""),e.blur()}},align:function xe(e){var t=ye();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):ce(t,ue(),e),ve(),S(),n(),g.selection.clear()},refreshAlign:function $e(e){d&&e.find("> *").first().replaceWith(g.icon.create("image-align-"+me()))},refreshAlignOnShow:function Ue(e,t){d&&t.find('.fr-command[data-param1="'+me()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function Ie(e){var t=ye();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):ce(t,e,me()),ve(),S(),n(),g.selection.clear()},refreshDisplayOnShow:function Pe(e,t){d&&t.find('.fr-command[data-param1="'+ue()+'"]').addClass("fr-active").attr("aria-selected",!0)},replace:he,back:function e(){d?(g.events.disableBlur(),c(".fr-popup input:focus").blur(),B(d)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:be,getEl:ye,insert:_,showProgressBar:O,remove:ee,hideProgressBar:k,applyStyle:function Oe(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!d)return!1;var i=ye();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==_e(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),B(d)},showAltPopup:F,showSizePopup:Q,setAlt:function ke(e){if(d){var t=g.popups.get("image.alt");d.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),B(d)}},setSize:function Ne(e,t){if(d){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;d.removeAttr("width").removeAttr("height"),e.match(i)?d.css("width",e):d.css("width",""),t.match(i)?d.css("height",t):d.css("height",""),we()&&(d.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?d.parents(".fr-img-caption").css("width",e):d.parents(".fr-img-caption").css("width",""),t.match(i)?d.parents(".fr-img-caption").css("height",t):d.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),B(d)}},toggleCaption:function Be(){var e;if(d&&!we()){var t,a;(e=d).parent().is("a")&&(e=d.parent()),e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var i=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":d.width()+"px";e.wrap("<span "+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+d.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span>'),e.wrap('<span class="fr-img-wrap"></span>'),d.after('<span class="fr-inner"'+(g.browser.mozilla?"":' contenteditable="true"')+">"+Te.START_MARKER+g.language.translate("Image Caption")+Te.END_MARKER+"</span>"),d.removeAttr("class").removeAttr("style").removeAttr("width"),d.parents(".fr-img-caption").css("width",i),fe(!0),g.selection.restore()}else e=ye(),d.insertAfter(e),d.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),B(d)},hasCaption:we,exitEdit:fe,edit:B}},Te.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),Te.RegisterShortcut(Te.KEYCODE.P,"insertImage",null,"P"),Te.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"}),Te.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),Te.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)}}),Te.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),Te.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)}}),Te.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"))}}),Te.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),Te.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)}}),Te.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),Te.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Te.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Te.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),Te.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Te.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=Te.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="'+a+'" title="'+this.language.translate(t[a])+'">'+this.icon.create("image-align-"+a)+'<span class="fr-sr-only">'+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)}}),Te.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Te.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),Te.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),Te.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),Te.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),Te.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"))}}),Te.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),Te.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),Te.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 i=t[a];"object"==_e(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+a+'">'+this.language.translate(i)+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&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)})}}),Te.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),Te.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),Te.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),Te.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Te.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),Te.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),Te.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),Te.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())}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(n.FroalaEditor)}(this,function(n){"use strict";n=n&&n.hasOwnProperty("default")?n["default"]:n,Object.assign(n.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),n.PLUGINS.inlineClass=function(a){var i=a.$;return{apply:function(n){a.format.toggle("span",{"class":n})},refreshOnShow:function(n,e){e.find(".fr-command").each(function(){var n=i(this).data("param1"),e=a.format.is("span",{"class":n});i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}},n.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.inlineClasses;for(var a in e)e.hasOwnProperty(a)&&(n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'+a+'" title="'+e[a]+'">'+e[a]+"</a></li>");return n+="</ul>"},callback:function(n,e){this.inlineClass.apply(e)},refreshOnShow:function(n,e){this.inlineClass.refreshOnShow(n,e)},plugin:"inlineClass"}),n.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"})}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(n.FroalaEditor)}(this,function(n){"use strict";n=n&&n.hasOwnProperty("default")?n["default"]:n,Object.assign(n.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),n.PLUGINS.inlineClass=function(a){var i=a.$;return{apply:function e(n){a.format.toggle("span",{"class":n})},refreshOnShow:function s(n,e){e.find(".fr-command").each(function(){var n=i(this).data("param1"),e=a.format.is("span",{"class":n});i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}},n.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var n='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.inlineClasses;for(var a in e)e.hasOwnProperty(a)&&(n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'+a+'" title="'+e[a]+'">'+e[a]+"</a></li>");return n+="</ul>"},callback:function(n,e){this.inlineClass.apply(e)},refreshOnShow:function(n,e){this.inlineClass.refreshOnShow(n,e)},plugin:"inlineClass"}),n.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),a.PLUGINS.inlineStyle=function(i){return{apply:function(e){if(""!==i.selection.text())for(var t=e.split(";"),n=0;n<t.length;n++){var l=t[n].split(":");t[n].length&&2==l.length&&i.format.applyStyle(l[0].trim(),l[1].trim())}else i.html.insert('<span style="'+e+'">'+a.INVISIBLE_SPACE+a.MARKERS+"</span>")}}},a.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var n in t){if(t.hasOwnProperty(n))e+='<li role="presentation"><span style="'+(t[n]+(-1===t[n].indexOf("display:block;")?" display:block;":""))+'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="'+t[n]+'" title="'+this.language.translate(n)+'">'+this.language.translate(n)+"</a></span></li>"}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),a.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"})}); | ||
!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(o){"use strict";o=o&&o.hasOwnProperty("default")?o["default"]:o,Object.assign(o.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),o.PLUGINS.inlineStyle=function(i){return{apply:function a(e){if(""!==i.selection.text())for(var t=e.split(";"),n=0;n<t.length;n++){var l=t[n].split(":");t[n].length&&2==l.length&&i.format.applyStyle(l[0].trim(),l[1].trim())}else i.html.insert('<span style="'+e+'">'+o.INVISIBLE_SPACE+o.MARKERS+"</span>")}}},o.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var n in t){if(t.hasOwnProperty(n))e+='<li role="presentation"><span style="'+(t[n]+(-1===t[n].indexOf("display:block;")?" display:block;":""))+'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="'+t[n]+'" title="'+this.language.translate(n)+'">'+this.language.translate(n)+"</a></span></li>"}return e+="</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),o.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(g){"use strict";g=g&&g.hasOwnProperty("default")?g["default"]:g,Object.assign(g.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),g.PLUGINS.lineBreaker=function(c){var v,t,a,m=c.$;function s(e,t){var r,n,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,r=(f=t.offset().top)-Math.min((f-i)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),n=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),r=l+Math.min(Math.abs(s-l)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),n=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u<p)return!1;r=(p+u)/2,a=o.outerWidth(),n=o.offset().left}if(c.opts.iframe){var d=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-top")),g=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-left"));n+=c.$iframe.offset().left-c.helpers.scrollLeft()+g,r+=c.$iframe.offset().top-c.helpers.scrollTop()+d}c.$box.append(v),v.css("top",r-c.win.pageYOffset),v.css("left",n-c.win.pageXOffset),v.css("width",a),v.data("tag1",e),v.data("tag2",t),v.addClass("fr-visible").data("instance",c)}function f(e){if(e){var t=m(e);if(0===c.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(c.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(c.opts.lineBreakerTags.join(",")).length)return e=t.parents(c.opts.lineBreakerTags.join(",")).get(0),0!==c.$el.find(m(e)).length&&m(e).is(c.opts.lineBreakerTags.join(","))?m(e):null}return null}function o(e,t){var r=c.doc.elementFromPoint(e,t);return r&&!m(r).closest(".fr-line-breaker").length&&!c.node.isElement(r)&&r!=c.$wp.get(0)&&function(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==c.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==c.$wp.get(0),t.inFroalaWrapper}(r)?r:null}function i(e,t,r){for(var n=r,a=null;n<=c.opts.lineBreakerOffset&&!a;)(a=o(e,t-n))||(a=o(e,t+n)),n+=r;return a}function l(e,t,r){for(var n=null,a=100;!n&&e>c.$box.offset().left&&e<c.$box.offset().left+c.$box.outerWidth()&&0<a;)(n=o(e,t))||(n=i(e,t,5)),"left"==r?e-=c.opts.lineBreakerHorizontalOffset:e+=c.opts.lineBreakerHorizontalOffset,a-=c.opts.lineBreakerHorizontalOffset;return n}function r(e){var t=a=null,r=null,n=c.doc.elementFromPoint(e.pageX-c.win.pageXOffset,e.pageY-c.win.pageYOffset);n&&("HTML"==n.tagName||"BODY"==n.tagName||c.node.isElement(n)||0<=(n.getAttribute("class")||"").indexOf("fr-line-breaker"))?((r=i(e.pageX-c.win.pageXOffset,e.pageY-c.win.pageYOffset,1))||(r=l(e.pageX-c.win.pageXOffset-c.opts.lineBreakerHorizontalOffset,e.pageY-c.win.pageYOffset,"left")),r||(r=l(e.pageX-c.win.pageXOffset+c.opts.lineBreakerHorizontalOffset,e.pageY-c.win.pageYOffset,"right")),t=f(r)):t=f(n),t?function(e,t){var r,n,a=e.offset().top,o=e.offset().top+e.outerHeight();if(Math.abs(o-t)<=c.opts.lineBreakerOffset||Math.abs(t-a)<=c.opts.lineBreakerOffset)if(Math.abs(o-t)<Math.abs(t-a)){for(var i=(n=e.get(0)).nextSibling;i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return s(e,null);if(r=f(i))return s(e,r)}else{if(!(n=e.get(0)).previousSibling)return s(null,e);if(r=f(n.previousSibling))return s(r,e)}v.removeClass("fr-visible").removeData("instance")}(t,e.pageY):c.core.sameInstance(v)&&v.removeClass("fr-visible").removeData("instance")}function e(e){return!(v.hasClass("fr-visible")&&!c.core.sameInstance(v))&&(c.popups.areVisible()||c.el.querySelector(".fr-selected-cell")?(v.removeClass("fr-visible"),!0):void(!1!==t||c.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(r,30,e))))}function n(){a&&clearTimeout(a),v&&v.hasClass("fr-visible")&&v.removeClass("fr-visible").removeData("instance")}function p(){t=!0,n()}function u(){t=!1}function d(e){e.preventDefault();var t=v.data("instance")||c;v.removeClass("fr-visible").removeData("instance");var r=v.data("tag1"),n=v.data("tag2"),a=c.html.defaultTag();null==r?a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.before("<"+a+">"+g.MARKERS+"<br></"+a+">"):n.before(g.MARKERS+"<br>"):a&&"TD"!=r.parent().get(0).tagName&&0===r.parents(a).length?r.after("<"+a+">"+g.MARKERS+"<br></"+a+">"):r.after(g.MARKERS+"<br>"),t.selection.restore()}return{_init:function(){if(!c.$wp)return!1;c.shared.$line_breaker||(c.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+c.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>')),v=c.shared.$line_breaker,c.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),c.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),c.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),c.events.bindClick(v,"a",d),t=!1,c.events.$on(c.$win,"mousemove",e),c.events.$on(m(c.win),"scroll",n),c.events.on("popups.show.table.edit",n),c.events.on("commands.after",n),c.events.$on(m(c.win),"mousedown",p),c.events.$on(m(c.win),"mouseup",u)}}}}); | ||
!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(b){"use strict";b=b&&b.hasOwnProperty("default")?b["default"]:b,Object.assign(b.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),b.PLUGINS.lineBreaker=function(c){var v,t,a,m=c.$;function f(e,t){var n,r,a,o,i,s,f,l;if(null==e)i=(o=t.parent()).offset().top,n=(f=t.offset().top)-Math.min((f-i)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else if(null==t)(s=(o=e.parent()).offset().top+o.outerHeight())<(l=e.offset().top+e.outerHeight())&&(s=(o=m(o).parent()).offset().top+o.outerHeight()),n=l+Math.min(Math.abs(s-l)/2,c.opts.lineBreakerOffset),a=o.outerWidth(),r=o.offset().left;else{o=e.parent();var p=e.offset().top+e.height(),u=t.offset().top;if(u<p)return!1;n=(p+u)/2,a=o.outerWidth(),r=o.offset().left}if(c.opts.iframe){var d=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-top")),g=c.helpers.getPX(c.$wp.find(".fr-iframe").css("padding-left"));r+=c.$iframe.offset().left-c.helpers.scrollLeft()+g,n+=c.$iframe.offset().top-c.helpers.scrollTop()+d}c.$box.append(v),v.css("top",n-c.win.pageYOffset),v.css("left",r-c.win.pageXOffset),v.css("width",a),v.data("tag1",e),v.data("tag2",t),v.addClass("fr-visible").data("instance",c)}function l(e){if(e){var t=m(e);if(0===c.$el.find(t).length)return null;if(e.nodeType!=Node.TEXT_NODE&&t.is(c.opts.lineBreakerTags.join(",")))return t;if(0<t.parents(c.opts.lineBreakerTags.join(",")).length)return e=t.parents(c.opts.lineBreakerTags.join(",")).get(0),0!==c.$el.find(m(e)).length&&m(e).is(c.opts.lineBreakerTags.join(","))?m(e):null}return null}function o(e,t){var n=c.doc.elementFromPoint(e,t);return n&&!m(n).closest(".fr-line-breaker").length&&!c.node.isElement(n)&&n!=c.$wp.get(0)&&function r(e){if("undefined"!=typeof e.inFroalaWrapper)return e.inFroalaWrapper;for(var t=e;e.parentNode&&e.parentNode!==c.$wp.get(0);)e=e.parentNode;return t.inFroalaWrapper=e.parentNode==c.$wp.get(0),t.inFroalaWrapper}(n)?n:null}function i(e,t,n){for(var r=n,a=null;r<=c.opts.lineBreakerOffset&&!a;)(a=o(e,t-r))||(a=o(e,t+r)),r+=n;return a}function p(e,t,n){for(var r=null,a=100;!r&&e>c.$box.offset().left&&e<c.$box.offset().left+c.$box.outerWidth()&&0<a;)(r=o(e,t))||(r=i(e,t,5)),"left"==n?e-=c.opts.lineBreakerHorizontalOffset:e+=c.opts.lineBreakerHorizontalOffset,a-=c.opts.lineBreakerHorizontalOffset;return r}function n(e){var t=a=null,n=null,r=c.doc.elementFromPoint(e.pageX-c.win.pageXOffset,e.pageY-c.win.pageYOffset);(t=r&&("HTML"==r.tagName||"BODY"==r.tagName||c.node.isElement(r)||0<=(r.getAttribute("class")||"").indexOf("fr-line-breaker"))?((n=i(e.pageX-c.win.pageXOffset,e.pageY-c.win.pageYOffset,1))||(n=p(e.pageX-c.win.pageXOffset-c.opts.lineBreakerHorizontalOffset,e.pageY-c.win.pageYOffset,"left")),n||(n=p(e.pageX-c.win.pageXOffset+c.opts.lineBreakerHorizontalOffset,e.pageY-c.win.pageYOffset,"right")),l(n)):l(r))?function s(e,t){var n,r,a=e.offset().top,o=e.offset().top+e.outerHeight();if(Math.abs(o-t)<=c.opts.lineBreakerOffset||Math.abs(t-a)<=c.opts.lineBreakerOffset)if(Math.abs(o-t)<Math.abs(t-a)){for(var i=(r=e.get(0)).nextSibling;i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return f(e,null),!0;if(n=l(i))return f(e,n),!0}else{if(!(r=e.get(0)).previousSibling)return f(null,e),!0;if(n=l(r.previousSibling))return f(n,e),!0}v.removeClass("fr-visible").removeData("instance")}(t,e.pageY):c.core.sameInstance(v)&&v.removeClass("fr-visible").removeData("instance")}function r(e){return!(v.hasClass("fr-visible")&&!c.core.sameInstance(v))&&(c.popups.areVisible()||c.el.querySelector(".fr-selected-cell")?(v.removeClass("fr-visible"),!0):void(!1!==t||c.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(n,30,e))))}function s(){a&&clearTimeout(a),v&&v.hasClass("fr-visible")&&v.removeClass("fr-visible").removeData("instance")}function u(){t=!0,s()}function d(){t=!1}function g(e){e.preventDefault();var t=v.data("instance")||c;v.removeClass("fr-visible").removeData("instance");var n=v.data("tag1"),r=v.data("tag2"),a=c.html.defaultTag();null==n?a&&"TD"!=r.parent().get(0).tagName&&0===r.parents(a).length?r.before("<"+a+">"+b.MARKERS+"<br></"+a+">"):r.before(b.MARKERS+"<br>"):a&&"TD"!=n.parent().get(0).tagName&&0===n.parents(a).length?n.after("<"+a+">"+b.MARKERS+"<br></"+a+">"):n.after(b.MARKERS+"<br>"),t.selection.restore()}return{_init:function h(){if(!c.$wp)return!1;!function e(){c.shared.$line_breaker||(c.shared.$line_breaker=m(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+c.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>')),v=c.shared.$line_breaker,c.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null},!0),c.events.on("destroy",function(){v.removeData("instance").removeClass("fr-visible"),m("body").first().append(v),clearTimeout(a)},!0),c.events.$on(v,"mousemove",function(e){e.stopPropagation()},!0),c.events.bindClick(v,"a",g)}(),t=!1,c.events.$on(c.$win,"mousemove",r),c.events.$on(m(c.win),"scroll",s),c.events.on("popups.show.table.edit",s),c.events.on("commands.after",s),c.events.$on(m(c.win),"mousedown",u),c.events.$on(m(c.win),"mouseup",d)}}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),e.PLUGINS.lineHeight=function(a){var r=a.$;return{_init:function(){},apply:function(e){a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();var t=a.selection.blocks();a.selection.save();for(var i=0;i<t.length;i++)r(t[i]).css("line-height",e),""===r(t[i]).attr("style")&&r(t[i]).removeAttr("style");a.html.unwrap(),a.selection.restore()},refreshOnShow:function(e,t){var i=a.selection.blocks();if(i.length){var n=r(i[0]);t.find(".fr-command").each(function(){var e=r(this).data("param1"),t=0<=(n.attr("style")||"").indexOf("line-height: "+e+";");r(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},e.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command '+i+'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="'+t[i]+'" title="'+this.language.translate(i)+'">'+this.language.translate(i)+"</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"}),e.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),e.PLUGINS.lineHeight=function(a){var r=a.$;return{_init:function e(){},apply:function n(e){a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();var t=a.selection.blocks();a.selection.save();for(var i=0;i<t.length;i++)r(t[i]).css("line-height",e),""===r(t[i]).attr("style")&&r(t[i]).removeAttr("style");a.html.unwrap(),a.selection.restore()},refreshOnShow:function l(e,t){var i=a.selection.blocks();if(i.length){var n=r(i[0]);t.find(".fr-command").each(function(){var e=r(this).data("param1"),t=0<=(n.attr("style")||"").indexOf("line-height: "+e+";");r(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},e.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command '+i+'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="'+t[i]+'" title="'+this.language.translate(i)+'">'+this.language.translate(i)+"</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"}),e.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(m){"use strict";m=m&&m.hasOwnProperty("default")?m["default"]:m,Object.assign(m.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(m.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}),m.PLUGINS.link=function(c){var d=c.$;function u(){var e=c.image?c.image.get():null;if(!e&&c.$wp){var t=c.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(c.el)||!c.el.contains(t)||c.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=c.selection.element(),i=c.selection.endElement();"A"==n.tagName||c.node.isElement(n)||(n=d(n).parentsUntil(c.$el,"a").first().get(0)),"A"==i.tagName||c.node.isElement(i)||(i=d(i).parentsUntil(c.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(c.el)||!c.el.contains(i)||c.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(c.el)||!c.el.contains(n)||c.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(c.browser.msie||c.helpers.isMobile())&&(c.selection.info(n).atEnd||c.selection.info(n).atStart)?null:n:null}return"A"==c.el.tagName?c.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0}function k(){var e,t,n,i,r=c.image?c.image.get():null,l=[];if(r)"A"==r.get(0).parentNode.tagName&&l.push(r.get(0).parentNode);else if(c.win.getSelection){var a=c.win.getSelection();if(a.getRangeAt&&a.rangeCount){i=c.doc.createRange();for(var s=0;s<a.rangeCount;++s)if((t=(e=a.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())l.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&l.push(n[o])}}}else if(c.doc.selection&&"Control"!=c.doc.selection.type)if("a"==(t=(e=c.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())l.push(t);else{n=t.getElementsByTagName("a"),i=c.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&l.push(n[p])}return l}function g(r){if(c.core.hasFocus()){if(a(),r&&"keyup"===r.type&&(r.altKey||r.which==m.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=u(),t=c.image?c.image.get():null;if(e&&!t){if(c.image){var n=c.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=c.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?d(e).before(m.MARKERS):d(e).after(m.MARKERS),c.selection.restore(),!1}}r&&r.stopPropagation(),l(e)}}},c.helpers.isIOS()?100:0)}}function l(e){var t=c.popups.get("link.edit");t||(t=function(){var e="";1<=c.opts.linkEditButtons.length&&("A"==c.el.tagName&&0<=c.opts.linkEditButtons.indexOf("linkRemove")&&c.opts.linkEditButtons.splice(c.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(c.button.buildList(c.opts.linkEditButtons),"</div>"));var t={buttons:e},n=c.popups.create("link.edit",t);c.$wp&&c.events.$on(c.$wp,"scroll.link-edit",function(){u()&&c.popups.isVisible("link.edit")&&l(u())});return n}());var n=d(e);c.popups.isVisible("link.edit")||c.popups.refresh("link.edit"),c.popups.setContainer("link.edit",c.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();c.popups.show("link.edit",i,r,n.outerHeight(),!0)}function a(){c.popups.hide("link.edit")}function o(){var e=c.popups.get("link.insert"),t=u();if(t){var n,i,r=d(t),l=e.find('input.fr-link-attr[type="text"]'),a=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<l.length;n++)(i=d(l[n])).val(r.attr(i.attr("name")||""));for(a.attr("checked",!1),n=0;n<a.length;n++)i=d(a[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(c.selection.text());e.find("input.fr-link-attr").trigger("change"),(c.image?c.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 c.popups.onRefresh("link.insert",o),!0;var t="";1<=c.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'+c.button.buildList(c.opts.linkInsertButtons)+"</div>");var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'+c.id+'">',n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'+c.id+'" name="href" type="text" class="fr-link-attr" placeholder="'+c.language.translate("URL")+'" tabIndex="'+ ++i+'"></div>',c.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'+c.id+'" name="text" type="text" class="fr-link-attr" placeholder="'+c.language.translate("Text")+'" tabIndex="'+ ++i+'"></div>'),c.opts.linkAttributes)if(c.opts.linkAttributes.hasOwnProperty(r)){var l=c.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'+r+'" type="text" class="fr-link-attr" placeholder="'+c.language.translate(l)+'" tabIndex="'+ ++i+'"></div>'}c.opts.linkAlwaysBlank||(n+='<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(c.id,'" tabIndex="').concat(++i,'"><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(c.id,'">').concat(c.language.translate("Open in new tab"),"</label></div>"));var a={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'+ ++i+'" type="button">'+c.language.translate("Insert")+"</button></div></div>"},s=c.popups.create("link.insert",a);return c.$wp&&c.events.$on(c.$wp,"scroll.link-insert",function(){(c.image?c.image.get():null)&&c.popups.isVisible("link.insert")&&h(),c.popups.isVisible("link.insert")&&f()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===c.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=c.image?c.image.get():null;i||"A"==c.el.tagName?"A"==c.el.tagName&&c.$el.focus():(c.selection.restore(),c.popups.hide("link.insert"));var r=e;c.opts.linkConvertEmailAddress&&c.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:"+e);if(""===c.opts.linkAutoPrefix||new RegExp("^("+m.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=c.opts.linkAutoPrefix+c.helpers.sanitizeURL(e)),e=c.helpers.sanitizeURL(e),c.opts.linkAlwaysBlank&&(n.target="_blank"),c.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),c.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(c.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),c.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===c.opts.linkAutoPrefix)return c.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),c.events.trigger("link.bad",[r]),!1;var l,a=u();if(a){if((l=d(a)).attr("href",e),0<t.length&&l.text()!=t&&!i){for(var s=l.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];d(s).text(t)}i||l.prepend(m.START_MARKER).append(m.END_MARKER),l.attr(n),i||c.selection.restore()}else{i?(i.wrap('<a href="'+e+'"></a>'),c.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(c.format.remove("a"),c.selection.isCollapsed()?(t=0===t.length?r:t,c.html.insert('<a href="'+e+'">'+m.START_MARKER+t.replace(/&/g,"&").replace(/</,"<",">",">")+m.END_MARKER+"</a>"),c.selection.restore()):0<t.length&&t!=c.selection.text().replace(/\n/g,"")?(c.selection.remove(),c.html.insert('<a href="'+e+'">'+m.START_MARKER+t.replace(/&/g,"&")+m.END_MARKER+"</a>"),c.selection.restore()):(!function(){if(!c.selection.isCollapsed()){c.selection.save();for(var e=c.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=d(e.pop());t.removeClass("fr-unprocessed");var n=c.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",l="";i=i.parentNode,c.node.isBlock(i)||(r+=c.node.closeTagString(i),l=c.node.openTagString(i)+l),i!=n;);var a=c.node.openTagString(t.get(0))+t.html()+c.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+a+l)).replace(l+r,""),n.outerHTML=s}e=c.$el.find(".fr-marker.fr-unprocessed").toArray()}c.html.cleanEmptyTags(),c.selection.restore()}}(),c.format.apply("a",{href:e})));for(var o=k(),p=0;p<o.length;p++)(l=d(o[p])).attr(n),l.removeAttr("_moz_dirty");1==o.length&&c.$wp&&!i&&(d(o[0]).prepend(m.START_MARKER).append(m.END_MARKER),c.selection.restore())}if(i){var f=c.popups.get("link.insert");f&&f.find("input:focus").blur(),c.image.edit(i)}else g()}function f(){a();var e=u();if(e){var t=c.popups.get("link.insert");t||(t=s()),c.popups.isVisible("link.insert")||(c.popups.refresh("link.insert"),c.selection.save(),c.helpers.isMobile()&&(c.events.disableBlur(),c.$el.blur(),c.events.enableBlur())),c.popups.setContainer("link.insert",c.$sc);var n=(c.image?c.image.get():null)||d(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();c.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function h(){var e=c.image?c.image.getEl():null;if(e){var t=c.popups.get("link.insert");c.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),c.popups.setContainer("link.insert",c.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();c.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function(){c.events.on("keyup",function(e){e.which!=m.KEYCODE.ESC&&g(e)}),c.events.on("window.mouseup",g),c.events.$on(c.$el,"click","a",function(e){c.edit.isDisabled()&&e.preventDefault()}),c.helpers.isMobile()&&c.events.$on(c.$doc,"selectionchange",g),s(!0),"A"==c.el.tagName&&c.$el.addClass("fr-view"),c.events.on("toolbar.esc",function(){if(c.popups.isVisible("link.edit"))return c.events.disableBlur(),c.events.focus(),!1},!0)},remove:function(){var e=u(),t=c.image?c.image.get():null;if(!1===c.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),c.image.edit(t)):e&&(c.selection.save(),d(e).replaceWith(d(e).html()),c.selection.restore(),a())},showInsertPopup:function(){var e=c.$tb.find('.fr-command[data-cmd="insertLink"]'),t=c.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(c.popups.refresh("link.insert"),c.popups.setContainer("link.insert",c.$tb||c.$sc),e.isVisible()){var n=c.button.getPosition(e),i=n.left,r=n.top;c.popups.show("link.insert",i,r,e.outerHeight())}else c.position.forSelection(t),c.popups.show("link.insert")},usePredefined:function(e){var t,n,i=c.opts.linkList[e],r=c.popups.get("link.insert"),l=r.find('input.fr-link-attr[type="text"]'),a=r.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<l.length;n++)i[(t=d(l[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<a.length;n++)(t=d(a[n])).attr("checked",t.data("checked")==i[t.attr("name")]);c.accessibility.focusPopup(r)},insertCallback:function(){var e,t,n=c.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),l=(i.filter('[name="href"]').val()||"").trim(),a=i.filter('[name="text"]').val(),s={};for(t=0;t<i.length;t++)e=d(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=d(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;var o=c.helpers.scrollTop();p(l,a,s),d(c.o_win).scrollTop(o)},insert:p,update:f,get:u,allSelected:k,back:function(){c.image&&c.image.get()?c.image.back():(c.events.disableBlur(),c.selection.restore(),c.events.enableBlur(),u()&&c.$wp?(c.selection.restore(),a(),g()):"A"==c.el.tagName?(c.$el.focus(),g()):(c.popups.hide("link.insert"),c.toolbar.showInline()))},imageLink:h,applyStyle:function(e,t,n){void 0===n&&(n=c.opts.linkMultipleStyles),void 0===t&&(t=c.opts.linkStyles);var i=u();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),d(i).removeClass(r.join(" "))}d(i).toggleClass(e),g()}}},m.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),m.RegisterShortcut(m.KEYCODE.K,"insertLink",null,"K"),m.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"}),m.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),m.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():this.o_win.open(e.href,"_blank","noopener"),this.popups.hide("link.edit"))},plugin:"link"}),m.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"editLink"}),m.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"}),m.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),m.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"}),m.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),m.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"}),m.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),m.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,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'+n+'">'+(t[n].displayText||t[n].text)+"</a></li>";return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),m.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"}),m.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),m.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"}),m.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),m.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'+n+'">'+this.language.translate(t[n])+"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(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"})}); | ||
!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(y){"use strict";y=y&&y.hasOwnProperty("default")?y["default"]:y,Object.assign(y.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(y.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}),y.PLUGINS.link=function(d){var u=d.$;function k(){var e=d.image?d.image.get():null;if(e||!d.$wp)return"A"==d.el.tagName?d.el:e&&e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?e.get(0).parentNode:void 0;var t=d.selection.ranges(0).commonAncestorContainer;try{t&&(t.contains&&t.contains(d.el)||!d.el.contains(t)||d.el==t)&&(t=null)}catch(r){t=null}if(t&&"A"===t.tagName)return t;var n=d.selection.element(),i=d.selection.endElement();"A"==n.tagName||d.node.isElement(n)||(n=u(n).parentsUntil(d.$el,"a").first().get(0)),"A"==i.tagName||d.node.isElement(i)||(i=u(i).parentsUntil(d.$el,"a").first().get(0));try{i&&(i.contains&&i.contains(d.el)||!d.el.contains(i)||d.el==i)&&(i=null)}catch(r){i=null}try{n&&(n.contains&&n.contains(d.el)||!d.el.contains(n)||d.el==n)&&(n=null)}catch(r){n=null}return i&&i==n&&"A"==i.tagName?(d.browser.msie||d.helpers.isMobile())&&(d.selection.info(n).atEnd||d.selection.info(n).atStart)?null:n:null}function g(){var e,t,n,i,r=d.image?d.image.get():null,l=[];if(r)"A"==r.get(0).parentNode.tagName&&l.push(r.get(0).parentNode);else if(d.win.getSelection){var a=d.win.getSelection();if(a.getRangeAt&&a.rangeCount){i=d.doc.createRange();for(var s=0;s<a.rangeCount;++s)if((t=(e=a.getRangeAt(s)).commonAncestorContainer)&&1!=t.nodeType&&(t=t.parentNode),t&&"a"==t.nodeName.toLowerCase())l.push(t);else{n=t.getElementsByTagName("a");for(var o=0;o<n.length;++o)i.selectNodeContents(n[o]),i.compareBoundaryPoints(e.END_TO_START,e)<1&&-1<i.compareBoundaryPoints(e.START_TO_END,e)&&l.push(n[o])}}}else if(d.doc.selection&&"Control"!=d.doc.selection.type)if("a"==(t=(e=d.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())l.push(t);else{n=t.getElementsByTagName("a"),i=d.doc.body.createTextRange();for(var p=0;p<n.length;++p)i.moveToElementText(n[p]),-1<i.compareEndPoints("StartToEnd",e)&&i.compareEndPoints("EndToStart",e)<1&&l.push(n[p])}return l}function h(r){if(d.core.hasFocus()){if(l(),r&&"keyup"===r.type&&(r.altKey||r.which==y.KEYCODE.ALT))return!0;setTimeout(function(){if(!r||r&&(1==r.which||"mouseup"!=r.type)){var e=k(),t=d.image?d.image.get():null;if(e&&!t){if(d.image){var n=d.node.contents(e);if(1==n.length&&"IMG"==n[0].tagName){var i=d.selection.ranges(0);return 0===i.startOffset&&0===i.endOffset?u(e).before(y.MARKERS):u(e).after(y.MARKERS),d.selection.restore(),!1}}r&&r.stopPropagation(),a(e)}}},d.helpers.isIOS()?100:0)}}function a(e){var t=d.popups.get("link.edit");t||(t=function l(){var e="";1<=d.opts.linkEditButtons.length&&("A"==d.el.tagName&&0<=d.opts.linkEditButtons.indexOf("linkRemove")&&d.opts.linkEditButtons.splice(d.opts.linkEditButtons.indexOf("linkRemove"),1),e='<div class="fr-buttons">'.concat(d.button.buildList(d.opts.linkEditButtons),"</div>"));var t={buttons:e},n=d.popups.create("link.edit",t);d.$wp&&d.events.$on(d.$wp,"scroll.link-edit",function(){k()&&d.popups.isVisible("link.edit")&&a(k())});return n}());var n=u(e);d.popups.isVisible("link.edit")||d.popups.refresh("link.edit"),d.popups.setContainer("link.edit",d.$sc);var i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();d.popups.show("link.edit",i,r,n.outerHeight(),!0)}function l(){d.popups.hide("link.edit")}function o(){var e=d.popups.get("link.insert"),t=k();if(t){var n,i,r=u(t),l=e.find('input.fr-link-attr[type="text"]'),a=e.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<l.length;n++)(i=u(l[n])).val(r.attr(i.attr("name")||""));for(a.attr("checked",!1),n=0;n<a.length;n++)i=u(a[n]),r.attr(i.attr("name"))==i.data("checked")&&i.attr("checked",!0);e.find('input.fr-link-attr[type="text"][name="text"]').val(r.text())}else e.find('input.fr-link-attr[type="text"]').val(""),e.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),e.find('input.fr-link-attr[type="text"][name="text"]').val(d.selection.text());e.find("input.fr-link-attr").trigger("change"),(d.image?d.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 d.popups.onRefresh("link.insert",o),!0;var t="";1<=d.opts.linkInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'+d.button.buildList(d.opts.linkInsertButtons)+"</div>");var n="",i=0;for(var r in n='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'+d.id+'">',n+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'+d.id+'" name="href" type="text" class="fr-link-attr" placeholder="'+d.language.translate("URL")+'" tabIndex="'+ ++i+'"></div>',d.opts.linkText&&(n+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'+d.id+'" name="text" type="text" class="fr-link-attr" placeholder="'+d.language.translate("Text")+'" tabIndex="'+ ++i+'"></div>'),d.opts.linkAttributes)if(d.opts.linkAttributes.hasOwnProperty(r)){var l=d.opts.linkAttributes[r];n+='<div class="fr-input-line"><input name="'+r+'" type="text" class="fr-link-attr" placeholder="'+d.language.translate(l)+'" tabIndex="'+ ++i+'"></div>'}d.opts.linkAlwaysBlank||(n+='<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(d.id,'" tabIndex="').concat(++i,'"><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(d.id,'">').concat(d.language.translate("Open in new tab"),"</label></div>"));var a={buttons:t,input_layer:n+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'+ ++i+'" type="button">'+d.language.translate("Insert")+"</button></div></div>"},s=d.popups.create("link.insert",a);return d.$wp&&d.events.$on(d.$wp,"scroll.link-insert",function(){(d.image?d.image.get():null)&&d.popups.isVisible("link.insert")&&c(),d.popups.isVisible("link.insert")&&f()}),s}function p(e,t,n){if(void 0===n&&(n={}),!1===d.events.trigger("link.beforeInsert",[e,t,n]))return!1;var i=d.image?d.image.get():null;i||"A"==d.el.tagName?"A"==d.el.tagName&&d.$el.focus():(d.selection.restore(),d.popups.hide("link.insert"));var r=e;d.opts.linkConvertEmailAddress&&d.helpers.isEmail(e)&&!/^mailto:.*/i.test(e)&&(e="mailto:"+e);if(""===d.opts.linkAutoPrefix||new RegExp("^("+y.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=d.opts.linkAutoPrefix+d.helpers.sanitizeURL(e)),e=d.helpers.sanitizeURL(e),d.opts.linkAlwaysBlank&&(n.target="_blank"),d.opts.linkAlwaysNoFollow&&(n.rel="nofollow"),d.helpers.isEmail(r)&&(n.target=null,n.rel=null),"_blank"==n.target?(d.opts.linkNoOpener&&(n.rel?n.rel+=" noopener":n.rel="noopener"),d.opts.linkNoReferrer&&(n.rel?n.rel+=" noreferrer":n.rel="noreferrer")):null==n.target&&(n.rel?n.rel=n.rel.replace(/noopener/,"").replace(/noreferrer/,""):n.rel=null),t=t||"",e===d.opts.linkAutoPrefix)return d.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),d.events.trigger("link.bad",[r]),!1;var l,a=k();if(a){if((l=u(a)).attr("href",e),0<t.length&&l.text()!=t&&!i){for(var s=l.get(0);1===s.childNodes.length&&s.childNodes[0].nodeType==Node.ELEMENT_NODE;)s=s.childNodes[0];u(s).text(t)}i||l.prepend(y.START_MARKER).append(y.END_MARKER),l.attr(n),i||d.selection.restore()}else{i?(i.wrap('<a href="'+e+'"></a>'),d.image.hasCaption()&&i.parent().append(i.parents(".fr-img-caption").find(".fr-inner"))):(d.format.remove("a"),d.selection.isCollapsed()?(t=0===t.length?r:t,d.html.insert('<a href="'+e+'">'+y.START_MARKER+t.replace(/&/g,"&").replace(/</,"<",">",">")+y.END_MARKER+"</a>"),d.selection.restore()):0<t.length&&t!=d.selection.text().replace(/\n/g,"")?(d.selection.remove(),d.html.insert('<a href="'+e+'">'+y.START_MARKER+t.replace(/&/g,"&")+y.END_MARKER+"</a>"),d.selection.restore()):(!function c(){if(!d.selection.isCollapsed()){d.selection.save();for(var e=d.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();e.length;){var t=u(e.pop());t.removeClass("fr-unprocessed");var n=d.node.deepestParent(t.get(0));if(n){for(var i=t.get(0),r="",l="";i=i.parentNode,d.node.isBlock(i)||(r+=d.node.closeTagString(i),l=d.node.openTagString(i)+l),i!=n;);var a=d.node.openTagString(t.get(0))+t.html()+d.node.closeTagString(t.get(0));t.replaceWith('<span id="fr-break"></span>');var s=n.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,r+a+l)).replace(l+r,""),n.outerHTML=s}e=d.$el.find(".fr-marker.fr-unprocessed").toArray()}d.html.cleanEmptyTags(),d.selection.restore()}}(),d.format.apply("a",{href:e})));for(var o=g(),p=0;p<o.length;p++)(l=u(o[p])).attr(n),l.removeAttr("_moz_dirty");1==o.length&&d.$wp&&!i&&(u(o[0]).prepend(y.START_MARKER).append(y.END_MARKER),d.selection.restore())}if(i){var f=d.popups.get("link.insert");f&&f.find("input:focus").blur(),d.image.edit(i)}else h()}function f(){l();var e=k();if(e){var t=d.popups.get("link.insert");t||(t=s()),d.popups.isVisible("link.insert")||(d.popups.refresh("link.insert"),d.selection.save(),d.helpers.isMobile()&&(d.events.disableBlur(),d.$el.blur(),d.events.enableBlur())),d.popups.setContainer("link.insert",d.$sc);var n=(d.image?d.image.get():null)||u(e),i=n.offset().left+n.outerWidth()/2,r=n.offset().top+n.outerHeight();d.popups.show("link.insert",i,r,n.outerHeight(),!0)}}function c(){var e=d.image?d.image.getEl():null;if(e){var t=d.popups.get("link.insert");d.image.hasCaption()&&(e=e.find(".fr-img-wrap")),t||(t=s()),o(),d.popups.setContainer("link.insert",d.$sc);var n=e.offset().left+e.outerWidth()/2,i=e.offset().top+e.outerHeight();d.popups.show("link.insert",n,i,e.outerHeight(),!0)}}return{_init:function e(){d.events.on("keyup",function(e){e.which!=y.KEYCODE.ESC&&h(e)}),d.events.on("window.mouseup",h),d.events.$on(d.$el,"click","a",function(e){d.edit.isDisabled()&&e.preventDefault()}),d.helpers.isMobile()&&d.events.$on(d.$doc,"selectionchange",h),s(!0),"A"==d.el.tagName&&d.$el.addClass("fr-view"),d.events.on("toolbar.esc",function(){if(d.popups.isVisible("link.edit"))return d.events.disableBlur(),d.events.focus(),!1},!0)},remove:function n(){var e=k(),t=d.image?d.image.get():null;if(!1===d.events.trigger("link.beforeRemove",[e]))return!1;t&&e?(t.unwrap(),d.image.edit(t)):e&&(d.selection.save(),u(e).replaceWith(u(e).html()),d.selection.restore(),l())},showInsertPopup:function m(){var e=d.$tb.find('.fr-command[data-cmd="insertLink"]'),t=d.popups.get("link.insert");if(t||(t=s()),!t.hasClass("fr-active"))if(d.popups.refresh("link.insert"),d.popups.setContainer("link.insert",d.$tb||d.$sc),e.isVisible()){var n=d.button.getPosition(e),i=n.left,r=n.top;d.popups.show("link.insert",i,r,e.outerHeight())}else d.position.forSelection(t),d.popups.show("link.insert")},usePredefined:function v(e){var t,n,i=d.opts.linkList[e],r=d.popups.get("link.insert"),l=r.find('input.fr-link-attr[type="text"]'),a=r.find('input.fr-link-attr[type="checkbox"]');for(n=0;n<l.length;n++)i[(t=u(l[n])).attr("name")]?(t.val(i[t.attr("name")]),t.toggleClass("fr-not-empty",!0)):"text"!=t.attr("name")&&t.val("");for(n=0;n<a.length;n++)(t=u(a[n])).attr("checked",t.data("checked")==i[t.attr("name")]);d.accessibility.focusPopup(r)},insertCallback:function b(){var e,t,n=d.popups.get("link.insert"),i=n.find('input.fr-link-attr[type="text"]'),r=n.find('input.fr-link-attr[type="checkbox"]'),l=(i.filter('[name="href"]').val()||"").trim(),a=i.filter('[name="text"]').val(),s={};for(t=0;t<i.length;t++)e=u(i[t]),["href","text"].indexOf(e.attr("name"))<0&&(s[e.attr("name")]=e.val());for(t=0;t<r.length;t++)(e=u(r[t])).is(":checked")?s[e.attr("name")]=e.data("checked"):s[e.attr("name")]=e.data("unchecked")||null;var o=d.helpers.scrollTop();p(l,a,s),u(d.o_win).scrollTop(o)},insert:p,update:f,get:k,allSelected:g,back:function t(){d.image&&d.image.get()?d.image.back():(d.events.disableBlur(),d.selection.restore(),d.events.enableBlur(),k()&&d.$wp?(d.selection.restore(),l(),h()):"A"==d.el.tagName?(d.$el.focus(),h()):(d.popups.hide("link.insert"),d.toolbar.showInline()))},imageLink:c,applyStyle:function E(e,t,n){void 0===n&&(n=d.opts.linkMultipleStyles),void 0===t&&(t=d.opts.linkStyles);var i=k();if(!i)return!1;if(!n){var r=Object.keys(t);r.splice(r.indexOf(e),1),u(i).removeClass(r.join(" "))}u(i).toggleClass(e),h()}}},y.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),y.RegisterShortcut(y.KEYCODE.K,"insertLink",null,"K"),y.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"}),y.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),y.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():this.o_win.open(e.href,"_blank","noopener"),this.popups.hide("link.edit"))},plugin:"link"}),y.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"editLink"}),y.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"}),y.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),y.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"}),y.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),y.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"}),y.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),y.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,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'+n+'">'+(t[n].displayText||t[n].text)+"</a></li>";return e+="</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),y.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"}),y.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),y.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"}),y.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),y.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'+n+'">'+this.language.translate(t[n])+"</a></li>");return e+="</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,i=this.link.get();if(i){var r=n(i);t.find(".fr-command").each(function(){var e=n(this).data("param1"),t=r.hasClass(e);n(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"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(l){"use strict";l=l&&l.hasOwnProperty("default")?l["default"]:l,Object.assign(l.DEFAULTS,{listAdvancedTypes:!0}),l.PLUGINS.lists=function(d){var c=d.$;function g(e){return'<span class="fr-open-'+e.toLowerCase()+'"></span>'}function m(e){return'<span class="fr-close-'+e.toLowerCase()+'"></span>'}function r(e,t){!function(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var s=a.length-1;0<=s;s--){var i=c(a[s]);i.replaceWith("<"+t.toLowerCase()+" "+d.node.attributes(i.get(0))+">"+i.html()+"</"+t.toLowerCase()+">")}}(e,t);var a,n=d.html.defaultTag(),r=null;e.length&&(a="rtl"==d.opts.direction||"rtl"==c(e[0]).css("direction")?"margin-right":"margin-left");for(var s=0;s<e.length;s++)if("TD"!=e[s].tagName&&"TH"!=e[s].tagName&&"LI"!=e[s].tagName){var i=d.helpers.getPX(c(e[s]).css(a))||0;(e[s].style.marginLeft=null)===r&&(r=i);var o=0<r?"<"+t+' style="'+a+": "+r+'px ">':"<"+t+">",l="</"+t+">";for(i-=r;0<i/d.opts.indentMargin;)o+="<"+t+">",l+=l,i-=d.opts.indentMargin;n&&e[s].tagName.toLowerCase()==n?c(e[s]).replaceWith(o+"<li"+d.node.attributes(e[s])+">"+c(e[s]).html()+"</li>"+l):c(e[s]).wrap(o+"<li></li>"+l)}d.clean.lists()}function s(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(c(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 r=c(e[t]),s=e[t].parentNode,i=r.attr("class");if(r.before(m(s.tagName)),"LI"==s.parentNode.tagName)r.before(m("LI")),r.after(g("LI"));else{var o="";i&&(o+=' class="'+i+'"');var l="rtl"==d.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";d.helpers.getPX(c(s).css(l))&&0<=(c(s).attr("style")||"").indexOf(l+":")&&(o+=' style="'+l+":"+d.helpers.getPX(c(s).css(l))+'px;"'),d.html.defaultTag()&&0===r.find(d.html.blockTagsQuery()).length&&r.wrapInner(d.html.defaultTag()+o),d.node.isEmpty(r.get(0),!0)||0!==r.find(d.html.blockTagsQuery()).length||r.append("<br>"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(s.tagName)),"LI"==s.parentNode.tagName&&(s=s.parentNode.parentNode),n.indexOf(s)<0&&n.push(s)}for(t=0;t<n.length;t++){var f=c(n[t]),p=f.html();p=(p=p.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),f.replaceWith(d.node.openTagString(f.get(0))+p+d.node.closeTagString(f.get(0)))}d.$el.find("li:empty").remove(),d.$el.find("ul:empty, ol:empty").remove(),d.clean.lists(),d.html.wrap()}function i(e){d.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=c(e[t]).find("> ul, ol").last().get(0);if(n){var r=c(document.createElement("li"));c(n).prepend(r);for(var s=d.node.contents(e[t])[0];s&&!d.node.isList(s);){var i=s.nextSibling;r.append(s),s=i}c(a).append(c(n)),c(e[t]).remove()}else{var o=c(a).find("> ul, ol").last().get(0);if(o)c(o).append(c(e[t]));else{var l=c("<"+e[t].parentNode.tagName+">");c(a).append(l),l.append(c(e[t]))}}}}d.clean.lists(),d.selection.restore()}function o(e){d.selection.save(),s(e),d.selection.restore()}function e(e){if("indent"==e||"outdent"==e){for(var t=!1,a=d.selection.blocks(),n=[],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?i(n):o(n))}}return{_init:function(){d.events.on("commands.after",e),d.events.on("keydown",function(e){if(e.which==l.KEYCODE.TAB){for(var t=d.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&&(d.selection.info(a[0]).atStart||d.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?o(a):i(a),!1}},!0)},format:function(e,t){var a,n;for(d.selection.save(),d.html.wrap(!0,!0,!0,!0),d.selection.restore(),n=d.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(d.selection.save(),function(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||s(n):r(n,e),d.html.unwrap(),d.selection.restore(),t=t||"default"){for(n=d.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&&(c(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(c(n[a].parentNode).attr("style")||"").length&&c(n[a].parentNode).removeAttr("style"))}},refresh:function(e,t){var a=c(d.selection.element());if(a.get(0)!=d.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&&d.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},l.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),l.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"}),l.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"}),l.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"}),l.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),l.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})}); | ||
!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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{listAdvancedTypes:!0}),p.PLUGINS.lists=function(d){var c=d.$;function g(e){return'<span class="fr-open-'+e.toLowerCase()+'"></span>'}function m(e){return'<span class="fr-close-'+e.toLowerCase()+'"></span>'}function s(e,t){!function f(e,t){for(var a=[],n=0;n<e.length;n++){var r=e[n].parentNode;"LI"==e[n].tagName&&r.tagName!=t&&a.indexOf(r)<0&&a.push(r)}for(var s=a.length-1;0<=s;s--){var i=c(a[s]);i.replaceWith("<"+t.toLowerCase()+" "+d.node.attributes(i.get(0))+">"+i.html()+"</"+t.toLowerCase()+">")}}(e,t);var a,n=d.html.defaultTag(),r=null;e.length&&(a="rtl"==d.opts.direction||"rtl"==c(e[0]).css("direction")?"margin-right":"margin-left");for(var s=0;s<e.length;s++)if("TD"!=e[s].tagName&&"TH"!=e[s].tagName&&"LI"!=e[s].tagName){var i=d.helpers.getPX(c(e[s]).css(a))||0;(e[s].style.marginLeft=null)===r&&(r=i);var o=0<r?"<"+t+' style="'+a+": "+r+'px ">':"<"+t+">",l="</"+t+">";for(i-=r;0<i/d.opts.indentMargin;)o+="<"+t+">",l+=l,i-=d.opts.indentMargin;n&&e[s].tagName.toLowerCase()==n?c(e[s]).replaceWith(o+"<li"+d.node.attributes(e[s])+">"+c(e[s]).html()+"</li>"+l):c(e[s]).wrap(o+"<li></li>"+l)}d.clean.lists()}function i(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--)if(c(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 r=c(e[t]),s=e[t].parentNode,i=r.attr("class");if(r.before(m(s.tagName)),"LI"==s.parentNode.tagName)r.before(m("LI")),r.after(g("LI"));else{var o="";i&&(o+=' class="'+i+'"');var l="rtl"==d.opts.direction||"rtl"==r.css("direction")?"margin-right":"margin-left";d.helpers.getPX(c(s).css(l))&&0<=(c(s).attr("style")||"").indexOf(l+":")&&(o+=' style="'+l+":"+d.helpers.getPX(c(s).css(l))+'px;"'),d.html.defaultTag()&&0===r.find(d.html.blockTagsQuery()).length&&r.wrapInner(d.html.defaultTag()+o),d.node.isEmpty(r.get(0),!0)||0!==r.find(d.html.blockTagsQuery()).length||r.append("<br>"),r.append(g("LI")),r.prepend(m("LI"))}r.after(g(s.tagName)),"LI"==s.parentNode.tagName&&(s=s.parentNode.parentNode),n.indexOf(s)<0&&n.push(s)}for(t=0;t<n.length;t++){var f=c(n[t]),p=f.html();p=(p=p.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),f.replaceWith(d.node.openTagString(f.get(0))+p+d.node.closeTagString(f.get(0)))}d.$el.find("li:empty").remove(),d.$el.find("ul:empty, ol:empty").remove(),d.clean.lists(),d.html.wrap()}function o(e){d.selection.save();for(var t=0;t<e.length;t++){var a=e[t].previousSibling;if(a){var n=c(e[t]).find("> ul, ol").last().get(0);if(n){var r=c(document.createElement("li"));c(n).prepend(r);for(var s=d.node.contents(e[t])[0];s&&!d.node.isList(s);){var i=s.nextSibling;r.append(s),s=i}c(a).append(c(n)),c(e[t]).remove()}else{var o=c(a).find("> ul, ol").last().get(0);if(o)c(o).append(c(e[t]));else{var l=c("<"+e[t].parentNode.tagName+">");c(a).append(l),l.append(c(e[t]))}}}}d.clean.lists(),d.selection.restore()}function l(e){d.selection.save(),i(e),d.selection.restore()}function e(e){if("indent"==e||"outdent"==e){for(var t=!1,a=d.selection.blocks(),n=[],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?o(n):l(n))}}return{_init:function t(){d.events.on("commands.after",e),d.events.on("keydown",function(e){if(e.which==p.KEYCODE.TAB){for(var t=d.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&&(d.selection.info(a[0]).atStart||d.node.isEmpty(a[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?l(a):o(a),!1}},!0)},format:function f(e,t){var a,n;for(d.selection.save(),d.html.wrap(!0,!0,!0,!0),d.selection.restore(),n=d.selection.blocks(),a=0;a<n.length;a++)"LI"!=n[a].tagName&&"LI"==n[a].parentNode.tagName&&(n[a]=n[a].parentNode);if(d.selection.save(),function r(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||i(n):s(n,e),d.html.unwrap(),d.selection.restore(),t=t||"default"){for(n=d.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&&(c(n[a].parentNode).css("list-style-type","default"===t?"":t),0===(c(n[a].parentNode).attr("style")||"").length&&c(n[a].parentNode).removeAttr("style"))}},refresh:function r(e,t){var a=c(d.selection.element());if(a.get(0)!=d.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&&d.el.contains(n.parentNode)&&e.addClass("fr-active")}}}},p.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),p.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"}),p.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"}),p.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"}),p.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),p.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),a.PLUGINS.paragraphFormat=function(m){var f=m.$;function g(a,t){var e=m.html.defaultTag();if(t&&t.toLowerCase()!=e)if(0<a.find("ul, ol").length){var r=f("<"+t+">");a.prepend(r);for(var n=m.node.contents(a.get(0))[0];n&&["UL","OL"].indexOf(n.tagName)<0;){var o=n.nextSibling;r.append(n),n=o}}else a.html("<"+t+">"+a.html()+"</"+t+">")}return{apply:function(a){"N"==a&&(a=m.html.defaultTag()),m.selection.save(),m.html.wrap(!0,!0,!m.opts.paragraphFormat.BLOCKQUOTE,!0,!0),m.selection.restore();var t,e,r,n,o,i,l,p,s=m.selection.blocks();m.selection.save(),m.$el.find("pre").attr("skip",!0);for(var d=0;d<s.length;d++)if(s[d].tagName!=a&&!m.node.isList(s[d])){var h=f(s[d]);"LI"==s[d].tagName?g(h,a):"LI"==s[d].parentNode.tagName&&s[d]?(i=h,l=a,p=m.html.defaultTag(),l&&l.toLowerCase()!=p||(l='div class="fr-temp-div"'),i.replaceWith(f("<"+l+">").html(i.html()))):0<=["TD","TH"].indexOf(s[d].parentNode.tagName)?(r=h,n=a,o=m.html.defaultTag(),n||(n='div class="fr-temp-div"'+(m.node.isEmpty(r.get(0),!0)?' data-empty="true"':"")),n.toLowerCase()==o?(m.node.isEmpty(r.get(0),!0)||r.append("<br/>"),r.replaceWith(r.html())):r.replaceWith(f("<"+n+">").html(r.html()))):(t=h,(e=a)||(e='div class="fr-temp-div"'+(m.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),t.replaceWith(f("<"+e+" "+m.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")))}m.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){f(this).prev().append("<br>"+f(this).html()),f(this).remove()}),m.$el.find("pre").removeAttr("skip"),m.html.unwrap(),m.selection.restore()},refreshOnShow:function(a,t){var e=m.selection.blocks();if(e.length){var r=e[0],n="N",o=m.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=m.el&&(n=r.tagName),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function(a){if(m.opts.paragraphFormatSelection){var t=m.selection.blocks();if(t.length){var e=t[0],r="N",n=m.html.defaultTag();e.tagName.toLowerCase()!=n&&e!=m.el&&(r=e.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),a.find(">span").text(m.language.translate(m.opts.paragraphFormat[r]))}else a.find(">span").text(m.language.translate(m.opts.paragraphFormat.N))}}}},a.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(a){return a.opts.paragraphFormatSelection},defaultSelection:function(a){return a.language.translate(a.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var e in t)if(t.hasOwnProperty(e)){var r=this.shortcuts.get("paragraphFormat."+e);r=r?'<span class="fr-shortcut">'+r+"</span>":"",a+='<li role="presentation"><'+("N"==e?this.html.defaultTag()||"DIV":e)+' style="padding: 0 !important; margin: 0 !important;" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+e+'" title="'+this.language.translate(t[e])+'">'+this.language.translate(t[e])+"</a></"+("N"==e?this.html.defaultTag()||"DIV":e)+"></li>"}return a+="</ul>"},title:"Paragraph Format",callback:function(a,t){this.paragraphFormat.apply(t)},refresh:function(a){this.paragraphFormat.refresh(a)},refreshOnShow:function(a,t){this.paragraphFormat.refreshOnShow(a,t)},plugin:"paragraphFormat"}),a.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"})}); | ||
!function(a,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),a.PLUGINS.paragraphFormat=function(m){var f=m.$;function g(a,t){var e=m.html.defaultTag();if(t&&t.toLowerCase()!=e)if(0<a.find("ul, ol").length){var r=f("<"+t+">");a.prepend(r);for(var n=m.node.contents(a.get(0))[0];n&&["UL","OL"].indexOf(n.tagName)<0;){var o=n.nextSibling;r.append(n),n=o}}else a.html("<"+t+">"+a.html()+"</"+t+">")}return{apply:function c(a){"N"==a&&(a=m.html.defaultTag()),m.selection.save(),m.html.wrap(!0,!0,!m.opts.paragraphFormat.BLOCKQUOTE,!0,!0),m.selection.restore();var t,e,r,n,o,i,l,p,s=m.selection.blocks();m.selection.save(),m.$el.find("pre").attr("skip",!0);for(var d=0;d<s.length;d++)if(s[d].tagName!=a&&!m.node.isList(s[d])){var h=f(s[d]);"LI"==s[d].tagName?g(h,a):"LI"==s[d].parentNode.tagName&&s[d]?(i=h,l=a,p=m.html.defaultTag(),l&&l.toLowerCase()!=p||(l='div class="fr-temp-div"'),i.replaceWith(f("<"+l+">").html(i.html()))):0<=["TD","TH"].indexOf(s[d].parentNode.tagName)?(r=h,n=a,o=m.html.defaultTag(),n||(n='div class="fr-temp-div"'+(m.node.isEmpty(r.get(0),!0)?' data-empty="true"':"")),n.toLowerCase()==o?(m.node.isEmpty(r.get(0),!0)||r.append("<br/>"),r.replaceWith(r.html())):r.replaceWith(f("<"+n+">").html(r.html()))):(t=h,(e=a)||(e='div class="fr-temp-div"'+(m.node.isEmpty(t.get(0),!0)?' data-empty="true"':"")),t.replaceWith(f("<"+e+" "+m.node.attributes(t.get(0))+">").html(t.html()).removeAttr("data-empty")))}m.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){f(this).prev().append("<br>"+f(this).html()),f(this).remove()}),m.$el.find("pre").removeAttr("skip"),m.html.unwrap(),m.selection.restore()},refreshOnShow:function i(a,t){var e=m.selection.blocks();if(e.length){var r=e[0],n="N",o=m.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=m.el&&(n=r.tagName),t.find('.fr-command[data-param1="'+n+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function o(a){if(m.opts.paragraphFormatSelection){var t=m.selection.blocks();if(t.length){var e=t[0],r="N",n=m.html.defaultTag();e.tagName.toLowerCase()!=n&&e!=m.el&&(r=e.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),a.find(">span").text(m.language.translate(m.opts.paragraphFormat[r]))}else a.find(">span").text(m.language.translate(m.opts.paragraphFormat.N))}}}},a.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(a){return a.opts.paragraphFormatSelection},defaultSelection:function(a){return a.language.translate(a.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var e in t)if(t.hasOwnProperty(e)){var r=this.shortcuts.get("paragraphFormat."+e);r=r?'<span class="fr-shortcut">'+r+"</span>":"",a+='<li role="presentation"><'+("N"==e?this.html.defaultTag()||"DIV":e)+' style="padding: 0 !important; margin: 0 !important;" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+e+'" title="'+this.language.translate(t[e])+'">'+this.language.translate(t[e])+"</a></"+("N"==e?this.html.defaultTag()||"DIV":e)+"></li>"}return a+="</ul>"},title:"Paragraph Format",callback:function(a,t){this.paragraphFormat.apply(t)},refresh:function(a){this.paragraphFormat.refresh(a)},refreshOnShow:function(a,t){this.paragraphFormat.refreshOnShow(a,t)},plugin:"paragraphFormat"}),a.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),a.PLUGINS.paragraphStyle=function(n){var i=n.$;return{_init:function(){},apply:function(a,e,t){void 0===e&&(e=n.opts.paragraphStyles),void 0===t&&(t=n.opts.paragraphMultipleStyles);var r="";t||((r=Object.keys(e)).splice(r.indexOf(a),1),r=r.join(" ")),n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var s=n.selection.blocks();n.selection.save();for(var l=i(s[0]).hasClass(a),o=0;o<s.length;o++)i(s[o]).removeClass(r).toggleClass(a,!l),i(s[o]).hasClass("fr-temp-div")&&i(s[o]).removeClass("fr-temp-div"),""===i(s[o]).attr("class")&&i(s[o]).removeAttr("class");n.html.unwrap(),n.selection.restore()},refreshOnShow:function(a,e){var t=n.selection.blocks();if(t.length){var r=i(t[0]);e.find(".fr-command").each(function(){var a=i(this).data("param1"),e=r.hasClass(a);i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}}},a.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.paragraphStyles;for(var t in e)e.hasOwnProperty(t)&&(a+='<li role="presentation"><a class="fr-command '+t+'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="'+t+'" title="'+this.language.translate(e[t])+'">'+this.language.translate(e[t])+"</a></li>");return a+="</ul>"},title:"Paragraph Style",callback:function(a,e){this.paragraphStyle.apply(e)},refreshOnShow:function(a,e){this.paragraphStyle.refreshOnShow(a,e)},plugin:"paragraphStyle"}),a.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"})}); | ||
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(a.FroalaEditor)}(this,function(a){"use strict";a=a&&a.hasOwnProperty("default")?a["default"]:a,Object.assign(a.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),a.PLUGINS.paragraphStyle=function(n){var i=n.$;return{_init:function a(){},apply:function p(a,e,t){void 0===e&&(e=n.opts.paragraphStyles),void 0===t&&(t=n.opts.paragraphMultipleStyles);var r="";t||((r=Object.keys(e)).splice(r.indexOf(a),1),r=r.join(" ")),n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore();var s=n.selection.blocks();n.selection.save();for(var l=i(s[0]).hasClass(a),o=0;o<s.length;o++)i(s[o]).removeClass(r).toggleClass(a,!l),i(s[o]).hasClass("fr-temp-div")&&i(s[o]).removeClass("fr-temp-div"),""===i(s[o]).attr("class")&&i(s[o]).removeAttr("class");n.html.unwrap(),n.selection.restore()},refreshOnShow:function s(a,e){var t=n.selection.blocks();if(t.length){var r=i(t[0]);e.find(".fr-command").each(function(){var a=i(this).data("param1"),e=r.hasClass(a);i(this).toggleClass("fr-active",e).attr("aria-selected",e)})}}}},a.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var a='<ul class="fr-dropdown-list" role="presentation">',e=this.opts.paragraphStyles;for(var t in e)e.hasOwnProperty(t)&&(a+='<li role="presentation"><a class="fr-command '+t+'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="'+t+'" title="'+this.language.translate(e[t])+'">'+this.language.translate(e[t])+"</a></li>");return a+="</ul>"},title:"Paragraph Style",callback:function(a,e){this.paragraphStyle.apply(e)},refreshOnShow:function(a,e){this.paragraphStyle.refreshOnShow(a,e)},plugin:"paragraphStyle"}),a.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(l){return{run:function(){!function(t){var n=l.$el.html(),i=null;l.shared.print_iframe?i=l.shared.print_iframe:((i=document.createElement("iframe")).name="fr-print",i.style.position="fixed",i.style.top="0",i.style.left="-9999px",i.style.height="100%",i.style.width="0",i.style.overflow="hidden",i.style["z-index"]="2147483647",i.style.tabIndex="-1",l.events.on("shared.destroy",function(){i.remove()}),l.shared.print_iframe=i);try{document.body.removeChild(i)}catch(d){}document.body.appendChild(i),i.addEventListener("load",function e(){t(),i.removeEventListener("load",e)});var o=i.contentWindow;o.document.open(),o.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),o.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",o.document.write(t.outerHTML)}),o.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">'),o.document.write(n),o.document.write("</div></body></html>"),o.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(){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))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{html2pdf:window.html2pdf}),e.PLUGINS.print=function(a){return{run:function e(){!function l(e){var t=a.$el.html(),n=null;a.shared.print_iframe?n=a.shared.print_iframe:((n=document.createElement("iframe")).name="fr-print",n.style.position="fixed",n.style.top="0",n.style.left="-9999px",n.style.height="100%",n.style.width="0",n.style.overflow="hidden",n.style["z-index"]="2147483647",n.style.tabIndex="-1",a.events.on("shared.destroy",function(){n.remove()}),a.shared.print_iframe=n);try{document.body.removeChild(n)}catch(d){}document.body.appendChild(n);var i=function i(){e(),n.removeEventListener("load",i)};n.addEventListener("load",i);var o=n.contentWindow;o.document.open(),o.document.write("<!DOCTYPE html><html "+(a.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),o.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",o.document.write(t.outerHTML)}),o.document.write('</head><body style="height:auto;text-align: '+("rtl"==a.opts.direction?"right":"left")+"; direction: "+a.opts.direction+"; "+(a.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),o.document.write(t),o.document.write("</div></body></html>"),o.document.close()}(function(){setTimeout(function(){a.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),a.$win.get(0).focus(),a.events.disableBlur(),a.events.focus()},0)})},toPDF:function t(){a.opts.html2pdf&&(a.$el.css("text-align","left"),a.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(a.el).save(),setTimeout(function(){a.$el.css("text-align","")},100))}}},e.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),e.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),e.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),e.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(f){"use strict";f=f&&f.hasOwnProperty("default")?f["default"]:f,Object.assign(f.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),f.QUICK_INSERT_BUTTONS={},f.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),f.RegisterQuickInsertButton=function(e,t){f.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},f.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"+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()}}),f.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)}}),f.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)}}),f.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),f.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),f.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),f.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),f.PLUGINS.quickInsert=function(r){var a,l,u=r.$;function t(e){var t,i,n;(t=e.offset().top-r.$box.offset().top,i=(r.$iframe&&r.$iframe.offset().left||0)+e.offset().left<a.outerWidth()?e.offset().left+a.outerWidth():0-a.outerWidth(),r.opts.enter!=f.ENTER_BR)?n=(a.outerHeight()-e.outerHeight())/2:(u(document.createElement("span")).html(f.INVISIBLE_SPACE).insertAfter(e),n=(a.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(r.opts.iframe){var s=r.helpers.getPX(r.$wp.find(".fr-iframe").css("padding-top"));t+=r.$iframe.offset().top+s}a.hasClass("fr-on")&&0<=t&&l.css("top",t-n),0<=t&&t-Math.abs(n)<=r.$box.outerHeight()-e.outerHeight()?(a.hasClass("fr-hidden")&&(a.hasClass("fr-on")&&o(),a.removeClass("fr-hidden")),a.css("top",t-n)):a.hasClass("fr-visible")&&(a.addClass("fr-hidden"),d()),a.css("left",i)}function i(e){a||function(){r.shared.$quick_insert||(r.shared.$quick_insert=u(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+r.language.translate("Quick Insert")+'">'+r.icon.create("quickInsert")+"</a>"));a=r.shared.$quick_insert,r.tooltip.bind(r.$box,".fr-quick-insert > a.fr-floating-btn"),r.events.on("destroy",function(){u("body").first().append(a.removeClass("fr-on")).css("left",-9999).css("top",-9999),l&&(d(),u("body").first().append(l))},!0),r.events.on("shared.destroy",function(){a.html("").removeData().remove(),a=null,l&&(l.html("").removeData().remove(),l=null)},!0),r.events.on("commands.before",s),r.events.on("commands.after",function(){r.popups.areVisible()||n()}),r.events.bindClick(r.$box,".fr-quick-insert > a",o),r.events.bindClick(r.$box,".fr-qi-helper > a.fr-btn",function(e){var t=u(e.currentTarget).data("cmd");if(!1===r.events.trigger("quickInsert.commands.before",[t]))return!1;f.QUICK_INSERT_BUTTONS[t].callback.apply(r,[e.currentTarget]),f.QUICK_INSERT_BUTTONS[t].undo&&r.undo.saveStep(),r.events.trigger("quickInsert.commands.after",[t]),r.quickInsert.hide()}),r.events.$on(r.$wp,"scroll",c),r.events.$on(r.$tb,"transitionend",".fr-more-toolbar",c)}(),a.hasClass("fr-on")&&d(),r.$box.append(a),t(e),a.data("tag",e),a.addClass("fr-visible")}function n(){if(r.core.hasFocus()){var e=r.selection.element();if(r.opts.enter==f.ENTER_BR||r.node.isBlock(e)||(e=r.node.blockParent(e)),r.opts.enter==f.ENTER_BR&&!r.node.isBlock(e)){var t=r.node.deepestParent(e);t&&(e=t)}e&&(r.opts.enter!=f.ENTER_BR&&r.node.isEmpty(e)&&0<=r.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())||r.opts.enter==f.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))||r.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||r.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||r.node.isBlock(e.nextSibling))))?a&&a.data("tag").is(u(e))&&a.hasClass("fr-on")?d():r.selection.isCollapsed()&&i(u(e)):s()}}function s(){a&&(a.hasClass("fr-on")&&d(),a.removeClass("fr-visible fr-on"),a.css("left",-9999).css("top",-9999))}function o(e){if(e&&e.preventDefault(),a.hasClass("fr-on")&&!a.hasClass("fr-hidden"))d();else{if(!r.shared.$qi_helper){for(var t=r.opts.quickInsertButtons,i='<div class="fr-qi-helper">',n=0,s=0;s<t.length;s++){var o=f.QUICK_INSERT_BUTTONS[t[s]];o&&(!o.requiredPlugin||f.PLUGINS[o.requiredPlugin]&&0<=r.opts.pluginsEnabled.indexOf(o.requiredPlugin))&&(i+='<a class="fr-btn fr-floating-btn" role="button" title="'+r.language.translate(o.title)+'" tabIndex="-1" data-cmd="'+t[s]+'" style="transition-delay: '+.025*n+++'s;">'+r.icon.create(o.icon)+"</a>")}i+="</div>",r.shared.$qi_helper=u(i),r.tooltip.bind(r.shared.$qi_helper,"a.fr-btn"),r.events.$on(r.shared.$qi_helper,"mousedown",function(e){e.preventDefault()},!0)}l=r.shared.$qi_helper,r.$box.append(l),setTimeout(function(){l.css("top",parseFloat(a.css("top"))),l.css("left",parseFloat(a.css("left"))+a.outerWidth()),l.find("a").addClass("fr-size-1"),a.addClass("fr-on")},10)}}function d(){var i=r.$box.find(".fr-qi-helper");i.length&&function(){for(var t=i.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){i.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){i.css("left",-9999),a.hasClass("fr-hidden")||a.removeClass("fr-on")},25*e)}()}function c(){a.hasClass("fr-visible")&&t(a.data("tag"))}return{_init:function(){if(!r.$wp||!r.opts.quickInsertEnabled)return!1;r.popups.onShow("image.edit",s),r.events.on("mouseup",n),r.helpers.isMobile()&&r.events.$on(u(r.o_doc),"selectionchange",n),r.events.on("blur",s),r.events.on("keyup",n),r.events.on("keydown",function(){setTimeout(function(){n()},0)})},hide:s}}}); | ||
!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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),p.QUICK_INSERT_BUTTONS={},p.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),p.RegisterQuickInsertButton=function(e,t){p.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},p.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"+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()}}),p.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)}}),p.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)}}),p.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),p.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),p.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),p.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),p.PLUGINS.quickInsert=function(o){var a,l,u=o.$;function n(e){var t,n,i;(t=e.offset().top-o.$box.offset().top,n=(o.$iframe&&o.$iframe.offset().left||0)+e.offset().left<a.outerWidth()?e.offset().left+a.outerWidth():0-a.outerWidth(),o.opts.enter!=p.ENTER_BR)?i=(a.outerHeight()-e.outerHeight())/2:(u(document.createElement("span")).html(p.INVISIBLE_SPACE).insertAfter(e),i=(a.outerHeight()-e.next().outerHeight())/2,e.next().remove());if(o.opts.iframe){var s=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top"));t+=o.$iframe.offset().top+s}a.hasClass("fr-on")&&0<=t&&l.css("top",t-i),0<=t&&t-Math.abs(i)<=o.$box.outerHeight()-e.outerHeight()?(a.hasClass("fr-hidden")&&(a.hasClass("fr-on")&&d(),a.removeClass("fr-hidden")),a.css("top",t-i)):a.hasClass("fr-visible")&&(a.addClass("fr-hidden"),c()),a.css("left",n)}function s(e){a||function t(){o.shared.$quick_insert||(o.shared.$quick_insert=u(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+o.language.translate("Quick Insert")+'">'+o.icon.create("quickInsert")+"</a>"));a=o.shared.$quick_insert,o.tooltip.bind(o.$box,".fr-quick-insert > a.fr-floating-btn"),o.events.on("destroy",function(){u("body").first().append(a.removeClass("fr-on")).css("left",-9999).css("top",-9999),l&&(c(),u("body").first().append(l))},!0),o.events.on("shared.destroy",function(){a.html("").removeData().remove(),a=null,l&&(l.html("").removeData().remove(),l=null)},!0),o.events.on("commands.before",r),o.events.on("commands.after",function(){o.popups.areVisible()||i()}),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=u(e.currentTarget).data("cmd");if(!1===o.events.trigger("quickInsert.commands.before",[t]))return!1;p.QUICK_INSERT_BUTTONS[t].callback.apply(o,[e.currentTarget]),p.QUICK_INSERT_BUTTONS[t].undo&&o.undo.saveStep(),o.events.trigger("quickInsert.commands.after",[t]),o.quickInsert.hide()}),o.events.$on(o.$wp,"scroll",f),o.events.$on(o.$tb,"transitionend",".fr-more-toolbar",f)}(),a.hasClass("fr-on")&&c(),o.$box.append(a),n(e),a.data("tag",e),a.addClass("fr-visible")}function i(){if(o.core.hasFocus()){var e=o.selection.element();if(o.opts.enter==p.ENTER_BR||o.node.isBlock(e)||(e=o.node.blockParent(e)),o.opts.enter==p.ENTER_BR&&!o.node.isBlock(e)){var t=o.node.deepestParent(e);t&&(e=t)}var n=function n(){return o.opts.enter!=p.ENTER_BR&&o.node.isEmpty(e)&&0<=o.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},i=function i(){return o.opts.enter==p.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&&(n()||i())?a&&a.data("tag").is(u(e))&&a.hasClass("fr-on")?c():o.selection.isCollapsed()&&s(u(e)):r()}}function r(){a&&(a.hasClass("fr-on")&&c(),a.removeClass("fr-visible fr-on"),a.css("left",-9999).css("top",-9999))}function d(e){if(e&&e.preventDefault(),a.hasClass("fr-on")&&!a.hasClass("fr-hidden"))c();else{if(!o.shared.$qi_helper){for(var t=o.opts.quickInsertButtons,n='<div class="fr-qi-helper">',i=0,s=0;s<t.length;s++){var r=p.QUICK_INSERT_BUTTONS[t[s]];r&&(!r.requiredPlugin||p.PLUGINS[r.requiredPlugin]&&0<=o.opts.pluginsEnabled.indexOf(r.requiredPlugin))&&(n+='<a class="fr-btn fr-floating-btn" role="button" title="'+o.language.translate(r.title)+'" tabIndex="-1" data-cmd="'+t[s]+'" style="transition-delay: '+.025*i+++'s;">'+o.icon.create(r.icon)+"</a>")}n+="</div>",o.shared.$qi_helper=u(n),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(a.css("top"))),l.css("left",parseFloat(a.css("left"))+a.outerWidth()),l.find("a").addClass("fr-size-1"),a.addClass("fr-on")},10)}}function c(){var n=o.$box.find(".fr-qi-helper");n.length&&function(){for(var t=n.find("a"),e=0;e<t.length;e++)!function(e){setTimeout(function(){n.children().eq(t.length-1-e).removeClass("fr-size-1")},25*e)}(e);setTimeout(function(){n.css("left",-9999),a.hasClass("fr-hidden")||a.removeClass("fr-on")},25*e)}()}function f(){a.hasClass("fr-visible")&&n(a.data("tag"))}return{_init:function e(){if(!o.$wp||!o.opts.quickInsertEnabled)return!1;o.popups.onShow("image.edit",r),o.events.on("mouseup",i),o.helpers.isMobile()&&o.events.$on(u(o.o_doc),"selectionchange",i),o.events.on("blur",r),o.events.on("keyup",i),o.events.on("keydown",function(){setTimeout(function(){i()},0)})},hide:r}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.quote=function(r){var n=r.$;function a(e){for(;e.parentNode&&e.parentNode!=r.el;)e=e.parentNode;return e}return{apply:function(e){r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore(),"increase"==e?function(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)t[e]=a(t[e]);r.selection.save();var o=n(document.createElement("blockquote"));for(o.insertBefore(t[0]),e=0;e<t.length;e++)o.append(t[e]);r.html.unwrap(),r.selection.restore()}():"decrease"==e&&function(){var e,t=r.selection.blocks();for(e=0;e<t.length;e++)"BLOCKQUOTE"!=t[e].tagName&&(t[e]=n(t[e]).parentsUntil(r.$el,"BLOCKQUOTE").get(0));for(r.selection.save(),e=0;e<t.length;e++)t[e]&&n(t[e]).replaceWith(t[e].innerHTML);r.html.unwrap(),r.selection.restore()}()}}},e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),e.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var o in t)if(t.hasOwnProperty(o)){var r=this.shortcuts.get("quote."+o);e+='<li role="presentation"><a class="fr-command fr-active '+o+'" tabIndex="-1" role="option" data-cmd="quote" data-param1="'+o+'" title="'+t[o]+'">'+this.language.translate(t[o])+(r?'<span class="fr-shortcut">'+r+"</span>":"")+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),e.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.quote=function(n){var a=n.$;function i(e){for(;e.parentNode&&e.parentNode!=n.el;)e=e.parentNode;return e}return{apply:function t(e){n.selection.save(),n.html.wrap(!0,!0,!0,!0),n.selection.restore(),"increase"==e?function r(){var e,t=n.selection.blocks();for(e=0;e<t.length;e++)t[e]=i(t[e]);n.selection.save();var o=a(document.createElement("blockquote"));for(o.insertBefore(t[0]),e=0;e<t.length;e++)o.append(t[e]);n.html.unwrap(),n.selection.restore()}():"decrease"==e&&function o(){var e,t=n.selection.blocks();for(e=0;e<t.length;e++)"BLOCKQUOTE"!=t[e].tagName&&(t[e]=a(t[e]).parentsUntil(n.$el,"BLOCKQUOTE").get(0));for(n.selection.save(),e=0;e<t.length;e++)t[e]&&a(t[e]).replaceWith(t[e].innerHTML);n.html.unwrap(),n.selection.restore()}()}}},e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),e.RegisterShortcut(e.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),e.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var o in t)if(t.hasOwnProperty(o)){var r=this.shortcuts.get("quote."+o);e+='<li role="presentation"><a class="fr-command fr-active '+o+'" tabIndex="-1" role="option" data-cmd="quote" data-param1="'+o+'" title="'+t[o]+'">'+this.language.translate(t[o])+(r?'<span class="fr-shortcut">'+r+"</span>":"")+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),e.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),e.PLUGINS.save=function(i){var v=i.$,e=null,f=null,t=!1,u=1,l=2,s={};function c(e,t){i.events.trigger("save.error",[{code:e,message:s[e]},t])}function a(e){void 0===e&&(e=i.html.get());var a=e,t=i.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),i.opts.saveURL){var s={};for(var n in i.opts.saveParams)if(i.opts.saveParams.hasOwnProperty(n)){var o=i.opts.saveParams[n];s[n]="function"==typeof o?o.call(this):o}var r={};r[i.opts.saveParam]=e,v(this).ajax({method:i.opts.saveMethod,url:i.opts.saveURL,data:Object.assign(r,s),crossDomain:i.opts.requestWithCORS,withCredentials:i.opts.requestWithCredentials,headers:i.opts.requestHeaders,done:function(e,t,s){f=a,i.events.trigger("save.after",[e])},fail:function(e){c(l,e.response||e.responseText)}})}else c(u)}function n(){clearTimeout(e),e=setTimeout(function(){var e=i.html.get();(f!=e||t)&&(t=!1,a(f=e))},i.opts.saveInterval)}return s[u]="Missing saveURL option.",s[l]="Something went wrong during save.",{_init:function(){i.opts.saveInterval&&(f=i.html.get(),i.events.on("contentChanged",n),i.events.on("keydown destroy",function(){clearTimeout(e)}))},save:a,reset:function(){n(),t=!1},force:function(){t=!0}}},e.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),e.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,Object.assign(e.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),e.PLUGINS.save=function(i){var v=i.$,e=null,f=null,t=!1,u=1,l=2,s={};function c(e,t){i.events.trigger("save.error",[{code:e,message:s[e]},t])}function a(e){void 0===e&&(e=i.html.get());var a=e,t=i.events.trigger("save.before",[e]);if(!1===t)return!1;if("string"==typeof t&&(e=t),i.opts.saveURL){var s={};for(var n in i.opts.saveParams)if(i.opts.saveParams.hasOwnProperty(n)){var o=i.opts.saveParams[n];s[n]="function"==typeof o?o.call(this):o}var r={};r[i.opts.saveParam]=e,v(this).ajax({method:i.opts.saveMethod,url:i.opts.saveURL,data:Object.assign(r,s),crossDomain:i.opts.requestWithCORS,withCredentials:i.opts.requestWithCredentials,headers:i.opts.requestHeaders,done:function(e,t,s){f=a,i.events.trigger("save.after",[e])},fail:function(e){c(l,e.response||e.responseText)}})}else c(u)}function n(){clearTimeout(e),e=setTimeout(function(){var e=i.html.get();(f!=e||t)&&(t=!1,a(f=e))},i.opts.saveInterval)}return s[u]="Missing saveURL option.",s[l]="Something went wrong during save.",{_init:function o(){i.opts.saveInterval&&(f=i.html.get(),i.events.on("contentChanged",n),i.events.on("keydown destroy",function(){clearTimeout(e)}))},save:a,reset:function r(){n(),t=!1},force:function d(){t=!0}}},e.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),e.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(c,E){"object"==typeof exports&&"undefined"!=typeof module?E(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],E):E(c.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"¡",list:[{"char":"¡",desc:"INVERTED EXCLAMATION MARK"},{"char":"¢",desc:"CENT SIGN"},{"char":"£",desc:"POUND SIGN"},{"char":"¤",desc:"CURRENCY SIGN"},{"char":"¥",desc:"YEN SIGN"},{"char":"¦",desc:"BROKEN BAR"},{"char":"§",desc:"SECTION SIGN"},{"char":"¨",desc:"DIAERESIS"},{"char":"©",desc:"COPYRIGHT SIGN"},{"char":"™",desc:"TRADEMARK SIGN"},{"char":"ª",desc:"FEMININE ORDINAL INDICATOR"},{"char":"«",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¬",desc:"NOT SIGN"},{"char":"®",desc:"REGISTERED SIGN"},{"char":"¯",desc:"MACRON"},{"char":"°",desc:"DEGREE SIGN"},{"char":"±",desc:"PLUS-MINUS SIGN"},{"char":"²",desc:"SUPERSCRIPT TWO"},{"char":"³",desc:"SUPERSCRIPT THREE"},{"char":"´",desc:"ACUTE ACCENT"},{"char":"µ",desc:"MICRO SIGN"},{"char":"¶",desc:"PILCROW SIGN"},{"char":"·",desc:"MIDDLE DOT"},{"char":"¸",desc:"CEDILLA"},{"char":"¹",desc:"SUPERSCRIPT ONE"},{"char":"º",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"»",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¼",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"½",desc:"VULGAR FRACTION ONE HALF"},{"char":"¾",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"¿",desc:"INVERTED QUESTION MARK"},{"char":"À",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"Á",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"Â",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"Ã",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"Ä",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"Å",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"Æ",desc:"LATIN CAPITAL LETTER AE"},{"char":"Ç",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"È",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"É",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"Ê",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"Ë",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"Ì",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"Í",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"Î",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"Ï",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"Ð",desc:"LATIN CAPITAL LETTER ETH"},{"char":"Ñ",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"Ò",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"Ó",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"Ô",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"Õ",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"Ö",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"×",desc:"MULTIPLICATION SIGN"},{"char":"Ø",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"Ù",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"Ú",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"Û",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"Ü",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"Ý",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"Þ",desc:"LATIN CAPITAL LETTER THORN"},{"char":"ß",desc:"LATIN SMALL LETTER SHARP S"},{"char":"à",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"á",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"â",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"ã",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"ä",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"å",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"æ",desc:"LATIN SMALL LETTER AE"},{"char":"ç",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"è",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"é",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"ê",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"ë",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"ì",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"í",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"î",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"ï",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"ð",desc:"LATIN SMALL LETTER ETH"},{"char":"ñ",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"ò",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"ó",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"ô",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"õ",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"ö",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"÷",desc:"DIVISION SIGN"},{"char":"ø",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"ù",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"ú",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"û",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"ü",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"ý",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"þ",desc:"LATIN SMALL LETTER THORN"},{"char":"ÿ",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"Α",list:[{"char":"Α",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"Β",desc:"GREEK CAPITAL LETTER BETA"},{"char":"Γ",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"Δ",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"Ε",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"Ζ",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"Η",desc:"GREEK CAPITAL LETTER ETA"},{"char":"Θ",desc:"GREEK CAPITAL LETTER THETA"},{"char":"Ι",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"Κ",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"Λ",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"Μ",desc:"GREEK CAPITAL LETTER MU"},{"char":"Ν",desc:"GREEK CAPITAL LETTER NU"},{"char":"Ξ",desc:"GREEK CAPITAL LETTER XI"},{"char":"Ο",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"Π",desc:"GREEK CAPITAL LETTER PI"},{"char":"Ρ",desc:"GREEK CAPITAL LETTER RHO"},{"char":"Σ",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"Τ",desc:"GREEK CAPITAL LETTER TAU"},{"char":"Υ",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"Φ",desc:"GREEK CAPITAL LETTER PHI"},{"char":"Χ",desc:"GREEK CAPITAL LETTER CHI"},{"char":"Ψ",desc:"GREEK CAPITAL LETTER PSI"},{"char":"Ω",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"α",desc:"GREEK SMALL LETTER ALPHA"},{"char":"β",desc:"GREEK SMALL LETTER BETA"},{"char":"γ",desc:"GREEK SMALL LETTER GAMMA"},{"char":"δ",desc:"GREEK SMALL LETTER DELTA"},{"char":"ε",desc:"GREEK SMALL LETTER EPSILON"},{"char":"ζ",desc:"GREEK SMALL LETTER ZETA"},{"char":"η",desc:"GREEK SMALL LETTER ETA"},{"char":"θ",desc:"GREEK SMALL LETTER THETA"},{"char":"ι",desc:"GREEK SMALL LETTER IOTA"},{"char":"κ",desc:"GREEK SMALL LETTER KAPPA"},{"char":"λ",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"μ",desc:"GREEK SMALL LETTER MU"},{"char":"ν",desc:"GREEK SMALL LETTER NU"},{"char":"ξ",desc:"GREEK SMALL LETTER XI"},{"char":"ο",desc:"GREEK SMALL LETTER OMICRON"},{"char":"π",desc:"GREEK SMALL LETTER PI"},{"char":"ρ",desc:"GREEK SMALL LETTER RHO"},{"char":"ς",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"σ",desc:"GREEK SMALL LETTER SIGMA"},{"char":"τ",desc:"GREEK SMALL LETTER TAU"},{"char":"υ",desc:"GREEK SMALL LETTER UPSILON"},{"char":"φ",desc:"GREEK SMALL LETTER PHI"},{"char":"χ",desc:"GREEK SMALL LETTER CHI"},{"char":"ψ",desc:"GREEK SMALL LETTER PSI"},{"char":"ω",desc:"GREEK SMALL LETTER OMEGA"},{"char":"ϑ",desc:"GREEK THETA SYMBOL"},{"char":"ϒ",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"ϕ",desc:"GREEK PHI SYMBOL"},{"char":"ϖ",desc:"GREEK PI SYMBOL"},{"char":"Ϝ",desc:"GREEK LETTER DIGAMMA"},{"char":"ϝ",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"ϰ",desc:"GREEK KAPPA SYMBOL"},{"char":"ϱ",desc:"GREEK RHO SYMBOL"},{"char":"ϵ",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"϶",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"Ѐ",list:[{"char":"Ѐ",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"Ё",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"Ђ",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"Ѓ",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"Є",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"Ѕ",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"І",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"Ї",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"Ј",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"Љ",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"Њ",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"Ћ",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"Ќ",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"Ѝ",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"Ў",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"Џ",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"А",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"Б",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"В",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"Г",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"Д",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"Е",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"Ж",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"З",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"И",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"Й",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"К",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"Л",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"М",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"Н",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"О",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"П",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"Р",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"С",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"Т",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"У",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"Ф",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"Х",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"Ц",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"Ч",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"Ш",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"Щ",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"Ъ",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"Ы",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"Ь",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"Э",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"Ю",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"Я",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"а",desc:"CYRILLIC SMALL LETTER A"},{"char":"б",desc:"CYRILLIC SMALL LETTER BE"},{"char":"в",desc:"CYRILLIC SMALL LETTER VE"},{"char":"г",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"д",desc:"CYRILLIC SMALL LETTER DE"},{"char":"е",desc:"CYRILLIC SMALL LETTER IE"},{"char":"ж",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"з",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"и",desc:"CYRILLIC SMALL LETTER I"},{"char":"й",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"к",desc:"CYRILLIC SMALL LETTER KA"},{"char":"л",desc:"CYRILLIC SMALL LETTER EL"},{"char":"м",desc:"CYRILLIC SMALL LETTER EM"},{"char":"н",desc:"CYRILLIC SMALL LETTER EN"},{"char":"о",desc:"CYRILLIC SMALL LETTER O"},{"char":"п",desc:"CYRILLIC SMALL LETTER PE"},{"char":"р",desc:"CYRILLIC SMALL LETTER ER"},{"char":"с",desc:"CYRILLIC SMALL LETTER ES"},{"char":"т",desc:"CYRILLIC SMALL LETTER TE"},{"char":"у",desc:"CYRILLIC SMALL LETTER U"},{"char":"ф",desc:"CYRILLIC SMALL LETTER EF"},{"char":"х",desc:"CYRILLIC SMALL LETTER HA"},{"char":"ц",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"ч",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"ш",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"щ",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"ъ",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"ы",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"ь",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"э",desc:"CYRILLIC SMALL LETTER E"},{"char":"ю",desc:"CYRILLIC SMALL LETTER YU"},{"char":"я",desc:"CYRILLIC SMALL LETTER YA"},{"char":"ѐ",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"ё",desc:"CYRILLIC SMALL LETTER IO"},{"char":"ђ",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"ѓ",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"є",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"ѕ",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"і",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"ї",desc:"CYRILLIC SMALL LETTER YI"},{"char":"ј",desc:"CYRILLIC SMALL LETTER JE"},{"char":"љ",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"њ",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"ћ",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"ќ",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"ѝ",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"ў",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"џ",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"–",list:[{"char":"–",desc:"EN DASH"},{"char":"—",desc:"EM DASH"},{"char":"‘",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"’",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"‚",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"“",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"”",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"„",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"†",desc:"DAGGER"},{"char":"‡",desc:"DOUBLE DAGGER"},{"char":"•",desc:"BULLET"},{"char":"…",desc:"HORIZONTAL ELLIPSIS"},{"char":"‰",desc:"PER MILLE SIGN"},{"char":"′",desc:"PRIME"},{"char":"″",desc:"DOUBLE PRIME"},{"char":"‹",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"›",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"‾",desc:"OVERLINE"},{"char":"⁄",desc:"FRACTION SLASH"}]},{title:"Currency","char":"₠",list:[{"char":"₠",desc:"EURO-CURRENCY SIGN"},{"char":"₡",desc:"COLON SIGN"},{"char":"₢",desc:"CRUZEIRO SIGN"},{"char":"₣",desc:"FRENCH FRANC SIGN"},{"char":"₤",desc:"LIRA SIGN"},{"char":"₥",desc:"MILL SIGN"},{"char":"₦",desc:"NAIRA SIGN"},{"char":"₧",desc:"PESETA SIGN"},{"char":"₨",desc:"RUPEE SIGN"},{"char":"₩",desc:"WON SIGN"},{"char":"₪",desc:"NEW SHEQEL SIGN"},{"char":"₫",desc:"DONG SIGN"},{"char":"€",desc:"EURO SIGN"},{"char":"₭",desc:"KIP SIGN"},{"char":"₮",desc:"TUGRIK SIGN"},{"char":"₯",desc:"DRACHMA SIGN"},{"char":"₰",desc:"GERMAN PENNY SYMBOL"},{"char":"₱",desc:"PESO SIGN"},{"char":"₲",desc:"GUARANI SIGN"},{"char":"₳",desc:"AUSTRAL SIGN"},{"char":"₴",desc:"HRYVNIA SIGN"},{"char":"₵",desc:"CEDI SIGN"},{"char":"₶",desc:"LIVRE TOURNOIS SIGN"},{"char":"₷",desc:"SPESMILO SIGN"},{"char":"₸",desc:"TENGE SIGN"},{"char":"₹",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"←",list:[{"char":"←",desc:"LEFTWARDS ARROW"},{"char":"↑",desc:"UPWARDS ARROW"},{"char":"→",desc:"RIGHTWARDS ARROW"},{"char":"↓",desc:"DOWNWARDS ARROW"},{"char":"↔",desc:"LEFT RIGHT ARROW"},{"char":"↕",desc:"UP DOWN ARROW"},{"char":"↖",desc:"NORTH WEST ARROW"},{"char":"↗",desc:"NORTH EAST ARROW"},{"char":"↘",desc:"SOUTH EAST ARROW"},{"char":"↙",desc:"SOUTH WEST ARROW"},{"char":"↚",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"↛",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"↜",desc:"LEFTWARDS WAVE ARROW"},{"char":"↝",desc:"RIGHTWARDS WAVE ARROW"},{"char":"↞",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"↟",desc:"UPWARDS TWO HEADED ARROW"},{"char":"↠",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"↡",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"↢",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"↣",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"↤",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"↥",desc:"UPWARDS ARROW FROM BAR"},{"char":"↦",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"↧",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"↨",desc:"UP DOWN ARROW WITH BASE"},{"char":"↩",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"↪",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"↫",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"↬",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"↭",desc:"LEFT RIGHT WAVE ARROW"},{"char":"↮",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"↯",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"↰",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↱",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↲",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↳",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↴",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"↵",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"↶",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↷",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↸",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"↹",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"↺",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"↻",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"↼",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"↽",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"↾",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"↿",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇀",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"⇁",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"⇂",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"⇃",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇄",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"⇅",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"⇆",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"⇇",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"⇈",desc:"UPWARDS PAIRED ARROWS"},{"char":"⇉",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"⇊",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"⇋",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"⇌",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"⇍",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇎",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"⇏",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇐",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"⇑",desc:"UPWARDS DOUBLE ARROW"},{"char":"⇒",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"⇓",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"⇔",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"⇕",desc:"UP DOWN DOUBLE ARROW"},{"char":"⇖",desc:"NORTH WEST DOUBLE ARROW"},{"char":"⇗",desc:"NORTH EAST DOUBLE ARROW"},{"char":"⇘",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"⇙",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"⇚",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"⇛",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"⇜",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"⇝",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"⇞",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇟",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇠",desc:"LEFTWARDS DASHED ARROW"},{"char":"⇡",desc:"UPWARDS DASHED ARROW"},{"char":"⇢",desc:"RIGHTWARDS DASHED ARROW"},{"char":"⇣",desc:"DOWNWARDS DASHED ARROW"},{"char":"⇤",desc:"LEFTWARDS ARROW TO BAR"},{"char":"⇥",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"⇦",desc:"LEFTWARDS WHITE ARROW"},{"char":"⇧",desc:"UPWARDS WHITE ARROW"},{"char":"⇨",desc:"RIGHTWARDS WHITE ARROW"},{"char":"⇩",desc:"DOWNWARDS WHITE ARROW"},{"char":"⇪",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"⇫",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"⇬",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"⇭",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"⇮",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"⇯",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"⇰",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"⇱",desc:"NORTH WEST ARROW TO CORNER"},{"char":"⇲",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"⇳",desc:"UP DOWN WHITE ARROW"},{"char":"⇴",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"⇵",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"⇶",desc:"THREE RIGHTWARDS ARROWS"},{"char":"⇷",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇸",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇹",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"⇺",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇻",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇼",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇽",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"⇾",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"⇿",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"∀",list:[{"char":"∀",desc:"FOR ALL"},{"char":"∂",desc:"PARTIAL DIFFERENTIAL"},{"char":"∃",desc:"THERE EXISTS"},{"char":"∅",desc:"EMPTY SET"},{"char":"∇",desc:"NABLA"},{"char":"∈",desc:"ELEMENT OF"},{"char":"∉",desc:"NOT AN ELEMENT OF"},{"char":"∋",desc:"CONTAINS AS MEMBER"},{"char":"∏",desc:"N-ARY PRODUCT"},{"char":"∑",desc:"N-ARY SUMMATION"},{"char":"−",desc:"MINUS SIGN"},{"char":"∗",desc:"ASTERISK OPERATOR"},{"char":"√",desc:"SQUARE ROOT"},{"char":"∝",desc:"PROPORTIONAL TO"},{"char":"∞",desc:"INFINITY"},{"char":"∠",desc:"ANGLE"},{"char":"∧",desc:"LOGICAL AND"},{"char":"∨",desc:"LOGICAL OR"},{"char":"∩",desc:"INTERSECTION"},{"char":"∪",desc:"UNION"},{"char":"∫",desc:"INTEGRAL"},{"char":"∴",desc:"THEREFORE"},{"char":"∼",desc:"TILDE OPERATOR"},{"char":"≅",desc:"APPROXIMATELY EQUAL TO"},{"char":"≈",desc:"ALMOST EQUAL TO"},{"char":"≠",desc:"NOT EQUAL TO"},{"char":"≡",desc:"IDENTICAL TO"},{"char":"≤",desc:"LESS-THAN OR EQUAL TO"},{"char":"≥",desc:"GREATER-THAN OR EQUAL TO"},{"char":"⊂",desc:"SUBSET OF"},{"char":"⊃",desc:"SUPERSET OF"},{"char":"⊄",desc:"NOT A SUBSET OF"},{"char":"⊆",desc:"SUBSET OF OR EQUAL TO"},{"char":"⊇",desc:"SUPERSET OF OR EQUAL TO"},{"char":"⊕",desc:"CIRCLED PLUS"},{"char":"⊗",desc:"CIRCLED TIMES"},{"char":"⊥",desc:"UP TACK"}]},{title:"Misc","char":"♠",list:[{"char":"♠",desc:"BLACK SPADE SUIT"},{"char":"♣",desc:"BLACK CLUB SUIT"},{"char":"♥",desc:"BLACK HEART SUIT"},{"char":"♦",desc:"BLACK DIAMOND SUIT"},{"char":"♩",desc:"QUARTER NOTE"},{"char":"♪",desc:"EIGHTH NOTE"},{"char":"♫",desc:"BEAMED EIGHTH NOTES"},{"char":"♬",desc:"BEAMED SIXTEENTH NOTES"},{"char":"♭",desc:"MUSIC FLAT SIGN"},{"char":"♮",desc:"MUSIC NATURAL SIGN"},{"char":"☀",desc:"BLACK SUN WITH RAYS"},{"char":"☁",desc:"CLOUD"},{"char":"☂",desc:"UMBRELLA"},{"char":"☃",desc:"SNOWMAN"},{"char":"☕",desc:"HOT BEVERAGE"},{"char":"☘",desc:"SHAMROCK"},{"char":"☯",desc:"YIN YANG"},{"char":"✔",desc:"HEAVY CHECK MARK"},{"char":"✖",desc:"HEAVY MULTIPLICATION X"},{"char":"❄",desc:"SNOWFLAKE"},{"char":"❛",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❜",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❝",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❞",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❤",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(t.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),t.PLUGINS.specialCharacters=function(W){var N=W.$,A=W.opts.specialCharactersSets[0],a=W.opts.specialCharactersSets,I="";function e(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat((c=a,R=A,L="",c.forEach(function(c){var E={elementClass:c.title===R.title?"fr-active fr-active-tab":"",title:c.title,dataParam1:c.title,desc:c["char"]};L+='<button class="fr-command fr-btn fr-special-character-category '.concat(E.elementClass,'" title="').concat(E.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(E.dataParam1,'"><span>').concat(E.desc,"</span></button>")}),L),'\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat((T="",A.list.forEach(function(c){var E={dataParam1:c["char"],title:c.desc,splCharValue:c["char"]};T+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(E.dataParam1,'" \n title="').concat(E.title,'">').concat(E.splCharValue,"</span>")}),T),"\n </div>");var T,c,R,L}return{setSpecialCharacterCategory:function(E){A=a.filter(function(c){return c.title===E})[0],W.popups.get("specialCharacters").html(I+e())},showSpecialCharsPopup:function(){var c=W.popups.get("specialCharacters");if(c||(c=function(){W.opts.toolbarInline&&0<W.opts.specialCharButtons.length&&(I='<div class="fr-buttons fr-tabs">'.concat(W.button.buildList(W.opts.specialCharButtons),"</div>"));var S,c={buttons:I,custom_layer:e()},E=W.popups.create("specialCharacters",c);return S=E,W.events.on("popup.tab",function(c){var E=N(c.currentTarget);if(!W.popups.isVisible("specialCharacters")||!E.is("span, a"))return!0;var T,R,L,A=c.which;if(t.KEYCODE.TAB==A){if(E.is("span.fr-icon")&&c.shiftKey||E.is("a")&&!c.shiftKey){var a=S.find(".fr-buttons");T=!W.accessibility.focusToolbar(a,!!c.shiftKey)}if(!1!==T){var I=S.find("span.fr-icon:focus").first().concat(S.findVisible(" span.fr-icon").first().concat(S.find("a")));E.is("span.fr-icon")&&(I=I.not("span.fr-icon:not(:focus)")),R=I.index(E),R=c.shiftKey?((R-1)%I.length+I.length)%I.length:(R+1)%I.length,L=I.get(R),W.events.disableBlur(),L.focus(),T=!1}}else if(t.KEYCODE.ARROW_UP==A||t.KEYCODE.ARROW_DOWN==A||t.KEYCODE.ARROW_LEFT==A||t.KEYCODE.ARROW_RIGHT==A){if(E.is("span.fr-icon")){var e=E.parent().find("span.fr-icon");R=e.index(E);var r=11,s=Math.floor(e.length/r),h=R%r,d=Math.floor(R/r),C=d*r+h,O=s*r;t.KEYCODE.ARROW_UP==A?C=((C-r)%O+O)%O:t.KEYCODE.ARROW_DOWN==A?C=(C+r)%O:t.KEYCODE.ARROW_LEFT==A?C=((C-1)%O+O)%O:t.KEYCODE.ARROW_RIGHT==A&&(C=(C+1)%O),L=N(e.get(C)),W.events.disableBlur(),L.focus(),T=!1}}else t.KEYCODE.ENTER==A&&(E.is("a")?E[0].click():W.button.exec(E),T=!1);return!1===T&&(c.preventDefault(),c.stopPropagation()),T},!0),E}()),!c.hasClass("fr-active")){W.popups.refresh("specialCharacters"),W.popups.setContainer("specialCharacters",W.$tb);var E=W.$tb.find('.fr-command[data-cmd="specialCharacters"]'),T=W.button.getPosition(E),R=T.left,L=T.top;W.popups.show("specialCharacters",R,L,outerHeight)}},back:function(){W.popups.hide("specialCharacters"),W.toolbar.showInline()}}},t.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),t.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()}}),t.RegisterCommand("insertSpecialCharacter",{callback:function(c,E){this.undo.saveStep(),this.html.insert(E),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),t.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(c,E){this.specialCharacters.setSpecialCharacterCategory(E)}}),t.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}})}); | ||
!function(c,E){"object"==typeof exports&&"undefined"!=typeof module?E(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],E):E(c.FroalaEditor)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{specialCharactersSets:[{title:"Latin","char":"¡",list:[{"char":"¡",desc:"INVERTED EXCLAMATION MARK"},{"char":"¢",desc:"CENT SIGN"},{"char":"£",desc:"POUND SIGN"},{"char":"¤",desc:"CURRENCY SIGN"},{"char":"¥",desc:"YEN SIGN"},{"char":"¦",desc:"BROKEN BAR"},{"char":"§",desc:"SECTION SIGN"},{"char":"¨",desc:"DIAERESIS"},{"char":"©",desc:"COPYRIGHT SIGN"},{"char":"™",desc:"TRADEMARK SIGN"},{"char":"ª",desc:"FEMININE ORDINAL INDICATOR"},{"char":"«",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¬",desc:"NOT SIGN"},{"char":"®",desc:"REGISTERED SIGN"},{"char":"¯",desc:"MACRON"},{"char":"°",desc:"DEGREE SIGN"},{"char":"±",desc:"PLUS-MINUS SIGN"},{"char":"²",desc:"SUPERSCRIPT TWO"},{"char":"³",desc:"SUPERSCRIPT THREE"},{"char":"´",desc:"ACUTE ACCENT"},{"char":"µ",desc:"MICRO SIGN"},{"char":"¶",desc:"PILCROW SIGN"},{"char":"·",desc:"MIDDLE DOT"},{"char":"¸",desc:"CEDILLA"},{"char":"¹",desc:"SUPERSCRIPT ONE"},{"char":"º",desc:"MASCULINE ORDINAL INDICATOR"},{"char":"»",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{"char":"¼",desc:"VULGAR FRACTION ONE QUARTER"},{"char":"½",desc:"VULGAR FRACTION ONE HALF"},{"char":"¾",desc:"VULGAR FRACTION THREE QUARTERS"},{"char":"¿",desc:"INVERTED QUESTION MARK"},{"char":"À",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{"char":"Á",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{"char":"Â",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{"char":"Ã",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{"char":"Ä",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{"char":"Å",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{"char":"Æ",desc:"LATIN CAPITAL LETTER AE"},{"char":"Ç",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{"char":"È",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{"char":"É",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{"char":"Ê",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{"char":"Ë",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{"char":"Ì",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{"char":"Í",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{"char":"Î",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{"char":"Ï",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{"char":"Ð",desc:"LATIN CAPITAL LETTER ETH"},{"char":"Ñ",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{"char":"Ò",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{"char":"Ó",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{"char":"Ô",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{"char":"Õ",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{"char":"Ö",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{"char":"×",desc:"MULTIPLICATION SIGN"},{"char":"Ø",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{"char":"Ù",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{"char":"Ú",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{"char":"Û",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{"char":"Ü",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{"char":"Ý",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{"char":"Þ",desc:"LATIN CAPITAL LETTER THORN"},{"char":"ß",desc:"LATIN SMALL LETTER SHARP S"},{"char":"à",desc:"LATIN SMALL LETTER A WITH GRAVE"},{"char":"á",desc:"LATIN SMALL LETTER A WITH ACUTE "},{"char":"â",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{"char":"ã",desc:"LATIN SMALL LETTER A WITH TILDE"},{"char":"ä",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{"char":"å",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{"char":"æ",desc:"LATIN SMALL LETTER AE"},{"char":"ç",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{"char":"è",desc:"LATIN SMALL LETTER E WITH GRAVE"},{"char":"é",desc:"LATIN SMALL LETTER E WITH ACUTE"},{"char":"ê",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{"char":"ë",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{"char":"ì",desc:"LATIN SMALL LETTER I WITH GRAVE"},{"char":"í",desc:"LATIN SMALL LETTER I WITH ACUTE"},{"char":"î",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{"char":"ï",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{"char":"ð",desc:"LATIN SMALL LETTER ETH"},{"char":"ñ",desc:"LATIN SMALL LETTER N WITH TILDE"},{"char":"ò",desc:"LATIN SMALL LETTER O WITH GRAVE"},{"char":"ó",desc:"LATIN SMALL LETTER O WITH ACUTE"},{"char":"ô",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{"char":"õ",desc:"LATIN SMALL LETTER O WITH TILDE"},{"char":"ö",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{"char":"÷",desc:"DIVISION SIGN"},{"char":"ø",desc:"LATIN SMALL LETTER O WITH STROKE"},{"char":"ù",desc:"LATIN SMALL LETTER U WITH GRAVE"},{"char":"ú",desc:"LATIN SMALL LETTER U WITH ACUTE"},{"char":"û",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{"char":"ü",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{"char":"ý",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{"char":"þ",desc:"LATIN SMALL LETTER THORN"},{"char":"ÿ",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek","char":"Α",list:[{"char":"Α",desc:"GREEK CAPITAL LETTER ALPHA"},{"char":"Β",desc:"GREEK CAPITAL LETTER BETA"},{"char":"Γ",desc:"GREEK CAPITAL LETTER GAMMA"},{"char":"Δ",desc:"GREEK CAPITAL LETTER DELTA"},{"char":"Ε",desc:"GREEK CAPITAL LETTER EPSILON"},{"char":"Ζ",desc:"GREEK CAPITAL LETTER ZETA"},{"char":"Η",desc:"GREEK CAPITAL LETTER ETA"},{"char":"Θ",desc:"GREEK CAPITAL LETTER THETA"},{"char":"Ι",desc:"GREEK CAPITAL LETTER IOTA"},{"char":"Κ",desc:"GREEK CAPITAL LETTER KAPPA"},{"char":"Λ",desc:"GREEK CAPITAL LETTER LAMBDA"},{"char":"Μ",desc:"GREEK CAPITAL LETTER MU"},{"char":"Ν",desc:"GREEK CAPITAL LETTER NU"},{"char":"Ξ",desc:"GREEK CAPITAL LETTER XI"},{"char":"Ο",desc:"GREEK CAPITAL LETTER OMICRON"},{"char":"Π",desc:"GREEK CAPITAL LETTER PI"},{"char":"Ρ",desc:"GREEK CAPITAL LETTER RHO"},{"char":"Σ",desc:"GREEK CAPITAL LETTER SIGMA"},{"char":"Τ",desc:"GREEK CAPITAL LETTER TAU"},{"char":"Υ",desc:"GREEK CAPITAL LETTER UPSILON"},{"char":"Φ",desc:"GREEK CAPITAL LETTER PHI"},{"char":"Χ",desc:"GREEK CAPITAL LETTER CHI"},{"char":"Ψ",desc:"GREEK CAPITAL LETTER PSI"},{"char":"Ω",desc:"GREEK CAPITAL LETTER OMEGA"},{"char":"α",desc:"GREEK SMALL LETTER ALPHA"},{"char":"β",desc:"GREEK SMALL LETTER BETA"},{"char":"γ",desc:"GREEK SMALL LETTER GAMMA"},{"char":"δ",desc:"GREEK SMALL LETTER DELTA"},{"char":"ε",desc:"GREEK SMALL LETTER EPSILON"},{"char":"ζ",desc:"GREEK SMALL LETTER ZETA"},{"char":"η",desc:"GREEK SMALL LETTER ETA"},{"char":"θ",desc:"GREEK SMALL LETTER THETA"},{"char":"ι",desc:"GREEK SMALL LETTER IOTA"},{"char":"κ",desc:"GREEK SMALL LETTER KAPPA"},{"char":"λ",desc:"GREEK SMALL LETTER LAMBDA"},{"char":"μ",desc:"GREEK SMALL LETTER MU"},{"char":"ν",desc:"GREEK SMALL LETTER NU"},{"char":"ξ",desc:"GREEK SMALL LETTER XI"},{"char":"ο",desc:"GREEK SMALL LETTER OMICRON"},{"char":"π",desc:"GREEK SMALL LETTER PI"},{"char":"ρ",desc:"GREEK SMALL LETTER RHO"},{"char":"ς",desc:"GREEK SMALL LETTER FINAL SIGMA"},{"char":"σ",desc:"GREEK SMALL LETTER SIGMA"},{"char":"τ",desc:"GREEK SMALL LETTER TAU"},{"char":"υ",desc:"GREEK SMALL LETTER UPSILON"},{"char":"φ",desc:"GREEK SMALL LETTER PHI"},{"char":"χ",desc:"GREEK SMALL LETTER CHI"},{"char":"ψ",desc:"GREEK SMALL LETTER PSI"},{"char":"ω",desc:"GREEK SMALL LETTER OMEGA"},{"char":"ϑ",desc:"GREEK THETA SYMBOL"},{"char":"ϒ",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{"char":"ϕ",desc:"GREEK PHI SYMBOL"},{"char":"ϖ",desc:"GREEK PI SYMBOL"},{"char":"Ϝ",desc:"GREEK LETTER DIGAMMA"},{"char":"ϝ",desc:"GREEK SMALL LETTER DIGAMMA"},{"char":"ϰ",desc:"GREEK KAPPA SYMBOL"},{"char":"ϱ",desc:"GREEK RHO SYMBOL"},{"char":"ϵ",desc:"GREEK LUNATE EPSILON SYMBOL"},{"char":"϶",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic","char":"Ѐ",list:[{"char":"Ѐ",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{"char":"Ё",desc:"CYRILLIC CAPITAL LETTER IO"},{"char":"Ђ",desc:"CYRILLIC CAPITAL LETTER DJE"},{"char":"Ѓ",desc:"CYRILLIC CAPITAL LETTER GJE"},{"char":"Є",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{"char":"Ѕ",desc:"CYRILLIC CAPITAL LETTER DZE"},{"char":"І",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"Ї",desc:"CYRILLIC CAPITAL LETTER YI"},{"char":"Ј",desc:"CYRILLIC CAPITAL LETTER JE"},{"char":"Љ",desc:"CYRILLIC CAPITAL LETTER LJE"},{"char":"Њ",desc:"CYRILLIC CAPITAL LETTER NJE"},{"char":"Ћ",desc:"CYRILLIC CAPITAL LETTER TSHE"},{"char":"Ќ",desc:"CYRILLIC CAPITAL LETTER KJE"},{"char":"Ѝ",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{"char":"Ў",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{"char":"Џ",desc:"CYRILLIC CAPITAL LETTER DZHE"},{"char":"А",desc:"CYRILLIC CAPITAL LETTER A"},{"char":"Б",desc:"CYRILLIC CAPITAL LETTER BE"},{"char":"В",desc:"CYRILLIC CAPITAL LETTER VE"},{"char":"Г",desc:"CYRILLIC CAPITAL LETTER GHE"},{"char":"Д",desc:"CYRILLIC CAPITAL LETTER DE"},{"char":"Е",desc:"CYRILLIC CAPITAL LETTER IE"},{"char":"Ж",desc:"CYRILLIC CAPITAL LETTER ZHE"},{"char":"З",desc:"CYRILLIC CAPITAL LETTER ZE"},{"char":"И",desc:"CYRILLIC CAPITAL LETTER I"},{"char":"Й",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{"char":"К",desc:"CYRILLIC CAPITAL LETTER KA"},{"char":"Л",desc:"CYRILLIC CAPITAL LETTER EL"},{"char":"М",desc:"CYRILLIC CAPITAL LETTER EM"},{"char":"Н",desc:"CYRILLIC CAPITAL LETTER EN"},{"char":"О",desc:"CYRILLIC CAPITAL LETTER O"},{"char":"П",desc:"CYRILLIC CAPITAL LETTER PE"},{"char":"Р",desc:"CYRILLIC CAPITAL LETTER ER"},{"char":"С",desc:"CYRILLIC CAPITAL LETTER ES"},{"char":"Т",desc:"CYRILLIC CAPITAL LETTER TE"},{"char":"У",desc:"CYRILLIC CAPITAL LETTER U"},{"char":"Ф",desc:"CYRILLIC CAPITAL LETTER EF"},{"char":"Х",desc:"CYRILLIC CAPITAL LETTER HA"},{"char":"Ц",desc:"CYRILLIC CAPITAL LETTER TSE"},{"char":"Ч",desc:"CYRILLIC CAPITAL LETTER CHE"},{"char":"Ш",desc:"CYRILLIC CAPITAL LETTER SHA"},{"char":"Щ",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{"char":"Ъ",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{"char":"Ы",desc:"CYRILLIC CAPITAL LETTER YERU"},{"char":"Ь",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{"char":"Э",desc:"CYRILLIC CAPITAL LETTER E"},{"char":"Ю",desc:"CYRILLIC CAPITAL LETTER YU"},{"char":"Я",desc:"CYRILLIC CAPITAL LETTER YA"},{"char":"а",desc:"CYRILLIC SMALL LETTER A"},{"char":"б",desc:"CYRILLIC SMALL LETTER BE"},{"char":"в",desc:"CYRILLIC SMALL LETTER VE"},{"char":"г",desc:"CYRILLIC SMALL LETTER GHE"},{"char":"д",desc:"CYRILLIC SMALL LETTER DE"},{"char":"е",desc:"CYRILLIC SMALL LETTER IE"},{"char":"ж",desc:"CYRILLIC SMALL LETTER ZHE"},{"char":"з",desc:"CYRILLIC SMALL LETTER ZE"},{"char":"и",desc:"CYRILLIC SMALL LETTER I"},{"char":"й",desc:"CYRILLIC SMALL LETTER SHORT I"},{"char":"к",desc:"CYRILLIC SMALL LETTER KA"},{"char":"л",desc:"CYRILLIC SMALL LETTER EL"},{"char":"м",desc:"CYRILLIC SMALL LETTER EM"},{"char":"н",desc:"CYRILLIC SMALL LETTER EN"},{"char":"о",desc:"CYRILLIC SMALL LETTER O"},{"char":"п",desc:"CYRILLIC SMALL LETTER PE"},{"char":"р",desc:"CYRILLIC SMALL LETTER ER"},{"char":"с",desc:"CYRILLIC SMALL LETTER ES"},{"char":"т",desc:"CYRILLIC SMALL LETTER TE"},{"char":"у",desc:"CYRILLIC SMALL LETTER U"},{"char":"ф",desc:"CYRILLIC SMALL LETTER EF"},{"char":"х",desc:"CYRILLIC SMALL LETTER HA"},{"char":"ц",desc:"CYRILLIC SMALL LETTER TSE"},{"char":"ч",desc:"CYRILLIC SMALL LETTER CHE"},{"char":"ш",desc:"CYRILLIC SMALL LETTER SHA"},{"char":"щ",desc:"CYRILLIC SMALL LETTER SHCHA"},{"char":"ъ",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{"char":"ы",desc:"CYRILLIC SMALL LETTER YERU"},{"char":"ь",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{"char":"э",desc:"CYRILLIC SMALL LETTER E"},{"char":"ю",desc:"CYRILLIC SMALL LETTER YU"},{"char":"я",desc:"CYRILLIC SMALL LETTER YA"},{"char":"ѐ",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{"char":"ё",desc:"CYRILLIC SMALL LETTER IO"},{"char":"ђ",desc:"CYRILLIC SMALL LETTER DJE"},{"char":"ѓ",desc:"CYRILLIC SMALL LETTER GJE"},{"char":"є",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{"char":"ѕ",desc:"CYRILLIC SMALL LETTER DZE"},{"char":"і",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{"char":"ї",desc:"CYRILLIC SMALL LETTER YI"},{"char":"ј",desc:"CYRILLIC SMALL LETTER JE"},{"char":"љ",desc:"CYRILLIC SMALL LETTER LJE"},{"char":"њ",desc:"CYRILLIC SMALL LETTER NJE"},{"char":"ћ",desc:"CYRILLIC SMALL LETTER TSHE"},{"char":"ќ",desc:"CYRILLIC SMALL LETTER KJE"},{"char":"ѝ",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{"char":"ў",desc:"CYRILLIC SMALL LETTER SHORT U"},{"char":"џ",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation","char":"–",list:[{"char":"–",desc:"EN DASH"},{"char":"—",desc:"EM DASH"},{"char":"‘",desc:"LEFT SINGLE QUOTATION MARK"},{"char":"’",desc:"RIGHT SINGLE QUOTATION MARK"},{"char":"‚",desc:"SINGLE LOW-9 QUOTATION MARK"},{"char":"“",desc:"LEFT DOUBLE QUOTATION MARK"},{"char":"”",desc:"RIGHT DOUBLE QUOTATION MARK"},{"char":"„",desc:"DOUBLE LOW-9 QUOTATION MARK"},{"char":"†",desc:"DAGGER"},{"char":"‡",desc:"DOUBLE DAGGER"},{"char":"•",desc:"BULLET"},{"char":"…",desc:"HORIZONTAL ELLIPSIS"},{"char":"‰",desc:"PER MILLE SIGN"},{"char":"′",desc:"PRIME"},{"char":"″",desc:"DOUBLE PRIME"},{"char":"‹",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{"char":"›",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{"char":"‾",desc:"OVERLINE"},{"char":"⁄",desc:"FRACTION SLASH"}]},{title:"Currency","char":"₠",list:[{"char":"₠",desc:"EURO-CURRENCY SIGN"},{"char":"₡",desc:"COLON SIGN"},{"char":"₢",desc:"CRUZEIRO SIGN"},{"char":"₣",desc:"FRENCH FRANC SIGN"},{"char":"₤",desc:"LIRA SIGN"},{"char":"₥",desc:"MILL SIGN"},{"char":"₦",desc:"NAIRA SIGN"},{"char":"₧",desc:"PESETA SIGN"},{"char":"₨",desc:"RUPEE SIGN"},{"char":"₩",desc:"WON SIGN"},{"char":"₪",desc:"NEW SHEQEL SIGN"},{"char":"₫",desc:"DONG SIGN"},{"char":"€",desc:"EURO SIGN"},{"char":"₭",desc:"KIP SIGN"},{"char":"₮",desc:"TUGRIK SIGN"},{"char":"₯",desc:"DRACHMA SIGN"},{"char":"₰",desc:"GERMAN PENNY SYMBOL"},{"char":"₱",desc:"PESO SIGN"},{"char":"₲",desc:"GUARANI SIGN"},{"char":"₳",desc:"AUSTRAL SIGN"},{"char":"₴",desc:"HRYVNIA SIGN"},{"char":"₵",desc:"CEDI SIGN"},{"char":"₶",desc:"LIVRE TOURNOIS SIGN"},{"char":"₷",desc:"SPESMILO SIGN"},{"char":"₸",desc:"TENGE SIGN"},{"char":"₹",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows","char":"←",list:[{"char":"←",desc:"LEFTWARDS ARROW"},{"char":"↑",desc:"UPWARDS ARROW"},{"char":"→",desc:"RIGHTWARDS ARROW"},{"char":"↓",desc:"DOWNWARDS ARROW"},{"char":"↔",desc:"LEFT RIGHT ARROW"},{"char":"↕",desc:"UP DOWN ARROW"},{"char":"↖",desc:"NORTH WEST ARROW"},{"char":"↗",desc:"NORTH EAST ARROW"},{"char":"↘",desc:"SOUTH EAST ARROW"},{"char":"↙",desc:"SOUTH WEST ARROW"},{"char":"↚",desc:"LEFTWARDS ARROW WITH STROKE"},{"char":"↛",desc:"RIGHTWARDS ARROW WITH STROKE"},{"char":"↜",desc:"LEFTWARDS WAVE ARROW"},{"char":"↝",desc:"RIGHTWARDS WAVE ARROW"},{"char":"↞",desc:"LEFTWARDS TWO HEADED ARROW"},{"char":"↟",desc:"UPWARDS TWO HEADED ARROW"},{"char":"↠",desc:"RIGHTWARDS TWO HEADED ARROW"},{"char":"↡",desc:"DOWNWARDS TWO HEADED ARROW"},{"char":"↢",desc:"LEFTWARDS ARROW WITH TAIL"},{"char":"↣",desc:"RIGHTWARDS ARROW WITH TAIL"},{"char":"↤",desc:"LEFTWARDS ARROW FROM BAR"},{"char":"↥",desc:"UPWARDS ARROW FROM BAR"},{"char":"↦",desc:"RIGHTWARDS ARROW FROM BAR"},{"char":"↧",desc:"DOWNWARDS ARROW FROM BAR"},{"char":"↨",desc:"UP DOWN ARROW WITH BASE"},{"char":"↩",desc:"LEFTWARDS ARROW WITH HOOK"},{"char":"↪",desc:"RIGHTWARDS ARROW WITH HOOK"},{"char":"↫",desc:"LEFTWARDS ARROW WITH LOOP"},{"char":"↬",desc:"RIGHTWARDS ARROW WITH LOOP"},{"char":"↭",desc:"LEFT RIGHT WAVE ARROW"},{"char":"↮",desc:"LEFT RIGHT ARROW WITH STROKE"},{"char":"↯",desc:"DOWNWARDS ZIGZAG ARROW"},{"char":"↰",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↱",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↲",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{"char":"↳",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{"char":"↴",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{"char":"↵",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{"char":"↶",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↷",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{"char":"↸",desc:"NORTH WEST ARROW TO LONG BAR"},{"char":"↹",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{"char":"↺",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{"char":"↻",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{"char":"↼",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{"char":"↽",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"↾",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"↿",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇀",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{"char":"⇁",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{"char":"⇂",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{"char":"⇃",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{"char":"⇄",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{"char":"⇅",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{"char":"⇆",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{"char":"⇇",desc:"LEFTWARDS PAIRED ARROWS"},{"char":"⇈",desc:"UPWARDS PAIRED ARROWS"},{"char":"⇉",desc:"RIGHTWARDS PAIRED ARROWS"},{"char":"⇊",desc:"DOWNWARDS PAIRED ARROWS"},{"char":"⇋",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{"char":"⇌",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{"char":"⇍",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇎",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{"char":"⇏",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{"char":"⇐",desc:"LEFTWARDS DOUBLE ARROW"},{"char":"⇑",desc:"UPWARDS DOUBLE ARROW"},{"char":"⇒",desc:"RIGHTWARDS DOUBLE ARROW"},{"char":"⇓",desc:"DOWNWARDS DOUBLE ARROW"},{"char":"⇔",desc:"LEFT RIGHT DOUBLE ARROW"},{"char":"⇕",desc:"UP DOWN DOUBLE ARROW"},{"char":"⇖",desc:"NORTH WEST DOUBLE ARROW"},{"char":"⇗",desc:"NORTH EAST DOUBLE ARROW"},{"char":"⇘",desc:"SOUTH EAST DOUBLE ARROW"},{"char":"⇙",desc:"SOUTH WEST DOUBLE ARROW"},{"char":"⇚",desc:"LEFTWARDS TRIPLE ARROW"},{"char":"⇛",desc:"RIGHTWARDS TRIPLE ARROW"},{"char":"⇜",desc:"LEFTWARDS SQUIGGLE ARROW"},{"char":"⇝",desc:"RIGHTWARDS SQUIGGLE ARROW"},{"char":"⇞",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇟",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{"char":"⇠",desc:"LEFTWARDS DASHED ARROW"},{"char":"⇡",desc:"UPWARDS DASHED ARROW"},{"char":"⇢",desc:"RIGHTWARDS DASHED ARROW"},{"char":"⇣",desc:"DOWNWARDS DASHED ARROW"},{"char":"⇤",desc:"LEFTWARDS ARROW TO BAR"},{"char":"⇥",desc:"RIGHTWARDS ARROW TO BAR"},{"char":"⇦",desc:"LEFTWARDS WHITE ARROW"},{"char":"⇧",desc:"UPWARDS WHITE ARROW"},{"char":"⇨",desc:"RIGHTWARDS WHITE ARROW"},{"char":"⇩",desc:"DOWNWARDS WHITE ARROW"},{"char":"⇪",desc:"UPWARDS WHITE ARROW FROM BAR"},{"char":"⇫",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{"char":"⇬",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{"char":"⇭",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{"char":"⇮",desc:"UPWARDS WHITE DOUBLE ARROW"},{"char":"⇯",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{"char":"⇰",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{"char":"⇱",desc:"NORTH WEST ARROW TO CORNER"},{"char":"⇲",desc:"SOUTH EAST ARROW TO CORNER"},{"char":"⇳",desc:"UP DOWN WHITE ARROW"},{"char":"⇴",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{"char":"⇵",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{"char":"⇶",desc:"THREE RIGHTWARDS ARROWS"},{"char":"⇷",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇸",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{"char":"⇹",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{"char":"⇺",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇻",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇼",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{"char":"⇽",desc:"LEFTWARDS OPEN-HEADED ARROW"},{"char":"⇾",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{"char":"⇿",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math","char":"∀",list:[{"char":"∀",desc:"FOR ALL"},{"char":"∂",desc:"PARTIAL DIFFERENTIAL"},{"char":"∃",desc:"THERE EXISTS"},{"char":"∅",desc:"EMPTY SET"},{"char":"∇",desc:"NABLA"},{"char":"∈",desc:"ELEMENT OF"},{"char":"∉",desc:"NOT AN ELEMENT OF"},{"char":"∋",desc:"CONTAINS AS MEMBER"},{"char":"∏",desc:"N-ARY PRODUCT"},{"char":"∑",desc:"N-ARY SUMMATION"},{"char":"−",desc:"MINUS SIGN"},{"char":"∗",desc:"ASTERISK OPERATOR"},{"char":"√",desc:"SQUARE ROOT"},{"char":"∝",desc:"PROPORTIONAL TO"},{"char":"∞",desc:"INFINITY"},{"char":"∠",desc:"ANGLE"},{"char":"∧",desc:"LOGICAL AND"},{"char":"∨",desc:"LOGICAL OR"},{"char":"∩",desc:"INTERSECTION"},{"char":"∪",desc:"UNION"},{"char":"∫",desc:"INTEGRAL"},{"char":"∴",desc:"THEREFORE"},{"char":"∼",desc:"TILDE OPERATOR"},{"char":"≅",desc:"APPROXIMATELY EQUAL TO"},{"char":"≈",desc:"ALMOST EQUAL TO"},{"char":"≠",desc:"NOT EQUAL TO"},{"char":"≡",desc:"IDENTICAL TO"},{"char":"≤",desc:"LESS-THAN OR EQUAL TO"},{"char":"≥",desc:"GREATER-THAN OR EQUAL TO"},{"char":"⊂",desc:"SUBSET OF"},{"char":"⊃",desc:"SUPERSET OF"},{"char":"⊄",desc:"NOT A SUBSET OF"},{"char":"⊆",desc:"SUBSET OF OR EQUAL TO"},{"char":"⊇",desc:"SUPERSET OF OR EQUAL TO"},{"char":"⊕",desc:"CIRCLED PLUS"},{"char":"⊗",desc:"CIRCLED TIMES"},{"char":"⊥",desc:"UP TACK"}]},{title:"Misc","char":"♠",list:[{"char":"♠",desc:"BLACK SPADE SUIT"},{"char":"♣",desc:"BLACK CLUB SUIT"},{"char":"♥",desc:"BLACK HEART SUIT"},{"char":"♦",desc:"BLACK DIAMOND SUIT"},{"char":"♩",desc:"QUARTER NOTE"},{"char":"♪",desc:"EIGHTH NOTE"},{"char":"♫",desc:"BEAMED EIGHTH NOTES"},{"char":"♬",desc:"BEAMED SIXTEENTH NOTES"},{"char":"♭",desc:"MUSIC FLAT SIGN"},{"char":"♮",desc:"MUSIC NATURAL SIGN"},{"char":"☀",desc:"BLACK SUN WITH RAYS"},{"char":"☁",desc:"CLOUD"},{"char":"☂",desc:"UMBRELLA"},{"char":"☃",desc:"SNOWMAN"},{"char":"☕",desc:"HOT BEVERAGE"},{"char":"☘",desc:"SHAMROCK"},{"char":"☯",desc:"YIN YANG"},{"char":"✔",desc:"HEAVY CHECK MARK"},{"char":"✖",desc:"HEAVY MULTIPLICATION X"},{"char":"❄",desc:"SNOWFLAKE"},{"char":"❛",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❜",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❝",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{"char":"❞",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{"char":"❤",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(t.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),t.PLUGINS.specialCharacters=function(W){var N=W.$,T=W.opts.specialCharactersSets[0],L=W.opts.specialCharactersSets,a="";function I(){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function E(c,T){var R="";return c.forEach(function(c){var E={elementClass:c.title===T.title?"fr-active fr-active-tab":"",title:c.title,dataParam1:c.title,desc:c["char"]};R+='<button class="fr-command fr-btn fr-special-character-category '.concat(E.elementClass,'" title="').concat(E.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(E.dataParam1,'"><span>').concat(E.desc,"</span></button>")}),R}(L,T),'\n </div>\n <div class="fr-icon-container fr-sc-container">\n ').concat(function R(c){var T="";return c.list.forEach(function(c){var E={dataParam1:c["char"],title:c.desc,splCharValue:c["char"]};T+='<span class="fr-command fr-special-character fr-icon" role="button" \n data-cmd="insertSpecialCharacter" data-param1="'.concat(E.dataParam1,'" \n title="').concat(E.title,'">').concat(E.splCharValue,"</span>")}),T}(T),"\n </div>")}return{setSpecialCharacterCategory:function R(E){T=L.filter(function(c){return c.title===E})[0],function c(){W.popups.get("specialCharacters").html(a+I())}()},showSpecialCharsPopup:function e(){var c=W.popups.get("specialCharacters");if(c||(c=function A(){W.opts.toolbarInline&&0<W.opts.specialCharButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(W.button.buildList(W.opts.specialCharButtons),"</div>"));var c={buttons:a,custom_layer:I()},E=W.popups.create("specialCharacters",c);return function T(S){W.events.on("popup.tab",function(c){var E=N(c.currentTarget);if(!W.popups.isVisible("specialCharacters")||!E.is("span, a"))return!0;var T,R,L,A=c.which;if(t.KEYCODE.TAB==A){if(E.is("span.fr-icon")&&c.shiftKey||E.is("a")&&!c.shiftKey){var a=S.find(".fr-buttons");T=!W.accessibility.focusToolbar(a,!!c.shiftKey)}if(!1!==T){var I=S.find("span.fr-icon:focus").first().concat(S.findVisible(" span.fr-icon").first().concat(S.find("a")));E.is("span.fr-icon")&&(I=I.not("span.fr-icon:not(:focus)")),R=I.index(E),R=c.shiftKey?((R-1)%I.length+I.length)%I.length:(R+1)%I.length,L=I.get(R),W.events.disableBlur(),L.focus(),T=!1}}else if(t.KEYCODE.ARROW_UP==A||t.KEYCODE.ARROW_DOWN==A||t.KEYCODE.ARROW_LEFT==A||t.KEYCODE.ARROW_RIGHT==A){if(E.is("span.fr-icon")){var e=E.parent().find("span.fr-icon");R=e.index(E);var r=11,s=Math.floor(e.length/r),h=R%r,d=Math.floor(R/r),C=d*r+h,O=s*r;t.KEYCODE.ARROW_UP==A?C=((C-r)%O+O)%O:t.KEYCODE.ARROW_DOWN==A?C=(C+r)%O:t.KEYCODE.ARROW_LEFT==A?C=((C-1)%O+O)%O:t.KEYCODE.ARROW_RIGHT==A&&(C=(C+1)%O),L=N(e.get(C)),W.events.disableBlur(),L.focus(),T=!1}}else t.KEYCODE.ENTER==A&&(E.is("a")?E[0].click():W.button.exec(E),T=!1);return!1===T&&(c.preventDefault(),c.stopPropagation()),T},!0)}(E),E}()),!c.hasClass("fr-active")){W.popups.refresh("specialCharacters"),W.popups.setContainer("specialCharacters",W.$tb);var E=W.$tb.find('.fr-command[data-cmd="specialCharacters"]'),T=W.button.getPosition(E),R=T.left,L=T.top;W.popups.show("specialCharacters",R,L,outerHeight)}},back:function c(){W.popups.hide("specialCharacters"),W.toolbar.showInline()}}},t.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),t.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()}}),t.RegisterCommand("insertSpecialCharacter",{callback:function(c,E){this.undo.saveStep(),this.html.insert(E),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),t.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(c,E){this.specialCharacters.setSpecialCharacterCategory(E)}}),t.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),t.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(ee){"use strict";ee=ee&&ee.hasOwnProperty("default")?ee["default"]:ee,Object.assign(ee.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(ee.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}),ee.PLUGINS.table=function(E){var R,f,r,n,a,s,O,A=E.$;function h(){var e=x();if(e){var t=E.popups.get("table.edit");if(t||(t=p()),t){E.popups.setContainer("table.edit",E.$sc);var l=S(e),a=l.left+(l.right-l.left)/2,r=l.bottom;E.popups.show("table.edit",a,r,l.bottom-l.top,!0),E.edit.isDisabled()&&(1<Z().length&&E.toolbar.disable(),E.$el.removeClass("fr-no-selection"),E.edit.on(),E.button.bulkRefresh(),E.selection.setAtEnd(E.$el.find(".fr-selected-cell").last().get(0)),E.selection.restore())}}}function d(){var e,t,l,a,r=x();if(r){var n=E.popups.get("table.colors");n||(n=function(){var e="";0<E.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'+E.button.buildList(E.opts.tableColorsButtons)+"</div>");var t="";E.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'+E.id+'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-'+E.id+'" type="text" placeholder="'+E.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">'+E.language.translate("OK")+"</button></div></div>");var l={buttons:e,colors:function(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<E.opts.tableColors.length;t++)0!==t&&t%E.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=E.opts.tableColors[t]?e+='<span class="fr-command" style="background: '+E.opts.tableColors[t]+';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="'+E.opts.tableColors[t]+'"><span class="fr-sr-only">'+E.language.translate("Color")+" "+E.opts.tableColors[t]+" </span></span>":e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'+E.language.translate("Clear Formatting")+'">'+E.icon.create("tableColorRemove")+'<span class="fr-sr-only">'+E.language.translate("Clear Formatting")+"</span></span>";return e+="</div>"}(),custom_color:t},a=E.popups.create("table.colors",l);return E.events.$on(E.$wp,"scroll.table-colors",function(){E.popups.isVisible("table.colors")&&d()}),u=a,E.events.on("popup.tab",function(e){var t=A(e.currentTarget);if(!E.popups.isVisible("table.colors")||!t.is("span"))return!0;var l=e.which,a=!0;if(ee.KEYCODE.TAB==l){var r=u.find(".fr-buttons");a=!E.accessibility.focusToolbar(r,!!e.shiftKey)}else if(ee.KEYCODE.ARROW_UP==l||ee.KEYCODE.ARROW_DOWN==l||ee.KEYCODE.ARROW_LEFT==l||ee.KEYCODE.ARROW_RIGHT==l){var n=t.parent().find("span.fr-command"),s=n.index(t),o=E.opts.colorsStep,i=Math.floor(n.length/o),f=s%o,d=Math.floor(s/o),c=d*o+f,p=i*o;ee.KEYCODE.ARROW_UP==l?c=((c-o)%p+p)%p:ee.KEYCODE.ARROW_DOWN==l?c=(c+o)%p:ee.KEYCODE.ARROW_LEFT==l?c=((c-1)%p+p)%p:ee.KEYCODE.ARROW_RIGHT==l&&(c=(c+1)%p);var h=A(n.get(c));E.events.disableBlur(),h.focus(),a=!1}else ee.KEYCODE.ENTER==l&&(E.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0),a;var u}()),E.popups.setContainer("table.colors",E.$sc);var s=S(r),o=(s.left+s.right)/2,i=s.bottom;e=E.popups.get("table.colors"),t=E.$el.find(".fr-selected-cell").first(),l=E.helpers.RGBToHex(t.css("background-color")),a=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="'+l+'"]').addClass("fr-selected-color fr-active-item"),a.val(l).trigger("change"),E.popups.show("table.colors",o,i,s.bottom-s.top,!0)}}function o(){0===Z().length&&E.toolbar.enable()}function i(e){if(e)return E.popups.onHide("table.insert",function(){E.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<E.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'+E.button.buildList(E.opts.tableInsertButtons)+"</div>");var l,a={buttons:t,rows_columns:function(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 × 1</div><div class="fr-select-table-size">',t=1;t<=E.opts.tableInsertMaxSize;t++){for(var l=1;l<=E.opts.tableInsertMaxSize;l++){var a="inline-block";2<t&&!E.helpers.isMobile()&&(a="none");var r="fr-table-cell ";1==t&&1==l&&(r+=" hover"),e+='<span class="fr-command '+r+'" tabIndex="-1" data-cmd="tableInsert" data-row="'+t+'" data-col="'+l+'" data-param1="'+t+'" data-param2="'+l+'" style="display: '+a+';" role="button"><span></span><span class="fr-sr-only">'+t+" × "+l+" </span></span>"}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},r=E.popups.create("table.insert",a);return E.events.$on(r,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){c(A(e.currentTarget))},!0),l=r,E.events.$on(l,"focus","[tabIndex]",function(e){var t=A(e.currentTarget);c(t)}),E.events.on("popup.tab",function(e){var t=A(e.currentTarget);if(!E.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var l,a=e.which;if(ee.KEYCODE.ARROW_UP==a||ee.KEYCODE.ARROW_DOWN==a||ee.KEYCODE.ARROW_LEFT==a||ee.KEYCODE.ARROW_RIGHT==a){if(t.is("span.fr-table-cell")){var r=t.parent().find("span.fr-table-cell"),n=r.index(t),s=E.opts.tableInsertMaxSize,o=n%s,i=Math.floor(n/s);ee.KEYCODE.ARROW_UP==a?i=Math.max(0,i-1):ee.KEYCODE.ARROW_DOWN==a?i=Math.min(E.opts.tableInsertMaxSize-1,i+1):ee.KEYCODE.ARROW_LEFT==a?o=Math.max(0,o-1):ee.KEYCODE.ARROW_RIGHT==a&&(o=Math.min(E.opts.tableInsertMaxSize-1,o+1));var f=i*s+o,d=A(r.get(f));c(d),E.events.disableBlur(),d.focus(),l=!1}}else ee.KEYCODE.ENTER==a&&(E.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0),r}function c(e){var t=e.data("row");null!==t&&(t=parseInt(t));var l=e.data("col");null!==l&&(l=parseInt(l));var a=e.parent();a.siblings(".fr-table-size-info").html(t+" × "+l),a.find("> span").removeClass("hover fr-active-item");for(var r=1;r<=E.opts.tableInsertMaxSize;r++)for(var n=0;n<=E.opts.tableInsertMaxSize;n++){var s=a.find('> span[data-row="'+r+'"][data-col="'+n+'"]');r<=t&&n<=l?s.addClass("hover"):r<=t+1||r<=2&&!E.helpers.isMobile()?s.css("display","inline-block"):2<r&&!E.helpers.isMobile()&&s.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return E.popups.onHide("table.edit",o),!0;if(0<E.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(E.button.buildList(E.opts.tableEditButtons),"</div>")},l=E.popups.create("table.edit",t);return E.events.$on(E.$wp,"scroll.table-edit",function(){E.popups.isVisible("table.edit")&&h()}),l}return!1}function u(){if(0<Z().length){var e=Q();E.selection.setBefore(e.get(0))||E.selection.setAfter(e.get(0)),E.selection.restore(),E.popups.hide("table.edit"),e.remove(),E.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<E.$el.find("th.fr-selected-cell").length&&"above"==e)return;var l,a,r,n=x(),s=M(n);if(null==s)return;a="above"==e?s.min_i:s.max_i;var o="<tr>";for(l=0;l<n[a].length;l++){if("below"==e&&a<n.length-1&&n[a][l]==n[a+1][l]||"above"==e&&0<a&&n[a][l]==n[a-1][l]){if(0===l||0<l&&n[a][l]!=n[a][l-1]){var i=A(n[a][l]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else o+='<td style="'+A(n[a][l]).attr("style")+'" ><br></td>'}o+="</tr>",r=0<E.$el.find("th.fr-selected-cell").length&&"below"==e?A(t.find("tbody").not(t.find("> table tbody"))):A(t.find("tr").not(t.find("> table tr")).get(a)),"below"==e?"TBODY"==r.attr("tagName")?r.prepend(o):r[0].parentNode&&r[0].insertAdjacentHTML("afterend",o):"above"==e&&(r.before(o),E.popups.isVisible("table.edit")&&h())}}function g(e,t,l){var a,r,n,s,o,i=0,f=x(l);if(e<(t=Math.min(t,f[0].length-1)))for(r=e;r<=t;r++)if(!(e<r&&f[0][r]==f[0][r-1])&&1<(s=Math.min(parseInt(f[0][r].getAttribute("colspan"),10)||1,t-e+1))&&f[0][r]==f[0][r+1])for(i=s-1,a=1;a<f.length;a++)if(f[a][r]!=f[a-1][r]){for(n=r;n<r+s;n++)if(1<(o=parseInt(f[a][n].getAttribute("colspan"),10)||1)&&f[a][n]==f[a][n+1])n+=i=Math.min(i,o-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,l){var a,r,n,s,o,i=0,f=x(l);if(e<(t=Math.min(t,f.length-1)))for(a=e;a<=t;a++)if(!(e<a&&f[a][0]==f[a-1][0])&&1<(s=Math.min(parseInt(f[a][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[a][0]==f[a+1][0])for(i=s-1,r=1;r<f[0].length;r++)if(f[a][r]!=f[a][r-1]){for(n=a;n<a+s;n++)if(1<(o=parseInt(f[n][r].getAttribute("rowspan"),10)||1)&&f[n][r]==f[n+1][r])n+=i=Math.min(i,o-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,l,a,r,n,s){var o,i,f;for(o=a;o<=r;o++)for(i=n;i<=s;i++)a<o&&e[o][i]==e[o-1][i]||n<i&&e[o][i]==e[o][i-1]||1<(f=parseInt(e[o][i].getAttribute(l),10)||1)&&(1<f-t?e[o][i].setAttribute(l,f-t):e[o][i].removeAttribute(l))}function w(e,t,l,a,r){m(e,t,r),g(l,a,r)}function t(e){var t=E.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",E.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function x(e){var f=[];return null==(e=e||null)&&0<Z().length&&(e=Q()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(o,e){var t=A(e),i=0;t.find("> th, > td").each(function(e,t){for(var l=A(t),a=parseInt(l.attr("colspan"),10)||1,r=parseInt(l.attr("rowspan"),10)||1,n=o;n<o+r;n++)for(var s=i;s<i+a;s++)f[n]||(f[n]=[]),f[n][s]?i++:f[n][s]=t;i+=a})}),f}function _(e,t){for(var l=0;l<t.length;l++)for(var a=0;a<t[l].length;a++)if(t[l][a]==e)return{row:l,col:a}}function $(e,t,l){for(var a=e+1,r=t+1;a<l.length;){if(l[a][t]!=l[e][t]){a--;break}a++}for(a==l.length&&a--;r<l[e].length;){if(l[e][r]!=l[e][t]){r--;break}r++}return r==l[e].length&&r--,{row:a,col:r}}function C(){E.el.querySelector(".fr-cell-fixed")&&E.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),E.el.querySelector(".fr-cell-handler")&&E.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function D(){var e=E.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=A(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function y(){E.events.disableBlur(),E.selection.clear(),E.$el.addClass("fr-no-selection"),E.$el.blur(),E.events.enableBlur()}function M(e){var t=E.$el.find(".fr-selected-cell");if(0<t.length){var l,a=e.length,r=0,n=e[0].length,s=0;for(l=0;l<t.length;l++){var o=_(t[l],e),i=$(o.row,o.col,e);a=Math.min(o.row,a),r=Math.max(i.row,r),n=Math.min(o.col,n),s=Math.max(i.col,s)}return{min_i:a,max_i:r,min_j:n,max_j:s}}return null}function S(e){var t=M(e);if(null!=t){var l=A(e[t.min_i][t.min_j]),a=A(e[t.min_i][t.max_j]),r=A(e[t.max_i][t.min_j]);return{left:l.offset().left,right:a.offset().left+a.outerWidth(),top:l.offset().top,bottom:r.offset().top+r.outerHeight()}}}function I(t,l){if(A(t).is(l))D(),A(t).addClass("fr-selected-cell");else{y(),E.edit.off();var a=x(),r=_(t,a),n=_(l,a),s=function e(t,l,a,r,n){var s,o,i,f,d=t,c=l,p=a,h=r;for(s=d;s<=c;s++)(1<(parseInt(A(n[s][p]).attr("rowspan"),10)||1)||1<(parseInt(A(n[s][p]).attr("colspan"),10)||1))&&(f=$((i=_(n[s][p],n)).row,i.col,n),d=Math.min(i.row,d),c=Math.max(f.row,c),p=Math.min(i.col,p),h=Math.max(f.col,h)),(1<(parseInt(A(n[s][h]).attr("rowspan"),10)||1)||1<(parseInt(A(n[s][h]).attr("colspan"),10)||1))&&(f=$((i=_(n[s][h],n)).row,i.col,n),d=Math.min(i.row,d),c=Math.max(f.row,c),p=Math.min(i.col,p),h=Math.max(f.col,h));for(o=p;o<=h;o++)(1<(parseInt(A(n[d][o]).attr("rowspan"),10)||1)||1<(parseInt(A(n[d][o]).attr("colspan"),10)||1))&&(f=$((i=_(n[d][o],n)).row,i.col,n),d=Math.min(i.row,d),c=Math.max(f.row,c),p=Math.min(i.col,p),h=Math.max(f.col,h)),(1<(parseInt(A(n[c][o]).attr("rowspan"),10)||1)||1<(parseInt(A(n[c][o]).attr("colspan"),10)||1))&&(f=$((i=_(n[c][o],n)).row,i.col,n),d=Math.min(i.row,d),c=Math.max(f.row,c),p=Math.min(i.col,p),h=Math.max(f.col,h));return d==t&&c==l&&p==a&&h==r?{min_i:t,max_i:l,min_j:a,max_j:r}:e(d,c,p,h,n)}(Math.min(r.row,n.row),Math.max(r.row,n.row),Math.min(r.col,n.col),Math.max(r.col,n.col),a);D(),t.classList.add("fr-cell-fixed"),l.classList.add("fr-cell-handler");for(var o=s.min_i;o<=s.max_i;o++)for(var i=s.min_j;i<=s.max_j;i++)A(a[o][i]).addClass("fr-selected-cell")}}function N(e){var t=null,l=A(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<l.closest("td").length?t=l.closest("td").get(0):0<l.closest("th").length&&(t=l.closest("th").get(0)),-1===E.$el.html.toString().search(t)?null:t}function T(){D(),E.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==A(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&T(),!E.edit.isDisabled()||E.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&E.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&E.helpers.isMac()&&e.ctrlKey)&&t&&T();else if(n=!0,t){0<Z().length&&!e.shiftKey&&T(),e.stopPropagation(),E.events.trigger("image.hideResizer"),E.events.trigger("video.hideResizer"),r=!0;var l=t.tagName.toLowerCase();e.shiftKey&&0<E.$el.find(l+".fr-selected-cell").length?A(E.$el.find(l+".fr-selected-cell").closest("table")).is(A(t).closest("table"))?I(a,t):y():((E.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===A(t).find(E.selection.element()).length&&!A(t).is(E.selection.element()))&&y(),a=t,0<E.opts.tableEditButtons.length&&I(a,a))}}function l(e){if(E.popups.areVisible())return!0;if(r||E.$tb.is(e.target)||E.$tb.is(A(e.target).closest(".fr-toolbar"))||(0<Z().length&&E.toolbar.enable(),D()),!(1!=e.which||1==e.which&&E.helpers.isMac()&&e.ctrlKey)){if(n=!1,r)r=!1,N(e)||1!=Z().length?0<Z().length&&(E.selection.isCollapsed()?h():D()):D();if(O){O=!1,R.removeClass("fr-moving"),E.$el.removeClass("fr-no-selection"),E.edit.on();var t=parseFloat(R.css("left"))+E.opts.tableResizerOffset+E.$wp.offset().left;E.opts.iframe&&(t-=E.$iframe.offset().left),R.data("release-position",t),R.removeData("max-left"),R.removeData("max-right"),function(){var e=R.data("origin"),t=R.data("release-position");if(e!==t){var l=R.data("first"),a=R.data("second"),r=R.data("table"),n=r.outerWidth();if(E.undo.canDo()||E.undo.saveStep(),null!=l&&null!=a){var s,o,i,f=x(r),d=[],c=[],p=[],h=[];for(s=0;s<f.length;s++)o=A(f[s][l]),i=A(f[s][a]),d[s]=o.outerWidth(),p[s]=i.outerWidth(),c[s]=d[s]/n*100,h[s]=p[s]/n*100;for(s=0;s<f.length;s++)if(o=A(f[s][l]),i=A(f[s][a]),f[s][l]!=f[s][a]){var u=(c[s]*(d[s]+t-e)/d[s]).toFixed(4);o.css("width",u+"%"),i.css("width",(c[s]+h[s]-u).toFixed(4)+"%")}}else{var b,g=r.parent(),m=n/g.width()*100,v=(parseInt(r.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(r.css("margin-right"),10)||0)/g.width()*100;"rtl"==E.opts.direction&&0===a||"rtl"!=E.opts.direction&&0!==a?(b=(n+t-e)/n*m,r.css("margin-right","calc(100% - "+Math.round(b).toFixed(4)+"% - "+Math.round(v).toFixed(4)+"%)")):("rtl"==E.opts.direction&&0!==a||"rtl"!=E.opts.direction&&0===a)&&(b=(n-t+e)/n*m,r.css("margin-left","calc(100% - "+Math.round(b).toFixed(4)+"% - "+Math.round(w).toFixed(4)+"%)")),r.css("width",Math.round(b).toFixed(4)+"%")}E.selection.restore(),E.undo.saveStep(),E.events.trigger("table.resized",[r.get(0)])}R.removeData("origin"),R.removeData("release-position"),R.removeData("first"),R.removeData("second"),R.removeData("table")}(),Y()}}}function K(e){if(!0===r&&0<E.opts.tableEditButtons.length){if(A(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===E.$el.find("th.fr-selected-cell").length)return void I(a,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===E.$el.find("td.fr-selected-cell").length)return void I(a,e.currentTarget)}y()}}function B(e,t,l,a){for(var r,n=t;n!=E.el&&"TD"!=n.tagName&&"TH"!=n.tagName&&("up"==a?r=n.previousElementSibling:"down"==a&&(r=n.nextElementSibling),!r);)n=n.parentNode;"TD"==n.tagName||"TH"==n.tagName?function(e,t){for(var l=e;l&&"TABLE"!=l.tagName&&l.parentNode!=E.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName){var a=x(A(l));"up"==t?z(_(e,a),l,a):"down"==t&&k(_(e,a),l,a)}}(n,a):r&&("up"==a&&E.selection.setAtEnd(r),"down"==a&&E.selection.setAtStart(r))}function z(e,t,l){0<e.row?E.selection.setAtEnd(l[e.row-1][e.col]):B(0,t,0,"up")}function k(e,t,l){var a=parseInt(l[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<l.length-a?E.selection.setAtStart(l[e.row+a][e.col]):B(0,t,0,"down")}function Y(){R&&(R.find("div").css("opacity",0),R.css("top",0),R.css("left",0),R.css("height",0),R.find("div").css("height",0),R.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var l=A(t),a=l.closest("table"),r=a.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<l.closest("td").length?t=l.closest("td"):0<l.closest("th").length&&(t=l.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)R&&l.get(0)!=R.get(0)&&l.parent().get(0)!=R.get(0)&&E.core.sameInstance(R)&&Y();else{if(l=A(t),0===E.$el.find(l).length)return!1;var n=l.offset().left-1,s=n+l.outerWidth();if(Math.abs(e.pageX-n)<=E.opts.tableResizerOffset||Math.abs(s-e.pageX)<=E.opts.tableResizerOffset){var o,i,f,d,c,p=x(a),h=_(t,p),u=$(h.row,h.col,p),b=a.offset().top,g=a.outerHeight()-1;"rtl"!=E.opts.direction?e.pageX-n<=E.opts.tableResizerOffset?(f=n,0<h.col?(d=n-j(h.col-1,p)+E.opts.tableResizingLimit,c=n+j(h.col,p)-E.opts.tableResizingLimit,o=h.col-1,i=h.col):(o=null,i=0,d=a.offset().left-1-parseInt(a.css("margin-left"),10),c=a.offset().left-1+a.width()-p[0].length*E.opts.tableResizingLimit)):s-e.pageX<=E.opts.tableResizerOffset&&(f=s,u.col<p[u.row].length&&p[u.row][u.col+1]?(d=s-j(u.col,p)+E.opts.tableResizingLimit,c=s+j(u.col+1,p)-E.opts.tableResizingLimit,o=u.col,i=u.col+1):(o=u.col,i=null,d=a.offset().left-1+p[0].length*E.opts.tableResizingLimit,c=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):s-e.pageX<=E.opts.tableResizerOffset?(f=s,0<h.col?(d=s-j(h.col,p)+E.opts.tableResizingLimit,c=s+j(h.col-1,p)-E.opts.tableResizingLimit,o=h.col,i=h.col-1):(o=null,i=0,d=a.offset().left+p[0].length*E.opts.tableResizingLimit,c=r.offset().left-1+r.width()+parseFloat(r.css("padding-left")))):e.pageX-n<=E.opts.tableResizerOffset&&(f=n,u.col<p[u.row].length&&p[u.row][u.col+1]?(d=n-j(u.col+1,p)+E.opts.tableResizingLimit,c=n+j(u.col,p)-E.opts.tableResizingLimit,o=u.col+1,i=u.col):(o=u.col,i=null,d=r.offset().left+parseFloat(r.css("padding-left")),c=a.offset().left-1+a.width()-p[0].length*E.opts.tableResizingLimit)),R||(E.shared.$table_resizer||(E.shared.$table_resizer=A(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),R=E.shared.$table_resizer,E.events.$on(R,"mousedown",function(e){return!E.core.sameInstance(R)||(0<Z().length&&T(),1==e.which?(E.selection.save(),O=!0,R.addClass("fr-moving"),y(),E.edit.off(),R.find("div").css("opacity",1),!1):void 0)}),E.events.$on(R,"mousemove",function(e){if(!E.core.sameInstance(R))return!0;O&&(E.opts.iframe&&(e.pageX-=E.$iframe.offset().left),G(e))}),E.events.on("shared.destroy",function(){R.html("").removeData().remove(),R=null},!0),E.events.on("destroy",function(){E.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),A("body").first().append(R.hide())},!0)),R.data("table",a),R.data("first",o),R.data("second",i),R.data("instance",E),E.$wp.append(R);var m=f-E.win.pageXOffset-E.opts.tableResizerOffset-E.$wp.offset().left,v=b-E.$wp.offset().top+E.$wp.scrollTop();if(E.opts.iframe){var w=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-top")),C=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-left"));m+=E.$iframe.offset().left+C,v+=E.$iframe.offset().top+w,d+=E.$iframe.offset().left,c+=E.$iframe.offset().left}R.data("max-left",d),R.data("max-right",c),R.data("origin",f-E.win.pageXOffset),R.css("top",v),R.css("left",m),R.css("height",g),R.find("div").css("height",g),R.css("padding-left",E.opts.tableResizerOffset),R.css("padding-right",E.opts.tableResizerOffset),R.show()}else E.core.sameInstance(R)&&Y()}}function F(e,t){if(E.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),E.$box.append(f),f.data("instance",E);var l,a=A(t).find("tr").first(),r=e.pageX,n=0,s=0;if(E.opts.iframe){var o=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-top")),i=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-left"));n+=E.$iframe.offset().left-E.helpers.scrollLeft()+i,s+=E.$iframe.offset().top-E.helpers.scrollTop()+o}a.find("th, td").each(function(){var e=A(this);return e.offset().left<=r&&r<e.offset().left+e.outerWidth()/2?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-E.$box.offset().top-l-5),f.css("left",n+e.offset().left-E.$box.offset().left-l/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=r&&r<e.offset().left+e.outerWidth()?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-E.$box.offset().top-l-5),f.css("left",n+e.offset().left-E.$box.offset().left+e.outerWidth()-l/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(E.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),E.$box.append(f),f.data("instance",E);var l,a=A(t),r=e.pageY,n=0,s=0;if(E.opts.iframe){var o=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-top")),i=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-left"));n+=E.$iframe.offset().left-E.helpers.scrollLeft()+i,s+=E.$iframe.offset().top-E.helpers.scrollTop()+o}a.find("tr").each(function(){var e=A(this);return e.offset().top<=r&&r<e.offset().top+e.outerHeight()/2?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-E.$box.offset().top-l/2),f.css("left",n+e.offset().left-E.$box.offset().left-l-5),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=r&&r<e.offset().top+e.outerHeight()?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-E.$box.offset().top+e.outerHeight()-l/2),f.css("left",n+e.offset().left-E.$box.offset().left-l-5),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){s=null;var t=E.doc.elementFromPoint(e.pageX-E.win.pageXOffset,e.pageY-E.win.pageYOffset);E.opts.tableResizer&&(!E.popups.areVisible()||E.popups.areVisible()&&E.popups.isVisible("table.edit"))&&L(e,t),!E.opts.tableInsertHelper||E.popups.areVisible()||E.$tb.hasClass("fr-inline")&&E.$tb.isVisible()||function(e,t){if(0===Z().length){var l,a,r;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||E.node.isElement(t)))for(l=1;l<=E.opts.tableInsertHelperOffset;l++){if(a=E.doc.elementFromPoint(e.pageX-E.win.pageXOffset,e.pageY-E.win.pageYOffset+l),A(a).hasClass("fr-tooltip"))return;if(a&&("TH"==a.tagName||"TD"==a.tagName||"TABLE"==a.tagName)&&(A(a).parents(".fr-wrapper").length||E.opts.iframe))return F(e,A(a).closest("table"));if(r=E.doc.elementFromPoint(e.pageX-E.win.pageXOffset+l,e.pageY-E.win.pageYOffset),A(r).hasClass("fr-tooltip"))return;if(r&&("TH"==r.tagName||"TD"==r.tagName||"TABLE"==r.tagName)&&(A(r).parents(".fr-wrapper").length||E.opts.iframe))return H(e,A(r).closest("table"))}E.core.sameInstance(f)&&W()}}(e,t)}function P(){if(O){var e=R.data("table").offset().top-E.win.pageYOffset;if(E.opts.iframe){var t=E.helpers.getPX(E.$wp.find(".fr-iframe").css("padding-top"));e+=E.$iframe.offset().top-E.helpers.scrollTop()+t}R.css("top",e)}}function j(e,t){var l,a=A(t[0][e]).outerWidth();for(l=1;l<t.length;l++)a=Math.min(a,A(t[l][e]).outerWidth());return a}function X(e,t,l){var a,r=0;for(a=e;a<=t;a++)r+=j(a,l);return r}function G(e){if(1<Z().length&&n&&y(),!1===n&&!1===r&&!1===O)s&&clearTimeout(s),E.edit.isDisabled()&&!E.popups.isVisible("table.edit")||(s=setTimeout(V,30,e));else if(O){var t=e.pageX-E.win.pageXOffset;E.opts.iframe&&(t+=E.$iframe.offset().left);var l=R.data("max-left"),a=R.data("max-right");l<=t&&t<=a?R.css("left",t-E.opts.tableResizerOffset-E.$wp.offset().left):t<l&&parseFloat(R.css("left"),10)>l-E.opts.tableResizerOffset?R.css("left",l-E.opts.tableResizerOffset-E.$wp.offset().left):a<t&&parseFloat(R.css("left"),10)<a-E.opts.tableResizerOffset&&R.css("left",a-E.opts.tableResizerOffset-E.$wp.offset().left)}else n&&W()}function U(e){E.node.isEmpty(e.get(0))?e.prepend(ee.MARKERS):e.prepend(ee.START_MARKER).append(ee.END_MARKER)}function q(){E.shared.$ti_helper||(E.shared.$ti_helper=A(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+E.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>'),E.events.bindClick(E.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),l=f.data("instance")||E;"before"==t?(E.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertColumn(t),e.removeClass("fr-selected-cell"),E.undo.saveStep()):"after"==t?(E.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertColumn(t),e.removeClass("fr-selected-cell"),E.undo.saveStep()):"above"==t?(E.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertRow(t),e.removeClass("fr-selected-cell"),E.undo.saveStep()):"below"==t&&(E.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertRow(t),e.removeClass("fr-selected-cell"),E.undo.saveStep()),W()}),E.events.on("shared.destroy",function(){E.shared.$ti_helper.html("").removeData().remove(),E.shared.$ti_helper=null},!0),E.events.$on(E.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),E.events.$on(A(E.o_win),"scroll",function(){W()},!0),E.events.$on(E.$wp,"scroll",function(){W()},!0)),f=E.shared.$ti_helper,E.events.on("destroy",function(){f=null}),E.tooltip.bind(E.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){a=null,clearTimeout(s)}function Z(){return E.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=E.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?A(t):A([])}return A([])}return{_init:function(){if(!E.$wp)return!1;if(!E.helpers.isMobile()){O=r=n=!1,E.events.$on(E.$el,"mousedown",e),E.popups.onShow("image.edit",function(){D(),r=n=!1}),E.popups.onShow("link.edit",function(){D(),r=n=!1}),E.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&D()}),E.events.$on(E.$el,"mouseover","th, td",K),E.events.$on(E.$win,"mouseup",l),E.opts.iframe&&E.events.$on(A(E.o_win),"mouseup",l),E.events.$on(E.$win,"mousemove",G),E.events.$on(A(E.o_win),"scroll",P),E.events.on("contentChanged",function(){0<Z().length&&(h(),E.$el.find("img").on("load.selected-cells",function(){A(this).off("load.selected-cells"),0<Z().length&&h()}))}),E.events.$on(A(E.o_win),"resize",function(){D()}),E.events.on("toolbar.esc",function(){if(0<Z().length)return E.events.disableBlur(),E.events.focus(),!1},!0),E.events.$on(A(E.o_win),"keydown",function(){n&&r&&(r=n=!1,E.$el.removeClass("fr-no-selection"),E.edit.on(),E.selection.setAtEnd(E.$el.find(".fr-selected-cell").last().get(0)),E.selection.restore(),D())}),E.events.$on(E.$el,"keydown",function(e){e.shiftKey?!1===function(e){var t=Z();if(null!=t&&0<t.length){var l,a,r=x(),n=e.which;1==t.length?a=l=t[0]:(l=E.el.querySelector(".fr-cell-fixed"),a=E.el.querySelector(".fr-cell-handler"));var s=_(a,r);if(ee.KEYCODE.ARROW_RIGHT==n){if(s.col<r[0].length-1)return I(l,r[s.row][s.col+1]),!1}else if(ee.KEYCODE.ARROW_DOWN==n){if(s.row<r.length-1)return I(l,r[s.row+1][s.col]),!1}else if(ee.KEYCODE.ARROW_LEFT==n){if(0<s.col)return I(l,r[s.row][s.col-1]),!1}else if(ee.KEYCODE.ARROW_UP==n&&0<s.row)return I(l,r[s.row-1][s.col]),!1}}(e)&&setTimeout(function(){h()},0):function(e){var t=e.which,l=E.selection.blocks();if(l.length&&("TD"==(l=l[0]).tagName||"TH"==l.tagName)){for(var a=l;a&&"TABLE"!=a.tagName&&a.parentNode!=E.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName&&(ee.KEYCODE.ARROW_LEFT==t||ee.KEYCODE.ARROW_UP==t||ee.KEYCODE.ARROW_RIGHT==t||ee.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&T(),E.browser.webkit&&(ee.KEYCODE.ARROW_UP==t||ee.KEYCODE.ARROW_DOWN==t))){var r=E.selection.ranges(0).startContainer;if(r.nodeType==Node.TEXT_NODE&&(A.FE.KEYCODE.ARROW_UP==t&&(r.previousSibling&&"BR"!==r.previousSibling.tagName||r.previousSibling&&"BR"===r.previousSibling.tagName&&r.previousSibling.previousSibling)||A.FE.KEYCODE.ARROW_DOWN==t&&(r.nextSibling&&"BR"!==r.nextSibling.tagName||r.nextSibling&&"BR"===r.nextSibling.tagName&&r.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var n=x(A(a)),s=_(l,n);ee.KEYCODE.ARROW_UP==t?z(s,a,n):ee.KEYCODE.ARROW_DOWN==t&&k(s,a,n),E.selection.restore()}}}(e)}),E.events.on("keydown",function(e){if(!1===function(e){if(e.which==ee.KEYCODE.TAB){var t;if(0<Z().length)t=E.$el.find(".fr-selected-cell").last();else{var l=E.selection.element();"TD"==l.tagName||"TH"==l.tagName?t=A(l):l!=E.el&&(0<A(l).parentsUntil(E.$el,"td").length?t=A(l).parents("td").first():0<A(l).parentsUntil(E.$el,"th").length&&(t=A(l).parents("th").first()))}if(t)return e.preventDefault(),!!(0===E.selection.get().focusOffset&&0<A(E.selection.element()).parentsUntil(E.$el,"ol, ul").length&&(0<A(E.selection.element()).closest("li").prev().length||A(E.selection.element()).is("li")&&0<A(E.selection.element()).prev().length))||(T(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),D(),U(t.closest("tr").next().find("td").first())),E.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&E.keys.ctrlKey(e)&&e.which==ee.KEYCODE.A)return D(),E.popups.isVisible("table.edit")&&E.popups.hide("table.edit"),t=[],!0;if(e.which==ee.KEYCODE.ESC&&E.popups.isVisible("table.edit"))return D(),E.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==ee.KEYCODE.BACKSPACE||e.which==ee.KEYCODE.DELETE)){E.undo.saveStep();for(var l=0;l<t.length;l++)A(t[l]).html("<br>"),l==t.length-1&&A(t[l]).prepend(ee.MARKERS);return E.selection.restore(),E.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=ee.KEYCODE.F10&&!E.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function(e){if(e.altKey&&e.which==ee.KEYCODE.SPACE){var t,l=E.selection.element();if("TD"==l.tagName||"TH"==l.tagName?t=l:0<A(l).closest("td").length?t=A(l).closest("td").get(0):0<A(l).closest("th").length&&(t=A(l).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];E.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),E.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=[]}),i(!0),p(!0)}E.events.on("destroy",J)},insert:function(e,t){var l,a,r="<table "+(E.opts.tableDefaultWidth?'style="width: '+E.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',n=100/t;for(l=0;l<e;l++){for(r+="<tr>",a=0;a<t;a++)r+="<td"+(E.opts.tableDefaultWidth?' style="width: '+n.toFixed(4)+'%;"':"")+">",0===l&&0===a&&(r+=ee.MARKERS),r+="<br></td>";r+="</tr>"}r+="</tbody></table>",E.html.insert(r),E.selection.restore();var s=E.$el.find(".fr-inserted-table");s.removeClass("fr-inserted-table"),E.events.trigger("table.inserted",[s.get(0)])},remove:u,insertRow:b,deleteRow:function(){var e=Q();if(0<e.length){var t,l,a,r=x(),n=M(r);if(null==n)return;if(0===n.min_i&&n.max_i==r.length-1)u();else{for(t=n.max_i;t>=n.min_i;t--){for(a=A(e.find("tr").not(e.find("> table tr")).get(t)),l=0;l<r[t].length;l++)if(0===l||r[t][l]!=r[t][l-1]){var s=A(r[t][l]);if(1<parseInt(s.attr("rowspan"),10)){var o=parseInt(s.attr("rowspan"),10)-1;1==o?s.removeAttr("rowspan"):s.attr("rowspan",o)}if(t<r.length-1&&r[t][l]==r[t+1][l]&&(0===t||r[t][l]!=r[t-1][l])){for(var i=r[t][l],f=l;0<f&&r[t][f]==r[t][f-1];)f--;0===f?A(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):A(r[t+1][f-1])[0].parentNode&&A(r[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var d=a.parent();a.remove(),0===d.find("tr").length&&d.remove(),r=x(e)}w(0,r.length-1,0,r[0].length-1,e),0<n.min_i?E.selection.setAtEnd(r[n.min_i-1][0]):E.selection.setAtEnd(r[0][0]),E.selection.restore(),E.popups.hide("table.edit")}}},insertColumn:function(i){var e=Q();if(0<e.length){var f,d=x(),t=M(d);f="before"==i?t.min_j:t.max_j;var l,c=100/d[0].length,p=100/(d[0].length+1);e.find("th, td").each(function(){(l=A(this)).data("old-width",l.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,l=A(this),a=0,r=0;a-1<f;){if(!(t=l.find("> th, > td").get(r))){t=null;break}t==d[e][a]?(a+=parseInt(A(t).attr("colspan"),10)||1,r++):(a+=parseInt(A(d[e][a]).attr("colspan"),10)||1,"after"==i&&(t=0===r?-1:l.find("> th, > td").get(r-1)))}var n,s=A(t);if("after"==i&&f<a-1||"before"==i&&0<f&&d[e][f]==d[e][f-1]){if(0===e||0<e&&d[e][f]!=d[e-1][f]){var o=parseInt(s.attr("colspan"),10)+1;s.attr("colspan",o),s.css("width",(s.data("old-width")*p/c+p).toFixed(4)+"%"),s.removeData("old-width")}}else n=0<l.find("th").length?'<th style="width: '+p.toFixed(4)+'%;"><br></th>':'<td style="width: '+p.toFixed(4)+'%;"><br></td>',-1==t?l.prepend(n):null==t?l.append(n):"before"==i?s.before(n):"after"==i&&s[0].parentNode&&s[0].insertAdjacentHTML("afterend",n)}),e.find("th, td").each(function(){(l=A(this)).data("old-width")&&(l.css("width",(l.data("old-width")*p/c).toFixed(4)+"%"),l.removeData("old-width"))}),E.popups.isVisible("table.edit")&&h()}},deleteColumn:function(){var e=Q();if(0<e.length){var t,l,a,r=x(),n=M(r);if(null==n)return;if(0===n.min_j&&n.max_j==r[0].length-1)u();else{var s=0;for(t=0;t<r.length;t++)for(l=0;l<r[0].length;l++)(a=A(r[t][l])).hasClass("fr-selected-cell")||(a.data("old-width",a.outerWidth()/e.outerWidth()*100),(l<n.min_j||l>n.max_j)&&(s+=a.outerWidth()/e.outerWidth()*100));for(s/=r.length,l=n.max_j;l>=n.min_j;l--)for(t=0;t<r.length;t++)if(0===t||r[t][l]!=r[t-1][l])if(a=A(r[t][l]),1<(parseInt(a.attr("colspan"),10)||1)){var o=parseInt(a.attr("colspan"),10)-1;1==o?a.removeAttr("colspan"):a.attr("colspan",o),a.css("width",(100*(a.data("old-width")-j(l,r))/s).toFixed(4)+"%"),a.removeData("old-width")}else{var i=A(a.parent().get(0));a.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,r.length-1,0,r[0].length-1,e),0<n.min_j?E.selection.setAtEnd(r[n.min_i][n.min_j-1]):E.selection.setAtEnd(r[n.min_i][0]),E.selection.restore(),E.popups.hide("table.edit"),e.find("th, td").each(function(){(a=A(this)).data("old-width")&&(a.css("width",(100*a.data("old-width")/s).toFixed(4)+"%"),a.removeData("old-width"))})}}},mergeCells:function(){if(1<Z().length&&(0===E.$el.find("th.fr-selected-cell").length||0===E.$el.find("td.fr-selected-cell").length)){C();var e,t,l=M(x());if(null==l)return;var a=E.$el.find(".fr-selected-cell"),r=A(a[0]),n=r.parent().find(".fr-selected-cell"),s=r.closest("table"),o=r.html(),i=0;for(e=0;e<n.length;e++)i+=A(n[e]).outerWidth();for(r.css("width",Math.min(100,i/s.outerWidth()*100).toFixed(4)+"%"),l.min_j<l.max_j&&r.attr("colspan",l.max_j-l.min_j+1),l.min_i<l.max_i&&r.attr("rowspan",l.max_i-l.min_i+1),e=1;e<a.length;e++)"<br>"!=(t=A(a[e])).html()&&""!==t.html()&&(o+="<br>"+t.html()),t.remove();r.html(o),E.selection.setAtEnd(r.get(0)),E.selection.restore(),E.toolbar.enable(),m(l.min_i,l.max_i,s);var f=s.find("tr:empty");for(e=f.length-1;0<=e;e--)A(f[e]).remove();g(l.min_j,l.max_j,s),h()}},splitCellVertically:function(){if(1==Z().length){var e=E.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,l=e.parent().outerWidth(),a=e.outerWidth(),r=e.clone().html("<br>"),n=x(),s=_(e.get(0),n);if(1<t){var o=Math.ceil(t/2);a=X(s.col,s.col+o-1,n)/l*100;var i=X(s.col+o,s.col+t-1,n)/l*100;1<o?e.attr("colspan",o):e.removeAttr("colspan"),1<t-o?r.attr("colspan",t-o):r.removeAttr("colspan"),e.css("width",a.toFixed(4)+"%"),r.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<n.length;f++)if(0===f||n[f][s.col]!=n[f-1][s.col]){var d=A(n[f][s.col]);if(!d.is(e)){var c=(parseInt(d.attr("colspan"),10)||1)+1;d.attr("colspan",c)}}a=a/l*100/2,e.css("width",a.toFixed(4)+"%"),r.css("width",a.toFixed(4)+"%")}e[0].parentNode&&e[0].insertAdjacentElement("afterend",r[0]),D(),E.popups.hide("table.edit")}},splitCellHorizontally:function(){if(1==Z().length){var e=E.$el.find(".fr-selected-cell"),t=e.parent(),l=e.closest("table"),a=parseInt(e.attr("rowspan"),10),r=x(),n=_(e.get(0),r),s=e.clone().html("<br>");if(1<a){var o=Math.ceil(a/2);1<o?e.attr("rowspan",o):e.removeAttr("rowspan"),1<a-o?s.attr("rowspan",a-o):s.removeAttr("rowspan");for(var i=n.row+o,f=0===n.col?n.col:n.col-1;0<=f&&(r[i][f]==r[i][f-1]||0<i&&r[i][f]==r[i-1][f]);)f--;-1==f?A(l.find("tr").not(l.find("> table tr")).get(i)).prepend(s):A(r[i][f])[0].parentNode&&A(r[i][f])[0].insertAdjacentElement("afterend",s[0])}else{var d,c=A(document.createElement("tr")).append(s);for(d=0;d<r[0].length;d++)if(0===d||r[n.row][d]!=r[n.row][d-1]){var p=A(r[n.row][d]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",c[0])}D(),E.popups.hide("table.edit")}},addHeader:function(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,l="<thead><tr>",a=0;for(e.find("tr").first().find("> td").each(function(){var e=A(this);a+=parseInt(e.attr("colspan"),10)||1}),t=0;t<a;t++)l+="<th><br></th>";l+="</tr></thead>",e.prepend(l),h()}},removeHeader:function(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{E.popups.hide("table.edit");var l=e.find("tbody tr").first().find("td").first().get(0);l&&(E.selection.setAtEnd(l),E.selection.restore())}},setBackground:t,showInsertPopup:function(){var e=E.$tb.find('.fr-command[data-cmd="insertTable"]'),t=E.popups.get("table.insert");if(t||(t=i()),!t.hasClass("fr-active")){E.popups.refresh("table.insert"),E.popups.setContainer("table.insert",E.$tb);var l=E.button.getPosition(e),a=l.left,r=l.top;E.popups.show("table.insert",a,r,e.outerHeight())}},showEditPopup:h,showColorsPopup:d,back:function(){0<Z().length?h():(E.popups.hide("table.insert"),E.toolbar.showInline())},verticalAlign:function(e){E.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function(e){E.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function(e,t,l,a){if(0<t.length){if(!l){var r=Object.keys(a);r.splice(r.indexOf(e),1),t.removeClass(r.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function(){var e=E.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},ee.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),ee.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"}),ee.RegisterCommand("tableInsert",{callback:function(e,t,l){this.table.insert(t,l),this.popups.hide("table.insert")}}),ee.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),ee.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))}}),ee.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),ee.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=ee.COMMANDS.tableRows.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),ee.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),ee.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=ee.COMMANDS.tableColumns.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</a></li>");return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),ee.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),ee.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=ee.COMMANDS.tableCells.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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))}}),ee.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),ee.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),ee.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),ee.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 l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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 l=this.$,a=this.$el.find(".fr-selected-cell").closest("table");a&&t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=a.hasClass(e);l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),ee.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),ee.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),ee.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),ee.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),ee.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"))}}),ee.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),ee.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=ee.COMMANDS.tableCellVerticalAlign.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'+l.toLowerCase()+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(l)+"</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)}}),ee.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),ee.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ee.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ee.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),ee.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ee.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=ee.COMMANDS.tableCellHorizontalAlign.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.icon.create("align-"+l)+'<span class="fr-sr-only">'+this.language.translate(t[l])+"</span></a></li>");return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),l=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-"+this.helpers.getAlignment(l(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)}}),ee.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),ee.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 l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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 l=this.$,a=this.$el.find(".fr-selected-cell").first();a&&t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=a.hasClass(e);l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),ee.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),ee.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})}); | ||
!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(ge){"use strict";ge=ge&&ge.hasOwnProperty("default")?ge["default"]:ge,Object.assign(ge.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(ge.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}),ge.PLUGINS.table=function(R){var O,f,n,r,a,s,A,x=R.$;function h(){var e=_();if(e){var t=R.popups.get("table.edit");if(t||(t=p()),t){R.popups.setContainer("table.edit",R.$sc);var l=S(e),a=l.left+(l.right-l.left)/2,n=l.bottom;R.popups.show("table.edit",a,n,l.bottom-l.top,!0),R.edit.isDisabled()&&(1<Z().length&&R.toolbar.disable(),R.$el.removeClass("fr-no-selection"),R.edit.on(),R.button.bulkRefresh(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore())}}}function o(){var e=_();if(e){var t=R.popups.get("table.colors");t||(t=function s(){var e="";0<R.opts.tableColorsButtons.length&&(e='<div class="fr-buttons fr-tabs">'+R.button.buildList(R.opts.tableColorsButtons)+"</div>");var t="";R.opts.colorsHEXInput&&(t='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'+R.id+'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-'+R.id+'" type="text" placeholder="'+R.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">'+R.language.translate("OK")+"</button></div></div>");var l={buttons:e,colors:function n(){for(var e='<div class="fr-color-set fr-table-colors">',t=0;t<R.opts.tableColors.length;t++)0!==t&&t%R.opts.tableColorsStep==0&&(e+="<br>"),"REMOVE"!=R.opts.tableColors[t]?e+='<span class="fr-command" style="background: '+R.opts.tableColors[t]+';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="'+R.opts.tableColors[t]+'"><span class="fr-sr-only">'+R.language.translate("Color")+" "+R.opts.tableColors[t]+" </span></span>":e+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'+R.language.translate("Clear Formatting")+'">'+R.icon.create("tableColorRemove")+'<span class="fr-sr-only">'+R.language.translate("Clear Formatting")+"</span></span>";return e+="</div>"}(),custom_color:t},a=R.popups.create("table.colors",l);return R.events.$on(R.$wp,"scroll.table-colors",function(){R.popups.isVisible("table.colors")&&o()}),function r(u){R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.colors")||!t.is("span"))return!0;var l=e.which,a=!0;if(ge.KEYCODE.TAB==l){var n=u.find(".fr-buttons");a=!R.accessibility.focusToolbar(n,!!e.shiftKey)}else if(ge.KEYCODE.ARROW_UP==l||ge.KEYCODE.ARROW_DOWN==l||ge.KEYCODE.ARROW_LEFT==l||ge.KEYCODE.ARROW_RIGHT==l){var r=t.parent().find("span.fr-command"),s=r.index(t),o=R.opts.colorsStep,i=Math.floor(r.length/o),f=s%o,c=Math.floor(s/o),d=c*o+f,p=i*o;ge.KEYCODE.ARROW_UP==l?d=((d-o)%p+p)%p:ge.KEYCODE.ARROW_DOWN==l?d=(d+o)%p:ge.KEYCODE.ARROW_LEFT==l?d=((d-1)%p+p)%p:ge.KEYCODE.ARROW_RIGHT==l&&(d=(d+1)%p);var h=x(r.get(d));R.events.disableBlur(),h.focus(),a=!1}else ge.KEYCODE.ENTER==l&&(R.button.exec(t),a=!1);return!1===a&&(e.preventDefault(),e.stopPropagation()),a},!0)}(a),a}()),R.popups.setContainer("table.colors",R.$sc);var l=S(e),a=(l.left+l.right)/2,n=l.bottom;!function r(){var e=R.popups.get("table.colors"),t=R.$el.find(".fr-selected-cell").first(),l=R.helpers.RGBToHex(t.css("background-color")),a=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="'+l+'"]').addClass("fr-selected-color fr-active-item"),a.val(l).trigger("change")}(),R.popups.show("table.colors",a,n,l.bottom-l.top,!0)}}function i(){0===Z().length&&R.toolbar.enable()}function c(e){if(e)return R.popups.onHide("table.insert",function(){R.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<R.opts.tableInsertButtons.length&&(t='<div class="fr-buttons fr-tabs">'+R.button.buildList(R.opts.tableInsertButtons)+"</div>");var l={buttons:t,rows_columns:function r(){for(var e='<div class="fr-table-size"><div class="fr-table-size-info">1 × 1</div><div class="fr-select-table-size">',t=1;t<=R.opts.tableInsertMaxSize;t++){for(var l=1;l<=R.opts.tableInsertMaxSize;l++){var a="inline-block";2<t&&!R.helpers.isMobile()&&(a="none");var n="fr-table-cell ";1==t&&1==l&&(n+=" hover"),e+='<span class="fr-command '+n+'" tabIndex="-1" data-cmd="tableInsert" data-row="'+t+'" data-col="'+l+'" data-param1="'+t+'" data-param2="'+l+'" style="display: '+a+';" role="button"><span></span><span class="fr-sr-only">'+t+" × "+l+" </span></span>"}e+='<div class="new-line"></div>'}return e+="</div></div>"}()},a=R.popups.create("table.insert",l);return R.events.$on(a,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",function(e){d(x(e.currentTarget))},!0),function n(e){R.events.$on(e,"focus","[tabIndex]",function(e){var t=x(e.currentTarget);d(t)}),R.events.on("popup.tab",function(e){var t=x(e.currentTarget);if(!R.popups.isVisible("table.insert")||!t.is("span, a"))return!0;var l,a=e.which;if(ge.KEYCODE.ARROW_UP==a||ge.KEYCODE.ARROW_DOWN==a||ge.KEYCODE.ARROW_LEFT==a||ge.KEYCODE.ARROW_RIGHT==a){if(t.is("span.fr-table-cell")){var n=t.parent().find("span.fr-table-cell"),r=n.index(t),s=R.opts.tableInsertMaxSize,o=r%s,i=Math.floor(r/s);ge.KEYCODE.ARROW_UP==a?i=Math.max(0,i-1):ge.KEYCODE.ARROW_DOWN==a?i=Math.min(R.opts.tableInsertMaxSize-1,i+1):ge.KEYCODE.ARROW_LEFT==a?o=Math.max(0,o-1):ge.KEYCODE.ARROW_RIGHT==a&&(o=Math.min(R.opts.tableInsertMaxSize-1,o+1));var f=i*s+o,c=x(n.get(f));d(c),R.events.disableBlur(),c.focus(),l=!1}}else ge.KEYCODE.ENTER==a&&(R.button.exec(t),l=!1);return!1===l&&(e.preventDefault(),e.stopPropagation()),l},!0)}(a),a}function d(e){var t=e.data("row");null!==t&&(t=parseInt(t));var l=e.data("col");null!==l&&(l=parseInt(l));var a=e.parent();a.siblings(".fr-table-size-info").html(t+" × "+l),a.find("> span").removeClass("hover fr-active-item");for(var n=1;n<=R.opts.tableInsertMaxSize;n++)for(var r=0;r<=R.opts.tableInsertMaxSize;r++){var s=a.find('> span[data-row="'+n+'"][data-col="'+r+'"]');n<=t&&r<=l?s.addClass("hover"):n<=t+1||n<=2&&!R.helpers.isMobile()?s.css("display","inline-block"):2<n&&!R.helpers.isMobile()&&s.css("display","none")}e.addClass("fr-active-item")}function p(e){if(e)return R.popups.onHide("table.edit",i),!0;if(0<R.opts.tableEditButtons.length){var t={buttons:'<div class="fr-buttons">'.concat(R.button.buildList(R.opts.tableEditButtons),"</div>")},l=R.popups.create("table.edit",t);return R.events.$on(R.$wp,"scroll.table-edit",function(){R.popups.isVisible("table.edit")&&h()}),l}return!1}function u(){if(0<Z().length){var e=Q();R.selection.setBefore(e.get(0))||R.selection.setAfter(e.get(0)),R.selection.restore(),R.popups.hide("table.edit"),e.remove(),R.toolbar.enable()}}function b(e){var t=Q();if(0<t.length){if(0<R.$el.find("th.fr-selected-cell").length&&"above"==e)return;var l,a,n,r=_(),s=M(r);if(null==s)return;a="above"==e?s.min_i:s.max_i;var o="<tr>";for(l=0;l<r[a].length;l++){if("below"==e&&a<r.length-1&&r[a][l]==r[a+1][l]||"above"==e&&0<a&&r[a][l]==r[a-1][l]){if(0===l||0<l&&r[a][l]!=r[a][l-1]){var i=x(r[a][l]);i.attr("rowspan",parseInt(i.attr("rowspan"),10)+1)}}else o+='<td style="'+x(r[a][l]).attr("style")+'" ><br></td>'}o+="</tr>",n=0<R.$el.find("th.fr-selected-cell").length&&"below"==e?x(t.find("tbody").not(t.find("> table tbody"))):x(t.find("tr").not(t.find("> table tr")).get(a)),"below"==e?"TBODY"==n.attr("tagName")?n.prepend(o):n[0].parentNode&&n[0].insertAdjacentHTML("afterend",o):"above"==e&&(n.before(o),R.popups.isVisible("table.edit")&&h())}}function g(e,t,l){var a,n,r,s,o,i=0,f=_(l);if(e<(t=Math.min(t,f[0].length-1)))for(n=e;n<=t;n++)if(!(e<n&&f[0][n]==f[0][n-1])&&1<(s=Math.min(parseInt(f[0][n].getAttribute("colspan"),10)||1,t-e+1))&&f[0][n]==f[0][n+1])for(i=s-1,a=1;a<f.length;a++)if(f[a][n]!=f[a-1][n]){for(r=n;r<n+s;r++)if(1<(o=parseInt(f[a][r].getAttribute("colspan"),10)||1)&&f[a][r]==f[a][r+1])r+=i=Math.min(i,o-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"colspan",0,f.length-1,e,t)}function m(e,t,l){var a,n,r,s,o,i=0,f=_(l);if(e<(t=Math.min(t,f.length-1)))for(a=e;a<=t;a++)if(!(e<a&&f[a][0]==f[a-1][0])&&1<(s=Math.min(parseInt(f[a][0].getAttribute("rowspan"),10)||1,t-e+1))&&f[a][0]==f[a+1][0])for(i=s-1,n=1;n<f[0].length;n++)if(f[a][n]!=f[a][n-1]){for(r=a;r<a+s;r++)if(1<(o=parseInt(f[r][n].getAttribute("rowspan"),10)||1)&&f[r][n]==f[r+1][n])r+=i=Math.min(i,o-1);else if(!(i=Math.max(0,i-1)))break;if(!i)break}i&&v(f,i,"rowspan",e,t,0,f[0].length-1)}function v(e,t,l,a,n,r,s){var o,i,f;for(o=a;o<=n;o++)for(i=r;i<=s;i++)a<o&&e[o][i]==e[o-1][i]||r<i&&e[o][i]==e[o][i-1]||1<(f=parseInt(e[o][i].getAttribute(l),10)||1)&&(1<f-t?e[o][i].setAttribute(l,f-t):e[o][i].removeAttribute(l))}function w(e,t,l,a,n){m(e,t,n),g(l,a,n)}function t(e){var t=R.$el.find(".fr-selected-cell");"REMOVE"!=e?t.css("background-color",R.helpers.HEXtoRGB(e)):t.css("background-color",""),h()}function _(e){var f=[];return null==(e=e||null)&&0<Z().length&&(e=Q()),e&&e.findVisible("tr").not(e.find("> table tr")).each(function(o,e){var t=x(e),i=0;t.find("> th, > td").each(function(e,t){for(var l=x(t),a=parseInt(l.attr("colspan"),10)||1,n=parseInt(l.attr("rowspan"),10)||1,r=o;r<o+n;r++)for(var s=i;s<i+a;s++)f[r]||(f[r]=[]),f[r][s]?i++:f[r][s]=t;i+=a})}),f}function $(e,t){for(var l=0;l<t.length;l++)for(var a=0;a<t[l].length;a++)if(t[l][a]==e)return{row:l,col:a}}function D(e,t,l){for(var a=e+1,n=t+1;a<l.length;){if(l[a][t]!=l[e][t]){a--;break}a++}for(a==l.length&&a--;n<l[e].length;){if(l[e][n]!=l[e][t]){n--;break}n++}return n==l[e].length&&n--,{row:a,col:n}}function C(){R.el.querySelector(".fr-cell-fixed")&&R.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")&&R.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function E(){var e=R.$el.find(".fr-selected-cell");0<e.length&&e.each(function(){var e=x(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")}),C()}function y(){R.events.disableBlur(),R.selection.clear(),R.$el.addClass("fr-no-selection"),R.$el.blur(),R.events.enableBlur()}function M(e){var t=R.$el.find(".fr-selected-cell");if(0<t.length){var l,a=e.length,n=0,r=e[0].length,s=0;for(l=0;l<t.length;l++){var o=$(t[l],e),i=D(o.row,o.col,e);a=Math.min(o.row,a),n=Math.max(i.row,n),r=Math.min(o.col,r),s=Math.max(i.col,s)}return{min_i:a,max_i:n,min_j:r,max_j:s}}return null}function S(e){var t=M(e);if(null!=t){var l=x(e[t.min_i][t.min_j]),a=x(e[t.min_i][t.max_j]),n=x(e[t.max_i][t.min_j]);return{left:l.offset().left,right:a.offset().left+a.outerWidth(),top:l.offset().top,bottom:n.offset().top+n.outerHeight()}}}function I(e,t){if(x(e).is(t))E(),x(e).addClass("fr-selected-cell");else{y(),R.edit.off();var l=_(),a=$(e,l),n=$(t,l),r=function h(e,t,l,a,n){var r,s,o,i,f=e,c=t,d=l,p=a;for(r=f;r<=c;r++)(1<(parseInt(x(n[r][d]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][d]).attr("colspan"),10)||1))&&(i=D((o=$(n[r][d],n)).row,o.col,n),f=Math.min(o.row,f),c=Math.max(i.row,c),d=Math.min(o.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[r][p]).attr("rowspan"),10)||1)||1<(parseInt(x(n[r][p]).attr("colspan"),10)||1))&&(i=D((o=$(n[r][p],n)).row,o.col,n),f=Math.min(o.row,f),c=Math.max(i.row,c),d=Math.min(o.col,d),p=Math.max(i.col,p));for(s=d;s<=p;s++)(1<(parseInt(x(n[f][s]).attr("rowspan"),10)||1)||1<(parseInt(x(n[f][s]).attr("colspan"),10)||1))&&(i=D((o=$(n[f][s],n)).row,o.col,n),f=Math.min(o.row,f),c=Math.max(i.row,c),d=Math.min(o.col,d),p=Math.max(i.col,p)),(1<(parseInt(x(n[c][s]).attr("rowspan"),10)||1)||1<(parseInt(x(n[c][s]).attr("colspan"),10)||1))&&(i=D((o=$(n[c][s],n)).row,o.col,n),f=Math.min(o.row,f),c=Math.max(i.row,c),d=Math.min(o.col,d),p=Math.max(i.col,p));return f==e&&c==t&&d==l&&p==a?{min_i:e,max_i:t,min_j:l,max_j:a}:h(f,c,d,p,n)}(Math.min(a.row,n.row),Math.max(a.row,n.row),Math.min(a.col,n.col),Math.max(a.col,n.col),l);E(),e.classList.add("fr-cell-fixed"),t.classList.add("fr-cell-handler");for(var s=r.min_i;s<=r.max_i;s++)for(var o=r.min_j;o<=r.max_j;o++)x(l[s][o]).addClass("fr-selected-cell")}}function N(e){var t=null,l=x(e.target);return"TD"==e.target.tagName||"TH"==e.target.tagName?t=e.target:0<l.closest("td").length?t=l.closest("td").get(0):0<l.closest("th").length&&(t=l.closest("th").get(0)),-1===R.$el.html.toString().search(t)?null:t}function T(){E(),R.popups.hide("table.edit")}function e(e){var t=N(e);if("false"==x(t).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<Z().length&&!t&&T(),!R.edit.isDisabled()||R.popups.isVisible("table.edit"))if(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)(3==e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)&&t&&T();else if(r=!0,t){0<Z().length&&!e.shiftKey&&T(),e.stopPropagation(),R.events.trigger("image.hideResizer"),R.events.trigger("video.hideResizer"),n=!0;var l=t.tagName.toLowerCase();e.shiftKey&&0<R.$el.find(l+".fr-selected-cell").length?x(R.$el.find(l+".fr-selected-cell").closest("table")).is(x(t).closest("table"))?I(a,t):y():((R.keys.ctrlKey(e)||e.shiftKey)&&(1<Z().length||0===x(t).find(R.selection.element()).length&&!x(t).is(R.selection.element()))&&y(),a=t,0<R.opts.tableEditButtons.length&&I(a,a))}}function l(e){if(R.popups.areVisible())return!0;if(n||R.$tb.is(e.target)||R.$tb.is(x(e.target).closest(".fr-toolbar"))||(0<Z().length&&R.toolbar.enable(),E()),!(1!=e.which||1==e.which&&R.helpers.isMac()&&e.ctrlKey)){if(r=!1,n)n=!1,N(e)||1!=Z().length?0<Z().length&&(R.selection.isCollapsed()?h():E()):E();if(A){A=!1,O.removeClass("fr-moving"),R.$el.removeClass("fr-no-selection"),R.edit.on();var t=parseFloat(O.css("left"))+R.opts.tableResizerOffset+R.$wp.offset().left;R.opts.iframe&&(t-=R.$iframe.offset().left),O.data("release-position",t),O.removeData("max-left"),O.removeData("max-right"),function C(){var e=O.data("origin"),t=O.data("release-position");if(e!==t){var l=O.data("first"),a=O.data("second"),n=O.data("table"),r=n.outerWidth();if(R.undo.canDo()||R.undo.saveStep(),null!=l&&null!=a){var s,o,i,f=_(n),c=[],d=[],p=[],h=[];for(s=0;s<f.length;s++)o=x(f[s][l]),i=x(f[s][a]),c[s]=o.outerWidth(),p[s]=i.outerWidth(),d[s]=c[s]/r*100,h[s]=p[s]/r*100;for(s=0;s<f.length;s++)if(o=x(f[s][l]),i=x(f[s][a]),f[s][l]!=f[s][a]){var u=(d[s]*(c[s]+t-e)/c[s]).toFixed(4);o.css("width",u+"%"),i.css("width",(d[s]+h[s]-u).toFixed(4)+"%")}}else{var b,g=n.parent(),m=r/g.width()*100,v=(parseInt(n.css("margin-left"),10)||0)/g.width()*100,w=(parseInt(n.css("margin-right"),10)||0)/g.width()*100;"rtl"==R.opts.direction&&0===a||"rtl"!=R.opts.direction&&0!==a?(b=(r+t-e)/r*m,n.css("margin-right","calc(100% - "+Math.round(b).toFixed(4)+"% - "+Math.round(v).toFixed(4)+"%)")):("rtl"==R.opts.direction&&0!==a||"rtl"!=R.opts.direction&&0===a)&&(b=(r-t+e)/r*m,n.css("margin-left","calc(100% - "+Math.round(b).toFixed(4)+"% - "+Math.round(w).toFixed(4)+"%)")),n.css("width",Math.round(b).toFixed(4)+"%")}R.selection.restore(),R.undo.saveStep(),R.events.trigger("table.resized",[n.get(0)])}O.removeData("origin"),O.removeData("release-position"),O.removeData("first"),O.removeData("second"),O.removeData("table")}(),Y()}}}function K(e){if(!0===n&&0<R.opts.tableEditButtons.length){if(x(e.currentTarget).closest("table").is(Q())){if("TD"==e.currentTarget.tagName&&0===R.$el.find("th.fr-selected-cell").length)return void I(a,e.currentTarget);if("TH"==e.currentTarget.tagName&&0===R.$el.find("td.fr-selected-cell").length)return void I(a,e.currentTarget)}y()}}function B(e,t,l,a){for(var n,r=t;r!=R.el&&"TD"!=r.tagName&&"TH"!=r.tagName&&("up"==a?n=r.previousElementSibling:"down"==a&&(n=r.nextElementSibling),!n);)r=r.parentNode;"TD"==r.tagName||"TH"==r.tagName?function s(e,t){for(var l=e;l&&"TABLE"!=l.tagName&&l.parentNode!=R.el;)l=l.parentNode;if(l&&"TABLE"==l.tagName){var a=_(x(l));"up"==t?z($(e,a),l,a):"down"==t&&k($(e,a),l,a)}}(r,a):n&&("up"==a&&R.selection.setAtEnd(n),"down"==a&&R.selection.setAtStart(n))}function z(e,t,l){0<e.row?R.selection.setAtEnd(l[e.row-1][e.col]):B(0,t,0,"up")}function k(e,t,l){var a=parseInt(l[e.row][e.col].getAttribute("rowspan"),10)||1;e.row<l.length-a?R.selection.setAtStart(l[e.row+a][e.col]):B(0,t,0,"down")}function Y(){O&&(O.find("div").css("opacity",0),O.css("top",0),O.css("left",0),O.css("height",0),O.find("div").css("height",0),O.hide())}function W(){f&&f.removeClass("fr-visible").css("left","-9999px")}function L(e,t){var l=x(t),a=l.closest("table"),n=a.parent();if(t&&"TD"!=t.tagName&&"TH"!=t.tagName&&(0<l.closest("td").length?t=l.closest("td"):0<l.closest("th").length&&(t=l.closest("th"))),!t||"TD"!=t.tagName&&"TH"!=t.tagName)O&&l.get(0)!=O.get(0)&&l.parent().get(0)!=O.get(0)&&R.core.sameInstance(O)&&Y();else{if(l=x(t),0===R.$el.find(l).length)return!1;var r=l.offset().left-1,s=r+l.outerWidth();if(Math.abs(e.pageX-r)<=R.opts.tableResizerOffset||Math.abs(s-e.pageX)<=R.opts.tableResizerOffset){var o,i,f,c,d,p=_(a),h=$(t,p),u=D(h.row,h.col,p),b=a.offset().top,g=a.outerHeight()-1;"rtl"!=R.opts.direction?e.pageX-r<=R.opts.tableResizerOffset?(f=r,0<h.col?(c=r-j(h.col-1,p)+R.opts.tableResizingLimit,d=r+j(h.col,p)-R.opts.tableResizingLimit,o=h.col-1,i=h.col):(o=null,i=0,c=a.offset().left-1-parseInt(a.css("margin-left"),10),d=a.offset().left-1+a.width()-p[0].length*R.opts.tableResizingLimit)):s-e.pageX<=R.opts.tableResizerOffset&&(f=s,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=s-j(u.col,p)+R.opts.tableResizingLimit,d=s+j(u.col+1,p)-R.opts.tableResizingLimit,o=u.col,i=u.col+1):(o=u.col,i=null,c=a.offset().left-1+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):s-e.pageX<=R.opts.tableResizerOffset?(f=s,0<h.col?(c=s-j(h.col,p)+R.opts.tableResizingLimit,d=s+j(h.col-1,p)-R.opts.tableResizingLimit,o=h.col,i=h.col-1):(o=null,i=0,c=a.offset().left+p[0].length*R.opts.tableResizingLimit,d=n.offset().left-1+n.width()+parseFloat(n.css("padding-left")))):e.pageX-r<=R.opts.tableResizerOffset&&(f=r,u.col<p[u.row].length&&p[u.row][u.col+1]?(c=r-j(u.col+1,p)+R.opts.tableResizingLimit,d=r+j(u.col,p)-R.opts.tableResizingLimit,o=u.col+1,i=u.col):(o=u.col,i=null,c=n.offset().left+parseFloat(n.css("padding-left")),d=a.offset().left-1+a.width()-p[0].length*R.opts.tableResizingLimit)),O||function E(){R.shared.$table_resizer||(R.shared.$table_resizer=x(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),O=R.shared.$table_resizer,R.events.$on(O,"mousedown",function(e){return!R.core.sameInstance(O)||(0<Z().length&&T(),1==e.which?(R.selection.save(),A=!0,O.addClass("fr-moving"),y(),R.edit.off(),O.find("div").css("opacity",1),!1):void 0)}),R.events.$on(O,"mousemove",function(e){if(!R.core.sameInstance(O))return!0;A&&(R.opts.iframe&&(e.pageX-=R.$iframe.offset().left),G(e))}),R.events.on("shared.destroy",function(){O.html("").removeData().remove(),O=null},!0),R.events.on("destroy",function(){R.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),x("body").first().append(O.hide())},!0)}(),O.data("table",a),O.data("first",o),O.data("second",i),O.data("instance",R),R.$wp.append(O);var m=f-R.win.pageXOffset-R.opts.tableResizerOffset-R.$wp.offset().left,v=b-R.$wp.offset().top+R.$wp.scrollTop();if(R.opts.iframe){var w=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),C=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));m+=R.$iframe.offset().left+C,v+=R.$iframe.offset().top+w,c+=R.$iframe.offset().left,d+=R.$iframe.offset().left}O.data("max-left",c),O.data("max-right",d),O.data("origin",f-R.win.pageXOffset),O.css("top",v),O.css("left",m),O.css("height",g),O.find("div").css("height",g),O.css("padding-left",R.opts.tableResizerOffset),O.css("padding-right",R.opts.tableResizerOffset),O.show()}else R.core.sameInstance(O)&&Y()}}function F(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var l,a=x(t).find("tr").first(),n=e.pageX,r=0,s=0;if(R.opts.iframe){var o=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,s+=R.$iframe.offset().top-R.helpers.scrollTop()+o}a.find("th, td").each(function(){var e=x(this);return e.offset().left<=n&&n<e.offset().left+e.outerWidth()/2?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-R.$box.offset().top-l-5),f.css("left",r+e.offset().left-R.$box.offset().left-l/2),f.data("selected-cell",e),f.data("position","before"),f.addClass("fr-visible"),!1):e.offset().left+e.outerWidth()/2<=n&&n<e.offset().left+e.outerWidth()?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-R.$box.offset().top-l-5),f.css("left",r+e.offset().left-R.$box.offset().left+e.outerWidth()-l/2),f.data("selected-cell",e),f.data("position","after"),f.addClass("fr-visible"),!1):void 0})}function H(e,t){if(R.$box.find(".fr-line-breaker").isVisible())return!1;f||q(),R.$box.append(f),f.data("instance",R);var l,a=x(t),n=e.pageY,r=0,s=0;if(R.opts.iframe){var o=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top")),i=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-left"));r+=R.$iframe.offset().left-R.helpers.scrollLeft()+i,s+=R.$iframe.offset().top-R.helpers.scrollTop()+o}a.find("tr").each(function(){var e=x(this);return e.offset().top<=n&&n<e.offset().top+e.outerHeight()/2?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-R.$box.offset().top-l/2),f.css("left",r+e.offset().left-R.$box.offset().left-l-5),f.data("selected-cell",e.find("td").first()),f.data("position","above"),f.addClass("fr-visible"),!1):e.offset().top+e.outerHeight()/2<=n&&n<e.offset().top+e.outerHeight()?(l=parseInt(f.find("a").css("width"),10),f.css("top",s+e.offset().top-R.$box.offset().top+e.outerHeight()-l/2),f.css("left",r+e.offset().left-R.$box.offset().left-l-5),f.data("selected-cell",e.find("td").first()),f.data("position","below"),f.addClass("fr-visible"),!1):void 0})}function V(e){s=null;var t=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset);R.opts.tableResizer&&(!R.popups.areVisible()||R.popups.areVisible()&&R.popups.isVisible("table.edit"))&&L(e,t),!R.opts.tableInsertHelper||R.popups.areVisible()||R.$tb.hasClass("fr-inline")&&R.$tb.isVisible()||function r(e,t){if(0===Z().length){var l,a,n;if(t&&("HTML"==t.tagName||"BODY"==t.tagName||R.node.isElement(t)))for(l=1;l<=R.opts.tableInsertHelperOffset;l++){if(a=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset,e.pageY-R.win.pageYOffset+l),x(a).hasClass("fr-tooltip"))return!0;if(a&&("TH"==a.tagName||"TD"==a.tagName||"TABLE"==a.tagName)&&(x(a).parents(".fr-wrapper").length||R.opts.iframe))return F(e,x(a).closest("table")),!0;if(n=R.doc.elementFromPoint(e.pageX-R.win.pageXOffset+l,e.pageY-R.win.pageYOffset),x(n).hasClass("fr-tooltip"))return!0;if(n&&("TH"==n.tagName||"TD"==n.tagName||"TABLE"==n.tagName)&&(x(n).parents(".fr-wrapper").length||R.opts.iframe))return H(e,x(n).closest("table")),!0}R.core.sameInstance(f)&&W()}}(e,t)}function P(){if(A){var e=O.data("table").offset().top-R.win.pageYOffset;if(R.opts.iframe){var t=R.helpers.getPX(R.$wp.find(".fr-iframe").css("padding-top"));e+=R.$iframe.offset().top-R.helpers.scrollTop()+t}O.css("top",e)}}function j(e,t){var l,a=x(t[0][e]).outerWidth();for(l=1;l<t.length;l++)a=Math.min(a,x(t[l][e]).outerWidth());return a}function X(e,t,l){var a,n=0;for(a=e;a<=t;a++)n+=j(a,l);return n}function G(e){if(1<Z().length&&r&&y(),!1===r&&!1===n&&!1===A)s&&clearTimeout(s),R.edit.isDisabled()&&!R.popups.isVisible("table.edit")||(s=setTimeout(V,30,e));else if(A){var t=e.pageX-R.win.pageXOffset;R.opts.iframe&&(t+=R.$iframe.offset().left);var l=O.data("max-left"),a=O.data("max-right");l<=t&&t<=a?O.css("left",t-R.opts.tableResizerOffset-R.$wp.offset().left):t<l&&parseFloat(O.css("left"),10)>l-R.opts.tableResizerOffset?O.css("left",l-R.opts.tableResizerOffset-R.$wp.offset().left):a<t&&parseFloat(O.css("left"),10)<a-R.opts.tableResizerOffset&&O.css("left",a-R.opts.tableResizerOffset-R.$wp.offset().left)}else r&&W()}function U(e){R.node.isEmpty(e.get(0))?e.prepend(ge.MARKERS):e.prepend(ge.START_MARKER).append(ge.END_MARKER)}function q(){R.shared.$ti_helper||(R.shared.$ti_helper=x(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'+R.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>'),R.events.bindClick(R.shared.$ti_helper,"a",function(){var e=f.data("selected-cell"),t=f.data("position"),l=f.data("instance")||R;"before"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"after"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertColumn(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"above"==t?(R.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()):"below"==t&&(R.undo.saveStep(),e.addClass("fr-selected-cell"),l.table.insertRow(t),e.removeClass("fr-selected-cell"),R.undo.saveStep()),W()}),R.events.on("shared.destroy",function(){R.shared.$ti_helper.html("").removeData().remove(),R.shared.$ti_helper=null},!0),R.events.$on(R.shared.$ti_helper,"mousemove",function(e){e.stopPropagation()},!0),R.events.$on(x(R.o_win),"scroll",function(){W()},!0),R.events.$on(R.$wp,"scroll",function(){W()},!0)),f=R.shared.$ti_helper,R.events.on("destroy",function(){f=null}),R.tooltip.bind(R.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){a=null,clearTimeout(s)}function Z(){return R.el.querySelectorAll(".fr-selected-cell")}function Q(){var e=Z();if(e.length){for(var t=e[0];t&&"TABLE"!=t.tagName&&t.parentNode!=R.el;)t=t.parentNode;return t&&"TABLE"==t.tagName?x(t):x([])}return x([])}return{_init:function ee(){if(!R.$wp)return!1;if(!R.helpers.isMobile()){A=n=r=!1,R.events.$on(R.$el,"mousedown",e),R.popups.onShow("image.edit",function(){E(),n=r=!1}),R.popups.onShow("link.edit",function(){E(),n=r=!1}),R.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&E()}),R.events.$on(R.$el,"mouseover","th, td",K),R.events.$on(R.$win,"mouseup",l),R.opts.iframe&&R.events.$on(x(R.o_win),"mouseup",l),R.events.$on(R.$win,"mousemove",G),R.events.$on(x(R.o_win),"scroll",P),R.events.on("contentChanged",function(){0<Z().length&&(h(),R.$el.find("img").on("load.selected-cells",function(){x(this).off("load.selected-cells"),0<Z().length&&h()}))}),R.events.$on(x(R.o_win),"resize",function(){E()}),R.events.on("toolbar.esc",function(){if(0<Z().length)return R.events.disableBlur(),R.events.focus(),!1},!0),R.events.$on(x(R.o_win),"keydown",function(){r&&n&&(n=r=!1,R.$el.removeClass("fr-no-selection"),R.edit.on(),R.selection.setAtEnd(R.$el.find(".fr-selected-cell").last().get(0)),R.selection.restore(),E())}),R.events.$on(R.$el,"keydown",function(e){e.shiftKey?!1===function s(e){var t=Z();if(null!=t&&0<t.length){var l,a=_(),n=e.which,r=$(1==t.length?l=t[0]:(l=R.el.querySelector(".fr-cell-fixed"),R.el.querySelector(".fr-cell-handler")),a);if(ge.KEYCODE.ARROW_RIGHT==n){if(r.col<a[0].length-1)return I(l,a[r.row][r.col+1]),!1}else if(ge.KEYCODE.ARROW_DOWN==n){if(r.row<a.length-1)return I(l,a[r.row+1][r.col]),!1}else if(ge.KEYCODE.ARROW_LEFT==n){if(0<r.col)return I(l,a[r.row][r.col-1]),!1}else if(ge.KEYCODE.ARROW_UP==n&&0<r.row)return I(l,a[r.row-1][r.col]),!1}}(e)&&setTimeout(function(){h()},0):function o(e){var t=e.which,l=R.selection.blocks();if(l.length&&("TD"==(l=l[0]).tagName||"TH"==l.tagName)){for(var a=l;a&&"TABLE"!=a.tagName&&a.parentNode!=R.el;)a=a.parentNode;if(a&&"TABLE"==a.tagName&&(ge.KEYCODE.ARROW_LEFT==t||ge.KEYCODE.ARROW_UP==t||ge.KEYCODE.ARROW_RIGHT==t||ge.KEYCODE.ARROW_DOWN==t)&&(0<Z().length&&T(),R.browser.webkit&&(ge.KEYCODE.ARROW_UP==t||ge.KEYCODE.ARROW_DOWN==t))){var n=R.selection.ranges(0).startContainer;if(n.nodeType==Node.TEXT_NODE&&(x.FE.KEYCODE.ARROW_UP==t&&(n.previousSibling&&"BR"!==n.previousSibling.tagName||n.previousSibling&&"BR"===n.previousSibling.tagName&&n.previousSibling.previousSibling)||x.FE.KEYCODE.ARROW_DOWN==t&&(n.nextSibling&&"BR"!==n.nextSibling.tagName||n.nextSibling&&"BR"===n.nextSibling.tagName&&n.nextSibling.nextSibling)))return;e.preventDefault(),e.stopPropagation();var r=_(x(a)),s=$(l,r);return ge.KEYCODE.ARROW_UP==t?z(s,a,r):ge.KEYCODE.ARROW_DOWN==t&&k(s,a,r),R.selection.restore(),!1}}}(e)}),R.events.on("keydown",function(e){if(!1===function a(e){if(e.which==ge.KEYCODE.TAB){var t;if(0<Z().length)t=R.$el.find(".fr-selected-cell").last();else{var l=R.selection.element();"TD"==l.tagName||"TH"==l.tagName?t=x(l):l!=R.el&&(0<x(l).parentsUntil(R.$el,"td").length?t=x(l).parents("td").first():0<x(l).parentsUntil(R.$el,"th").length&&(t=x(l).parents("th").first()))}if(t)return e.preventDefault(),!!(0===R.selection.get().focusOffset&&0<x(R.selection.element()).parentsUntil(R.$el,"ol, ul").length&&(0<x(R.selection.element()).closest("li").prev().length||x(R.selection.element()).is("li")&&0<x(R.selection.element()).prev().length))||(T(),e.shiftKey?0<t.prev().length?U(t.prev()):0<t.closest("tr").length&&0<t.closest("tr").prev().length?U(t.closest("tr").prev().find("td").last()):0<t.closest("tbody").length&&0<t.closest("table").find("thead tr").length&&U(t.closest("table").find("thead tr th").last()):0<t.next().length?U(t.next()):0<t.closest("tr").length&&0<t.closest("tr").next().length?U(t.closest("tr").next().find("td").first()):0<t.closest("thead").length&&0<t.closest("table").find("tbody tr").length?U(t.closest("table").find("tbody tr td").first()):(t.addClass("fr-selected-cell"),b("below"),E(),U(t.closest("tr").next().find("td").first())),R.selection.restore(),!1)}}(e))return!1;var t=Z();if(0<t.length){if(0<t.length&&R.keys.ctrlKey(e)&&e.which==ge.KEYCODE.A)return E(),R.popups.isVisible("table.edit")&&R.popups.hide("table.edit"),t=[],!0;if(e.which==ge.KEYCODE.ESC&&R.popups.isVisible("table.edit"))return E(),R.popups.hide("table.edit"),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),!(t=[]);if(1<t.length&&(e.which==ge.KEYCODE.BACKSPACE||e.which==ge.KEYCODE.DELETE)){R.undo.saveStep();for(var l=0;l<t.length;l++)x(t[l]).html("<br>"),l==t.length-1&&x(t[l]).prepend(ge.MARKERS);return R.selection.restore(),R.undo.saveStep(),!(t=[])}if(1<t.length&&e.which!=ge.KEYCODE.F10&&!R.keys.isBrowserAction(e))return e.preventDefault(),!(t=[])}else if(!(t=[])===function n(e){if(e.altKey&&e.which==ge.KEYCODE.SPACE){var t,l=R.selection.element();if("TD"==l.tagName||"TH"==l.tagName?t=l:0<x(l).closest("td").length?t=x(l).closest("td").get(0):0<x(l).closest("th").length&&(t=x(l).closest("th").get(0)),t)return e.preventDefault(),I(t,t),h(),!1}}(e))return!1},!0);var t=[];R.events.on("html.beforeGet",function(){t=Z();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")}),R.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=[]}),c(!0),p(!0)}R.events.on("destroy",J)},insert:function te(e,t){var l,a,n="<table "+(R.opts.tableDefaultWidth?'style="width: '+R.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',r=100/t;for(l=0;l<e;l++){for(n+="<tr>",a=0;a<t;a++)n+="<td"+(R.opts.tableDefaultWidth?' style="width: '+r.toFixed(4)+'%;"':"")+">",0===l&&0===a&&(n+=ge.MARKERS),n+="<br></td>";n+="</tr>"}n+="</tbody></table>",R.html.insert(n),R.selection.restore();var s=R.$el.find(".fr-inserted-table");s.removeClass("fr-inserted-table"),R.events.trigger("table.inserted",[s.get(0)])},remove:u,insertRow:b,deleteRow:function le(){var e=Q();if(0<e.length){var t,l,a,n=_(),r=M(n);if(null==r)return;if(0===r.min_i&&r.max_i==n.length-1)u();else{for(t=r.max_i;t>=r.min_i;t--){for(a=x(e.find("tr").not(e.find("> table tr")).get(t)),l=0;l<n[t].length;l++)if(0===l||n[t][l]!=n[t][l-1]){var s=x(n[t][l]);if(1<parseInt(s.attr("rowspan"),10)){var o=parseInt(s.attr("rowspan"),10)-1;1==o?s.removeAttr("rowspan"):s.attr("rowspan",o)}if(t<n.length-1&&n[t][l]==n[t+1][l]&&(0===t||n[t][l]!=n[t-1][l])){for(var i=n[t][l],f=l;0<f&&n[t][f]==n[t][f-1];)f--;0===f?x(e.find("tr").not(e.find("> table tr")).get(t+1)).prepend(i):x(n[t+1][f-1])[0].parentNode&&x(n[t+1][f-1])[0].insertAdjacentElement("afterend",i)}}var c=a.parent();a.remove(),0===c.find("tr").length&&c.remove(),n=_(e)}w(0,n.length-1,0,n[0].length-1,e),0<r.min_i?R.selection.setAtEnd(n[r.min_i-1][0]):R.selection.setAtEnd(n[0][0]),R.selection.restore(),R.popups.hide("table.edit")}}},insertColumn:function ae(i){var e=Q();if(0<e.length){var f,c=_(),t=M(c);f="before"==i?t.min_j:t.max_j;var l,d=100/c[0].length,p=100/(c[0].length+1);e.find("th, td").each(function(){(l=x(this)).data("old-width",l.outerWidth()/e.outerWidth()*100)}),e.find("tr").not(e.find("> table tr")).each(function(e){for(var t,l=x(this),a=0,n=0;a-1<f;){if(!(t=l.find("> th, > td").get(n))){t=null;break}t==c[e][a]?(a+=parseInt(x(t).attr("colspan"),10)||1,n++):(a+=parseInt(x(c[e][a]).attr("colspan"),10)||1,"after"==i&&(t=0===n?-1:l.find("> th, > td").get(n-1)))}var r,s=x(t);if("after"==i&&f<a-1||"before"==i&&0<f&&c[e][f]==c[e][f-1]){if(0===e||0<e&&c[e][f]!=c[e-1][f]){var o=parseInt(s.attr("colspan"),10)+1;s.attr("colspan",o),s.css("width",(s.data("old-width")*p/d+p).toFixed(4)+"%"),s.removeData("old-width")}}else r=0<l.find("th").length?'<th style="width: '+p.toFixed(4)+'%;"><br></th>':'<td style="width: '+p.toFixed(4)+'%;"><br></td>',-1==t?l.prepend(r):null==t?l.append(r):"before"==i?s.before(r):"after"==i&&s[0].parentNode&&s[0].insertAdjacentHTML("afterend",r)}),e.find("th, td").each(function(){(l=x(this)).data("old-width")&&(l.css("width",(l.data("old-width")*p/d).toFixed(4)+"%"),l.removeData("old-width"))}),R.popups.isVisible("table.edit")&&h()}},deleteColumn:function ne(){var e=Q();if(0<e.length){var t,l,a,n=_(),r=M(n);if(null==r)return;if(0===r.min_j&&r.max_j==n[0].length-1)u();else{var s=0;for(t=0;t<n.length;t++)for(l=0;l<n[0].length;l++)(a=x(n[t][l])).hasClass("fr-selected-cell")||(a.data("old-width",a.outerWidth()/e.outerWidth()*100),(l<r.min_j||l>r.max_j)&&(s+=a.outerWidth()/e.outerWidth()*100));for(s/=n.length,l=r.max_j;l>=r.min_j;l--)for(t=0;t<n.length;t++)if(0===t||n[t][l]!=n[t-1][l])if(a=x(n[t][l]),1<(parseInt(a.attr("colspan"),10)||1)){var o=parseInt(a.attr("colspan"),10)-1;1==o?a.removeAttr("colspan"):a.attr("colspan",o),a.css("width",(100*(a.data("old-width")-j(l,n))/s).toFixed(4)+"%"),a.removeData("old-width")}else{var i=x(a.parent().get(0));a.remove(),0===i.find("> th, > td").length&&(0===i.prev().length||0===i.next().length||i.prev().find("> th[rowspan], > td[rowspan]").length<i.prev().find("> th, > td").length)&&i.remove()}w(0,n.length-1,0,n[0].length-1,e),0<r.min_j?R.selection.setAtEnd(n[r.min_i][r.min_j-1]):R.selection.setAtEnd(n[r.min_i][0]),R.selection.restore(),R.popups.hide("table.edit"),e.find("th, td").each(function(){(a=x(this)).data("old-width")&&(a.css("width",(100*a.data("old-width")/s).toFixed(4)+"%"),a.removeData("old-width"))})}}},mergeCells:function re(){if(1<Z().length&&(0===R.$el.find("th.fr-selected-cell").length||0===R.$el.find("td.fr-selected-cell").length)){C();var e,t,l=M(_());if(null==l)return;var a=R.$el.find(".fr-selected-cell"),n=x(a[0]),r=n.parent().find(".fr-selected-cell"),s=n.closest("table"),o=n.html(),i=0;for(e=0;e<r.length;e++)i+=x(r[e]).outerWidth();for(n.css("width",Math.min(100,i/s.outerWidth()*100).toFixed(4)+"%"),l.min_j<l.max_j&&n.attr("colspan",l.max_j-l.min_j+1),l.min_i<l.max_i&&n.attr("rowspan",l.max_i-l.min_i+1),e=1;e<a.length;e++)"<br>"!=(t=x(a[e])).html()&&""!==t.html()&&(o+="<br>"+t.html()),t.remove();n.html(o),R.selection.setAtEnd(n.get(0)),R.selection.restore(),R.toolbar.enable(),m(l.min_i,l.max_i,s);var f=s.find("tr:empty");for(e=f.length-1;0<=e;e--)x(f[e]).remove();g(l.min_j,l.max_j,s),h()}},splitCellVertically:function se(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=parseInt(e.attr("colspan"),10)||1,l=e.parent().outerWidth(),a=e.outerWidth(),n=e.clone().html("<br>"),r=_(),s=$(e.get(0),r);if(1<t){var o=Math.ceil(t/2);a=X(s.col,s.col+o-1,r)/l*100;var i=X(s.col+o,s.col+t-1,r)/l*100;1<o?e.attr("colspan",o):e.removeAttr("colspan"),1<t-o?n.attr("colspan",t-o):n.removeAttr("colspan"),e.css("width",a.toFixed(4)+"%"),n.css("width",i.toFixed(4)+"%")}else{var f;for(f=0;f<r.length;f++)if(0===f||r[f][s.col]!=r[f-1][s.col]){var c=x(r[f][s.col]);if(!c.is(e)){var d=(parseInt(c.attr("colspan"),10)||1)+1;c.attr("colspan",d)}}a=a/l*100/2,e.css("width",a.toFixed(4)+"%"),n.css("width",a.toFixed(4)+"%")}e[0].parentNode&&e[0].insertAdjacentElement("afterend",n[0]),E(),R.popups.hide("table.edit")}},splitCellHorizontally:function oe(){if(1==Z().length){var e=R.$el.find(".fr-selected-cell"),t=e.parent(),l=e.closest("table"),a=parseInt(e.attr("rowspan"),10),n=_(),r=$(e.get(0),n),s=e.clone().html("<br>");if(1<a){var o=Math.ceil(a/2);1<o?e.attr("rowspan",o):e.removeAttr("rowspan"),1<a-o?s.attr("rowspan",a-o):s.removeAttr("rowspan");for(var i=r.row+o,f=0===r.col?r.col:r.col-1;0<=f&&(n[i][f]==n[i][f-1]||0<i&&n[i][f]==n[i-1][f]);)f--;-1==f?x(l.find("tr").not(l.find("> table tr")).get(i)).prepend(s):x(n[i][f])[0].parentNode&&x(n[i][f])[0].insertAdjacentElement("afterend",s[0])}else{var c,d=x(document.createElement("tr")).append(s);for(c=0;c<n[0].length;c++)if(0===c||n[r.row][c]!=n[r.row][c-1]){var p=x(n[r.row][c]);p.is(e)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}t[0].parentNode&&t[0].insertAdjacentElement("afterend",d[0])}E(),R.popups.hide("table.edit")}},addHeader:function ie(){var e=Q();if(0<e.length&&0===e.find("th").length){var t,l="<thead><tr>",a=0;for(e.find("tr").first().find("> td").each(function(){var e=x(this);a+=parseInt(e.attr("colspan"),10)||1}),t=0;t<a;t++)l+="<th><br></th>";l+="</tr></thead>",e.prepend(l),h()}},removeHeader:function fe(){var e=Q(),t=e.find("thead");if(0<t.length)if(0===e.find("tbody tr").length)u();else if(t.remove(),0<Z().length)h();else{R.popups.hide("table.edit");var l=e.find("tbody tr").first().find("td").first().get(0);l&&(R.selection.setAtEnd(l),R.selection.restore())}},setBackground:t,showInsertPopup:function ce(){var e=R.$tb.find('.fr-command[data-cmd="insertTable"]'),t=R.popups.get("table.insert");if(t||(t=c()),!t.hasClass("fr-active")){R.popups.refresh("table.insert"),R.popups.setContainer("table.insert",R.$tb);var l=R.button.getPosition(e),a=l.left,n=l.top;R.popups.show("table.insert",a,n,e.outerHeight())}},showEditPopup:h,showColorsPopup:o,back:function de(){0<Z().length?h():(R.popups.hide("table.insert"),R.toolbar.showInline())},verticalAlign:function pe(e){R.$el.find(".fr-selected-cell").css("vertical-align",e)},horizontalAlign:function he(e){R.$el.find(".fr-selected-cell").css("text-align",e)},applyStyle:function ue(e,t,l,a){if(0<t.length){if(!l){var n=Object.keys(a);n.splice(n.indexOf(e),1),t.removeClass(n.join(" "))}t.toggleClass(e)}},selectedTable:Q,selectedCells:Z,customColor:function be(){var e=R.popups.get("table.colors").find(".fr-table-colors-hex-layer input");e.length&&t(e.val())},selectCells:I}},ge.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),ge.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"}),ge.RegisterCommand("tableInsert",{callback:function(e,t,l){this.table.insert(t,l),this.popups.hide("table.insert")}}),ge.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),ge.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))}}),ge.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),ge.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=ge.COMMANDS.tableRows.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</a></li>");return e+="</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),ge.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),ge.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=ge.COMMANDS.tableColumns.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</a></li>");return e+="</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),ge.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),ge.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=ge.COMMANDS.tableCells.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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))}}),ge.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),ge.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),ge.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),ge.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 l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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 l=this.$,a=this.$el.find(".fr-selected-cell").closest("table");a&&t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=a.hasClass(e);l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),ge.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),ge.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),ge.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),ge.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),ge.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"))}}),ge.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),ge.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=ge.COMMANDS.tableCellVerticalAlign.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'+l.toLowerCase()+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(l)+"</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)}}),ge.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),ge.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),ge.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),ge.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),ge.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),ge.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=ge.COMMANDS.tableCellHorizontalAlign.options;for(var l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.icon.create("align-"+l)+'<span class="fr-sr-only">'+this.language.translate(t[l])+"</span></a></li>");return e+="</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),l=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-"+this.helpers.getAlignment(l(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)}}),ge.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),ge.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 l in t)t.hasOwnProperty(l)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'+l+'" title="'+this.language.translate(t[l])+'">'+this.language.translate(t[l])+"</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 l=this.$,a=this.$el.find(".fr-selected-cell").first();a&&t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=a.hasClass(e);l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),ge.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),ge.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)("+r.LinkRegEx+"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$",r.PLUGINS.url=function(i){var l=i.$,a=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:"+o);else if(i.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//"+o),(t||"")+"<a"+(i.opts.linkAlwaysBlank?' target="_blank"':"")+(a?' rel="'+a+'"':"")+' data-fr-linked="true" href="'+o+'">'+n.replace(/&/g,"&").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")+"</a>"+r}function s(){return new RegExp(r.URLRegEx,"gi")}function p(e){return i.opts.linkAlwaysNoFollow&&(a="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(a?a+=" noopener":a="noopener"),i.opts.linkNoReferrer&&(a?a+=" noreferrer":a="noreferrer")),e.replace(s(),t)}function f(e){var t=e.split(" ");return t[t.length-1]}function n(){var t=i.selection.ranges(0),n=t.startContainer;if(!n||n.nodeType!==Node.TEXT_NODE||t.startOffset!==(n.textContent||"").length)return!1;if(function e(t){return!!t&&("A"===t.tagName||!(!t.parentNode||t.parentNode==i.el)&&e(t.parentNode))}(n))return!1;if(s().test(f(n.textContent))){l(n).before(p(n.textContent));var r=l(n.parentNode).find("a[data-fr-linked]");r.removeAttr("data-fr-linked"),n.parentNode.removeChild(n),i.events.trigger("url.linked",[r.get(0)])}else if(n.textContent.split(" ").length<=2&&n.previousSibling&&"A"===n.previousSibling.tagName){var o=n.previousSibling.innerText+n.textContent;s().test(f(o))&&(l(n.previousSibling).replaceWith(p(o)),n.parentNode.removeChild(n))}}return{_init:function(){i.events.on("keypress",function(e){!i.selection.isCollapsed()||"."!=e.key&&")"!=e.key&&"("!=e.key||n()},!0),i.events.on("keydown",function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),i.events.on("paste.beforeCleanup",function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a"+(i.opts.linkAlwaysBlank?' target="_blank"':"")+(t?' rel="'+t+'"':"")+' href="'+e+'" >'+e+"</a>"}})}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(r){"use strict";(r=r&&r.hasOwnProperty("default")?r["default"]:r).URLRegEx="(^| |\\u00A0)("+r.LinkRegEx+"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$",r.PLUGINS.url=function(i){var l=i.$,a=null;function t(e,t,n){for(var r="";n.length&&"."==n[n.length-1];)r+=".",n=n.substring(0,n.length-1);var o=n;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(o)&&!/^mailto:.*/i.test(o)&&(o="mailto:"+o);else if(i.helpers.isEmail(o))return t+n;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(o)||(o="//"+o),(t||"")+"<a"+(i.opts.linkAlwaysBlank?' target="_blank"':"")+(a?' rel="'+a+'"':"")+' data-fr-linked="true" href="'+o+'">'+n.replace(/&/g,"&").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")+"</a>"+r}function s(){return new RegExp(r.URLRegEx,"gi")}function p(e){return i.opts.linkAlwaysNoFollow&&(a="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(a?a+=" noopener":a="noopener"),i.opts.linkNoReferrer&&(a?a+=" noreferrer":a="noreferrer")),e.replace(s(),t)}function f(e){var t=e.split(" ");return t[t.length-1]}function n(){var e=i.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function o(e){return!!e&&("A"===e.tagName||!(!e.parentNode||e.parentNode==i.el)&&o(e.parentNode))}(t))return!1;if(s().test(f(t.textContent))){l(t).before(p(t.textContent));var n=l(t.parentNode).find("a[data-fr-linked]");n.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),i.events.trigger("url.linked",[n.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var r=t.previousSibling.innerText+t.textContent;s().test(f(r))&&(l(t.previousSibling).replaceWith(p(r)),t.parentNode.removeChild(t))}}return{_init:function e(){i.events.on("keypress",function(e){!i.selection.isCollapsed()||"."!=e.key&&")"!=e.key&&"("!=e.key||n()},!0),i.events.on("keydown",function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||n()},!0),i.events.on("paste.beforeCleanup",function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a"+(i.opts.linkAlwaysBlank?' target="_blank"':"")+(t?' rel="'+t+'"':"")+' href="'+e+'" >'+e+"</a>"}})}}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(Q){"use strict";Q=Q&&Q.hasOwnProperty("default")?Q["default"]:Q,Object.assign(Q.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(Q.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize"],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,videoUploadURL:null}),Q.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"}],Q.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,Q.PLUGINS.video=function(p){var a,f,v,u,o,i,c=p.$,d="https://i.froala.com/upload",l=2,h=3,g=4,m=5,b=6,r={};function y(){var e=p.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 s(){var e=p.popups.get("video.edit");if(e||(e=function(){var e="";if(0<p.opts.videoEditButtons.length){p.opts.videoResponsive&&(-1<p.opts.videoEditButtons.indexOf("videoSize")&&p.opts.videoEditButtons.splice(p.opts.videoEditButtons.indexOf("videoSize"),1),-1<p.opts.videoEditButtons.indexOf("videoDisplay")&&p.opts.videoEditButtons.splice(p.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<p.opts.videoEditButtons.indexOf("videoAlign")&&p.opts.videoEditButtons.splice(p.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(p.button.buildList(p.opts.videoEditButtons)," \n </div>")},i=p.popups.create("video.edit",t);return p.events.$on(p.$wp,"scroll.video-edit",function(){u&&p.popups.isVisible("video.edit")&&(p.events.disableBlur(),R(u))}),i}return!1}()),e){p.popups.setContainer("video.edit",p.$sc),p.popups.refresh("video.edit");var t=u.find("iframe, embed, video"),i=t.offset().left+t.outerWidth()/2,o=t.offset().top+t.outerHeight();p.popups.show("video.edit",i,o,t.outerHeight(),!0)}}function n(e){if(e)return p.popups.onRefresh("video.insert",y),p.popups.onHide("video.insert",j),!0;var t="";p.opts.videoUpload||-1===p.opts.videoInsertButtons.indexOf("videoUpload")||p.opts.videoInsertButtons.splice(p.opts.videoInsertButtons.indexOf("videoUpload"),1);var i=p.button.buildList(p.opts.videoInsertButtons);""!==i&&(t='<div class="fr-buttons">'+i+"</div>");var o,r="",s=p.opts.videoInsertButtons.indexOf("videoUpload"),n=p.opts.videoInsertButtons.indexOf("videoByURL"),a=p.opts.videoInsertButtons.indexOf("videoEmbed");0<=n&&(o=" fr-active",(s<n&&0<=s||a<n&&0<=a)&&(o=""),r='<div class="fr-video-by-url-layer fr-layer'+o+'" id="fr-video-by-url-layer-'+p.id+'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-'+p.id+'" type="text" placeholder="'+p.language.translate("Paste in a video URL")+'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">'+p.language.translate("Insert")+"</button></div></div>");var d="";0<=a&&(o=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(o=""),d='<div class="fr-video-embed-layer fr-layer'+o+'" id="fr-video-embed-layer-'+p.id+'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text'+p.id+'" type="text" placeholder="'+p.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">'+p.language.translate("Insert")+"</button></div></div>");var l="";0<=s&&(o=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(o=""),l='<div class="fr-video-upload-layer fr-layer'+o+'" id="fr-video-upload-layer-'+p.id+'"><strong>'+p.language.translate("Drop video")+"</strong><br>("+p.language.translate("or click")+')<div class="fr-form"><input type="file" accept="video/'+p.opts.videoAllowedTypes.join(", video/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-'+p.id+'" role="button"></div></div>');var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},v=p.popups.create("video.insert",f);return function(o){p.events.$on(o,"dragover dragenter",".fr-video-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),p.events.$on(o,"dragleave dragend",".fr-video-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),p.events.$on(o,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),c(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var i=o.data("instance")||p;i.events.disableBlur(),i.video.upload(t.files),i.events.enableBlur()}},!0),p.helpers.isIOS()&&p.events.$on(o,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0);p.events.$on(o,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=o.data("instance")||p;e.events.disableBlur(),o.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}c(this).val("")},!0)}(v),v}function w(e){p.events.focus(!0),p.selection.restore();var t=!1;u&&(W(),t=!0),p.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video">'+e+"</span>",!1,p.opts.videoSplitHTML),p.popups.hide("video.insert");var i=p.$el.find(".fr-jiv");i.removeClass("fr-jiv"),i.toggleClass("fr-rv",p.opts.videoResponsive),q(i,p.opts.videoDefaultDisplay,p.opts.videoDefaultAlign),i.toggleClass("fr-draggable",p.opts.videoMove),p.events.trigger(t?"video.replaced":"video.inserted",[i])}function E(){var e=c(this);p.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),R(e.parent()),p.events.trigger("video.loaded",[e.parent()])}function C(a,e,d,l,f){p.edit.off(),A("Loading video"),e&&(a=p.helpers.sanitizeURL(a));_("Loading video"),function(){var e,t;if(l){p.undo.canDo()||l.find("video").hasClass("fr-uploading")||p.undo.saveStep();var i=l.find("video").data("fr-old-src"),o=l.data("fr-replaced");l.data("fr-replaced",!1),p.$wp?((e=l.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),i&&l.find("video").attr("src",i),l.replaceWith(e)):e=l;for(var r=e.find("video").get(0).attributes,s=0;s<r.length;s++){var n=r[s];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==d)for(t in d)d.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-"+t,d[t]);e.find("video").on("canplay",E),e.find("video").attr("src",a),p.edit.on(),z(),p.undo.saveStep(),p.$el.blur(),p.events.trigger(o?"video.replaced":"video.inserted",[e,f])}else e=function(e,t,i){var o,r="";if(t&&void 0!==t)for(o in t)t.hasOwnProperty(o)&&"link"!=o&&(r+=" data-"+o+'="'+t[o]+'"');var s=p.opts.videoDefaultWidth;s&&"auto"!=s&&(s+="px");var n=c(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+p.opts.videoDefaultDisplay[0]+("center"!=p.opts.videoDefaultAlign?" fr-fv"+p.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(s?' style="width: '+s+';" ':"")+" controls>"+p.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",p.opts.videoMove),p.edit.on(),p.events.focus(!0),p.selection.restore(),p.undo.saveStep(),p.opts.videoSplitHTML?p.markers.split():p.markers.insert(),p.html.wrap();var a=p.$el.find(".fr-marker");return p.node.isLastSibling(a)&&a.parent().hasClass("fr-deletable")&&a.insertAfter(a.parent()),a.replaceWith(n),p.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||p.helpers.isIOS()?i.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",i),n}(a,d,E),z(),p.undo.saveStep(),p.events.trigger("video.inserted",[e,f])}()}function _(e){var t=p.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),u){var i=u.find("video");p.popups.setContainer("video.insert",p.$sc);var o=i.offset().left,r=i.offset().top+i.height();p.popups.show("video.insert",o,r,i.outerHeight())}void 0===e&&A(p.language.translate("Uploading"),0)}function S(e){var t=p.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||p.$el.find("video.fr-error").length)){if(p.events.focus(),p.$el.find("video.fr-error").length&&(p.$el.find("video.fr-error").parent().remove(),p.undo.saveStep(),p.undo.run(),p.undo.dropRedo()),!p.$wp&&u){var i=u;M(!0),p.selection.setAfter(i.find("video").get(0)),p.selection.restore()}p.popups.hide("video.insert")}}function A(e,t){var i=p.popups.get("video.insert");if(i){var o=i.find(".fr-video-progress-bar-layer");o.find("h3").text(e+(t?" "+t+"%":"")),o.removeClass("fr-error"),t?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width",t+"%")):o.find("div").addClass("fr-indeterminate")}}function x(e){_();var t=p.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),p.events.disableBlur(),i.focus()}function R(e){t.call(e.get(0))}function D(e){A("Loading video");var t=this.status,i=this.response,o=this.responseXML,r=this.responseText;try{if(p.opts.videoUploadToS3)if(201==t){var s=function(e){try{var t=c(e).find("Location").text(),i=c(e).find("Key").text();return!1===p.events.trigger("video.uploadedToS3",[t,i,e],!0)?(p.edit.on(),!1):t}catch(o){return K(g,e),!1}}(o);s&&C(s,!1,[],e,i||o)}else K(g,i||o);else if(200<=t&&t<300){var n=function(e){try{if(!1===p.events.trigger("video.uploaded",[e],!0))return p.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(K(l,e),!1)}catch(i){return K(g,e),!1}}(r);n&&C(n.link,!1,n,e,i||r)}else K(h,i||r)}catch(a){K(g,i||r)}}function U(){K(g,this.response||this.responseText||this.responseXML)}function B(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;A(p.language.translate("Uploading"),t)}}function $(){p.edit.on(),S(!0)}function I(e){if(!p.core.sameInstance(v))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),i=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!i)return!1;if("mousedown"==e.type){var o=p.$oel.get(0).ownerDocument,r=o.defaultView||o.parentWindow,s=!1;try{s=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}s&&r.frameElement&&(t+=p.helpers.getPX(c(r.frameElement).offset().left)+r.frameElement.clientLeft,i=e.clientY+p.helpers.getPX(c(r.frameElement).offset().top)+r.frameElement.clientTop)}p.undo.canDo()||p.undo.saveStep(),(f=c(this)).data("start-x",t),f.data("start-y",i),a.show(),p.popups.hideAll(),V()}function k(e){if(!p.core.sameInstance(v))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),i=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!i)return!1;var o=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",i);var s=t-o,n=i-r,a=u.find("iframe, embed, video"),d=a.width(),l=a.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(s=0-s),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(n=0-n),a.css("width",d+s),a.css("height",l+n),a.removeAttr("width"),a.removeAttr("height"),T()}}function O(e){if(!p.core.sameInstance(v))return!0;f&&u&&(e&&e.stopPropagation(),f=null,a.hide(),T(),s(),p.undo.saveStep())}function L(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function P(e,t,i,o){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+i*Math.floor(Math.pow(1.1,o)),e.pageY=e.pageY+i*Math.floor(Math.pow(1.1,o)),k.call(this,e),O.call(this,e),++o}function z(){var e,t=Array.prototype.slice.call(p.el.querySelectorAll("video, .fr-video > *")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("src")),c(t[e]).toggleClass("fr-draggable",p.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(o)for(e=0;e<o.length;e++)i.indexOf(o[e].getAttribute("src"))<0&&p.events.trigger("video.removed",[c(o[e])]);o=t}function T(){v||function(){var e;if(p.shared.$video_resizer?(v=p.shared.$video_resizer,a=p.shared.$vid_overlay,p.events.on("destroy",function(){c("body").first().append(v.removeClass("fr-active"))},!0)):(p.shared.$video_resizer=c(document.createElement("div")).attr("class","fr-video-resizer"),v=p.shared.$video_resizer,p.events.$on(v,"mousedown",function(e){e.stopPropagation()},!0),p.opts.videoResize&&(v.append(L("nw")+L("ne")+L("sw")+L("se")),p.shared.$vid_overlay=c(document.createElement("div")).attr("class","fr-video-overlay"),a=p.shared.$vid_overlay,e=v.get(0).ownerDocument,c(e).find("body").first().append(a))),p.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null,p.opts.videoResize&&(a.remove(),a=null)},!0),p.helpers.isMobile()||p.events.$on(c(p.o_win),"resize.video",function(){M(!0)}),p.opts.videoResize){e=v.get(0).ownerDocument,p.events.$on(v,p._mousedown,".fr-handler",I),p.events.$on(c(e),p._mousemove,k),p.events.$on(c(e.defaultView||e.parentWindow),p._mouseup,O),p.events.$on(a,"mouseleave",O);var o=1,r=null,s=0;p.events.on("keydown",function(e){if(u){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,i=e.which;(i!==r||200<e.timeStamp-s)&&(o=1),(i==Q.KEYCODE.EQUALS||p.browser.mozilla&&i==Q.KEYCODE.FF_EQUALS)&&t&&!e.altKey?o=P.call(this,e,1,1,o):(i==Q.KEYCODE.HYPHEN||p.browser.mozilla&&i==Q.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(o=P.call(this,e,2,-1,o)),r=i,s=e.timeStamp}}),p.events.on("keyup",function(){o=1})}}(),(p.$wp||p.$sc).append(v),v.data("instance",p);var e=u.find("iframe, embed, video"),t=0,i=0;p.opts.iframe&&(i=p.helpers.getPX(p.$wp.find(".fr-iframe").css("padding-top")),t=p.helpers.getPX(p.$wp.find(".fr-iframe").css("padding-left"))),v.css("top",(p.opts.iframe?e.offset().top+i-1:e.offset().top-p.$wp.offset().top-1)+p.$wp.scrollTop()).css("left",(p.opts.iframe?e.offset().left+t-1:e.offset().left-p.$wp.offset().left-1)+p.$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&&i)return!0;if(e&&p.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(p.edit.isDisabled())return!1;for(var t=0;t<Q.INSTANCES.length;t++)Q.INSTANCES[t]!=p&&Q.INSTANCES[t].events.trigger("video.hideResizer");p.toolbar.disable(),p.helpers.isMobile()&&(p.events.disableBlur(),p.$el.blur(),p.events.enableBlur()),p.$el.find(".fr-video.fr-active").removeClass("fr-active"),(u=c(this)).addClass("fr-active"),p.opts.iframe&&p.size.syncIframe(),J(),T(),s(),p.selection.clear(),p.button.bulkRefresh(),p.events.trigger("image.hideResizer")}function M(e){u&&(p.shared.vid_exit_flag||!0===e)&&(v.removeClass("fr-active"),p.toolbar.enable(),u.removeClass("fr-active"),u=null,V())}function e(){p.shared.vid_exit_flag=!0}function V(){p.shared.vid_exit_flag=!1}function Y(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var i=t.files[0];if(i&&i.type&&-1!==i.type.indexOf("video")){if(!p.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;p.markers.remove(),p.markers.insertAtPoint(e.originalEvent),p.$el.find(".fr-marker").replaceWith(Q.MARKERS),p.popups.hideAll();var o=p.popups.get("video.insert");return o||(o=n()),p.popups.setContainer("video.insert",p.$sc),p.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),_(),0<=p.opts.videoAllowedTypes.indexOf(i.type.replace(/video\//g,""))?N(t.files):K(b),e.preventDefault(),e.stopPropagation(),!1}}}function N(e){if(void 0!==e&&0<e.length){if(!1===p.events.trigger("video.beforeUpload",[e]))return!1;var t,i=e[0];if((null===p.opts.videoUploadURL||p.opts.videoUploadURL==d)&&!p.opts.videoUploadToS3)return function(o){u&&u.find("iframe")&&u.find("iframe").length&&W();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));C(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:o.type})),!1,null,u)},_(),r.readAsDataURL(o)}(i),!1;if(i.size>p.opts.videoMaxSize)return K(m),!1;if(p.opts.videoAllowedTypes.indexOf(i.type.replace(/video\//g,""))<0)return K(b),!1;if(p.drag_support.formdata&&(t=p.drag_support.formdata?new FormData:null),t){var o;if(!1!==p.opts.videoUploadToS3)for(o in t.append("key",p.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",i.type),p.opts.videoUploadToS3.params)p.opts.videoUploadToS3.params.hasOwnProperty(o)&&t.append(o,p.opts.videoUploadToS3.params[o]);for(o in p.opts.videoUploadParams)p.opts.videoUploadParams.hasOwnProperty(o)&&t.append(o,p.opts.videoUploadParams[o]);t.append(p.opts.videoUploadParam,i);var r=p.opts.videoUploadURL;p.opts.videoUploadToS3&&(r=p.opts.videoUploadToS3.uploadURL?p.opts.videoUploadToS3.uploadURL:"https://"+p.opts.videoUploadToS3.region+".amazonaws.com/"+p.opts.videoUploadToS3.bucket);var s=p.core.getXHR(r,p.opts.videoUploadMethod);s.onload=function(){D.call(s,u)},s.onerror=U,s.upload.onprogress=B,s.onabort=$,_(),p.events.disableBlur(),p.edit.off(),p.events.enableBlur();var n=p.popups.get("video.insert");n&&c(n.off("abortUpload")).on("abortUpload",function(){4!=s.readyState&&s.abort()}),s.send(t)}}}function K(e,t){p.edit.on(),u&&u.find("video").addClass("fr-error"),x(p.language.translate("Something went wrong. Please try again.")),p.events.trigger("video.error",[{code:e,message:r[e]},t])}function X(){if(u){var e=p.popups.get("video.size"),t=u.find("iframe, embed, 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 H(e){if(e)return p.popups.onRefresh("video.size",X),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+p.button.buildList(p.opts.videoSizeButtons)+"</div>",size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'+p.id+'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-'+p.id+'" type="text" name="width" placeholder="'+p.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-'+p.id+'" type="text" name="height" placeholder="'+p.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">'+p.language.translate("Update")+"</button></div></div>"},i=p.popups.create("video.size",t);return p.events.$on(p.$wp,"scroll",function(){u&&p.popups.isVisible("video.size")&&(p.events.disableBlur(),R(u))}),i}function G(e){if(void 0===e&&(e=u),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 F(e){void 0===e&&(e=u);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 W(){if(u&&!1!==p.events.trigger("video.beforeRemove",[u])){var e=u;p.popups.hideAll(),M(!0),p.selection.setBefore(e.get(0))||p.selection.setAfter(e.get(0)),e.remove(),p.selection.restore(),p.html.fillEmptyBlocks()}}function j(){S()}function q(e,t,i){!p.opts.htmlUntouched&&p.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv"+i[0]+" fr-dv"+t[0])):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function Z(){var e=p.$el.find("video").filter(function(){return 0===c(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(c(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false")),p.$el.find("embed, iframe").filter(function(){if(p.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<c(this).parents("span.fr-video").length)return!1;for(var e=c(this).attr("src"),t=0;t<Q.VIDEO_PROVIDERS.length;t++){var i=Q.VIDEO_PROVIDERS[t];if(i.test_regex.test(e)&&new RegExp(p.opts.videoAllowedProviders.join("|")).test(i.provider))return!0}return!1}).map(function(){return 0===c(this).parents("object").length?this:c(this).parents("object").get(0)}).wrap(c(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,i,o=p.$el.find("span.fr-video, video"),r=0;r<o.length;r++){var s=c(o[r]);!p.opts.htmlUntouched&&p.opts.useClasses?((i=s).hasClass("fr-dvi")||i.hasClass("fr-dvb")||(i.addClass("fr-fv"+G(i)[0]),i.addClass("fr-dv"+F(i)[0])),p.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):p.opts.htmlUntouched||p.opts.useClasses||(q(t=s,t.hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":G(t)),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}o.toggleClass("fr-draggable",p.opts.videoMove)}}function J(){if(u){p.selection.clear();var e=p.doc.createRange();e.selectNode(u.get(0)),p.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[l]="No link in upload response.",r[h]="Error during file upload.",r[g]="Parsing response failed.",r[m]="File is too large.",r[b]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",p.shared.vid_exit_flag=!1,{_init:function(){p.opts.videoResponsive&&(p.opts.videoResize=!1),p.events.on("drop",Y,!0),p.events.on("mousedown window.mousedown",e),p.events.on("window.touchmove",V),p.events.on("mouseup window.mouseup",M),p.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),p.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)}),p.helpers.isMobile()&&(p.events.$on(p.$el,"touchstart","span.fr-video",function(){i=!1}),p.events.$on(p.$el,"touchmove",function(){i=!0})),p.events.on("html.set",Z),Z(),p.events.$on(p.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(p.browser.msie||p.browser.edge)&&(e.target.dragDrop(),t.call(this,e))}),p.events.$on(p.$el,"click touchend","span.fr-video",function(e){if("false"==c(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),p.events.on("keydown",function(e){var t=e.which;return!u||t!=Q.KEYCODE.BACKSPACE&&t!=Q.KEYCODE.DELETE?u&&t==Q.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):u&&t!=Q.KEYCODE.F10&&!p.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),W(),p.undo.saveStep(),!1)},!0),p.events.on("toolbar.esc",function(){if(u)return p.events.disableBlur(),p.events.focus(),!1},!0),p.events.on("toolbar.focusEditor",function(){if(u)return!1},!0),p.events.on("keydown",function(){p.$el.find("span.fr-video:empty").remove()}),p.$wp&&(z(),p.events.on("contentChanged",z)),n(!0),H(!0)},showInsertPopup:function(){var e=p.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=p.popups.get("video.insert");if(t||(t=n()),S(),!t.hasClass("fr-active"))if(p.popups.refresh("video.insert"),p.popups.setContainer("video.insert",p.$tb),e.isVisible()){var i=p.button.getPosition(e),o=i.left,r=i.top;p.popups.show("video.insert",o,r,e.outerHeight())}else p.position.forSelection(t),p.popups.show("video.insert")},showLayer:function(e){var t,i,o=p.popups.get("video.insert");if(!u&&!p.opts.toolbarInline){var r=p.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,i=r.offset().top+(p.opts.toolbarBottom?10:r.outerHeight()-10)}p.opts.toolbarInline&&(i=o.offset().top-p.helpers.getPX(o.css("margin-top")),o.hasClass("fr-above")&&(i+=o.outerHeight())),o.find(".fr-layer").removeClass("fr-active"),o.find(".fr-"+e+"-layer").addClass("fr-active"),p.popups.show("video.insert",t,i,0),p.accessibility.focusPopup(o)},refreshByURLButton:function(e){var t=p.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(e){var t=p.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function(e){var t=p.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:N,insertByURL:function(e){void 0===e&&(e=(p.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var t=null;if(/^http/.test(e)||(e="https://"+e),p.helpers.isURL(e))for(var i=0;i<Q.VIDEO_PROVIDERS.length;i++){var o=Q.VIDEO_PROVIDERS[i];if(o.test_regex.test(e)&&new RegExp(p.opts.videoAllowedProviders.join("|")).test(o.provider)){t=e.replace(o.url_regex,o.url_text),t=o.html.replace(/\{url\}/,t);break}}t?w(t):(x(p.language.translate("Something went wrong. Please try again.")),p.events.trigger("video.linkError",[e]))},insertEmbed:function(e){void 0===e&&(e=p.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&Q.VIDEO_EMBED_REGEX.test(e)?w(e):(x(p.language.translate("Something went wrong. Please try again.")),p.events.trigger("video.codeError",[e]))},insert:w,align:function(e){u.removeClass("fr-fvr fr-fvl"),!p.opts.htmlUntouched&&p.opts.useClasses?"left"==e?u.addClass("fr-fvl"):"right"==e&&u.addClass("fr-fvr"):q(u,F(),e),J(),T(),s(),p.selection.clear()},refreshAlign:function(e){if(!u)return!1;e.find(">*").first().replaceWith(p.icon.create("video-align-"+G()))},refreshAlignOnShow:function(e,t){u&&t.find('.fr-command[data-param1="'+G()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function(e){u.removeClass("fr-dvi fr-dvb"),!p.opts.htmlUntouched&&p.opts.useClasses?"inline"==e?u.addClass("fr-dvi"):"block"==e&&u.addClass("fr-dvb"):q(u,e,G()),J(),T(),s(),p.selection.clear()},refreshDisplayOnShow:function(e,t){u&&t.find('.fr-command[data-param1="'+F()+'"]').addClass("fr-active").attr("aria-selected",!0)},remove:W,hideProgressBar:S,showSizePopup:function(){var e=p.popups.get("video.size");e||(e=H()),S(),p.popups.refresh("video.size"),p.popups.setContainer("video.size",p.$sc);var t=u.find("iframe, embed, video"),i=t.offset().left+t.outerWidth()/2,o=t.offset().top+t.height();p.popups.show("video.size",i,o,t.height(),!0)},replace:function(){var e=p.popups.get("video.insert");e||(e=n()),p.popups.isVisible("video.insert")||(S(),p.popups.refresh("video.insert"),p.popups.setContainer("video.insert",p.$sc));var t=u.offset().left+u.outerWidth()/2,i=u.offset().top+u.height();p.popups.show("video.insert",t,i,u.outerHeight(),!0)},back:function(){u?(p.events.disableBlur(),u[0].click()):(p.events.disableBlur(),p.selection.restore(),p.events.enableBlur(),p.popups.hide("video.insert"),p.toolbar.showInline())},setSize:function(e,t){if(u){var i=p.popups.get("video.size"),o=u.find("iframe, embed, video");o.css("width",e||i.find('input[name="width"]').val()),o.css("height",t||i.find('input[name="height"]').val()),o.get(0).style.width&&o.removeAttr("width"),o.get(0).style.height&&o.removeAttr("height"),i.find("input:focus").blur(),setTimeout(function(){u.trigger("click")},p.helpers.isAndroid()?50:0)}},get:function(){return u},showProgressBar:_}},Q.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"}),Q.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),Q.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),Q.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)}}),Q.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),Q.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)}}),Q.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),Q.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)}}),Q.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),Q.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),Q.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),Q.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)}}),Q.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),Q.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),Q.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),Q.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),Q.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),Q.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=Q.COMMANDS.videoAlign.options;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'+i+'" title="'+this.language.translate(t[i])+'">'+this.icon.create("video-align-"+i)+'<span class="fr-sr-only">'+this.language.translate(t[i])+"</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)}}),Q.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),Q.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),Q.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),Q.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),Q.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),Q.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),Q.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),Q.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"))}}),Q.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),Q.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})}); | ||
!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(me){"use strict";me=me&&me.hasOwnProperty("default")?me["default"]:me,Object.assign(me.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(me.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize"],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,videoUploadURL:null}),me.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"}],me.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,me.PLUGINS.video=function(u){var a,f,v,p,o,i,c=u.$,d="https://i.froala.com/upload",h=2,g=3,m=4,l=5,b=6,r={};function y(){var e=u.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 s(){var e=u.popups.get("video.edit");if(e||(e=function r(){var e="";if(0<u.opts.videoEditButtons.length){u.opts.videoResponsive&&(-1<u.opts.videoEditButtons.indexOf("videoSize")&&u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoSize"),1),-1<u.opts.videoEditButtons.indexOf("videoDisplay")&&u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<u.opts.videoEditButtons.indexOf("videoAlign")&&u.opts.videoEditButtons.splice(u.opts.videoEditButtons.indexOf("videoAlign"),1));var t={buttons:e+='<div class="fr-buttons"> \n '.concat(u.button.buildList(u.opts.videoEditButtons)," \n </div>")},i=u.popups.create("video.edit",t);return u.events.$on(u.$wp,"scroll.video-edit",function(){p&&u.popups.isVisible("video.edit")&&(u.events.disableBlur(),R(p))}),i}return!1}()),e){u.popups.setContainer("video.edit",u.$sc),u.popups.refresh("video.edit");var t=p.find("iframe, embed, video"),i=t.offset().left+t.outerWidth()/2,o=t.offset().top+t.outerHeight();u.popups.show("video.edit",i,o,t.outerHeight(),!0)}}function n(e){if(e)return u.popups.onRefresh("video.insert",y),u.popups.onHide("video.insert",q),!0;var t="";u.opts.videoUpload||-1===u.opts.videoInsertButtons.indexOf("videoUpload")||u.opts.videoInsertButtons.splice(u.opts.videoInsertButtons.indexOf("videoUpload"),1);var i=u.button.buildList(u.opts.videoInsertButtons);""!==i&&(t='<div class="fr-buttons">'+i+"</div>");var o,r="",s=u.opts.videoInsertButtons.indexOf("videoUpload"),n=u.opts.videoInsertButtons.indexOf("videoByURL"),a=u.opts.videoInsertButtons.indexOf("videoEmbed");0<=n&&(o=" fr-active",(s<n&&0<=s||a<n&&0<=a)&&(o=""),r='<div class="fr-video-by-url-layer fr-layer'+o+'" id="fr-video-by-url-layer-'+u.id+'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-'+u.id+'" type="text" placeholder="'+u.language.translate("Paste in a video URL")+'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">'+u.language.translate("Insert")+"</button></div></div>");var d="";0<=a&&(o=" fr-active",(s<a&&0<=s||n<a&&0<=n)&&(o=""),d='<div class="fr-video-embed-layer fr-layer'+o+'" id="fr-video-embed-layer-'+u.id+'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text'+u.id+'" type="text" placeholder="'+u.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">'+u.language.translate("Insert")+"</button></div></div>");var l="";0<=s&&(o=" fr-active",(a<s&&0<=a||n<s&&0<=n)&&(o=""),l='<div class="fr-video-upload-layer fr-layer'+o+'" id="fr-video-upload-layer-'+u.id+'"><strong>'+u.language.translate("Drop video")+"</strong><br>("+u.language.translate("or click")+')<div class="fr-form"><input type="file" accept="video/'+u.opts.videoAllowedTypes.join(", video/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-'+u.id+'" role="button"></div></div>');var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},v=u.popups.create("video.insert",f);return function p(o){u.events.$on(o,"dragover dragenter",".fr-video-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),u.events.$on(o,"dragleave dragend",".fr-video-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),u.events.$on(o,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),c(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var i=o.data("instance")||u;i.events.disableBlur(),i.video.upload(t.files),i.events.enableBlur()}},!0),u.helpers.isIOS()&&u.events.$on(o,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0);u.events.$on(o,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=o.data("instance")||u;e.events.disableBlur(),o.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}c(this).val("")},!0)}(v),v}function w(e){u.events.focus(!0),u.selection.restore();var t=!1;p&&(j(),t=!0),u.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video">'+e+"</span>",!1,u.opts.videoSplitHTML),u.popups.hide("video.insert");var i=u.$el.find(".fr-jiv");i.removeClass("fr-jiv"),i.toggleClass("fr-rv",u.opts.videoResponsive),Z(i,u.opts.videoDefaultDisplay,u.opts.videoDefaultAlign),i.toggleClass("fr-draggable",u.opts.videoMove),u.events.trigger(t?"video.replaced":"video.inserted",[i])}function E(){var e=c(this);u.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),R(e.parent()),u.events.trigger("video.loaded",[e.parent()])}function C(a,e,l,f,v){u.edit.off(),A("Loading video"),e&&(a=u.helpers.sanitizeURL(a));var p=function p(){var e,t;if(f){u.undo.canDo()||f.find("video").hasClass("fr-uploading")||u.undo.saveStep();var i=f.find("video").data("fr-old-src"),o=f.data("fr-replaced");f.data("fr-replaced",!1),u.$wp?((e=f.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),i&&f.find("video").attr("src",i),f.replaceWith(e)):e=f;for(var r=e.find("video").get(0).attributes,s=0;s<r.length;s++){var n=r[s];0===n.nodeName.indexOf("data-")&&e.find("video").removeAttr(n.nodeName)}if(void 0!==l)for(t in l)l.hasOwnProperty(t)&&"link"!=t&&e.find("video").attr("data-"+t,l[t]);e.find("video").on("canplay",E),e.find("video").attr("src",a),u.edit.on(),z(),u.undo.saveStep(),u.$el.blur(),u.events.trigger(o?"video.replaced":"video.inserted",[e,v])}else e=function d(e,t,i){var o,r="";if(t&&void 0!==t)for(o in t)t.hasOwnProperty(o)&&"link"!=o&&(r+=" data-"+o+'="'+t[o]+'"');var s=u.opts.videoDefaultWidth;s&&"auto"!=s&&(s+="px");var n=c(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+u.opts.videoDefaultDisplay[0]+("center"!=u.opts.videoDefaultAlign?" fr-fv"+u.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+r+(s?' style="width: '+s+';" ':"")+" controls>"+u.language.translate("Your browser does not support HTML5 video.")+"</video>");n.toggleClass("fr-draggable",u.opts.videoMove),u.edit.on(),u.events.focus(!0),u.selection.restore(),u.undo.saveStep(),u.opts.videoSplitHTML?u.markers.split():u.markers.insert();u.html.wrap();var a=u.$el.find(".fr-marker");u.node.isLastSibling(a)&&a.parent().hasClass("fr-deletable")&&a.insertAfter(a.parent());a.replaceWith(n),u.selection.clear(),n.find("video").get(0).readyState>n.find("video").get(0).HAVE_FUTURE_DATA||u.helpers.isIOS()?i.call(n.find("video").get(0)):n.find("video").on("canplaythrough load",i);return n}(a,l,E),z(),u.undo.saveStep(),u.events.trigger("video.inserted",[e,v])};_("Loading video"),p()}function _(e){var t=u.popups.get("video.insert");if(t||(t=n()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-video-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),p){var i=p.find("video");u.popups.setContainer("video.insert",u.$sc);var o=i.offset().left,r=i.offset().top+i.height();u.popups.show("video.insert",o,r,i.outerHeight())}void 0===e&&A(u.language.translate("Uploading"),0)}function S(e){var t=u.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||u.$el.find("video.fr-error").length)){if(u.events.focus(),u.$el.find("video.fr-error").length&&(u.$el.find("video.fr-error").parent().remove(),u.undo.saveStep(),u.undo.run(),u.undo.dropRedo()),!u.$wp&&p){var i=p;M(!0),u.selection.setAfter(i.find("video").get(0)),u.selection.restore()}u.popups.hide("video.insert")}}function A(e,t){var i=u.popups.get("video.insert");if(i){var o=i.find(".fr-video-progress-bar-layer");o.find("h3").text(e+(t?" "+t+"%":"")),o.removeClass("fr-error"),t?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width",t+"%")):o.find("div").addClass("fr-indeterminate")}}function x(e){_();var t=u.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var i=t.find("h3");i.text(e),u.events.disableBlur(),i.focus()}function R(e){t.call(e.get(0))}function D(e){A("Loading video");var t=this.status,i=this.response,o=this.responseXML,r=this.responseText;try{if(u.opts.videoUploadToS3)if(201==t){var s=function a(e){try{var t=c(e).find("Location").text(),i=c(e).find("Key").text();return!1===u.events.trigger("video.uploadedToS3",[t,i,e],!0)?(u.edit.on(),!1):t}catch(o){return X(m,e),!1}}(o);s&&C(s,!1,[],e,i||o)}else X(m,i||o);else if(200<=t&&t<300){var n=function d(e){try{if(!1===u.events.trigger("video.uploaded",[e],!0))return u.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(X(h,e),!1)}catch(i){return X(m,e),!1}}(r);n&&C(n.link,!1,n,e,i||r)}else X(g,i||r)}catch(l){X(m,i||r)}}function U(){X(m,this.response||this.responseText||this.responseXML)}function B(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;A(u.language.translate("Uploading"),t)}}function $(){u.edit.on(),S(!0)}function I(e){if(!u.core.sameInstance(v))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),i=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!i)return!1;if("mousedown"==e.type){var o=u.$oel.get(0).ownerDocument,r=o.defaultView||o.parentWindow,s=!1;try{s=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(n){}s&&r.frameElement&&(t+=u.helpers.getPX(c(r.frameElement).offset().left)+r.frameElement.clientLeft,i=e.clientY+u.helpers.getPX(c(r.frameElement).offset().top)+r.frameElement.clientTop)}u.undo.canDo()||u.undo.saveStep(),(f=c(this)).data("start-x",t),f.data("start-y",i),a.show(),u.popups.hideAll(),Y()}function k(e){if(!u.core.sameInstance(v))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),i=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!i)return!1;var o=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",i);var s=t-o,n=i-r,a=p.find("iframe, embed, video"),d=a.width(),l=a.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(s=0-s),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(n=0-n),a.css("width",d+s),a.css("height",l+n),a.removeAttr("width"),a.removeAttr("height"),T()}}function O(e){if(!u.core.sameInstance(v))return!0;f&&p&&(e&&e.stopPropagation(),f=null,a.hide(),T(),s(),u.undo.saveStep())}function L(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function P(e,t,i,o){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+i*Math.floor(Math.pow(1.1,o)),e.pageY=e.pageY+i*Math.floor(Math.pow(1.1,o)),k.call(this,e),O.call(this,e),++o}function z(){var e,t=Array.prototype.slice.call(u.el.querySelectorAll("video, .fr-video > *")),i=[];for(e=0;e<t.length;e++)i.push(t[e].getAttribute("src")),c(t[e]).toggleClass("fr-draggable",u.opts.videoMove),""===t[e].getAttribute("class")&&t[e].removeAttribute("class"),""===t[e].getAttribute("style")&&t[e].removeAttribute("style");if(o)for(e=0;e<o.length;e++)i.indexOf(o[e].getAttribute("src"))<0&&u.events.trigger("video.removed",[c(o[e])]);o=t}function T(){v||function n(){var e;if(u.shared.$video_resizer?(v=u.shared.$video_resizer,a=u.shared.$vid_overlay,u.events.on("destroy",function(){c("body").first().append(v.removeClass("fr-active"))},!0)):(u.shared.$video_resizer=c(document.createElement("div")).attr("class","fr-video-resizer"),v=u.shared.$video_resizer,u.events.$on(v,"mousedown",function(e){e.stopPropagation()},!0),u.opts.videoResize&&(v.append(L("nw")+L("ne")+L("sw")+L("se")),u.shared.$vid_overlay=c(document.createElement("div")).attr("class","fr-video-overlay"),a=u.shared.$vid_overlay,e=v.get(0).ownerDocument,c(e).find("body").first().append(a))),u.events.on("shared.destroy",function(){v.html("").removeData().remove(),v=null,u.opts.videoResize&&(a.remove(),a=null)},!0),u.helpers.isMobile()||u.events.$on(c(u.o_win),"resize.video",function(){M(!0)}),u.opts.videoResize){e=v.get(0).ownerDocument,u.events.$on(v,u._mousedown,".fr-handler",I),u.events.$on(c(e),u._mousemove,k),u.events.$on(c(e.defaultView||e.parentWindow),u._mouseup,O),u.events.$on(a,"mouseleave",O);var o=1,r=null,s=0;u.events.on("keydown",function(e){if(p){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,i=e.which;(i!==r||200<e.timeStamp-s)&&(o=1),(i==me.KEYCODE.EQUALS||u.browser.mozilla&&i==me.KEYCODE.FF_EQUALS)&&t&&!e.altKey?o=P.call(this,e,1,1,o):(i==me.KEYCODE.HYPHEN||u.browser.mozilla&&i==me.KEYCODE.FF_HYPHEN)&&t&&!e.altKey&&(o=P.call(this,e,2,-1,o)),r=i,s=e.timeStamp}}),u.events.on("keyup",function(){o=1})}}(),(u.$wp||u.$sc).append(v),v.data("instance",u);var e=p.find("iframe, embed, video"),t=0,i=0;u.opts.iframe&&(i=u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-top")),t=u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-left"))),v.css("top",(u.opts.iframe?e.offset().top+i-1:e.offset().top-u.$wp.offset().top-1)+u.$wp.scrollTop()).css("left",(u.opts.iframe?e.offset().left+t-1:e.offset().left-u.$wp.offset().left-1)+u.$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&&i)return!0;if(e&&u.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;if(u.edit.isDisabled())return!1;for(var t=0;t<me.INSTANCES.length;t++)me.INSTANCES[t]!=u&&me.INSTANCES[t].events.trigger("video.hideResizer");u.toolbar.disable(),u.helpers.isMobile()&&(u.events.disableBlur(),u.$el.blur(),u.events.enableBlur()),u.$el.find(".fr-video.fr-active").removeClass("fr-active"),(p=c(this)).addClass("fr-active"),u.opts.iframe&&u.size.syncIframe(),Q(),T(),s(),u.selection.clear(),u.button.bulkRefresh(),u.events.trigger("image.hideResizer")}function M(e){p&&(function t(){return u.shared.vid_exit_flag}()||!0===e)&&(v.removeClass("fr-active"),u.toolbar.enable(),p.removeClass("fr-active"),p=null,Y())}function V(){u.shared.vid_exit_flag=!0}function Y(){u.shared.vid_exit_flag=!1}function N(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var i=t.files[0];if(i&&i.type&&-1!==i.type.indexOf("video")){if(!u.opts.videoUpload)return e.preventDefault(),e.stopPropagation(),!1;u.markers.remove(),u.markers.insertAtPoint(e.originalEvent),u.$el.find(".fr-marker").replaceWith(me.MARKERS),u.popups.hideAll();var o=u.popups.get("video.insert");return o||(o=n()),u.popups.setContainer("video.insert",u.$sc),u.popups.show("video.insert",e.originalEvent.pageX,e.originalEvent.pageY),_(),0<=u.opts.videoAllowedTypes.indexOf(i.type.replace(/video\//g,""))?K(t.files):X(b),e.preventDefault(),e.stopPropagation(),!1}}}function K(e){if(void 0!==e&&0<e.length){if(!1===u.events.trigger("video.beforeUpload",[e]))return!1;var t,i=e[0];if((null===u.opts.videoUploadURL||u.opts.videoUploadURL==d)&&!u.opts.videoUploadToS3)return function a(o){p&&p.find("iframe")&&p.find("iframe").length&&j();var r=new FileReader;r.onload=function(){r.result;for(var e=atob(r.result.split(",")[1]),t=[],i=0;i<e.length;i++)t.push(e.charCodeAt(i));C(window.URL.createObjectURL(new Blob([new Uint8Array(t)],{type:o.type})),!1,null,p)},_(),r.readAsDataURL(o)}(i),!1;if(i.size>u.opts.videoMaxSize)return X(l),!1;if(u.opts.videoAllowedTypes.indexOf(i.type.replace(/video\//g,""))<0)return X(b),!1;if(u.drag_support.formdata&&(t=u.drag_support.formdata?new FormData:null),t){var o;if(!1!==u.opts.videoUploadToS3)for(o in t.append("key",u.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",i.type),u.opts.videoUploadToS3.params)u.opts.videoUploadToS3.params.hasOwnProperty(o)&&t.append(o,u.opts.videoUploadToS3.params[o]);for(o in u.opts.videoUploadParams)u.opts.videoUploadParams.hasOwnProperty(o)&&t.append(o,u.opts.videoUploadParams[o]);t.append(u.opts.videoUploadParam,i);var r=u.opts.videoUploadURL;u.opts.videoUploadToS3&&(r=u.opts.videoUploadToS3.uploadURL?u.opts.videoUploadToS3.uploadURL:"https://"+u.opts.videoUploadToS3.region+".amazonaws.com/"+u.opts.videoUploadToS3.bucket);var s=u.core.getXHR(r,u.opts.videoUploadMethod);s.onload=function(){D.call(s,p)},s.onerror=U,s.upload.onprogress=B,s.onabort=$,_(),u.events.disableBlur(),u.edit.off(),u.events.enableBlur();var n=u.popups.get("video.insert");n&&c(n.off("abortUpload")).on("abortUpload",function(){4!=s.readyState&&s.abort()}),s.send(t)}}}function X(e,t){u.edit.on(),p&&p.find("video").addClass("fr-error"),x(u.language.translate("Something went wrong. Please try again.")),u.events.trigger("video.error",[{code:e,message:r[e]},t])}function H(){if(p){var e=u.popups.get("video.size"),t=p.find("iframe, embed, video");e.find('input[name="width"]').val(t.get(0).style.width||t.attr("width")).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height||t.attr("height")).trigger("change")}}function G(e){if(e)return u.popups.onRefresh("video.size",H),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+u.button.buildList(u.opts.videoSizeButtons)+"</div>",size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'+u.id+'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-'+u.id+'" type="text" name="width" placeholder="'+u.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-'+u.id+'" type="text" name="height" placeholder="'+u.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">'+u.language.translate("Update")+"</button></div></div>"},i=u.popups.create("video.size",t);return u.events.$on(u.$wp,"scroll",function(){p&&u.popups.isVisible("video.size")&&(u.events.disableBlur(),R(p))}),i}function F(e){if(void 0===e&&(e=p),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function W(e){void 0===e&&(e=p);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 j(){if(p&&!1!==u.events.trigger("video.beforeRemove",[p])){var e=p;u.popups.hideAll(),M(!0),u.selection.setBefore(e.get(0))||u.selection.setAfter(e.get(0)),e.remove(),u.selection.restore(),u.html.fillEmptyBlocks()}}function q(){S()}function Z(e,t,i){!u.opts.htmlUntouched&&u.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv"+i[0]+" fr-dv"+t[0])):"inline"==t?(e.css({display:"inline-block"}),"center"==i?e.css({"float":"none"}):"left"==i?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==i?e.css({textAlign:"left"}):"right"==i?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=u.$el.find("video").filter(function(){return 0===c(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(c(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false")),u.$el.find("embed, iframe").filter(function(){if(u.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<c(this).parents("span.fr-video").length)return!1;for(var e=c(this).attr("src"),t=0;t<me.VIDEO_PROVIDERS.length;t++){var i=me.VIDEO_PROVIDERS[t];if(i.test_regex.test(e)&&new RegExp(u.opts.videoAllowedProviders.join("|")).test(i.provider))return!0}return!1}).map(function(){return 0===c(this).parents("object").length?this:c(this).parents("object").get(0)}).wrap(c(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var t,i,o,r,s=u.$el.find("span.fr-video, video"),n=0;n<s.length;n++){var a=c(s[n]);!u.opts.htmlUntouched&&u.opts.useClasses?((r=a).hasClass("fr-dvi")||r.hasClass("fr-dvb")||(r.addClass("fr-fv"+F(r)[0]),r.addClass("fr-dv"+W(r)[0])),u.opts.videoTextNear||a.removeClass("fr-dvi").addClass("fr-dvb")):u.opts.htmlUntouched||u.opts.useClasses||(void 0,i=(t=a).hasClass("fr-dvb")?"block":t.hasClass("fr-dvi")?"inline":null,o=t.hasClass("fr-fvl")?"left":t.hasClass("fr-fvr")?"right":F(t),Z(t,i,o),t.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}s.toggleClass("fr-draggable",u.opts.videoMove)}}function Q(){if(p){u.selection.clear();var e=u.doc.createRange();e.selectNode(p.get(0)),u.selection.get().addRange(e)}}return r[1]="Video cannot be loaded from the passed link.",r[h]="No link in upload response.",r[g]="Error during file upload.",r[m]="Parsing response failed.",r[l]="File is too large.",r[b]="Video file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",u.shared.vid_exit_flag=!1,{_init:function ee(){u.opts.videoResponsive&&(u.opts.videoResize=!1),function e(){u.events.on("drop",N,!0),u.events.on("mousedown window.mousedown",V),u.events.on("window.touchmove",Y),u.events.on("mouseup window.mouseup",M),u.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&M()}),u.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){M(!0)})}(),u.helpers.isMobile()&&(u.events.$on(u.$el,"touchstart","span.fr-video",function(){i=!1}),u.events.$on(u.$el,"touchmove",function(){i=!0})),u.events.on("html.set",J),J(),u.events.$on(u.$el,"mousedown","span.fr-video",function(e){e.stopPropagation(),(u.browser.msie||u.browser.edge)&&(e.target.dragDrop(),t.call(this,e))}),u.events.$on(u.$el,"click touchend","span.fr-video",function(e){if("false"==c(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.call(this,e)}),u.events.on("keydown",function(e){var t=e.which;return!p||t!=me.KEYCODE.BACKSPACE&&t!=me.KEYCODE.DELETE?p&&t==me.KEYCODE.ESC?(M(!0),e.preventDefault(),!1):p&&t!=me.KEYCODE.F10&&!u.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),j(),u.undo.saveStep(),!1)},!0),u.events.on("toolbar.esc",function(){if(p)return u.events.disableBlur(),u.events.focus(),!1},!0),u.events.on("toolbar.focusEditor",function(){if(p)return!1},!0),u.events.on("keydown",function(){u.$el.find("span.fr-video:empty").remove()}),u.$wp&&(z(),u.events.on("contentChanged",z)),n(!0),G(!0)},showInsertPopup:function te(){var e=u.$tb.find('.fr-command[data-cmd="insertVideo"]'),t=u.popups.get("video.insert");if(t||(t=n()),S(),!t.hasClass("fr-active"))if(u.popups.refresh("video.insert"),u.popups.setContainer("video.insert",u.$tb),e.isVisible()){var i=u.button.getPosition(e),o=i.left,r=i.top;u.popups.show("video.insert",o,r,e.outerHeight())}else u.position.forSelection(t),u.popups.show("video.insert")},showLayer:function ie(e){var t,i,o=u.popups.get("video.insert");if(!p&&!u.opts.toolbarInline){var r=u.$tb.find('.fr-command[data-cmd="insertVideo"]');t=r.offset().left,i=r.offset().top+(u.opts.toolbarBottom?10:r.outerHeight()-10)}u.opts.toolbarInline&&(i=o.offset().top-u.helpers.getPX(o.css("margin-top")),o.hasClass("fr-above")&&(i+=o.outerHeight())),o.find(".fr-layer").removeClass("fr-active"),o.find(".fr-"+e+"-layer").addClass("fr-active"),u.popups.show("video.insert",t,i,0),u.accessibility.focusPopup(o)},refreshByURLButton:function oe(e){var t=u.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=u.popups.get("video.insert");t&&t.find(".fr-video-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function se(e){var t=u.popups.get("video.insert");t&&t.find(".fr-video-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function ne(e){void 0===e&&(e=(u.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var t=null;if(/^http/.test(e)||(e="https://"+e),u.helpers.isURL(e))for(var i=0;i<me.VIDEO_PROVIDERS.length;i++){var o=me.VIDEO_PROVIDERS[i];if(o.test_regex.test(e)&&new RegExp(u.opts.videoAllowedProviders.join("|")).test(o.provider)){t=e.replace(o.url_regex,o.url_text),t=o.html.replace(/\{url\}/,t);break}}t?w(t):(x(u.language.translate("Something went wrong. Please try again.")),u.events.trigger("video.linkError",[e]))},insertEmbed:function ae(e){void 0===e&&(e=u.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==e.length&&me.VIDEO_EMBED_REGEX.test(e)?w(e):(x(u.language.translate("Something went wrong. Please try again.")),u.events.trigger("video.codeError",[e]))},insert:w,align:function de(e){p.removeClass("fr-fvr fr-fvl"),!u.opts.htmlUntouched&&u.opts.useClasses?"left"==e?p.addClass("fr-fvl"):"right"==e&&p.addClass("fr-fvr"):Z(p,W(),e),Q(),T(),s(),u.selection.clear()},refreshAlign:function le(e){if(!p)return!1;e.find(">*").first().replaceWith(u.icon.create("video-align-"+F()))},refreshAlignOnShow:function fe(e,t){p&&t.find('.fr-command[data-param1="'+F()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){p.removeClass("fr-dvi fr-dvb"),!u.opts.htmlUntouched&&u.opts.useClasses?"inline"==e?p.addClass("fr-dvi"):"block"==e&&p.addClass("fr-dvb"):Z(p,e,F()),Q(),T(),s(),u.selection.clear()},refreshDisplayOnShow:function pe(e,t){p&&t.find('.fr-command[data-param1="'+W()+'"]').addClass("fr-active").attr("aria-selected",!0)},remove:j,hideProgressBar:S,showSizePopup:function ue(){var e=u.popups.get("video.size");e||(e=G()),S(),u.popups.refresh("video.size"),u.popups.setContainer("video.size",u.$sc);var t=p.find("iframe, embed, video"),i=t.offset().left+t.outerWidth()/2,o=t.offset().top+t.height();u.popups.show("video.size",i,o,t.height(),!0)},replace:function ce(){var e=u.popups.get("video.insert");e||(e=n()),u.popups.isVisible("video.insert")||(S(),u.popups.refresh("video.insert"),u.popups.setContainer("video.insert",u.$sc));var t=p.offset().left+p.outerWidth()/2,i=p.offset().top+p.height();u.popups.show("video.insert",t,i,p.outerHeight(),!0)},back:function e(){p?(u.events.disableBlur(),p[0].click()):(u.events.disableBlur(),u.selection.restore(),u.events.enableBlur(),u.popups.hide("video.insert"),u.toolbar.showInline())},setSize:function he(e,t){if(p){var i=u.popups.get("video.size"),o=p.find("iframe, embed, video");o.css("width",e||i.find('input[name="width"]').val()),o.css("height",t||i.find('input[name="height"]').val()),o.get(0).style.width&&o.removeAttr("width"),o.get(0).style.height&&o.removeAttr("height"),i.find("input:focus").blur(),setTimeout(function(){p.trigger("click")},u.helpers.isAndroid()?50:0)}},get:function ge(){return p},showProgressBar:_}},me.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"}),me.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),me.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),me.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)}}),me.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),me.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)}}),me.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),me.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)}}),me.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),me.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),me.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),me.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)}}),me.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),me.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),me.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),me.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),me.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),me.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=me.COMMANDS.videoAlign.options;for(var i in t)t.hasOwnProperty(i)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'+i+'" title="'+this.language.translate(t[i])+'">'+this.icon.create("video-align-"+i)+'<span class="fr-sr-only">'+this.language.translate(t[i])+"</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)}}),me.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),me.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),me.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),me.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),me.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),me.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),me.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),me.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"))}}),me.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),me.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(w){"use strict";w=w&&w.hasOwnProperty("default")?w["default"]:w,Object.assign(w.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),w.PLUGINS.wordPaste=function(E){var a,n,f=E.$,l="word_paste",g={};function t(e){var t=E.opts.wordAllowedStyleProps;e||(E.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=function(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(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],g[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,o=function(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0],n=i.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(n)for(var a=0;a<n.length;a++){var l=n[a],o=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=l.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 d=o.split(", "),f=0;f<d.length;f++)t[d[f]]=s}}return t}(i);u(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===w.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(A(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),u(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||function(e,t){if(!t)return;var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&E.helpers.isURL(e.getAttribute("alt")))return e.setAttribute("src",e.getAttribute("alt"));(r=g[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),!r)return;n=t,p={},c(n,"i","\\shppict"),c(n,"s","\\shp{");var n;var a=p[r.substring(7)];if(a){var l=function(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(a.image_hex),o="data:"+a.image_type+";base64,"+l;"IMG"===e.tagName?(e.src=o,e.setAttribute("data-fr-image-pasted",!0)):f(e.parentNode).before('<img data-fr-image-pasted="true" src="'+o+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),l=a.length-1;0<=l;l--)a[l].previousElementSibling&&"LI"===a[l].previousElementSibling.tagName&&a[l].previousElementSibling.appendChild(a[l]);u(n,function(t){if(t.nodeType===Node.TEXT_NODE)return t.data=t.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(t.nodeType===Node.ELEMENT_NODE){if(y(t)){var r=t.parentNode,i=t.previousSibling,n=function e(t,r,i){var n=/[0-9a-zA-Z]./gi;var a=!1;var l=!1;var o=!1;var s;var d=t.querySelector('span[style="mso-list:Ignore"]');var f;var g;d&&(a=a||n.test(d.textContent));var u=a?"ol":"ul";var p="<"+u+">";for(;t;){if(!y(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var c=t.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1");if((i=i||c)<c)g=e(t,r,c),p+=g.el.outerHTML,t=g.currentNode;else{if(c<i)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(n.lastIndex=0,l=n.test(t.firstElementChild.firstElementChild.firstChild.data||"")),s&&s.firstElementChild&&s.firstElementChild.firstElementChild&&s.firstElementChild.firstElementChild.firstChild&&(n.lastIndex=0,o=n.test(s.firstElementChild.firstElementChild.firstChild.data||"")),o===undefined||o===l?(f=b(t,r),p+="<li>"+f+"</li>"):(g=e(t,r,c),p+=g.el.outerHTML,t=g.currentNode);var h=t&&t.nextElementSibling;h&&(s=h.previousElementSibling),t&&t.parentNode&&t.parentNode.removeChild(t),t=h}}p+="</"+u+">";var m=document.createElement("div");m.innerHTML=p;var v=m.firstElementChild;return{el:v,currentNode:t}}(t,o).el,a=null;return(a=i?i.nextSibling:r.firstChild)?r.insertBefore(n,a):r.appendChild(n),!1}return"FONT"===t.tagName&&o["."+t.getAttribute("class")]&&(t=N(t,"span")),h(t,o)}if(t.nodeType===Node.COMMENT_NODE){if(-1<t.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=t.nextSibling;l;)(l=t.nextSibling)&&A(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);return A(t),!1}return!0}),u(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG"].indexOf(t)){for(var r=e.parentNode;r&&(A(e),!(e=r).innerHTML);)r=e.parentNode;return!1}!function(e){var t=e.getAttribute("style");if(!t)return;(t=T(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(!r)return;for(var i={},n=0;n<r.length;n++){var a=r[n],l=a.split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===e.tagName||(i[l[0]]=l[1]))}var o="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var d=null;try{d=parseFloat(i[s].slice(0,-3),10)}catch(f){d=null}d&&(d=Math.round(1.33*d),i[s]=d+"px;")}o+=s+":"+i[s]}o&&e.setAttribute("style",o)}(e)}return!0}),u(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var s=n.outerHTML,d=E.opts.htmlAllowedStyleProps;return E.opts.htmlAllowedStyleProps=E.opts.wordAllowedStyleProps,s=E.clean.html(s,E.opts.wordDeniedTags,E.opts.wordDeniedAttrs,!1),E.opts.htmlAllowedStyleProps=d,s}(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+=" ";return r}),E.paste.getRtfClipboard());var r=E.doc.createElement("DIV");r.innerHTML=n,E.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=E.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),E.modals.hide(l),E.paste.clean(n,!0,!0),E.opts.wordAllowedStyleProps=t}function A(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,u(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function y(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 b(e,a){var l=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var t=document.createElement(e.tagName.toLowerCase());t.setAttribute("style",e.getAttribute("style")),t.innerHTML=l.innerHTML,l.innerHTML=t.outerHTML}u(l,function(e){if(e.nodeType==Node.COMMENT_NODE&&(E.browser.msie||E.browser.safari||E.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(n){}var r,i;return e.nodeType===Node.ELEMENT_NODE&&("mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",(r="",i=l.getAttribute("style"),["line-height","font-family","font-size"].forEach(function(e){var t=i.match(new RegExp(e+":.*;"));t&&(r+=t[0]+";")}),r)),h(e,a)),!0});var r=l.innerHTML;return r=r.replace(/<!--[\s\S]*?-->/gi,"")}function N(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function C(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function T(e){return e.replace(/\n|\r|\n\r|"/g,"")}function x(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var p=null;function c(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",o=0;o<a.length&&"\\"!==a[o]&&"{"!==a[o]&&" "!==a[o]&&"\r"!==a[o]&&"\n"!==a[o];)l+=a[o],o++;var s=a.split("bliptag");if(s&&s.length<2)continue;var d=null;if(-1!==s[0].indexOf("pngblip")?d="image/png":-1!==s[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=s[1].split("}");if(f&&f.length<2)continue;var g=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))g=f[1].split(" ");else{if((g=f[0].split(" "))&&g.length<2)continue;g.shift()}var u=g.join("");p[t+l]={image_hex:u,image_type:d}}}}function h(e,t){var r=e.tagName,n=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?N(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&N(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return A(e),!1;for(var a=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<a.length;l++)if(-1!==r.indexOf(a[l]))return e.innerHTML&&(e.outerHTML=e.innerHTML),A(e),!1;if("TD"!==r){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var s=(o=T(o)).split(" "),d=0;d<s.length;d++){var f=[],g="."+s[d];f.push(g),g=n+g,f.push(g);for(var u=0;u<f.length;u++)t[f[u]]&&x(e,t[f[u]])}e.removeAttribute("class")}t&&t[n]&&x(e,t[n])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var p=e.getAttribute("class");if(p&&(t&&t[r.toLowerCase()+"."+p]&&x(e,t[r.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var c=T(p);(c=c.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",c):e.removeAttribute("class")}var h=e.getAttribute("style");if(h){var m=h.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}C(e)}if("TR"===r&&function(e,t){E.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===w.UNICODE_NBSP)&&(r.firstChild&&A(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,o=1===r.children.length;l;)"P"!==l.tagName||y(l)||o&&C(l),l=l.nextElementSibling;if(t){var s=r.getAttribute("class");if(s){var d=(s=T(s)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&x(r,t[f])}}t.td&&x(r,t.td)}var g=r.getAttribute("style");g&&(g=T(g))&&";"!==g.slice(-1)&&(g+=";");var u=r.getAttribute("valign");if(!u&&g){var p=g.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(u=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(g){var h=g.match(/text-align:.+?[; "]{1,1}/gi);h&&(c=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var m=null;if(g){var v=g.match(/background:.+?[; "]{1,1}/gi);v&&(m=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),N=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),N&&r.setAttribute("rowspan",N),u&&(r.style["vertical-align"]=u),c&&(r.style["text-align"]=c),m&&(r.style["background-color"]=m),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img")){var v=e.querySelectorAll("span");for(i=0;i<v.length;i++)v[i].innerText||(v[i].outerHTML=v[i].innerHTML)}if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width||"100%"),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=T(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}return{_init:function(){E.events.on("paste.wordPaste",function(e){return n=e,E.opts.wordPasteModal?function(){if(!a){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> '+E.language.translate("Word Paste Detected")+"</h4>",t=(n='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">',n+='<p style="text-align: left;">'+E.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",n+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+E.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+E.language.translate("Keep")+"</button></div>",n+="</div>"),r=E.modals.create(l,e,t),i=r.$body;a=r.$modal,r.$modal.addClass("fr-middle"),E.events.bindClick(i,"button.fr-remove-word",function(){var e=a.data("instance")||E;e.wordPaste.clean()}),E.events.bindClick(i,"button.fr-keep-word",function(){var e=a.data("instance")||E;e.wordPaste.clean(!0)}),E.events.$on(f(E.o_win),"resize",function(){E.modals.resize(l)})}var n;E.modals.show(l),E.modals.resize(l)}():t(E.opts.wordPasteKeepFormatting),!1})},clean:t}}}); | ||
!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(S){"use strict";S=S&&S.hasOwnProperty("default")?S["default"]:S,Object.assign(S.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"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),S.PLUGINS.wordPaste=function(A){var l,n,p=A.$,o="word_paste",c={};function t(e){var t=A.opts.wordAllowedStyleProps;e||(A.opts.wordAllowedStyleProps=[]),0===n.indexOf("<colgroup>")&&(n="<table>"+n+"</table>"),n=function g(e,t){0<=e.indexOf("<html")&&(e=e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"));!function f(e){for(var t=e.split("v:shape"),r=1;r<t.length;r++){var i=t[r],n=i.split(' id="')[1];if(n&&1<n.length){n=n.split('"')[0];var a=i.split(' o:spid="')[1];a&&1<a.length&&(a=a.split('"')[0],c[n]=a)}}}(e);var r=(new DOMParser).parseFromString(e,"text/html"),i=r.head,n=r.body,l=function u(e){var t={},r=e.getElementsByTagName("style");if(r.length){var i=r[0],n=i.innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(n)for(var a=0;a<n.length;a++){var l=n[a],o=l.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=l.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 d=o.split(", "),f=0;f<d.length;f++)t[d[f]]=s}}return t}(i);h(n,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===S.UNICODE_NBSP?(e.data="\u200b",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(y(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),h(n,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||function d(e,t){if(!t)return;var r;if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&A.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(r=c[e.getAttribute("v:shapes")])||(r=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(r=null))}else r=e.parentNode.getAttribute("o:spid");if(e.removeAttribute("height"),!r)return;!function o(e){m={},v(e,"i","\\shppict"),v(e,"s","\\shp{")}(t);var n=m[r.substring(7)];if(n){var a=function s(e){for(var t=e.match(/[0-9a-f]{2}/gi),r=[],i=0;i<t.length;i++)r.push(String.fromCharCode(parseInt(t[i],16)));var n=r.join("");return btoa(n)}(n.image_hex),l="data:"+n.image_type+";base64,"+a;"IMG"===e.tagName?(e.src=l,e.setAttribute("data-fr-image-pasted",!0)):p(e.parentNode).before('<img data-fr-image-pasted="true" src="'+l+'" style="'+e.parentNode.getAttribute("style")+'">').remove()}}(e,t),!0});for(var a=n.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),o=a.length-1;0<=o;o--)a[o].previousElementSibling&&"LI"===a[o].previousElementSibling.tagName&&a[o].previousElementSibling.appendChild(a[o]);h(n,function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(C(e)){var t=e.parentNode,r=e.previousSibling,i=function v(e,t,r){var i=/[0-9a-zA-Z]./gi;var n=!1;var a=!1;var l=!1;var o;var s=e.querySelector('span[style="mso-list:Ignore"]');var d;var f;s&&(n=n||i.test(s.textContent));var u=n?"ol":"ul";var g="<"+u+">";for(;e;){if(!C(e)){if(e.outerHTML&&0<e.outerHTML.indexOf("mso-bookmark")&&0==(e.textContent||"").length){e=e.nextElementSibling;continue}break}var p=e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1");if((r=r||p)<p)f=v(e,t,p),g+=f.el.outerHTML,e=f.currentNode;else{if(p<r)break;e.firstElementChild&&e.firstElementChild.firstElementChild&&e.firstElementChild.firstElementChild.firstChild&&(i.lastIndex=0,a=i.test(e.firstElementChild.firstElementChild.firstChild.data||"")),o&&o.firstElementChild&&o.firstElementChild.firstElementChild&&o.firstElementChild.firstElementChild.firstChild&&(i.lastIndex=0,l=i.test(o.firstElementChild.firstElementChild.firstChild.data||"")),l===undefined||l===a?(d=b(e,t),g+="<li>"+d+"</li>"):(f=v(e,t,p),g+=f.el.outerHTML,e=f.currentNode);var c=e&&e.nextElementSibling;c&&(o=c.previousElementSibling),e&&e.parentNode&&e.parentNode.removeChild(e),e=c}}g+="</"+u+">";var h=document.createElement("div");h.innerHTML=g;var m=h.firstElementChild;return{el:m,currentNode:e}}(e,l).el,n=null;return(n=r?r.nextSibling:t.firstChild)?t.insertBefore(i,n):t.appendChild(i),!1}return"FONT"===e.tagName&&l["."+e.getAttribute("class")]&&(e=N(e,"span")),E(e,l)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var a=e.nextSibling;a;)(a=e.nextSibling)&&y(a),a.data&&-1<a.data.indexOf("[endif]")&&(a=null);return y(e),!1}),h(n,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG"].indexOf(t)){for(var r=e.parentNode;r&&(y(e),!(e=r).innerHTML);)r=e.parentNode;return!1}!function u(e){var t=e.getAttribute("style");if(!t)return;(t=x(t))&&";"!==t.slice(-1)&&(t+=";");var r=t.match(/(^|\S+?):.+?;{1,1}/gi);if(!r)return;for(var i={},n=0;n<r.length;n++){var a=r[n],l=a.split(":");2===l.length&&("text-align"===l[0]&&"SPAN"===e.tagName||(i[l[0]]=l[1]))}var o="";for(var s in i)if(i.hasOwnProperty(s)){if("font-size"===s&&"pt;"===i[s].slice(-3)){var d=null;try{d=parseFloat(i[s].slice(0,-3),10)}catch(f){d=null}d&&(d=Math.round(1.33*d),i[s]=d+"px;")}o+=s+":"+i[s]}o&&e.setAttribute("style",o)}(e)}return!0}),h(n,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});var s=n.outerHTML,d=A.opts.htmlAllowedStyleProps;return A.opts.htmlAllowedStyleProps=A.opts.wordAllowedStyleProps,s=A.clean.html(s,A.opts.wordDeniedTags,A.opts.wordDeniedAttrs,!1),A.opts.htmlAllowedStyleProps=d,s}(n=n.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var r="",i=0;i++<t.length;)r+=" ";return r}),A.paste.getRtfClipboard());var r=A.doc.createElement("DIV");r.innerHTML=n,A.html.cleanBlankSpaces(r),n=r.innerHTML,n=(n=A.paste.cleanEmptyTagsAndDivs(n)).replace(/\u200b/g,""),function i(){A.modals.hide(o)}(),A.paste.clean(n,!0,!0),A.opts.wordAllowedStyleProps=t}function y(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e,t){if(t(e))for(var r=e.firstChild;r;){var i=r,n=r.previousSibling;r=r.nextSibling,h(i,t),i.previousSibling||i.nextSibling||i.parentNode||!r||n===r.previousSibling||!r.parentNode?i.previousSibling||i.nextSibling||i.parentNode||!r||r.previousSibling||r.nextSibling||r.parentNode||(n?r=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(r=e.firstChild.nextSibling)):r=n?n.nextSibling:e.firstChild}}function C(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 b(e,i){var a=e.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)){var t=document.createElement(e.tagName.toLowerCase());t.setAttribute("style",e.getAttribute("style")),t.innerHTML=a.innerHTML,a.innerHTML=t.outerHTML}h(a,function(e){if(e.nodeType==Node.COMMENT_NODE&&(A.browser.msie||A.browser.safari||A.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(r){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function n(e){var r="",i=e.getAttribute("style");return["line-height","font-family","font-size"].forEach(function(e){var t=i.match(new RegExp(e+":.*;"));t&&(r+=t[0]+";")}),r}(a)),E(e,i)),!0});var r=a.innerHTML;return r=r.replace(/<!--[\s\S]*?-->/gi,"")}function N(e,t){for(var r=document.createElement(t),i=0;i<e.attributes.length;i++){var n=e.attributes[i].name;r.setAttribute(n,e.getAttribute(n))}return r.innerHTML=e.innerHTML,e.parentNode.replaceChild(r,e),r}function T(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function x(e){return e.replace(/\n|\r|\n\r|"/g,"")}function w(e,t,r){if(t){var i=e.getAttribute("style");i&&";"!==i.slice(-1)&&(i+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var n=null;n=r?(i||"")+t:t+(i||""),e.setAttribute("style",n)}}var m=null;function v(e,t,r){for(var i=e.split(r),n=1;n<i.length;n++){var a=i[n];if(1<(a=a.split("shplid")).length){a=a[1];for(var l="",o=0;o<a.length&&"\\"!==a[o]&&"{"!==a[o]&&" "!==a[o]&&"\r"!==a[o]&&"\n"!==a[o];)l+=a[o],o++;var s=a.split("bliptag");if(s&&s.length<2)continue;var d=null;if(-1!==s[0].indexOf("pngblip")?d="image/png":-1!==s[0].indexOf("jpegblip")&&(d="image/jpeg"),!d)continue;var f=s[1].split("}");if(f&&f.length<2)continue;var u=void 0;if(2<f.length&&-1!==f[0].indexOf("blipuid"))u=f[1].split(" ");else{if((u=f[0].split(" "))&&u.length<2)continue;u.shift()}var g=u.join("");m[t+l]={image_hex:g,image_type:d}}}}function E(e,t){var r=e.tagName,n=r.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?N(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&N(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(r))return y(e),!1;for(var a=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<a.length;l++)if(-1!==r.indexOf(a[l]))return e.innerHTML&&(e.outerHTML=e.innerHTML),y(e),!1;if("TD"!==r){var o=e.getAttribute("class")||"MsoNormal";if(t&&o){for(var s=(o=x(o)).split(" "),d=0;d<s.length;d++){var f=[],u="."+s[d];f.push(u),u=n+u,f.push(u);for(var g=0;g<f.length;g++)t[f[g]]&&w(e,t[f[g]])}e.removeAttribute("class")}t&&t[n]&&w(e,t[n])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(r)){var p=e.getAttribute("class");if(p&&(t&&t[r.toLowerCase()+"."+p]&&w(e,t[r.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var c=x(p);(c=c.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",c):e.removeAttribute("class")}var h=e.getAttribute("style");if(h){var m=h.match(/text-align:.+?[; "]{1,1}/gi);m&&m[m.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}T(e)}if("TR"===r&&function E(e,t){A.node.clearAttributes(e);for(var r=e.firstElementChild,i=0,n=!1,a=null;r;){r.firstElementChild&&-1!==r.firstElementChild.tagName.indexOf("W:")&&(r.innerHTML=r.firstElementChild.innerHTML),(a=r.getAttribute("width"))||n||(n=!0),i+=parseInt(a,10),(!r.firstChild||r.firstChild&&r.firstChild.data===S.UNICODE_NBSP)&&(r.firstChild&&y(r.firstChild),r.innerHTML="<br>");for(var l=r.firstElementChild,o=1===r.children.length;l;)"P"!==l.tagName||C(l)||o&&T(l),l=l.nextElementSibling;if(t){var s=r.getAttribute("class");if(s){var d=(s=x(s)).match(/xl[0-9]+/gi);if(d){var f="."+d[0];t[f]&&w(r,t[f])}}t.td&&w(r,t.td)}var u=r.getAttribute("style");u&&(u=x(u))&&";"!==u.slice(-1)&&(u+=";");var g=r.getAttribute("valign");if(!g&&u){var p=u.match(/vertical-align:.+?[; "]{1,1}/gi);p&&(g=p[p.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var c=null;if(u){var h=u.match(/text-align:.+?[; "]{1,1}/gi);h&&(c=h[h.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===c&&(c=null)}var m=null;if(u){var v=u.match(/background:.+?[; "]{1,1}/gi);v&&(m=v[v.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=r.getAttribute("colspan"),N=r.getAttribute("rowspan");b&&r.setAttribute("colspan",b),N&&r.setAttribute("rowspan",N),g&&(r.style["vertical-align"]=g),c&&(r.style["text-align"]=c),m&&(r.style["background-color"]=m),a&&r.setAttribute("width",a),r=r.nextElementSibling}for(r=e.firstElementChild;r;)a=r.getAttribute("width"),n?r.removeAttribute("width"):r.setAttribute("width",100*parseInt(a,10)/i+"%"),r=r.nextElementSibling}(e,t),"A"!==r||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==r&&e.getAttribute("href")&&e.querySelector("img")){var v=e.querySelectorAll("span");for(i=0;i<v.length;i++)v[i].innerText||(v[i].outerHTML=v[i].innerHTML)}if("TD"!==r&&"TH"!==r||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===r&&(e.style.width=e.style.width||"100%"),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")){var b=x(e.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",b):e.removeAttribute("style")}return!0}return{_init:function e(){A.events.on("paste.wordPaste",function(e){return n=e,A.opts.wordPasteModal?function a(){if(!l){var e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+A.language.translate("Word Paste Detected")+"</h4>",t=function n(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e+='<p style="text-align: left;">'+A.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">'+A.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+A.language.translate("Keep")+"</button></div>",e+="</div>"}(),r=A.modals.create(o,e,t),i=r.$body;l=r.$modal,r.$modal.addClass("fr-middle"),A.events.bindClick(i,"button.fr-remove-word",function(){var e=l.data("instance")||A;e.wordPaste.clean()}),A.events.bindClick(i,"button.fr-keep-word",function(){var e=l.data("instance")||A;e.wordPaste.clean(!0)}),A.events.$on(p(A.o_win),"resize",function(){A.modals.resize(o)})}A.modals.show(o),A.modals.resize(o)}():t(A.opts.wordPasteKeepFormatting),!1})},clean:t}}}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(p){"use strict";p=p&&p.hasOwnProperty("default")?p["default"]:p,Object.assign(p.POPUP_TEMPLATES,{"embedly.insert":"[_BUTTONS_][_URL_LAYER_]","embedly.edit":"[_BUTTONS_]"}),Object.assign(p.DEFAULTS,{embedlyKey:null,embedlyInsertButtons:["embedlyBack","|"],embedlyEditButtons:["embedlyRemove"],embedlyScriptPath:"https://cdn.embedly.com/widgets/platform.js"}),p.PLUGINS.embedly=function(o){var s,n,r=o.$;function t(){o.events.on("html.processGet",l),o.events.$on(o.$el,"click touchend","div.fr-embedly",d),o.events.on("mousedown window.mousedown",u),o.events.on("window.touchmove",c),o.events.on("mouseup window.mouseup",b),o.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&b()}),o.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){b(!0)}),o.events.on("element.beforeDrop",function(e){if(e.hasClass("fr-embedly"))return e.html(e.attr("data-original-embed")),e}),o.events.on("keydown",function(e){var t=e.which;return!s||t!=p.KEYCODE.BACKSPACE&&t!=p.KEYCODE.DELETE?s&&t==p.KEYCODE.ESC?(b(!0),e.preventDefault(),!1):s&&t!=p.KEYCODE.F10&&!o.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),m(),!1)},!0),o.events.on("toolbar.esc",function(){if(s)return o.events.disableBlur(),o.events.focus(),!1},!0),o.events.on("toolbar.focusEditor",function(){if(s)return!1},!0),o.events.on("snapshot.after",function(e){var t=o.doc.createElement("div");t.innerHTML=e.html,l(t),e.html=t.innerHTML}),o.win.embedly&&(o.win.embedly("on","card.rendered",function(e){i(e)}),o.win.embedly("on","card.resize",function(e){i(e)})),a(!0)}function i(e){var t=r(e);t.parents(".fr-embedly").attr("contenteditable",!1).attr("draggable",!0).addClass("fr-draggable").css("height",t.height()).addClass("fr-draggable"),o.opts.iframe&&o.size.syncIframe()}function d(e){s=r(this),function(){n||function(){o.shared.$embedly_resizer?(n=o.shared.$embedly_resizer,o.shared.$embedly_overlay,o.events.on("destroy",function(){r("body").first().append(n)},!0)):(o.shared.$embedly_resizer=r(document.createElement("div")).attr("class","fr-embedly-resizer"),n=o.shared.$embedly_resizer,o.events.$on(n,"mousedown",function(e){e.stopPropagation()},!0));o.events.on("shared.destroy",function(){n.html("").removeData().remove(),n=null},!0)}();(o.$wp||o.$sc).append(n),n.data("instance",o);var e=0,t=0;o.opts.iframe&&(t=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top")),e=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-left")));n.css("top",(o.opts.iframe?s.offset().top+t-1+o.$iframe.position().top:s.offset().top-o.$wp.offset().top-1)+o.$wp.scrollTop()).css("left",(o.opts.iframe?s.offset().left+e-1:s.offset().left-o.$wp.offset().left-1)+o.$wp.scrollLeft()).css("width",s.outerWidth()).css("height",s.height()).addClass("fr-active")}(),function(){var e=o.popups.get("embedly.edit");e||(e=function(){var e="";if(0<o.opts.embedlyEditButtons.length){var t={buttons:e+='<div class="fr-buttons">\n '.concat(o.button.buildList(o.opts.embedlyEditButtons),"\n </div>")},n=o.popups.create("embedly.edit",t);return o.events.$on(o.$wp,"scroll.emebdly-edit",function(){s&&o.popups.isVisible("embedly.edit")&&(o.events.disableBlur(),d.call(s.get(0)))}),n}return!1}());if(e){o.popups.setContainer("embedly.edit",o.$sc),o.popups.refresh("embedly.edit");var t=s.offset().left+s.outerWidth()/2,n=s.offset().top+s.outerHeight();o.popups.show("embedly.edit",t,n,s.outerHeight())}}()}function l(e){if(e&&o.node.hasClass(e,"fr-embedly"))e.innerHTML=e.getAttribute("data-original-embed"),e.removeAttribute("draggable"),e.removeAttribute("contenteditable"),e.setAttribute("class",(e.getAttribute("class")||"").replace("fr-draggable",""));else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll(".fr-embedly"),n=0;n<t.length;n++)l(t[n])}function a(e){if(e)return o.popups.onRefresh("embedly.insert",f),!0;var t="";0<o.opts.embedlyInsertButtons.length&&(t+='<div class="fr-buttons fr-tabs">',t+=o.button.buildList(o.opts.embedlyInsertButtons),t+="</div>");var n={buttons:t,url_layer:'<div class="fr-embedly-layer fr-active fr-layer" id="fr-embedly-layer-'+o.id+'"><div class="fr-input-line"><input id="fr-embedly-layer-text-'+o.id+'" type="text" placeholder="'+o.language.translate("Paste in a URL to embed")+'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="embedlyInsert" tabIndex="2" role="button">'+o.language.translate("Insert")+"</button></div></div>"};return o.popups.create("embedly.insert",n)}function f(){o.popups.get("embedly.insert").find(".fr-embedly-layer input").val("").trigger("change")}function e(e){if(e.length){var t="<a href='"+e+"' data-card-branding='0' class='embedly-card'"+(o.opts.embedlyKey?" data-card-key='"+o.opts.embedlyKey+"'":"")+"></a>";o.html.insert('<div class="fr-embedly fr-draggable" draggable="true" contenteditable="false" data-original-embed="'+t+'">'+t+"</div>"),o.popups.hideAll()}}function m(){if(s&&!1!==o.events.trigger("embedly.beforeRemove",[s])){var e=s;o.popups.hideAll(),b(!0),o.selection.setBefore(e.get(0))||o.selection.setAfter(e.get(0)),e.remove(),o.selection.restore(),o.html.fillEmptyBlocks(),o.undo.saveStep(),o.events.trigger("video.removed",[e])}}function b(e){s&&(o.shared.embedly_exit_flag||!0===e)&&(n.removeClass("fr-active"),o.toolbar.enable(),s.removeClass("fr-active"),s=null,c())}function u(){o.shared.embedly_exit_flag=!0}function c(){o.shared.embedly_exit_flag=!1}return o.shared.embedly_exit_flag=!1,{_init:function(){if(!o.$wp)return!1;if("undefined"!=typeof embedly)t();else if(o.shared.embedlyLoaded)o.shared.embedlyCallbacks.push(t);else{o.shared.embedlyLoaded=!0,o.shared.embedlyCallbacks=[],o.shared.embedlyCallbacks.push(t);var e=o.doc.createElement("script");e.type="text/javascript",e.src=o.opts.embedlyScriptPath,e.innerText="",e.onload=function(){if(o.shared.embedlyCallbacks)for(var e=0;e<o.shared.embedlyCallbacks.length;e++)o.shared.embedlyCallbacks[e]()},o.doc.getElementsByTagName("head")[0].appendChild(e)}},showInsertPopup:function(){var e=o.$tb.find('.fr-command[data-cmd="embedly"]'),t=o.popups.get("embedly.insert");if(t||(t=a()),!t.hasClass("fr-active"))if(o.popups.refresh("embedly.insert"),o.popups.setContainer("embedly.insert",o.$tb),e.isVisible()){var n=o.button.getPosition(e),s=n.left,r=n.top;o.popups.show("embedly.insert",s,r,e.outerHeight())}else o.position.forSelection(t),o.popups.show("embedly.insert")},insert:function(){e(o.popups.get("embedly.insert").find(".fr-embedly-layer input").val())},remove:m,get:function(){return s},add:e,back:function(){s?(o.events.disableBlur(),s.trigger("click")):(o.events.disableBlur(),o.selection.restore(),o.events.enableBlur(),o.popups.hide("embedly.insert"),o.toolbar.showInline())}}},p.DefineIcon("embedly",{NAME:"share-alt",SVG_KEY:"insertEmbed"}),p.RegisterCommand("embedly",{undo:!0,focus:!0,title:"Embed URL",popup:!0,callback:function(){this.popups.isVisible("embedly.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("embedly.insert")):this.embedly.showInsertPopup()},plugin:"embedly"}),p.RegisterCommand("embedlyInsert",{undo:!0,focus:!0,callback:function(){this.embedly.insert()}}),p.DefineIcon("embedlyRemove",{NAME:"trash",SVG_KEY:"remove"}),p.RegisterCommand("embedlyRemove",{title:"Remove",undo:!1,callback:function(){this.embedly.remove()}}),p.DefineIcon("embedlyBack",{NAME:"arrow-left",SVG_KEY:"back"}),p.RegisterCommand("embedlyBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.embedly.back()},refresh:function(e){this.embedly.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"))}})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(E){"use strict";E=E&&E.hasOwnProperty("default")?E["default"]:E,Object.assign(E.POPUP_TEMPLATES,{"embedly.insert":"[_BUTTONS_][_URL_LAYER_]","embedly.edit":"[_BUTTONS_]"}),Object.assign(E.DEFAULTS,{embedlyKey:null,embedlyInsertButtons:["embedlyBack","|"],embedlyEditButtons:["embedlyRemove"],embedlyScriptPath:"https://cdn.embedly.com/widgets/platform.js"}),E.PLUGINS.embedly=function(o){var i,d,l=o.$;function t(){o.events.on("html.processGet",s),o.events.$on(o.$el,"click touchend","div.fr-embedly",a),o.events.on("mousedown window.mousedown",b),o.events.on("window.touchmove",c),o.events.on("mouseup window.mouseup",u),o.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&u()}),o.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){u(!0)}),o.events.on("element.beforeDrop",function(e){if(e.hasClass("fr-embedly"))return e.html(e.attr("data-original-embed")),e}),o.events.on("keydown",function(e){var t=e.which;return!i||t!=E.KEYCODE.BACKSPACE&&t!=E.KEYCODE.DELETE?i&&t==E.KEYCODE.ESC?(u(!0),e.preventDefault(),!1):i&&t!=E.KEYCODE.F10&&!o.keys.isBrowserAction(e)?(e.preventDefault(),!1):void 0:(e.preventDefault(),m(),!1)},!0),o.events.on("toolbar.esc",function(){if(i)return o.events.disableBlur(),o.events.focus(),!1},!0),o.events.on("toolbar.focusEditor",function(){if(i)return!1},!0),o.events.on("snapshot.after",function(e){var t=o.doc.createElement("div");t.innerHTML=e.html,s(t),e.html=t.innerHTML}),o.win.embedly&&(o.win.embedly("on","card.rendered",function(e){n(e)}),o.win.embedly("on","card.resize",function(e){n(e)})),f(!0)}function n(e){var t=l(e);t.parents(".fr-embedly").attr("contenteditable",!1).attr("draggable",!0).addClass("fr-draggable").css("height",t.height()).addClass("fr-draggable"),o.opts.iframe&&o.size.syncIframe()}function a(e){i=l(this),function s(){d||function n(){o.shared.$embedly_resizer?(d=o.shared.$embedly_resizer,o.shared.$embedly_overlay,o.events.on("destroy",function(){l("body").first().append(d)},!0)):(o.shared.$embedly_resizer=l(document.createElement("div")).attr("class","fr-embedly-resizer"),d=o.shared.$embedly_resizer,o.events.$on(d,"mousedown",function(e){e.stopPropagation()},!0));o.events.on("shared.destroy",function(){d.html("").removeData().remove(),d=null},!0)}();(o.$wp||o.$sc).append(d),d.data("instance",o);var e=0,t=0;o.opts.iframe&&(t=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-top")),e=o.helpers.getPX(o.$wp.find(".fr-iframe").css("padding-left")));d.css("top",(o.opts.iframe?i.offset().top+t-1+o.$iframe.position().top:i.offset().top-o.$wp.offset().top-1)+o.$wp.scrollTop()).css("left",(o.opts.iframe?i.offset().left+e-1:i.offset().left-o.$wp.offset().left-1)+o.$wp.scrollLeft()).css("width",i.outerWidth()).css("height",i.height()).addClass("fr-active")}(),function r(){var e=o.popups.get("embedly.edit");e||(e=function s(){var e="";if(0<o.opts.embedlyEditButtons.length){var t={buttons:e+='<div class="fr-buttons">\n '.concat(o.button.buildList(o.opts.embedlyEditButtons),"\n </div>")},n=o.popups.create("embedly.edit",t);return o.events.$on(o.$wp,"scroll.emebdly-edit",function(){i&&o.popups.isVisible("embedly.edit")&&(o.events.disableBlur(),function t(e){a.call(e.get(0))}(i))}),n}return!1}());if(e){o.popups.setContainer("embedly.edit",o.$sc),o.popups.refresh("embedly.edit");var t=i.offset().left+i.outerWidth()/2,n=i.offset().top+i.outerHeight();o.popups.show("embedly.edit",t,n,i.outerHeight())}}()}function s(e){if(e&&o.node.hasClass(e,"fr-embedly"))e.innerHTML=e.getAttribute("data-original-embed"),e.removeAttribute("draggable"),e.removeAttribute("contenteditable"),e.setAttribute("class",(e.getAttribute("class")||"").replace("fr-draggable",""));else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll(".fr-embedly"),n=0;n<t.length;n++)s(t[n])}function f(e){if(e)return o.popups.onRefresh("embedly.insert",r),!0;var t="";0<o.opts.embedlyInsertButtons.length&&(t+='<div class="fr-buttons fr-tabs">',t+=o.button.buildList(o.opts.embedlyInsertButtons),t+="</div>");var n={buttons:t,url_layer:'<div class="fr-embedly-layer fr-active fr-layer" id="fr-embedly-layer-'+o.id+'"><div class="fr-input-line"><input id="fr-embedly-layer-text-'+o.id+'" type="text" placeholder="'+o.language.translate("Paste in a URL to embed")+'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="embedlyInsert" tabIndex="2" role="button">'+o.language.translate("Insert")+"</button></div></div>"};return o.popups.create("embedly.insert",n)}function r(){o.popups.get("embedly.insert").find(".fr-embedly-layer input").val("").trigger("change")}function e(e){if(e.length){var t="<a href='"+e+"' data-card-branding='0' class='embedly-card'"+(o.opts.embedlyKey?" data-card-key='"+o.opts.embedlyKey+"'":"")+"></a>";o.html.insert('<div class="fr-embedly fr-draggable" draggable="true" contenteditable="false" data-original-embed="'+t+'">'+t+"</div>"),o.popups.hideAll()}}function m(){if(i&&!1!==o.events.trigger("embedly.beforeRemove",[i])){var e=i;o.popups.hideAll(),u(!0),o.selection.setBefore(e.get(0))||o.selection.setAfter(e.get(0)),e.remove(),o.selection.restore(),o.html.fillEmptyBlocks(),o.undo.saveStep(),o.events.trigger("video.removed",[e])}}function u(e){i&&(function t(){return o.shared.embedly_exit_flag}()||!0===e)&&(d.removeClass("fr-active"),o.toolbar.enable(),i.removeClass("fr-active"),i=null,c())}function b(){o.shared.embedly_exit_flag=!0}function c(){o.shared.embedly_exit_flag=!1}return o.shared.embedly_exit_flag=!1,{_init:function p(){if(!o.$wp)return!1;if("undefined"!=typeof embedly)t();else if(o.shared.embedlyLoaded)o.shared.embedlyCallbacks.push(t);else{o.shared.embedlyLoaded=!0,o.shared.embedlyCallbacks=[],o.shared.embedlyCallbacks.push(t);var e=o.doc.createElement("script");e.type="text/javascript",e.src=o.opts.embedlyScriptPath,e.innerText="",e.onload=function(){if(o.shared.embedlyCallbacks)for(var e=0;e<o.shared.embedlyCallbacks.length;e++)o.shared.embedlyCallbacks[e]()},o.doc.getElementsByTagName("head")[0].appendChild(e)}},showInsertPopup:function y(){var e=o.$tb.find('.fr-command[data-cmd="embedly"]'),t=o.popups.get("embedly.insert");if(t||(t=f()),!t.hasClass("fr-active"))if(o.popups.refresh("embedly.insert"),o.popups.setContainer("embedly.insert",o.$tb),e.isVisible()){var n=o.button.getPosition(e),s=n.left,r=n.top;o.popups.show("embedly.insert",s,r,e.outerHeight())}else o.position.forSelection(t),o.popups.show("embedly.insert")},insert:function h(){e(o.popups.get("embedly.insert").find(".fr-embedly-layer input").val())},remove:m,get:function v(){return i},add:e,back:function g(){i?(o.events.disableBlur(),i.trigger("click")):(o.events.disableBlur(),o.selection.restore(),o.events.enableBlur(),o.popups.hide("embedly.insert"),o.toolbar.showInline())}}},E.DefineIcon("embedly",{NAME:"share-alt",SVG_KEY:"insertEmbed"}),E.RegisterCommand("embedly",{undo:!0,focus:!0,title:"Embed URL",popup:!0,callback:function(){this.popups.isVisible("embedly.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("embedly.insert")):this.embedly.showInsertPopup()},plugin:"embedly"}),E.RegisterCommand("embedlyInsert",{undo:!0,focus:!0,callback:function(){this.embedly.insert()}}),E.DefineIcon("embedlyRemove",{NAME:"trash",SVG_KEY:"remove"}),E.RegisterCommand("embedlyRemove",{title:"Remove",undo:!1,callback:function(){this.embedly.remove()}}),E.DefineIcon("embedlyBack",{NAME:"arrow-left",SVG_KEY:"back"}),E.RegisterCommand("embedlyBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.embedly.back()},refresh:function(e){this.embedly.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"))}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],o):o(e.FroalaEditor)}(this,function(g){"use strict";g=g&&g.hasOwnProperty("default")?g["default"]:g,Object.assign(g.DEFAULTS,{fontAwesomeTemplate:'<i class="fa fa-[NAME] fr-deletable" aria-hidden="true"></i>',fontAwesomeSets:[{title:"Web Application Icons",icon:"address-book",list:["address-book","address-book-o","address-card","address-card-o","adjust","american-sign-language-interpreting","anchor","archive","area-chart","arrows","arrows-h","arrows-v","asl-interpreting ","assistive-listening-systems","asterisk","at","audio-description","automobile ","balance-scale","ban","bank ","bar-chart","bar-chart-o ","barcode","bars","bath","bathtub ","battery ","battery-0 ","battery-1 ","battery-2 ","battery-3 ","battery-4 ","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","blind","bluetooth","bluetooth-b","bolt","bomb","book","bookmark","bookmark-o","braille","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab ","calculator","calendar","calendar-check-o","calendar-minus-o","calendar-o","calendar-plus-o","calendar-times-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cart-arrow-down","cart-plus","cc","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-o-notch","circle-thin","clock-o","clone","close ","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","commenting","commenting-o","comments","comments-o","compass","copyright","creative-commons","credit-card","credit-card-alt","crop","crosshairs","cube","cubes","cutlery","dashboard ","database","deaf","deafness ","desktop","diamond","dot-circle-o","download","drivers-license ","drivers-license-o ","edit ","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-open","envelope-open-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","feed ","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o ","file-pdf-o","file-photo-o ","file-picture-o ","file-powerpoint-o","file-sound-o ","file-video-o","file-word-o","file-zip-o ","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash ","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear ","gears ","gift","glass","globe","graduation-cap","group ","hand-grab-o ","hand-lizard-o","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","handshake-o","hard-of-hearing ","hashtag","hdd-o","headphones","heart","heart-o","heartbeat","history","home","hotel ","hourglass","hourglass-1 ","hourglass-2 ","hourglass-3 ","hourglass-end","hourglass-half","hourglass-o","hourglass-start","i-cursor","id-badge","id-card","id-card-o","image ","inbox","industry","info","info-circle","institution ","key","keyboard-o","language","laptop","leaf","legal ","lemon-o","level-down","level-up","life-bouy ","life-buoy ","life-ring","life-saver ","lightbulb-o","line-chart","location-arrow","lock","low-vision","magic","magnet","mail-forward ","mail-reply ","mail-reply-all ","male","map","map-marker","map-o","map-pin","map-signs","meh-o","microchip","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone ","money","moon-o","mortar-board ","motorcycle","mouse-pointer","music","navicon ","newspaper-o","object-group","object-ungroup","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","percent","phone","phone-square","photo ","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","podcast","power-off","print","puzzle-piece","qrcode","question","question-circle","question-circle-o","quote-left","quote-right","random","recycle","refresh","registered","remove ","reorder ","reply","reply-all","retweet","road","rocket","rss","rss-square","s15 ","search","search-minus","search-plus","send ","send-o ","server","share","share-alt","share-alt-square","share-square","share-square-o","shield","ship","shopping-bag","shopping-basket","shopping-cart","shower","sign-in","sign-language","sign-out","signal","signing ","sitemap","sliders","smile-o","snowflake-o","soccer-ball-o ","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down ","sort-numeric-asc","sort-numeric-desc","sort-up ","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty ","star-half-full ","star-half-o","star-o","sticky-note","sticky-note-o","street-view","suitcase","sun-o","support ","tablet","tachometer","tag","tags","tasks","taxi","television","terminal","thermometer ","thermometer-0 ","thermometer-1 ","thermometer-2 ","thermometer-3 ","thermometer-4 ","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","times-rectangle ","times-rectangle-o ","tint","toggle-down ","toggle-left ","toggle-off","toggle-on","toggle-right ","toggle-up ","trademark","trash","trash-o","tree","trophy","truck","tty","tv ","umbrella","universal-access","university","unlock","unlock-alt","unsorted ","upload","user","user-circle","user-circle-o","user-o","user-plus","user-secret","user-times","users","vcard ","vcard-o ","video-camera","volume-control-phone","volume-down","volume-off","volume-up","warning ","wheelchair","wheelchair-alt","wifi","window-close","window-close-o","window-maximize","window-minimize","window-restore","wrench"]},{title:"Accessibility Icons",icon:"american-sign-language-interpreting",list:["american-sign-language-interpreting","asl-interpreting ","assistive-listening-systems","audio-description","blind","braille","cc","deaf","deafness ","hard-of-hearing ","low-vision","question-circle-o","sign-language","signing ","tty","universal-access","volume-control-phone","wheelchair","wheelchair-alt"]},{title:"Hand Icons",icon:"hand-grab-o",list:["hand-grab-o ","hand-lizard-o","hand-o-down","hand-o-left","hand-o-right","hand-o-up","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up"]},{title:"Transportation Icons",icon:"ambulance",list:["ambulance","automobile ","bicycle","bus","cab ","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","wheelchair-alt"]},{title:"Gender Icons",icon:"genderless",list:["genderless","intersex ","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","transgender","transgender-alt","venus","venus-double","venus-mars"]},{title:"Form Control Icons",icon:"check-square",list:["check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","plus-square-o","square","square-o"]},{title:"Payment Icons",icon:"cc-amex",list:["cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","credit-card","credit-card-alt","google-wallet","paypal"]},{title:"Chart Icons",icon:"area-chart",list:["area-chart","bar-chart","bar-chart-o ","line-chart","pie-chart"]},{title:"Currency Icons",icon:"bitcoin",list:["bitcoin ","btc","cny ","dollar ","eur","euro ","gbp","gg","gg-circle","ils","inr","jpy","krw","money","rmb ","rouble ","rub","ruble ","rupee ","shekel ","sheqel ","try","turkish-lira ","usd","viacoin","won ","yen"]},{title:"Text Editor Icons",icon:"align-center",list:["align-center","align-justify","align-left","align-right","bold","chain ","chain-broken","clipboard","columns","copy ","cut ","dedent ","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste ","repeat","rotate-left ","rotate-right ","save ","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink"]},{title:"Brand Icons",icon:"500px",list:["500px","adn","amazon","android","angellist","apple","bandcamp","behance","behance-square","bitbucket","bitbucket-square","bitcoin ","black-tie","bluetooth","bluetooth-b","btc","buysellads","cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","chrome","codepen","codiepie","connectdevelop","contao","css3","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","eercast","empire","envira","etsy","expeditedssl","fa ","facebook","facebook-f ","facebook-official","facebook-square","firefox","first-order","flickr","font-awesome","fonticons","fort-awesome","forumbee","foursquare","free-code-camp","ge ","get-pocket","gg","gg-circle","git","git-square","github","github-alt","github-square","gitlab","gittip ","glide","glide-g","google","google-plus","google-plus-circle ","google-plus-official","google-plus-square","google-wallet","gratipay","grav","hacker-news","houzz","html5","imdb","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linode","linux","maxcdn","meanpath","medium","meetup","mixcloud","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","pied-piper","pied-piper-alt","pied-piper-pp","pinterest","pinterest-p","pinterest-square","product-hunt","qq","quora","ra ","ravelry","rebel","reddit","reddit-alien","reddit-square","renren","resistance ","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat-ghost","snapchat-square","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","superpowers","telegram","tencent-weibo","themeisle","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","viadeo","viadeo-square","vimeo","vimeo-square","vine","vk","wechat ","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","wpbeginner","wpexplorer","wpforms","xing","xing-square","y-combinator","y-combinator-square ","yahoo","yc ","yc-square ","yelp","yoast","youtube","youtube-play","youtube-square"]}],faButtons:["fontAwesomeBack","|"]}),Object.assign(g.POPUP_TEMPLATES,{fontAwesome:"[_BUTTONS_][_CUSTOM_LAYER_]"}),g.PLUGINS.fontAwesome=function(f){var b=f.$,p=f.opts.fontAwesomeSets[0],d=f.opts.fontAwesomeSets,t="";function s(){f.opts.toolbarInline&&0<f.opts.faButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(f.button.buildList(f.opts.faButtons),"</div>"));var m,e={buttons:t,custom_layer:a()},o=f.popups.create("fontAwesome",e);return m=o,f.events.on("popup.tab",function(e){var o=b(e.currentTarget);if(!f.popups.isVisible("fontAwesome")||!o.is("span, a"))return!0;var t,a,r,s=e.which;if(g.KEYCODE.TAB==s){if(o.is("span.fr-icon")&&e.shiftKey||o.is("a")&&!e.shiftKey){var i=m.find(".fr-buttons");t=!f.accessibility.focusToolbar(i,!!e.shiftKey)}if(!1!==t){var n=m.find("span.fr-icon:focus").first().concat(m.findVisible(" span.fr-icon").first().concat(m.find("a")));o.is("span.fr-icon")&&(n=n.not("span.fr-icon:not(:focus)")),a=n.index(o),a=e.shiftKey?((a-1)%n.length+n.length)%n.length:(a+1)%n.length,r=n.get(a),f.events.disableBlur(),r.focus(),t=!1}}else if(g.KEYCODE.ARROW_UP==s||g.KEYCODE.ARROW_DOWN==s||g.KEYCODE.ARROW_LEFT==s||g.KEYCODE.ARROW_RIGHT==s){if(o.is("span.fr-icon")){var c=o.parent().find("span.fr-icon");a=c.index(o);var l=Math.floor(c.length/8),u=a%8,p=Math.floor(a/8),d=8*p+u,h=8*l;g.KEYCODE.ARROW_UP==s?d=((d-8)%h+h)%h:g.KEYCODE.ARROW_DOWN==s?d=(d+8)%h:g.KEYCODE.ARROW_LEFT==s?d=((d-1)%h+h)%h:g.KEYCODE.ARROW_RIGHT==s&&(d=(d+1)%h),r=b(c.get(d)),f.events.disableBlur(),r.focus(),t=!1}}else g.KEYCODE.ENTER==s&&(o.is("a")?o[0].click():f.button.exec(o),t=!1);return!1===t&&(e.preventDefault(),e.stopPropagation()),t},!0),o}function a(){var e,o,t,a,r,s,i,n,c,l,u;return"".concat((r=d,s=p,i=f.opts.fontAwesomeTemplate,'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat((n=r,c=s,l=i,u="",n.forEach(function(e){var o={elementClass:e.title===c.title?"fr-active fr-active-tab":"",title:e.title,dataCmd:"setIconCategory",dataParam1:e.title,iconValue:l.replace(/\[NAME\]/g,e.icon)};u+='<button class="fr-fa-icon-category fr-command fr-btn '.concat(o.elementClass,'" title="').concat(o.title,'" data-cmd="').concat(o.dataCmd,'" data-param1="').concat(o.dataParam1,'"</button><span>').concat(o.iconValue,"</span>")}),u),"\n </div>\n ")),"\n ").concat((e=p,o=f.opts.fontAwesomeTemplate,'\n <div class="fr-icon-container fr-fa-container">\n '.concat((t=o,a="",e.list.forEach(function(e){var o={dataParam1:e,title:e,iconValue:t.replace(/\[NAME\]/g,e)};a+='<span class="fr-command fr-fa-icon fr-icon" role="button" data-cmd="insertIcon" data-param1="'.concat(o.dataParam1,'" title="').concat(o.title,'">').concat(o.iconValue,"</span>")}),a),"\n </div>\n ")))}return{setIconCategory:function(o){p=d.filter(function(e){return e.title===o})[0],f.popups.get("fontAwesome").html(t+a())},showFontAwesomePopup:function(){var e=f.popups.get("fontAwesome");if(e||(e=s()),!e.hasClass("fr-active")){f.popups.refresh("fontAwesome"),f.popups.setContainer("fontAwesome",f.$tb);var o=f.$tb.find('.fr-command[data-cmd="fontAwesome"]'),t=f.button.getPosition(o),a=t.left,r=t.top;f.popups.show("fontAwesome",a,r,o.outerHeight())}},back:function(){f.popups.hide("fontAwesome"),f.toolbar.showInline()}}},g.DefineIcon("fontAwesome",{NAME:"flag",SVG_KEY:"fontAwesome"}),g.RegisterCommand("fontAwesome",{title:"Font Awesome",icon:"fontAwesome",undo:!1,focus:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("fontAwesome")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("fontAwesome")):this.fontAwesome.showFontAwesomePopup()},plugin:"fontAwesome",showOnMobile:!0}),g.RegisterCommand("insertIcon",{callback:function(e,o){this.undo.saveStep(),this.html.insert("".concat(this.opts.fontAwesomeTemplate.replace(/\[NAME\]/g,o)," ")),this.undo.saveStep(),this.popups.hide("fontAwesome")}}),g.RegisterCommand("setIconCategory",{undo:!1,focus:!1,callback:function(e,o){this.fontAwesome.setIconCategory(o)}}),g.DefineIcon("fontAwesomeBack",{NAME:"arrow-left",SVG_KEY:"back"}),g.RegisterCommand("fontAwesomeBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.fontAwesome.back()}})}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],o):o(e.FroalaEditor)}(this,function(g){"use strict";g=g&&g.hasOwnProperty("default")?g["default"]:g,Object.assign(g.DEFAULTS,{fontAwesomeTemplate:'<i class="fa fa-[NAME] fr-deletable" aria-hidden="true"></i>',fontAwesomeSets:[{title:"Web Application Icons",icon:"address-book",list:["address-book","address-book-o","address-card","address-card-o","adjust","american-sign-language-interpreting","anchor","archive","area-chart","arrows","arrows-h","arrows-v","asl-interpreting ","assistive-listening-systems","asterisk","at","audio-description","automobile ","balance-scale","ban","bank ","bar-chart","bar-chart-o ","barcode","bars","bath","bathtub ","battery ","battery-0 ","battery-1 ","battery-2 ","battery-3 ","battery-4 ","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","bell-o","bell-slash","bell-slash-o","bicycle","binoculars","birthday-cake","blind","bluetooth","bluetooth-b","bolt","bomb","book","bookmark","bookmark-o","braille","briefcase","bug","building","building-o","bullhorn","bullseye","bus","cab ","calculator","calendar","calendar-check-o","calendar-minus-o","calendar-o","calendar-plus-o","calendar-times-o","camera","camera-retro","car","caret-square-o-down","caret-square-o-left","caret-square-o-right","caret-square-o-up","cart-arrow-down","cart-plus","cc","certificate","check","check-circle","check-circle-o","check-square","check-square-o","child","circle","circle-o","circle-o-notch","circle-thin","clock-o","clone","close ","cloud","cloud-download","cloud-upload","code","code-fork","coffee","cog","cogs","comment","comment-o","commenting","commenting-o","comments","comments-o","compass","copyright","creative-commons","credit-card","credit-card-alt","crop","crosshairs","cube","cubes","cutlery","dashboard ","database","deaf","deafness ","desktop","diamond","dot-circle-o","download","drivers-license ","drivers-license-o ","edit ","ellipsis-h","ellipsis-v","envelope","envelope-o","envelope-open","envelope-open-o","envelope-square","eraser","exchange","exclamation","exclamation-circle","exclamation-triangle","external-link","external-link-square","eye","eye-slash","eyedropper","fax","feed ","female","fighter-jet","file-archive-o","file-audio-o","file-code-o","file-excel-o","file-image-o","file-movie-o ","file-pdf-o","file-photo-o ","file-picture-o ","file-powerpoint-o","file-sound-o ","file-video-o","file-word-o","file-zip-o ","film","filter","fire","fire-extinguisher","flag","flag-checkered","flag-o","flash ","flask","folder","folder-o","folder-open","folder-open-o","frown-o","futbol-o","gamepad","gavel","gear ","gears ","gift","glass","globe","graduation-cap","group ","hand-grab-o ","hand-lizard-o","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","handshake-o","hard-of-hearing ","hashtag","hdd-o","headphones","heart","heart-o","heartbeat","history","home","hotel ","hourglass","hourglass-1 ","hourglass-2 ","hourglass-3 ","hourglass-end","hourglass-half","hourglass-o","hourglass-start","i-cursor","id-badge","id-card","id-card-o","image ","inbox","industry","info","info-circle","institution ","key","keyboard-o","language","laptop","leaf","legal ","lemon-o","level-down","level-up","life-bouy ","life-buoy ","life-ring","life-saver ","lightbulb-o","line-chart","location-arrow","lock","low-vision","magic","magnet","mail-forward ","mail-reply ","mail-reply-all ","male","map","map-marker","map-o","map-pin","map-signs","meh-o","microchip","microphone","microphone-slash","minus","minus-circle","minus-square","minus-square-o","mobile","mobile-phone ","money","moon-o","mortar-board ","motorcycle","mouse-pointer","music","navicon ","newspaper-o","object-group","object-ungroup","paint-brush","paper-plane","paper-plane-o","paw","pencil","pencil-square","pencil-square-o","percent","phone","phone-square","photo ","picture-o","pie-chart","plane","plug","plus","plus-circle","plus-square","plus-square-o","podcast","power-off","print","puzzle-piece","qrcode","question","question-circle","question-circle-o","quote-left","quote-right","random","recycle","refresh","registered","remove ","reorder ","reply","reply-all","retweet","road","rocket","rss","rss-square","s15 ","search","search-minus","search-plus","send ","send-o ","server","share","share-alt","share-alt-square","share-square","share-square-o","shield","ship","shopping-bag","shopping-basket","shopping-cart","shower","sign-in","sign-language","sign-out","signal","signing ","sitemap","sliders","smile-o","snowflake-o","soccer-ball-o ","sort","sort-alpha-asc","sort-alpha-desc","sort-amount-asc","sort-amount-desc","sort-asc","sort-desc","sort-down ","sort-numeric-asc","sort-numeric-desc","sort-up ","space-shuttle","spinner","spoon","square","square-o","star","star-half","star-half-empty ","star-half-full ","star-half-o","star-o","sticky-note","sticky-note-o","street-view","suitcase","sun-o","support ","tablet","tachometer","tag","tags","tasks","taxi","television","terminal","thermometer ","thermometer-0 ","thermometer-1 ","thermometer-2 ","thermometer-3 ","thermometer-4 ","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thumb-tack","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up","ticket","times","times-circle","times-circle-o","times-rectangle ","times-rectangle-o ","tint","toggle-down ","toggle-left ","toggle-off","toggle-on","toggle-right ","toggle-up ","trademark","trash","trash-o","tree","trophy","truck","tty","tv ","umbrella","universal-access","university","unlock","unlock-alt","unsorted ","upload","user","user-circle","user-circle-o","user-o","user-plus","user-secret","user-times","users","vcard ","vcard-o ","video-camera","volume-control-phone","volume-down","volume-off","volume-up","warning ","wheelchair","wheelchair-alt","wifi","window-close","window-close-o","window-maximize","window-minimize","window-restore","wrench"]},{title:"Accessibility Icons",icon:"american-sign-language-interpreting",list:["american-sign-language-interpreting","asl-interpreting ","assistive-listening-systems","audio-description","blind","braille","cc","deaf","deafness ","hard-of-hearing ","low-vision","question-circle-o","sign-language","signing ","tty","universal-access","volume-control-phone","wheelchair","wheelchair-alt"]},{title:"Hand Icons",icon:"hand-grab-o",list:["hand-grab-o ","hand-lizard-o","hand-o-down","hand-o-left","hand-o-right","hand-o-up","hand-paper-o","hand-peace-o","hand-pointer-o","hand-rock-o","hand-scissors-o","hand-spock-o","hand-stop-o ","thumbs-down","thumbs-o-down","thumbs-o-up","thumbs-up"]},{title:"Transportation Icons",icon:"ambulance",list:["ambulance","automobile ","bicycle","bus","cab ","car","fighter-jet","motorcycle","plane","rocket","ship","space-shuttle","subway","taxi","train","truck","wheelchair","wheelchair-alt"]},{title:"Gender Icons",icon:"genderless",list:["genderless","intersex ","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mercury","neuter","transgender","transgender-alt","venus","venus-double","venus-mars"]},{title:"Form Control Icons",icon:"check-square",list:["check-square","check-square-o","circle","circle-o","dot-circle-o","minus-square","minus-square-o","plus-square","plus-square-o","square","square-o"]},{title:"Payment Icons",icon:"cc-amex",list:["cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","credit-card","credit-card-alt","google-wallet","paypal"]},{title:"Chart Icons",icon:"area-chart",list:["area-chart","bar-chart","bar-chart-o ","line-chart","pie-chart"]},{title:"Currency Icons",icon:"bitcoin",list:["bitcoin ","btc","cny ","dollar ","eur","euro ","gbp","gg","gg-circle","ils","inr","jpy","krw","money","rmb ","rouble ","rub","ruble ","rupee ","shekel ","sheqel ","try","turkish-lira ","usd","viacoin","won ","yen"]},{title:"Text Editor Icons",icon:"align-center",list:["align-center","align-justify","align-left","align-right","bold","chain ","chain-broken","clipboard","columns","copy ","cut ","dedent ","eraser","file","file-o","file-text","file-text-o","files-o","floppy-o","font","header","indent","italic","link","list","list-alt","list-ol","list-ul","outdent","paperclip","paragraph","paste ","repeat","rotate-left ","rotate-right ","save ","scissors","strikethrough","subscript","superscript","table","text-height","text-width","th","th-large","th-list","underline","undo","unlink"]},{title:"Brand Icons",icon:"500px",list:["500px","adn","amazon","android","angellist","apple","bandcamp","behance","behance-square","bitbucket","bitbucket-square","bitcoin ","black-tie","bluetooth","bluetooth-b","btc","buysellads","cc-amex","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","chrome","codepen","codiepie","connectdevelop","contao","css3","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","edge","eercast","empire","envira","etsy","expeditedssl","fa ","facebook","facebook-f ","facebook-official","facebook-square","firefox","first-order","flickr","font-awesome","fonticons","fort-awesome","forumbee","foursquare","free-code-camp","ge ","get-pocket","gg","gg-circle","git","git-square","github","github-alt","github-square","gitlab","gittip ","glide","glide-g","google","google-plus","google-plus-circle ","google-plus-official","google-plus-square","google-wallet","gratipay","grav","hacker-news","houzz","html5","imdb","instagram","internet-explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm-square","leanpub","linkedin","linkedin-square","linode","linux","maxcdn","meanpath","medium","meetup","mixcloud","modx","odnoklassniki","odnoklassniki-square","opencart","openid","opera","optin-monster","pagelines","paypal","pied-piper","pied-piper-alt","pied-piper-pp","pinterest","pinterest-p","pinterest-square","product-hunt","qq","quora","ra ","ravelry","rebel","reddit","reddit-alien","reddit-square","renren","resistance ","safari","scribd","sellsy","share-alt","share-alt-square","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat-ghost","snapchat-square","soundcloud","spotify","stack-exchange","stack-overflow","steam","steam-square","stumbleupon","stumbleupon-circle","superpowers","telegram","tencent-weibo","themeisle","trello","tripadvisor","tumblr","tumblr-square","twitch","twitter","twitter-square","usb","viacoin","viadeo","viadeo-square","vimeo","vimeo-square","vine","vk","wechat ","weibo","weixin","whatsapp","wikipedia-w","windows","wordpress","wpbeginner","wpexplorer","wpforms","xing","xing-square","y-combinator","y-combinator-square ","yahoo","yc ","yc-square ","yelp","yoast","youtube","youtube-play","youtube-square"]}],faButtons:["fontAwesomeBack","|"]}),Object.assign(g.POPUP_TEMPLATES,{fontAwesome:"[_BUTTONS_][_CUSTOM_LAYER_]"}),g.PLUGINS.fontAwesome=function(f){var b=f.$,r=f.opts.fontAwesomeSets[0],s=f.opts.fontAwesomeSets,a="";function i(){f.opts.toolbarInline&&0<f.opts.faButtons.length&&(a='<div class="fr-buttons fr-tabs">'.concat(f.button.buildList(f.opts.faButtons),"</div>"));var e={buttons:a,custom_layer:n()},o=f.popups.create("fontAwesome",e);return function t(m){f.events.on("popup.tab",function(e){var o=b(e.currentTarget);if(!f.popups.isVisible("fontAwesome")||!o.is("span, a"))return!0;var t,a,r,s=e.which;if(g.KEYCODE.TAB==s){if(o.is("span.fr-icon")&&e.shiftKey||o.is("a")&&!e.shiftKey){var i=m.find(".fr-buttons");t=!f.accessibility.focusToolbar(i,!!e.shiftKey)}if(!1!==t){var n=m.find("span.fr-icon:focus").first().concat(m.findVisible(" span.fr-icon").first().concat(m.find("a")));o.is("span.fr-icon")&&(n=n.not("span.fr-icon:not(:focus)")),a=n.index(o),a=e.shiftKey?((a-1)%n.length+n.length)%n.length:(a+1)%n.length,r=n.get(a),f.events.disableBlur(),r.focus(),t=!1}}else if(g.KEYCODE.ARROW_UP==s||g.KEYCODE.ARROW_DOWN==s||g.KEYCODE.ARROW_LEFT==s||g.KEYCODE.ARROW_RIGHT==s){if(o.is("span.fr-icon")){var c=o.parent().find("span.fr-icon");a=c.index(o);var l=Math.floor(c.length/8),u=a%8,p=Math.floor(a/8),d=8*p+u,h=8*l;g.KEYCODE.ARROW_UP==s?d=((d-8)%h+h)%h:g.KEYCODE.ARROW_DOWN==s?d=(d+8)%h:g.KEYCODE.ARROW_LEFT==s?d=((d-1)%h+h)%h:g.KEYCODE.ARROW_RIGHT==s&&(d=(d+1)%h),r=b(c.get(d)),f.events.disableBlur(),r.focus(),t=!1}}else g.KEYCODE.ENTER==s&&(o.is("a")?o[0].click():f.button.exec(o),t=!1);return!1===t&&(e.preventDefault(),e.stopPropagation()),t},!0)}(o),o}function n(){return"".concat(function a(e,o,t){return'\n <div class="fr-buttons fr-tabs fr-tabs-scroll">\n '.concat(function s(e,t,a){var r="";return e.forEach(function(e){var o={elementClass:e.title===t.title?"fr-active fr-active-tab":"",title:e.title,dataCmd:"setIconCategory",dataParam1:e.title,iconValue:a.replace(/\[NAME\]/g,e.icon)};r+='<button class="fr-fa-icon-category fr-command fr-btn '.concat(o.elementClass,'" title="').concat(o.title,'" data-cmd="').concat(o.dataCmd,'" data-param1="').concat(o.dataParam1,'"</button><span>').concat(o.iconValue,"</span>")}),r}(e,o,t),"\n </div>\n ")}(s,r,f.opts.fontAwesomeTemplate),"\n ").concat(function t(e,o){return'\n <div class="fr-icon-container fr-fa-container">\n '.concat(function r(e,t){var a="";return e.list.forEach(function(e){var o={dataParam1:e,title:e,iconValue:t.replace(/\[NAME\]/g,e)};a+='<span class="fr-command fr-fa-icon fr-icon" role="button" data-cmd="insertIcon" data-param1="'.concat(o.dataParam1,'" title="').concat(o.title,'">').concat(o.iconValue,"</span>")}),a}(e,o),"\n </div>\n ")}(r,f.opts.fontAwesomeTemplate))}return{setIconCategory:function t(o){r=s.filter(function(e){return e.title===o})[0],function e(){f.popups.get("fontAwesome").html(a+n())}()},showFontAwesomePopup:function c(){var e=f.popups.get("fontAwesome");if(e||(e=i()),!e.hasClass("fr-active")){f.popups.refresh("fontAwesome"),f.popups.setContainer("fontAwesome",f.$tb);var o=f.$tb.find('.fr-command[data-cmd="fontAwesome"]'),t=f.button.getPosition(o),a=t.left,r=t.top;f.popups.show("fontAwesome",a,r,o.outerHeight())}},back:function e(){f.popups.hide("fontAwesome"),f.toolbar.showInline()}}},g.DefineIcon("fontAwesome",{NAME:"flag",SVG_KEY:"fontAwesome"}),g.RegisterCommand("fontAwesome",{title:"Font Awesome",icon:"fontAwesome",undo:!1,focus:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("fontAwesome")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("fontAwesome")):this.fontAwesome.showFontAwesomePopup()},plugin:"fontAwesome",showOnMobile:!0}),g.RegisterCommand("insertIcon",{callback:function(e,o){this.undo.saveStep(),this.html.insert("".concat(this.opts.fontAwesomeTemplate.replace(/\[NAME\]/g,o)," ")),this.undo.saveStep(),this.popups.hide("fontAwesome")}}),g.RegisterCommand("setIconCategory",{undo:!1,focus:!1,callback:function(e,o){this.fontAwesome.setIconCategory(o)}}),g.DefineIcon("fontAwesomeBack",{NAME:"arrow-left",SVG_KEY:"back"}),g.RegisterCommand("fontAwesomeBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.fontAwesome.back()}})}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}if(t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{imageTUIOptions:{includeUI:{theme:{"menu.normalIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-d.svg","menu.activeIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-b.svg","menu.disabledIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-a.svg","menu.hoverIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-c.svg","submenu.normalIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},initMenu:"filter",menuBarPosition:"left"}},tui:window.tui}),t.PLUGINS.imageTUI=function(r){var s=r.$;function c(t){s("#tuieditor").remove(),t.style.display="none"}return{_init:function(){var t=r.o_doc.body,e=r.o_doc.createElement("div");e.setAttribute("id","tuiContainer"),e.style.cssText="position: fixed; top: 0;left: 0;margin: 0;padding: 0;width: 100%;height: 100%;background: rgba(0,0,0,.5);z-index: 9998;display:none",t.appendChild(e)},launch:function(e){if("object"===u(r.opts.tui)){var t=r.o_doc.createElement("div");t.setAttribute("id","tuieditor");var i=r.o_doc.getElementById("tuiContainer");i.appendChild(t),i.style.display="block";var n=e.image.get(),o=r.opts.imageTUIOptions;o.includeUI.loadImage={path:n[0].src,name:" "};var a=new r.opts.tui.ImageEditor(r.o_doc.querySelector("#tuieditor"),o),d=r.o_doc.getElementById("tuieditor");d.style.minHeight="590px",d.style.width="94%",d.style.height="94%",d.style.margin="auto",s(".tui-image-editor-header-buttons").html('<button class="tui-editor-cancel-btn" data-cmd="cancel_tui_image">Cancel</button> <button class="tui-editor-save-btn">Save</button>'),s(".tui-editor-cancel-btn")[0].addEventListener("click",function(t){c(i)}),s(".tui-editor-save-btn")[0].addEventListener("click",function(t){!function(t,e,i){for(var n=t.toDataURL(),o=atob(n.split(",")[1]),a=[],d=0;d<o.length;d++)a.push(o.charCodeAt(d));var r=new Blob([new Uint8Array(a)],{type:"image/png"});e.image.edit(i),e.image.upload([r])}(a,e,n),c(i)})}}}},t.DefineIcon("imageTUI",{NAME:"sliders",FA5NAME:"sliders-h",SVG_KEY:"advancedImageEditor"}),t.RegisterCommand("imageTUI",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(t,e){this.imageTUI.launch(this)},plugin:"imageTUI"}),!t.PLUGINS.image)throw new Error("TUI image editor plugin requires image plugin.");t.DEFAULTS.imageEditButtons.push("imageTUI")}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],e):e(t.FroalaEditor)}(this,function(t){"use strict";function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}if(t=t&&t.hasOwnProperty("default")?t["default"]:t,Object.assign(t.DEFAULTS,{imageTUIOptions:{includeUI:{theme:{"menu.normalIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-d.svg","menu.activeIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-b.svg","menu.disabledIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-a.svg","menu.hoverIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-c.svg","submenu.normalIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":"https://cdn.jsdelivr.net/npm/tui-image-editor@3.2.2/dist/svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},initMenu:"filter",menuBarPosition:"left"}},tui:window.tui}),t.PLUGINS.imageTUI=function(r){var s=r.$;function c(t){s("#tuieditor").remove(),t.style.display="none"}return{_init:function i(){var t=r.o_doc.body,e=r.o_doc.createElement("div");e.setAttribute("id","tuiContainer"),e.style.cssText="position: fixed; top: 0;left: 0;margin: 0;padding: 0;width: 100%;height: 100%;background: rgba(0,0,0,.5);z-index: 9998;display:none",t.appendChild(e)},launch:function u(e){if("object"===l(r.opts.tui)){var t=r.o_doc.createElement("div");t.setAttribute("id","tuieditor");var i=r.o_doc.getElementById("tuiContainer");i.appendChild(t),i.style.display="block";var n=e.image.get(),o=r.opts.imageTUIOptions;o.includeUI.loadImage={path:n[0].src,name:" "};var a=new r.opts.tui.ImageEditor(r.o_doc.querySelector("#tuieditor"),o),d=r.o_doc.getElementById("tuieditor");d.style.minHeight="590px",d.style.width="94%",d.style.height="94%",d.style.margin="auto",s(".tui-image-editor-header-buttons").html('<button class="tui-editor-cancel-btn" data-cmd="cancel_tui_image">Cancel</button> <button class="tui-editor-save-btn">Save</button>'),s(".tui-editor-cancel-btn")[0].addEventListener("click",function(t){c(i)}),s(".tui-editor-save-btn")[0].addEventListener("click",function(t){!function s(t,e,i){for(var n=t.toDataURL(),o=atob(n.split(",")[1]),a=[],d=0;d<o.length;d++)a.push(o.charCodeAt(d));var r=new Blob([new Uint8Array(a)],{type:"image/png"});e.image.edit(i),e.image.upload([r])}(a,e,n),c(i)})}}}},t.DefineIcon("imageTUI",{NAME:"sliders",FA5NAME:"sliders-h",SVG_KEY:"advancedImageEditor"}),t.RegisterCommand("imageTUI",{title:"Advanced Edit",undo:!1,focus:!1,callback:function(t,e){this.imageTUI.launch(this)},plugin:"imageTUI"}),!t.PLUGINS.image)throw new Error("TUI image editor plugin requires image plugin.");t.DEFAULTS.imageEditButtons.push("imageTUI")}); |
/*! | ||
* froala_editor v3.0.0-rc.2 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.0 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 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(c){"use strict";(c=c&&c.hasOwnProperty("default")?c["default"]:c).DEFAULT_SCAYT_OPTIONS={enableOnTouchDevices:!1,disableOptionsStorage:["all"],localization:"en",extraModules:"ui",DefaultSelection:"American English",spellcheckLang:"en_US",contextMenuSections:"suggest|moresuggest",serviceProtocol:"https",servicePort:"80",serviceHost:"svc.webspellchecker.net",servicePath:"spellcheck/script/ssrv.cgi",contextMenuForMisspelledOnly:!0,scriptPath:"https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"},Object.assign(c.DEFAULTS,{scaytAutoload:!1,scaytCustomerId:"1:ldogw1-MSDuT3-slyfO-0YJgB1-Wx7262-HIT741-MAMDv4-10qfb3-A4LDP-c60m3-hSQgd2-az2",scaytOptions:{}}),c.PLUGINS.spellChecker=function(s){var l;function e(e){if(l&&l.isDisabled){var t=!l.isDisabled();e.toggleClass("fr-active",t).attr("aria-pressed",t),s.$el.attr("spellcheck",s.opts.spellcheck&&!t)}}function t(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.removeMarkupInSelectionNode({removeInside:!0})}function o(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.reloadMarkup()}function a(e){l&&l.isDisabled&&!l.isDisabled()&&(e.which==c.KEYCODE.ENTER&&setTimeout(l.reloadMarkup,0))}function i(e){if(e&&e.getAttribute&&e.getAttribute("data-scayt-word"))e.outerHTML=e.innerHTML;else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll("[data-scayt-word], [data-spelling-word]"),s=0;s<t.length;s++)t[s].outerHTML=t[s].innerHTML}function r(){s.events.on("commands.before",t),s.events.on("commands.after",o),s.events.on("keydown",a,!0),s.events.on("html.processGet",i),e(s.$tb.find('[data-cmd="spellChecker"]'))}function n(){var e=s.opts.scaytOptions;e.customerId=s.opts.scaytCustomerId,e.container=s.$iframe?s.$iframe.get(0):s.$el.get(0),e.autoStartup=s.opts.scaytAutoload,e.onLoad=r,null!==s.opts.language&&(s.opts.spellCheckerLanguage=s.opts.language),!0===s.opts.scaytAutoload&&(s.opts.spellcheck=!1),l=new SCAYT.CUSTOMSCAYT(e)}return{_init:function(){if(!s.$wp)return!1;if(s.opts.scaytOptions=Object.assign({},c.DEFAULT_SCAYT_OPTIONS,s.opts.scaytOptions),"undefined"!=typeof SCAYT)n();else if(s.shared.spellCheckerLoaded||(s.shared.spellCheckerCallbacks=[]),s.shared.spellCheckerCallbacks.push(n),!s.shared.spellCheckerLoaded){s.shared.spellCheckerLoaded=!0;var e=document.createElement("script");e.type="text/javascript",e.src=s.opts.scaytOptions.scriptPath,e.innerText="",e.onload=function(){for(var e=0;e<s.shared.spellCheckerCallbacks.length;e++)s.shared.spellCheckerCallbacks[e]()},document.getElementsByTagName("head")[0].appendChild(e)}},refresh:e,toggle:function(){l&&l.isDisabled&&l.setDisabled(!l.isDisabled())}}},c.DefineIcon("spellChecker",{NAME:"keyboard-o",FA5NAME:"keyboard",SVG_KEY:"spellcheck"}),c.RegisterCommand("spellChecker",{title:"Spell Checker",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.spellChecker.toggle()},refresh:function(e){this.spellChecker.refresh(e)},plugin:"spellChecker"})}); | ||
!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(p){"use strict";(p=p&&p.hasOwnProperty("default")?p["default"]:p).DEFAULT_SCAYT_OPTIONS={enableOnTouchDevices:!1,disableOptionsStorage:["all"],localization:"en",extraModules:"ui",DefaultSelection:"American English",spellcheckLang:"en_US",contextMenuSections:"suggest|moresuggest",serviceProtocol:"https",servicePort:"80",serviceHost:"svc.webspellchecker.net",servicePath:"spellcheck/script/ssrv.cgi",contextMenuForMisspelledOnly:!0,scriptPath:"https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"},Object.assign(p.DEFAULTS,{scaytAutoload:!1,scaytCustomerId:"1:ldogw1-MSDuT3-slyfO-0YJgB1-Wx7262-HIT741-MAMDv4-10qfb3-A4LDP-c60m3-hSQgd2-az2",scaytOptions:{}}),p.PLUGINS.spellChecker=function(s){var l;function e(e){if(l&&l.isDisabled){var t=!l.isDisabled();e.toggleClass("fr-active",t).attr("aria-pressed",t),s.$el.attr("spellcheck",s.opts.spellcheck&&!t)}}function t(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.removeMarkupInSelectionNode({removeInside:!0})}function o(e){l&&l.isDisabled&&!l.isDisabled()&&0<=["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","html"].indexOf(e)&&l.reloadMarkup()}function a(e){l&&l.isDisabled&&!l.isDisabled()&&(e.which==p.KEYCODE.ENTER&&setTimeout(l.reloadMarkup,0))}function i(e){if(e&&e.getAttribute&&e.getAttribute("data-scayt-word"))e.outerHTML=e.innerHTML;else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var t=e.querySelectorAll("[data-scayt-word], [data-spelling-word]"),s=0;s<t.length;s++)t[s].outerHTML=t[s].innerHTML}function r(){s.events.on("commands.before",t),s.events.on("commands.after",o),s.events.on("keydown",a,!0),s.events.on("html.processGet",i),e(s.$tb.find('[data-cmd="spellChecker"]'))}function n(){var e=s.opts.scaytOptions;e.customerId=s.opts.scaytCustomerId,e.container=s.$iframe?s.$iframe.get(0):s.$el.get(0),e.autoStartup=s.opts.scaytAutoload,e.onLoad=r,null!==s.opts.language&&(s.opts.spellCheckerLanguage=s.opts.language),!0===s.opts.scaytAutoload&&(s.opts.spellcheck=!1),l=new SCAYT.CUSTOMSCAYT(e)}return{_init:function c(){if(!s.$wp)return!1;if(s.opts.scaytOptions=Object.assign({},p.DEFAULT_SCAYT_OPTIONS,s.opts.scaytOptions),"undefined"!=typeof SCAYT)n();else if(s.shared.spellCheckerLoaded||(s.shared.spellCheckerCallbacks=[]),s.shared.spellCheckerCallbacks.push(n),!s.shared.spellCheckerLoaded){s.shared.spellCheckerLoaded=!0;var e=document.createElement("script");e.type="text/javascript",e.src=s.opts.scaytOptions.scriptPath,e.innerText="",e.onload=function(){for(var e=0;e<s.shared.spellCheckerCallbacks.length;e++)s.shared.spellCheckerCallbacks[e]()},document.getElementsByTagName("head")[0].appendChild(e)}},refresh:e,toggle:function d(){l&&l.isDisabled&&l.setDisabled(!l.isDisabled())}}},p.DefineIcon("spellChecker",{NAME:"keyboard-o",FA5NAME:"keyboard",SVG_KEY:"spellcheck"}),p.RegisterCommand("spellChecker",{title:"Spell Checker",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.spellChecker.toggle()},refresh:function(e){this.spellChecker.refresh(e)},plugin:"spellChecker"})}); |
{ | ||
"name": "froala-editor", | ||
"version": "3.0.0-rc.2", | ||
"version": "3.0.0", | ||
"description": "The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3999561
39