/*! * froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 Froala Labs */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(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:'',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:'',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:'',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'',provider:"vidyard"}],me.VIDEO_EMBED_REGEX=/^\W*(((\s|\n)*<\/iframe>)|())\W*$/i,me.PLUGINS.video=function(c){var s,f,v,p,i,o,u=c.$,d="https://i.froala.com/upload",h=2,g=3,m=4,l=5,b=6,r={};function y(){var e=c.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 n(){var e=c.popups.get("video.edit");if(e||(e=function r(){var e="";if(0 \n '.concat(c.button.buildList(c.opts.videoEditButtons)," \n ")},o=c.popups.create("video.edit",t);return c.events.$on(c.$wp,"scroll.video-edit",function(){p&&c.popups.isVisible("video.edit")&&(c.events.disableBlur(),R(p))}),o}return!1}()),e){c.popups.setContainer("video.edit",c.$sc),c.popups.refresh("video.edit");var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();c.popups.show("video.edit",o,i,t.outerHeight(),!0)}}function a(e){if(e)return c.popups.onRefresh("video.insert",y),c.popups.onHide("video.insert",q),!0;var t="";c.opts.videoUpload||-1===c.opts.videoInsertButtons.indexOf("videoUpload")||c.opts.videoInsertButtons.splice(c.opts.videoInsertButtons.indexOf("videoUpload"),1);var o=c.button.buildList(c.opts.videoInsertButtons);""!==o&&(t='
'+o+"
");var i,r="",n=c.opts.videoInsertButtons.indexOf("videoUpload"),a=c.opts.videoInsertButtons.indexOf("videoByURL"),s=c.opts.videoInsertButtons.indexOf("videoEmbed");0<=a&&(i=" fr-active",(n
"));var d="";0<=s&&(i=" fr-active",(n
"));var l="";0<=n&&(i=" fr-active",(s').concat(c.language.translate("Drop video"),"
(").concat(c.language.translate("or click"),')
'));var f={buttons:t,by_url_layer:r,embed_layer:d,upload_layer:l,progress_bar:'

Uploading

'},v=c.popups.create("video.insert",f);return function p(i){c.events.$on(i,"dragover dragenter",".fr-video-upload-layer",function(){return u(this).addClass("fr-drop"),!1},!0),c.events.$on(i,"dragleave dragend",".fr-video-upload-layer",function(){return u(this).removeClass("fr-drop"),!1},!0),c.events.$on(i,"drop",".fr-video-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),u(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var o=i.data("instance")||c;o.events.disableBlur(),o.video.upload(t.files),o.events.enableBlur()}},!0),c.helpers.isIOS()&&c.events.$on(i,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){u(this).trigger("click")},!0);c.events.$on(i,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||c;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.video.upload(this.files)}u(this).val("")},!0)}(v),v}function w(e){c.events.focus(!0),c.selection.restore();var t=!1;p&&(j(),t=!0),c.html.insert(''.concat(e,""),!1,c.opts.videoSplitHTML),c.popups.hide("video.insert");var o=c.$el.find(".fr-jiv");o.removeClass("fr-jiv"),o.toggleClass("fr-rv",c.opts.videoResponsive),Z(o,c.opts.videoDefaultDisplay,c.opts.videoDefaultAlign),o.toggleClass("fr-draggable",c.opts.videoMove),c.events.trigger(t?"video.replaced":"video.inserted",[o])}function E(){var e=u(this);c.popups.hide("video.insert"),e.removeClass("fr-uploading"),e.parent().next().is("br")&&e.parent().next().remove(),R(e.parent()),c.events.trigger("video.loaded",[e.parent()])}function C(s,e,l,f,v){c.edit.off(),A("Loading video"),e&&(s=c.helpers.sanitizeURL(s));var p=function p(){var e,t;if(f){c.undo.canDo()||f.find("video").hasClass("fr-uploading")||c.undo.saveStep();var o=f.find("video").data("fr-old-src"),i=f.data("fr-replaced");f.data("fr-replaced",!1),c.$wp?((e=f.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),o&&f.find("video").attr("src",o),f.replaceWith(e)):e=f;for(var r=e.find("video").get(0).attributes,n=0;n"+c.language.translate("Your browser does not support HTML5 video.")+"");a.toggleClass("fr-draggable",c.opts.videoMove),c.edit.on(),c.events.focus(!0),c.selection.restore(),c.undo.saveStep(),c.opts.videoSplitHTML?c.markers.split():c.markers.insert();c.html.wrap();var s=c.$el.find(".fr-marker");c.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent());s.replaceWith(a),c.selection.clear(),a.find("video").get(0).readyState>a.find("video").get(0).HAVE_FUTURE_DATA||c.helpers.isIOS()?o.call(a.find("video").get(0)):a.find("video").on("canplaythrough load",o);return a}(s,l,E),z(),c.undo.saveStep(),c.events.trigger("video.inserted",[e,v])};_("Loading video"),p()}function _(e){var t=c.popups.get("video.insert");if(t||(t=a()),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 o=p.find("video");c.popups.setContainer("video.insert",c.$sc);var i=o.offset().left,r=o.offset().top+o.height();c.popups.show("video.insert",i,r,o.outerHeight())}void 0===e&&A(c.language.translate("Uploading"),0)}function S(e){var t=c.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||c.$el.find("video.fr-error").length)){if(c.events.focus(),c.$el.find("video.fr-error").length&&(c.$el.find("video.fr-error").parent().remove(),c.undo.saveStep(),c.undo.run(),c.undo.dropRedo()),!c.$wp&&p){var o=p;M(!0),c.selection.setAfter(o.find("video").get(0)),c.selection.restore()}c.popups.hide("video.insert")}}function A(e,t){var o=c.popups.get("video.insert");if(o){var i=o.find(".fr-video-progress-bar-layer");i.find("h3").text(e+(t?" ".concat(t,"%"):"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width","".concat(t,"%"))):i.find("div").addClass("fr-indeterminate")}}function x(e){_();var t=c.popups.get("video.insert").find(".fr-video-progress-bar-layer");t.addClass("fr-error");var o=t.find("h3");o.text(e),c.events.disableBlur(),o.focus()}function R(e){t.call(e.get(0))}function D(e){A("Loading video");var t=this.status,o=this.response,i=this.responseXML,r=this.responseText;try{if(c.opts.videoUploadToS3)if(201==t){var n=function s(e){try{var t=u(e).find("Location").text(),o=u(e).find("Key").text();return!1===c.events.trigger("video.uploadedToS3",[t,o,e],!0)?(c.edit.on(),!1):t}catch(i){return X(m,e),!1}}(i);n&&C(n,!1,[],e,o||i)}else X(m,o||i);else if(200<=t&&t<300){var a=function d(e){try{if(!1===c.events.trigger("video.uploaded",[e],!0))return c.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(X(h,e),!1)}catch(o){return X(m,e),!1}}(r);a&&C(a.link,!1,a,e,o||r)}else X(g,o||r)}catch(l){X(m,o||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(c.language.translate("Uploading"),t)}}function $(){c.edit.on(),S(!0)}function I(e){if(!c.core.sameInstance(v))return!0;e.preventDefault(),e.stopPropagation();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;if("mousedown"==e.type){var i=c.$oel.get(0).ownerDocument,r=i.defaultView||i.parentWindow,n=!1;try{n=r.location!=r.parent.location&&!(r.$&&r.$.FE)}catch(a){}n&&r.frameElement&&(t+=c.helpers.getPX(u(r.frameElement).offset().left)+r.frameElement.clientLeft,o=e.clientY+c.helpers.getPX(u(r.frameElement).offset().top)+r.frameElement.clientTop)}c.undo.canDo()||c.undo.saveStep(),(f=u(this)).data("start-x",t),f.data("start-y",o),s.show(),c.popups.hideAll(),Y()}function k(e){if(!c.core.sameInstance(v))return!0;if(f){e.preventDefault();var t=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),o=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!t||!o)return!1;var i=f.data("start-x"),r=f.data("start-y");f.data("start-x",t),f.data("start-y",o);var n=t-i,a=o-r,s=p.find("iframe, embed, video"),d=s.width(),l=s.height();(f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(n=0-n),(f.hasClass("fr-hnw")||f.hasClass("fr-hne"))&&(a=0-a),s.css("width",d+n),s.css("height",l+a),s.removeAttr("width"),s.removeAttr("height"),T()}}function O(e){if(!c.core.sameInstance(v))return!0;f&&p&&(e&&e.stopPropagation(),f=null,s.hide(),T(),n(),c.undo.saveStep())}function L(e){return'
')}function P(e,t,o,i){return e.pageX=t,e.pageY=t,I.call(this,e),e.pageX=e.pageX+o*Math.floor(Math.pow(1.1,i)),e.pageY=e.pageY+o*Math.floor(Math.pow(1.1,i)),k.call(this,e),O.call(this,e),++i}function z(){var e,t=Array.prototype.slice.call(c.el.querySelectorAll("video, .fr-video > *")),o=[];for(e=0;ec.opts.videoMaxSize)return X(l),!1;if(c.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))<0)return X(b),!1;if(c.drag_support.formdata&&(t=c.drag_support.formdata?new FormData:null),t){var i;if(!1!==c.opts.videoUploadToS3)for(i in t.append("key",c.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(o.name||"untitled")),t.append("success_action_status","201"),t.append("X-Requested-With","xhr"),t.append("Content-Type",o.type),c.opts.videoUploadToS3.params)c.opts.videoUploadToS3.params.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadToS3.params[i]);for(i in c.opts.videoUploadParams)c.opts.videoUploadParams.hasOwnProperty(i)&&t.append(i,c.opts.videoUploadParams[i]);t.append(c.opts.videoUploadParam,o);var r=c.opts.videoUploadURL;c.opts.videoUploadToS3&&(r=c.opts.videoUploadToS3.uploadURL?c.opts.videoUploadToS3.uploadURL:"https://".concat(c.opts.videoUploadToS3.region,".amazonaws.com/").concat(c.opts.videoUploadToS3.bucket));var n=c.core.getXHR(r,c.opts.videoUploadMethod);n.onload=function(){D.call(n,p)},n.onerror=U,n.upload.onprogress=B,n.onabort=$,_(),c.events.disableBlur(),c.edit.off(),c.events.enableBlur();var a=c.popups.get("video.insert");a&&u(a.off("abortUpload")).on("abortUpload",function(){4!=n.readyState&&n.abort()}),n.send(t)}}}function X(e,t){c.edit.on(),p&&p.find("video").addClass("fr-error"),x(c.language.translate("Something went wrong. Please try again.")),c.events.trigger("video.error",[{code:e,message:r[e]},t])}function H(){if(p){var e=c.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 c.popups.onRefresh("video.size",H),!0;var t={buttons:'
'.concat(c.button.buildList(c.opts.videoSizeButtons),"
"),size_layer:'
")},o=c.popups.create("video.size",t);return c.events.$on(c.$wp,"scroll",function(){p&&c.popups.isVisible("video.size")&&(c.events.disableBlur(),R(p))}),o}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!==c.events.trigger("video.beforeRemove",[p])){var e=p;c.popups.hideAll(),M(!0),c.selection.setBefore(e.get(0))||c.selection.setAfter(e.get(0)),e.remove(),c.selection.restore(),c.html.fillEmptyBlocks()}}function q(){S()}function Z(e,t,o){!c.opts.htmlUntouched&&c.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(o[0]," fr-dv").concat(t[0]))):"inline"==t?(e.css({display:"inline-block"}),"center"==o?e.css({"float":"none"}):"left"==o?e.css({"float":"left"}):e.css({"float":"right"})):(e.css({display:"block",clear:"both"}),"left"==o?e.css({textAlign:"left"}):"right"==o?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function J(){var e=c.$el.find("video").filter(function(){return 0===u(this).parents("span.fr-video").length});if(0!=e.length){e.wrap(u(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),c.$el.find("embed, iframe").filter(function(){if(c.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0*").first().replaceWith(c.icon.create("video-align-".concat(F())))},refreshAlignOnShow:function fe(e,t){p&&t.find('.fr-command[data-param1="'.concat(F(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function ve(e){p.removeClass("fr-dvi fr-dvb"),!c.opts.htmlUntouched&&c.opts.useClasses?"inline"==e?p.addClass("fr-dvi"):"block"==e&&p.addClass("fr-dvb"):Z(p,e,F()),Q(),T(),n(),c.selection.clear()},refreshDisplayOnShow:function pe(e,t){p&&t.find('.fr-command[data-param1="'.concat(W(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:j,hideProgressBar:S,showSizePopup:function ce(){var e=c.popups.get("video.size");e||(e=G()),S(),c.popups.refresh("video.size"),c.popups.setContainer("video.size",c.$sc);var t=p.find("iframe, embed, video"),o=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.height();c.popups.show("video.size",o,i,t.height(),!0)},replace:function ue(){var e=c.popups.get("video.insert");e||(e=a()),c.popups.isVisible("video.insert")||(S(),c.popups.refresh("video.insert"),c.popups.setContainer("video.insert",c.$sc));var t=p.offset().left+p.outerWidth()/2,o=p.offset().top+p.height();c.popups.show("video.insert",t,o,p.outerHeight(),!0)},back:function e(){p?(c.events.disableBlur(),p[0].click()):(c.events.disableBlur(),c.selection.restore(),c.events.enableBlur(),c.popups.hide("video.insert"),c.toolbar.showInline())},setSize:function he(e,t){if(p){var o=c.popups.get("video.size"),i=p.find("iframe, embed, video");i.css("width",e||o.find('input[name="width"]').val()),i.css("height",t||o.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),o.find("input:focus").blur(),setTimeout(function(){p.trigger("click")},c.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='"},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()}})});