From 6ff03f3d084c3d8fb91f7e72123aaf50c06645bf Mon Sep 17 00:00:00 2001 From: Chupurnov Valeriy Date: Tue, 22 Aug 2017 21:50:39 +0500 Subject: [PATCH] New version 3.0.20. Read more https://github.com/xdan/jodit/releases/tag/3.0.20 --- build/jodit.min.css | 2 +- build/jodit.min.js | 4 ++-- package.json | 2 +- src/modules/Dom.ts | 2 +- src/modules/Uploader.ts | 1 + src/plugins/resizer.ts | 1 - 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/jodit.min.css b/build/jodit.min.css index e602587af..02fcd0bc7 100644 --- a/build/jodit.min.css +++ b/build/jodit.min.css @@ -2,7 +2,7 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (https://xdsoft.net/) - * Version: v3.0.19 + * Version: v3.0.20 * Url: https://xdsoft.net/jodit/ * License(s): SEE LICENSE IN * diff --git a/build/jodit.min.js b/build/jodit.min.js index afe07d70d..5cc2593c6 100644 --- a/build/jodit.min.js +++ b/build/jodit.min.js @@ -2,9 +2,9 @@ * * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser * Author: Chupurnov (https://xdsoft.net/) - * Version: v3.0.19 + * Version: v3.0.20 * Url: https://xdsoft.net/jodit/ * License(s): SEE LICENSE IN * */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Jodit=e():t.Jodit=e()}(this,function(){return function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};return e.m=t,e.c=o,e.i=function(t){return t},e.d=function(t,o,i){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/build/",e(e.s=28)}([function(t,e,o){"use strict";var i=this;e.__esModule=!0;var n=o(3),r={},a=r.toString,s=r.hasOwnProperty;e.isIE=function(){return-1!=navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)};var l=1;e.$$=function(t,o){var i;if(!/:scope/.test(t)||!e.isIE()||"undefined"!=typeof HTMLDocument&&o instanceof HTMLDocument)i=o.querySelectorAll(t);else{var n=o.id,r=n||"_selector_id_"+(""+Math.random()).slice(2)+l++;t=t.replace(/:scope/g,"#"+r),!n&&o.setAttribute("id",r),i=o.parentNode.querySelectorAll(t),n||o.removeAttribute("id")}return[].slice.call(i)},e.isWindow=function(t){return null!==t&&t===t.window},e.type=function(t){return null===t?"null":"object"==typeof t||"function"==typeof t?r[a.call(t)]||"object":typeof t},e.each=function(t,e){var o,i,n;if(Array.isArray(t)){for(o=t.length,n=0;o>n;n+=1)if(!1===e.call(t[n],n,t[n]))return!1}else for(i=Object.keys(t),n=0;i.length>n;n+=1)if(!1===e.call(t[i[n]],i[n],t[i[n]]))return!1;return t},e.each(["Boolean","Number","String","Function","Array","Date","RegExp","Object","Error","Symbol","HTMLDocument","Window","HTMLElement","HTMLBodyElement","Text","DocumentFragment"],function(t,e){r["[object "+e+"]"]=e.toLowerCase()}),e.inArray=function(t,e){return-1!==e.indexOf(t)},e.isPlainObject=function(t){return!("object"!=typeof t||t.nodeType||e.isWindow(t)||t.constructor&&!s.call(t.constructor.prototype,"isPrototypeOf"))},e.extend=function(){for(var t=[],o=0;arguments.length>o;o++)t[o]=arguments[o];var n,r,a,s,l,d,c,u,f=t[0]||{},p=1,h=t.length,g=!1;for("boolean"==typeof f&&(g=f,f=t[p]||{},p+=1),"object"!=typeof f&&"function"===e.type(f)&&(f={}),p===h&&(f=i,p+=1),p;h>p;p+=1)if(null!==(n=t[p])&&void 0!==n)for(u=Object.keys(n),c=0;u.length>c;c+=1)r=u[c],a=f[r],s=n[r],f!==s&&(g&&s&&(e.isPlainObject(s)||Array.isArray(s))?(l=Array.isArray(s),l?(l=!1,d=a&&Array.isArray(a)?a:[]):d=a&&e.isPlainObject(a)?a:{},f[r]=e.extend(g,d,s)):void 0!==s&&(f[r]=s));return f},e.trim=function(t){return t.replace(n.SPACE_REG_EXP_START,"").replace(n.SPACE_REG_EXP_END,"")},e.colorToHex=function(t){if("rgba(0, 0, 0, 0)"===t||""===t)return!1;if(!t)return"#000000";if("#"===t.substr(0,1))return t;var e,o,i,n,r,a=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t);if(!a)return"#000000";for(o=parseInt(a[2],10),i=parseInt(a[3],10),n=parseInt(a[4],10),r=n|i<<8|o<<16,e=r.toString(16).toUpperCase();6>e.length;)e="0"+e;return a[1]+"#"+e},e.normalizeColor=function(t){var o,i=["#"],n=e.colorToHex(t);if(!n)return!1;if(n=e.trim(n.toUpperCase()),n=n.substr(1),3===n.length){for(o=0;3>o;o+=1)i.push(n[o]),i.push(n[o]);return i.join("")}return n.length>6&&(n=n.substr(0,6)),"#"+n},e.normalizeSize=function(t){return/^[0-9]+$/.test(""+t)?t+"px":""+t},e.getContentWidth=function(t,e){var o=function(t){return parseInt(t,10)},i=e.getComputedStyle(t);return t.offsetWidth-o(i.getPropertyValue("padding-left")||"0")-o(i.getPropertyValue("padding-right")||"0")},e.ctrlKey=function(t){if(-1!==navigator.userAgent.indexOf("Mac OS X")){if(t.metaKey&&!t.altKey)return!0}else if(t.ctrlKey&&!t.altKey)return!0;return!1};var d=function(t){return"file:"===window.location.protocol&&/^\/\//.test(t)&&(t="https:"+t),t};e.appendScript=function(t,e,o){void 0===o&&(o="");var i=document.createElement("script");i.className=o,i.type="text/javascript",i.charset="utf-8",i.src=d(t),void 0!==e&&(i.onload=e),document.body.appendChild(i)},e.dom=function(t,e){if(void 0===e&&(e=document),t instanceof e.defaultView.HTMLElement)return t;var o=e.createElement("div");return o.innerHTML=t,o.firstChild!==o.lastChild?o:o.firstChild},e.hexToRgb=function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,o,i){return e+e+o+o+i+i});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null},e.clear=function(t,o){return void 0===o&&(o=!1),t=e.trim(t).replace(n.INVISIBLE_SPACE_REG_EXP,"").replace(/[\s]*class=""/g,""),o&&(t=t.replace(/]*>[\s\n\r\t]*( |
|)?[\s\n\r\t]*<\/p>[\n\r]*/g,"")),t},e.htmlentities=function(t){return t.replace(//gi,">").replace(/"/gi,""").replace(/'/gi,"'")},e.cleanFromWord=function(t){return t=t.replace(/\s*<\/o:p>/g,""),t=t.replace(/.*?<\/o:p>/g," "),t=t.replace(/\s*mso-[^:]+:[^;"]+;?/gi,""),t=t.replace(/\s*MARGIN: 0cm 0cm 0pt\s*;/gi,""),t=t.replace(/\s*MARGIN: 0cm 0cm 0pt\s*"/gi,'"'),t=t.replace(/\s*TEXT-INDENT: 0cm\s*;/gi,""),t=t.replace(/\s*TEXT-INDENT: 0cm\s*"/gi,'"'),t=t.replace(/\s*TEXT-ALIGN: [^\s;]+;?"/gi,'"'),t=t.replace(/\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi,'"'),t=t.replace(/\s*FONT-VARIANT: [^\s;]+;?"/gi,'"'),t=t.replace(/\s*tab-stops:[^;"]*;?/gi,""),t=t.replace(/\s*tab-stops:[^"]*/gi,""),t=t.replace(/\s*face="[^"]*"/gi,""),t=t.replace(/\s*face=[^ >]*/gi,""),t=t.replace(/\s*FONT-FAMILY:[^;"]*;?/gi,""),t=t.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3"),t=t.replace(/<(\w[^>]*) style="([^"]*)"([^>]*)/gi,"<$1$3"),t=t.replace(/\s*style="\s*"/gi,""),t=t.replace(/]*>\s* \s*<\/SPAN>/gi," "),t=t.replace(/]*><\/SPAN>/gi,""),t=t.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3"),t=t.replace(/(.*?)<\/SPAN>/gi,"$1"),t=t.replace(/(.*?)<\/FONT>/gi,"$1"),t=t.replace(/<\\?\?xml[^>]*>/gi,""),t=t.replace(/<\/?\w+:[^>]*>/gi,""),t=t.replace(/\s*<\/H\d>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/]*)>/gi,""),t=t.replace(/<\/H\d>/gi,"
"),t=t.replace(/<(U|I|STRIKE)> <\/\1>/g," "),t=t.replace(/<(b)> <\/\b>/gi,""),t=t.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),t=t.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),t=t.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/g,""),t=t.replace(RegExp("(]*>.*?)(

)","gi"),""),t=t.replace(/(]*>.*?)(<\/FONT>|<\/font>)/gi,""),t=t.replace(/size|SIZE = ([\d])/g,"")},e.isURL=function(t){return RegExp("^(https?:\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t)},e.pathNormalize=function(t){return t.replace(/([^:])[\\\/]+/g,"$1/")},e.urlNormalize=function(t){return t.replace(/([^:])[\\\/]+/g,"$1/")},e.isHTML=function(t){return/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t)},e.humanSizeToBytes=function(t){if(/^[0-9.]+$/.test(""+t))return t;var e=t.substr(-2,2).toUpperCase(),o=["KB","MB","GB","TB"],i=t.substr(0,t.length-2);return-1!==o.indexOf(e)?i*Math.pow(1024,o.indexOf(e)+1):parseInt(t,10)},e.parseQuery=function(t){var e,o,i={},n=t.substr(1).split("&");for(e=0;n.length>e;e+=1)o=n[e].split("="),i[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"");return i},e.convertMediaURLToVideoEmbed=function(t,o,i){if(void 0===o&&(o=400),void 0===i&&(i=345),!e.isURL(t))return t;var n,r=document.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;switch(r.href=t,o||(o=400),i||(i=345),r.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(t)?t.replace(a,''):t;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":return n=r.search?e.parseQuery(r.search):{v:r.pathname.substr(1)},n.v?'':t}return t},e.browser=function(t){var e=navigator.userAgent.toLowerCase(),o=/(firefox)[\s\/]([\w.]+)/.exec(e)||/(chrome)[\s\/]([\w.]+)/.exec(e)||/(webkit)[\s\/]([\w.]+)/.exec(e)||/(opera)(?:.*version)[\s\/]([\w.]+)/.exec(e)||/(msie)[\s]([\w.]+)/.exec(e)||/(trident)\/([\w.]+)/.exec(e)||0>e.indexOf("compatible")||[];return"version"===t?o[2]:"webkit"===t?"chrome"===o[1]||"webkit"===o[1]:"ff"===t?"firefox"===o[1]:"msie"===t?"trident"===o[1]||"msie"===o[1]:o[1]===t},e.offset=function(t,o,i){void 0===i&&(i=!1);var n,r,a=t.getBoundingClientRect(),s=t.ownerDocument,l=s.body,d=s.documentElement,c=s.defaultView||s.parentWindow,u=c.pageYOffset||d.scrollTop||l.scrollTop,f=c.pageXOffset||d.scrollLeft||l.scrollLeft,p=d.clientTop||l.clientTop||0,h=d.clientLeft||l.clientLeft||0;if(!i&&o.options.iframe){var g=e.offset(o.iframe,o,!0),v=g.top,m=g.left;n=a.top+v,r=a.left+m}else n=a.top+u-p,r=a.left+f-h;return{top:Math.round(n),left:Math.round(r),width:a.width,height:a.height}},e.camelCase=function(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})},e.fromCamelCase=function(t){return t.replace(/([A-Z]+)/g,function(t,e){return"-"+e.toLowerCase()})},e.htmlspecialchars=function(t){var e=document.createElement("div");return e.innerText=t,e.innerHTML},e.debounce=function(t,e,o,i){3===arguments.length&&"boolean"!=typeof o&&(i=o,o=!1);var n;return function(){var r=arguments;i=i||this,!o&&e||t.apply(i,r),clearTimeout(n),e&&(n=setTimeout(function(){o||t.apply(i,r),n=null},e))}},e.throttle=function(t,e,o){var i,n,r,a;return function(){n=arguments,r=!0,o=o||this,i||(a=function(){r?(t.apply(o,n),r=!1,i=setTimeout(a,e)):i=null})()}},e.normilizeCSSValue=function(t,e){switch(t){case"font-weight":return"bold"===e?700:e}return e},e.css=function(t,o,i){var n=/^left|top|bottom|right|width|min|max|height|margin|padding|font-size/i;if(!e.isPlainObject(o)&&void 0===i){var r=e.fromCamelCase(o),a=t.ownerDocument,s=!!a&&(a.defaultView||a.parentWindow),l=void 0!==t.style[o]&&""!==t.style[o]?t.style[o]:s?s.getComputedStyle(t).getPropertyValue(r):"";return n.test(o)&&/^[\-+]?[0-9\.]+px$/.test(""+l)&&(l=parseInt(l,10)),e.normilizeCSSValue(o,l)}var d=function(t,o,i){void 0!==i&&null!==i&&n.test(o)&&/^[\-+]?[0-9.]+$/.test(""+i)&&(i=parseInt(i,10)+"px"),e.css(t,o)!=e.normilizeCSSValue(o,i)&&(t.style[o]=i)};if(e.isPlainObject(o)){var c=Object.keys(o),u=void 0;for(u=0;c.length>u;u+=1)d(t,e.camelCase(c[u]),o[c[u]])}else d(t,e.camelCase(o),i)},e.asArray=function(t){return Array.isArray(t)?t:[t]},e.sprintf=function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var o=/%%|%(\d+\$)?([-+#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g,i=t,n=0,r=i[n++],a=function(t,e,o,i){var n=e>t.length?Array(1+e-t.length>>>0).join(o):"";return i?t+n:n+t},s=function(t,e,o,i,n){var r=i-t.length;return r>0&&(t=o||!n?a(t,i," ",o):t.slice(0,e.length)+a("",r,"0",!0)+t.slice(e.length)),t},l=function(t,e,o,i,n,r,l){var d=t>>>0;return o=o&&d&&{2:"0b",8:"0",16:"0x"}[e]||"",t=o+a(d.toString(e),r||0,"0",!1),s(t,o,i,n,l)},d=function(t,e,o,i,n){return null!=i&&(t=t.slice(0,i)),s(t,"",e,o,n)};return r.replace(o,function(t,e,o,r,c,u,f){if("%%"==t)return"%";for(var p=!1,h="",g=!1,v=!1,m=0;o&&o.length>m;m++)switch(o.charAt(m)){case" ":h=" ";break;case"+":h="+";break;case"-":p=!0;break;case"0":g=!0;break;case"#":v=!0}if(r=r?"*"===r?+i[n++]:"*"===r.charAt(0)?+i[r.slice(1,-1)]:+r:0,0>r&&(r=-r,p=!0),!isFinite(r))throw Error("sprintf: (minimum-)width must be finite");u=u?"*"===u?+i[n++]:"*"===u[0]?+i[u.slice(1,-1)]:+u:"fFeE".indexOf(f)>-1?6:"d"==f?0:void 0;var _=e?i[e.slice(0,-1)]:i[n++];switch(f){case"s":return d(_+"",p,r,u,g);case"c":return d(String.fromCharCode(+_),p,r,u,g);case"b":return l(_,2,v,p,r,u,g);case"o":return l(_,8,v,p,r,u,g);case"x":return l(_,16,v,p,r,u,g);case"X":return l(_,16,v,p,r,u,g).toUpperCase();case"u":return l(_,10,v,p,r,u,g);case"i":case"d":var b=parseInt(""+_,10),y=0>b?"-":h;return _=y+a(Math.abs(b)+"",u,"0",!1),s(_,y,p,r,g);case"e":case"E":case"f":case"F":case"g":case"G":var b=+_,y=0>b?"-":h,w=["toExponential","toFixed","toPrecision"]["efg".indexOf(f.toLowerCase())],q=["toString","toUpperCase"]["eEfFgG".indexOf(f)%2];return _=y+Math.abs(b)[w](u),s(_,y,p,r,g)[q]();default:return t}})},e.val=function(t,e,o){var i=t.querySelector(e);return i?(o&&(i.value=o),i.value):""},e.defaultLanguage=function(t){return"auto"===t||void 0===t?document.documentElement.lang||navigator.language&&navigator.language.substr(0,2)||navigator.browserLanguage&&navigator.browserLanguage.substr(0,2)||"en":t}},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(6),a=o(11),s=o(3),l=o(0),d=o(0),c=o(2),u=function(t){function e(o,i){var n=t.call(this)||this;n.version="3.0.19",n.components=[],n.__modulesInstances={},n.__plugins={},n.__defaultStyleDisplayKey="data-jodit-default-style-display",n.__whoLocked="",n.isLocked=function(){return""!==n.__whoLocked},n.isLockedNotBy=function(t){return n.isLocked()&&n.__whoLocked!==t},n.mode=s.MODE_WYSIWYG,n.getVersion=function(){return n.version},n.doc=document,n.win=window;var a=function(){};if(a.prototype=e.defaultOptions,n.options=new a,void 0!==i&&"object"==typeof i&&Object.keys(i).forEach(function(t){n.options[t]="object"!=typeof e.defaultOptions[t]||Array.isArray(e.defaultOptions[t])?i[t]:l.extend(!0,{},e.defaultOptions[t],i[t])}),void 0===(n.element="string"==typeof o?document.querySelector(o):o)||!(n.element instanceof HTMLElement))throw Error('Element "'+o+'" should be string or HTMLElement');n.selection=n.getInstance("Selection"),n.uploader=n.getInstance("Uploader"),n.events=n.getInstance("Events"),n.container=l.dom('
'),n.container.classList.add("jodit_"+(n.options.theme||"default")+"_theme"),n.options.zIndex&&(n.container.style.zIndex=""+parseInt(""+n.options.zIndex,10)),n.workplace=l.dom('
'),n.progress_bar=l.dom('
'),n.toolbar=new r.default(n),n.toolbar.build(n.options.buttons.concat(n.options.extraButtons),n.container),n.container.classList.add("jodit_toolbar_size-"+(-1!==["middle","large","small"].indexOf(n.options.toolbarButtonSize.toLowerCase())?n.options.toolbarButtonSize.toLowerCase():"middle")),n.options.textIcons&&n.container.classList.add("jodit_text_icons"),n.__on(window,"resize",function(){n.events.fire("resize")}),n.container.appendChild(n.workplace),n.workplace.appendChild(n.progress_bar),n.element.parentNode.insertBefore(n.container,n.element),n.helper=d,n.initPlugines(),n.__createEditor(),n.setElementValue(),n.options.events&&l.each(n.options.events,function(t,e){n.events.on(t,e)}),n.id=n.element.getAttribute("id")||""+(new Date).getTime(),e.instances[n.id]=n;try{n.doc.execCommand("enableObjectResizing",!1,!1),n.doc.execCommand("enableInlineTableEditing",!1,!1)}catch(t){}return n.setMode(n.options.defaultMode),n.events.fire("afterInit"),n}return i(e,t),e.prototype.getInstance=function(t,o){if(void 0===e.modules[t])throw Error("Need real module name");return void 0===this.__modulesInstances[t]&&(this.__modulesInstances[t]=new e.modules[t](this,o)),this.__modulesInstances[t]},e.prototype.initPlugines=function(){var t,o=Object.keys(e.plugins);for(t=0;o.length>t;t+=1)this.__plugins[o[t]]=new e.plugins[o[t]](this)},e.prototype.__createEditor=function(){var t=this;!1!==this.events.fire("createEditor")&&(this.editor=l.dom('
'),l.css(this.editor,{width:this.options.width,height:this.options.height,minHeight:this.options.minHeight}),this.workplace.appendChild(document.createTextNode("\n")),this.workplace.appendChild(this.editor),this.workplace.appendChild(document.createTextNode("\n"))),this.options.editorCssClass&&this.editor.classList.add(this.options.editorCssClass),["keydown","keyup","keypress","mousedown","mouseup","mousepress","paste","resize","touchstart","touchend"].forEach(function(e){t.editor.addEventListener(e,function(o){if(!1===t.events.fire(e,[o]))return o.preventDefault(),!1;t.setEditorValue()})}),this.options.spellcheck&&this.editor.setAttribute("spellcheck","true"),this.options.direction&&(this.editor.style.direction="rtl"===this.options.direction.toLowerCase()?"rtl":"ltr"),this.element.style.display&&this.element.setAttribute(this.__defaultStyleDisplayKey,this.element.style.display),this.element.style.display="none",this.options.triggerChangeEvent&&this.events.on("change",l.debounce(function(){t.__fire(t.element,"change")},this.options.observer.timeout))},e.prototype.destruct=function(){var t=this;!1!==this.events.fire("beforeDestruct")&&this.editor&&(this.element.hasAttribute(this.__defaultStyleDisplayKey)?(this.element.style.display=this.element.getAttribute(this.__defaultStyleDisplayKey),this.element.removeAttribute(this.__defaultStyleDisplayKey)):this.element.style.display="",this.element.hasAttribute("style")&&!this.element.getAttribute("style")&&this.element.removeAttribute("style"),delete this.selection,this.events.off(),delete this.events,Object.keys(this.__plugins).forEach(function(e){void 0!==t.__plugins[e].destruct&&"function"==typeof t.__plugins[e].destruct&&t.__plugins[e].destruct(),delete t.__plugins[e]}),this.components.forEach(function(t){void 0!==t.destruct&&"function"==typeof t.destruct&&t.destruct()}),this.container.parentNode.removeChild(this.container),delete this.container,delete this.editor,delete this.workplace,delete e.instances[this.id])},e.prototype.getElementValue=function(){return void 0!==this.element.value?this.element.value:this.element.innerHTML},e.prototype.getEditorValue=function(){var t;if(void 0!==(t=this.events.fire("beforeGetValueFromEditor")))return t;"
"===(t=this.editor?this.editor.innerHTML.replace(s.INVISIBLE_SPACE_REG_EXP,""):this.getElementValue())&&(t="");var e={value:t};return this.events.fire("afterGetValueFromEditor",[e]),e.value},e.prototype.setElementValue=function(t){if("string"!=typeof t&&void 0!==t)throw Error("value must be string");void 0!==t&&(void 0!==this.element.value?this.element.value=t:this.element.innerHTML=t),this.getElementValue()!==this.getEditorValue()&&this.setEditorValue(this.getElementValue())},e.prototype.setEditorValue=function(t){if(this.editor){if("string"!=typeof t&&void 0!==t)throw Error("value must be string");void 0!==t&&(this.editor.innerHTML=t);var e=this.getElementValue();e!==this.getEditorValue()&&(this.setElementValue(this.getEditorValue()),this.events.fire("change",[e,this.getEditorValue()]))}},e.prototype.execCommand=function(t,e,o){void 0===e&&(e=!1),void 0===o&&(o=null);var i;if(t=t.toLowerCase(),!1!==this.events.fire("beforeCommand",[t,e,o]))switch(this.selection.focus(),t){case"selectall":this.selection.select(this.editor,!0);break;default:try{i=this.doc.execCommand(t,e,o)}catch(t){}}return this.events.fire("afterCommand",[t,e,o]),this.setEditorValue(),i},e.prototype.lock=function(t){this.__whoLocked=t,this.editor.classList.add("jodit_disabled")},e.prototype.unlock=function(){this.__whoLocked="",this.editor.classList.remove("jodit_disabled")},e.prototype.getMode=function(){return this.mode},e.prototype.getRealMode=function(){return this.mode!==s.MODE_SPLIT?this.mode:document.activeElement&&"TEXTAREA"===document.activeElement.tagName?s.MODE_SOURCE:s.MODE_WYSIWYG},e.prototype.setMode=function(t){var e=this,o={mode:t},i=["jodit_wysiwyg_mode","jodit_source_mode","jodit_split_mode"];!1!==this.events.fire("beforeSetMode",[o])&&(this.mode=l.inArray(o.mode,[s.MODE_SOURCE,s.MODE_WYSIWYG,s.MODE_SPLIT])?o.mode:s.MODE_WYSIWYG,this.options.saveModeInCookie&&a.default.set("jodit_default_mode",this.mode,31),i.forEach(function(t){e.container.classList.remove(t)}),this.container.classList.add(i[this.mode-1]),this.events.fire("afterSetMode"))},e.prototype.toggleMode=function(){var t=this.getMode();l.inArray(t+1,[s.MODE_SOURCE,s.MODE_WYSIWYG,this.options.useSplitMode?s.MODE_SPLIT:9])?t+=1:t=s.MODE_WYSIWYG,this.setMode(t)},e.prototype.i18n=function(t){for(var o=this,i=[],n=1;arguments.length>n;n++)i[n-1]=arguments[n];if(void 0!==this.options&&this.options.debugLanguage)return"{"+t+"}";var r;return r=void 0!==this.options&&void 0!==e.lang[l.defaultLanguage(this.options.language)]?e.lang[l.defaultLanguage(this.options.language)]:void 0!==e.lang[l.defaultLanguage(e.defaultOptions.language)]?e.lang[l.defaultLanguage(e.defaultOptions.language)]:e.lang.en,function(t){return l.sprintf.apply(o,[t].concat(i))}(void 0!==this.options&&void 0!==this.options.i18n[l.defaultLanguage(this.options.language)]&&this.options.i18n[l.defaultLanguage(this.options.language)][t]?this.options.i18n[l.defaultLanguage(this.options.language)][t]:"string"==typeof r[t]&&r[t]?r[t]:"string"==typeof e.lang.en[t]&&e.lang.en[t]?e.lang.en[t]:t)},e.plugins={},e.modules={},e.instances={},e.lang={},e}(n.default);e.default=u,u.defaultOptions=new c.Config},function(t,e,o){"use strict";e.__esModule=!0;var i=o(3),n=o(0),r=o(8),a=r.Widget.TabsWidget,s=r.Widget.ImageSelectorWidget,l=function(){function t(){this.zIndex=0,this.offsetTopForAssix=0,this.toolbarButtonSize="middle",this.theme="default",this.saveModeInCookie=!1,this.spellcheck=!0,this.editorCssClass=!1,this.triggerChangeEvent=!0,this.width="auto",this.height="auto",this.minHeight=100,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n="en",this.tabIndex=-1,this.toolbar=!0,this.enter=i.PARAGRAPH,this.defaultMode=i.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.extraButtons=[],this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=["source","|","bold","italic","|","ul","ol","|","font","fontsize","brush","paragraph","|","image","video","table","link","|","align","|","undo","redo","|","hr","eraser","fullsize","about"],this.buttonsMD=["source","|","bold","italic","|","ul","ol","|","font","fontsize","brush","paragraph","|","image","table","link","|","align","|","undo","redo","|","hr","eraser","fullsize"],this.buttonsSM=["source","|","bold","italic","|","ul","ol","|","fontsize","brush","paragraph","|","image","table","link","|","align","|","undo","redo","|","eraser","fullsize"],this.buttonsXS=["bold","image","|","brush","paragraph","|","align","|","undo","redo","|","eraser"],this.events={},this.textIcons=!1}return t}();e.Config=l,l.prototype.controls={about:{exec:function(t){var e=new(o(7).default)(t);e.setTitle(t.i18n("About Jodit")),e.setContent('
'+t.i18n("Jodit Editor")+" v."+t.getVersion()+" "+t.i18n("Free Non-commercial Version")+'
'+t.i18n("Jodit User's Guide")+" "+t.i18n("contains detailed help for using")+"
"+t.i18n("For information about the license, please go to our website:")+'
"+t.i18n("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")+"
"),e.open()},tooltip:"About Jodit",mode:i.MODE_SOURCE+i.MODE_WYSIWYG},hr:{command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},image:{popup:function(t,e,o,i){var r,a=function(e){t.selection.insertNode(n.dom('',t.doc))};return e&&e.nodeType!==Node.TEXT_NODE&&("IMG"===e.tagName||n.$$("img",e).length)&&(r="IMG"===e.tagName?e:n.$$("img",e)[0]),s(t,{filebrowser:function(t){if(t.files&&t.files.length){var e=void 0;for(e=0;t.files.length>e;e+=1)a(t.baseurl+t.files[e])}i()},upload:function(t){var e;if(t.files&&t.files.length)for(e=0;t.files.length>e;e+=1)a(t.baseurl+t.files[e]);i()},url:function(e,o){var a=r||n.dom("",t.doc);a.setAttribute("src",e),a.setAttribute("alt",o),r||t.selection.insertNode(a),i()}},r)},tags:["img"],tooltip:"Insert Image"},video:{popup:function(t){var e=n.dom('
\n \n \n
"),i=n.dom('
\n \n \n
"),r={},s=t.selection.save(),l=function(e){t.selection.restore(s),t.selection.insertHTML(e)};return r[o(6).default.getIcon("link")+" "+t.i18n("Link")]=e,r[o(6).default.getIcon("source")+" "+t.i18n("Code")]=i,i.addEventListener("submit",function(t){return t.preventDefault(),n.trim(n.val(i,"textarea[name=code]"))?(l(n.val(i,"textarea[name=code]")),!1):(i.querySelector("textarea[name=code]").focus(),i.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)}),e.addEventListener("submit",function(t){return t.preventDefault(),n.isURL(n.val(e,"input[name=code]"))?(l(n.convertMediaURLToVideoEmbed(n.val(e,"input[name=code]"))),!1):(e.querySelector("input[name=code]").focus(),e.querySelector("input[name=code]").classList.add("jodit_error"),!1)}),a(t,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},table:{cols:10,popup:function(t,e,o,i){var r,a,s,l,d=1,c=1,u=o.cols,f=n.dom('
'),p=f.querySelectorAll("span")[0],h=f.querySelectorAll("span")[1],g=[],v=function(t){var e=(t+1)*u;if(g.length>e){for(r=e;g.length>r;r+=1)f.removeChild(g[r]),delete g[r];g.length=e}for(r=0;e>r;r+=1)g[r]||(l=document.createElement("div"),l.setAttribute("data-index",""+r),g.push(l));g.forEach(function(t){f.appendChild(t)}),f.style.width=g[0].offsetWidth*u+"px"};v(1),g[0].className="hovered";var m=function(t,e){var o=t.target;if("DIV"===o.tagName){if(s=isNaN(e)?parseInt(o.getAttribute("data-index"),10):e,d=Math.ceil((s+1)/u),c=s%u+1,v(d),c===u||u-1>c&&u>10)return u=c===u?u+1:u-1,m(t,c+(d-1)*u-1);for(r=0;g.length>r;r+=1)g[r].className=r%u+1>c||d=r;r+=1){for(l=t.doc.createElement("tr"),a=1;c>=a;a+=1)f=t.doc.createElement("td"),f.style.width=g+"%",n||(n=f),p=t.doc.createElement("br"),f.appendChild(p),l.appendChild(t.doc.createTextNode("\n")),l.appendChild(t.doc.createTextNode("\t")),l.appendChild(f);h.appendChild(t.doc.createTextNode("\n")),h.appendChild(l)}t.selection.insertNode(t.doc.createTextNode("\n")),t.selection.insertNode(h),t.selection.setCursorIn(n),i()}}),f},tags:["table"],tooltip:"Insert table"}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(0);e.INVISIBLE_SPACE="\ufeff",e.INVISIBLE_SPACE_REG_EXP=/[\uFEFF]/g,e.SPACE_REG_EXP=/[\s\n\t\r\uFEFF\u200b]+/g,e.SPACE_REG_EXP_START=/^[\s\n\t\r\uFEFF\u200b]+/g,e.SPACE_REG_EXP_END=/[\s\n\t\r\uFEFF\u200b]+$/g,e.IS_BLOCK=/^(PRE|DIV|P|TD|TH|LI|H[1-6]|TABLE|BLOCKQUOTE)$/i,e.KEY_ENTER=13,e.KEY_BACKSPACE=8,e.KEY_DELETE=46,e.KEY_TAB=9,e.KEY_LEFT=37,e.KEY_TOP=38,e.KEY_RIGHT=39,e.KEY_BOTTOM=40,e.KEY_Z=90,e.KEY_Y=89,e.NEARBY=5,e.ACCURACY=10,e.PARAGRAPH="P",e.MODE_WYSIWYG=1,e.MODE_SOURCE=2,e.MODE_SPLIT=3,e.TEXT_PLAIN=i.isIE()?"text":"text/plain",e.MARKER_CLASS="jodit_selection_marker",e.EMULATE_DBLCLICK_TIMEOUT=300},function(t,e,o){"use strict";e.__esModule=!0;var i=o(3),n=o(0);e.default=function(){function t(){}return t.unwrap=function(t){for(var e=t.parentNode,o=t;o.firstChild;)e.insertBefore(o.firstChild,o);e.removeChild(o)},t.each=function(e,o){var i=e;do{(i=t.next(i,function(t){return!!t},e))&&o.call(i,i)}while(i)},t.create=function(t,e,o){var i;return t=t.toLowerCase(),"text"===t?i=o.createTextNode("string"==typeof e?e:""):(i=o.createElement(t),void 0!==e&&(i.innerHTML=e)),i},t.replace=function(e,o,i,r,a){void 0===i&&(i=!1),void 0===r&&(r=!1);var s="string"==typeof o?t.create(o,"",a):o;if(!r)for(;e.firstChild;)s.appendChild(e.firstChild);return i&&n.each(e.attributes,function(t,e){s.setAttribute(e.name,e.nodeValue)}),e.parentNode.replaceChild(s,e),s},t.isBlock=function(t){return t&&t.tagName&&i.IS_BLOCK.test(t.tagName)},t.canSplitBlock=function(t,e){return t&&t instanceof(e||window).HTMLElement&&this.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)},t.prev=function(e,o,i,n){return void 0===n&&(n=!0),t.find(e,o,i,!1,"previousSibling",!!n&&"lastChild")},t.next=function(e,o,i,n){return void 0===n&&(n=!0),t.find(e,o,i,void 0,void 0,n?"firstChild":"")},t.find=function(e,o,i,n,r,a){if(void 0===n&&(n=!1),void 0===r&&(r="nextSibling"),void 0===a&&(a="firstChild"),n&&o(e))return e;var s,l=e;do{if(s=l[r],o(s))return s;if(a&&s&&s[a]){var d=t.find(s[a],o,s,!0,r,a);if(d)return d}s||(s=l.parentNode),l=s}while(l&&l!==i);return!1},t.isEmptyTextNode=function(t){return t&&t.nodeType===Node.TEXT_NODE&&0===t.nodeValue.replace(i.INVISIBLE_SPACE_REG_EXP,"").length},t.isNode=function(t,e){return"object"==typeof Node?t instanceof(e||window).Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},t.up=function(t,e,o){var i=t;if(!t)return!1;do{if(e(i))return i;if(i===o)break;i=i.parentNode}while(i&&i!==o);return!1},t.closest=function(e,o,i){var n;return n="function"==typeof o?o:o instanceof RegExp?function(t){return o.test(t.tagName)}:function(t){return RegExp("^("+o+")$","i").test(t.tagName)},t.up(e,n,i)},t.after=function(t,e){var o=t.parentNode;o.lastChild===t?o.appendChild(e):o.insertBefore(e,t.nextSibling)},t.all=function(e,o){var i=e,n=i.childNodes?Array.prototype.slice.call(i.childNodes):[];if(o(i))return i;n.forEach(function(e){t.all(e,o)})},t.wrap=function(e,o,i){var n,r=e,a=e,s=i.selection.save();do{(n=t.prev(r,function(e){return e&&!t.isBlock(e)},i.editor,!1))&&(r=n)}while(n);do{(n=t.next(a,function(e){return e&&!t.isBlock(e)},i.editor,!1))&&(a=n)}while(n);var l="string"==typeof o?t.create(o,"",i.doc):o;r.parentNode.insertBefore(l,r);for(var d=r;d&&(d=r.nextSibling,l.appendChild(r),r!==a);)r=d;return i.selection.restore(s),l},t.contains=function(t,e){for(;e.parentNode;){if(e.parentNode===t)return!0;e=e.parentNode}return!1},t.isOrContains=function(e,o){return e===o||t.contains(e,o)},t}()},function(t,e,o){"use strict";e.__esModule=!0,e.default=function(){function t(t){this.__scope=[],this.__scopeNamespace={},this.classSeparator=/[\s]+/,this.jodit=t,t&&t.components&&t.components.push(this)}return t.prototype.__fire=function(t,e,o){void 0===o&&(o=document);var i=o.createEvent("HTMLEvents");"string"==typeof e?i.initEvent(e,!0,!0):(i.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(function(t){Object.defineProperty(i,t,{value:e[t],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(i)},t.prototype.__off=function(t,e){if(void 0===t&&(t=!1),void 0===e&&(e=!1),e&&/^\./.test(e)){var o=e.replace(/^\./,"");return this.__scopeNamespace[o]&&this.__scopeNamespace[o].forEach(function(e){(Array.isArray(t)?t:[t]).forEach(function(t){e.element&&e.element.removeEventListener&&(!1===t||t===e.element)&&e.element.removeEventListener(e.event,e.callback)})}),this}return this.__scope.forEach(function(o){(Array.isArray(t)?t:[t]).forEach(function(t){!o.element||!o.element.removeEventListener||!1!==t&&t!==o.element||!1!==e&&e!==o.event||o.element.removeEventListener(o.event,o.callback)})}),this},t.prototype.__on=function(t,e,o,i){var n=this;"function"==typeof o&&(i=o,o=!1);var r=e?e.split(this.classSeparator):[],a=function(t){t.cancelBubble||(t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(function(e){Object.defineProperty(t,e,{value:t.changedTouches[0][e],enumerable:!0})}),t.originalEvent||(t.originalEvent=t))},s=function(t){a(t),i.call(this,t)};return r.forEach(function(e){var r="";/\./.test(e)&&(d=e.split("."),e=d[0],r=d[1]),o&&(s=function(t){a(t);for(var e=t.target;e&&e!==this;){if(e.matches(o)){if(!1===i.call(e,t))return t.preventDefault(),!1;return}e=e.parentNode}}),(Array.isArray(t)?t:[t]).forEach(function(t){t.addEventListener(e,s,!1)});var l={element:t,event:e,callback:s};void 0===n.__scopeNamespace[r]&&(n.__scopeNamespace[r]=[]),n.__scopeNamespace[r].push(l),n.__scope.push(l);var d}),this},t.prototype.destruct=function(){this.__off()},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(4);e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.__popapOpened=!1,o.__listOpened=!1,o.closeAll=function(){o.list.innerHTML="",o.popup.innerHTML="",o.popup.style.display="none",o.list.style.display="none",r.$$(".jodit_dropdown_open, .jodit_popap_open",o.container).forEach(function(t){t.classList.remove("jodit_dropdown_open","jodit_popap_open")}),o.__popapOpened&&o.jodit.selection&&o.jodit.selection.clear(),o.__popapOpened=!1,o.__listOpened=!1},o.defaultControl={template:function(t,e,i){return o.jodit.i18n(i)}},o.buttonList=[],o.initEvents=function(){o.__on(o.popup,"mousedown touchstart",function(t){t.stopPropagation()}).__on(o.list,"mousedown touchstart",function(t){t.stopPropagation()}).__on(window,"mousedown touchstart",function(){(o.__popapOpened||o.__listOpened)&&o.closeAll()}),o.jodit.events.on("mousedown keydown change afterSetMode",function(){var t=function(){o.jodit.selection&&o.checkActiveButtons(o.jodit.selection.current())};o.jodit.options.observer.timeout?setTimeout(t,o.jodit.options.observer.timeout):t()})},o.container=r.dom('
'),o.popup=r.dom('
'),o.list=r.dom('
    '),o.initEvents(),o}return i(e,t),e.getIcon=function(t,o){return void 0===o&&(o=""),void 0!==e.icons[t]?e.icons[t]:o},e.prototype.openPopup=function(t,e,o){void 0===o&&(o=!1),this.closeAll(),e&&(t.classList.add("jodit_popup_open"),t.appendChild(this.popup),this.__popapOpened=!0,this.popup.innerHTML="",this.popup.appendChild(r.dom(e)),this.popup.style.display="block",this.popup.classList.toggle("jodit_right",o))},e.prototype.openList=function(t){t.classList.add("jodit_dropdown_open"),this.closeAll(),this.__listOpened=!0,this.list.style.display="block"},e.__toggleButton=function(t,e){t.classList.toggle("jodit_disabled",!e),e?t.hasAttribute("disabled")&&t.removeAttribute("disabled"):t.hasAttribute("disabled")||t.setAttribute("disabled","disabled")},e.prototype.checkActiveButtons=function(t){var o=this;this.buttonList.forEach(function(i){var n=i.control,r=i.btn;r.classList.remove("jodit_active");var l=void 0===n||void 0===n.mode?a.MODE_WYSIWYG:n.mode;if(e.__toggleButton(r,l===a.MODE_SPLIT||l===o.jodit.getRealMode()),t){var d,c,u,f=function(t,e){return""+o.jodit.win.getComputedStyle(t).getPropertyValue(e)},p=function(t,e){var i=0,n=0;Object.keys(t).forEach(function(r){var a=t[r];"function"==typeof a?a(o.jodit,f(e,r).toLowerCase())&&(i+=1):-1!==a.indexOf(f(e,r).toLowerCase())&&(i+=1),n+=1}),n===i&&r.classList.add("jodit_active")};(n.tags||n.options&&n.options.tags)&&(d=n.tags||n.options&&n.options.tags,c=t,s.default.up(c,function(t){if(-1!==d.indexOf(t.nodeName.toLowerCase()))return r.classList.add("jodit_active"),!0},o.jodit.editor)),(n.css||n.options&&n.options.css)&&(u=n.css||n.options&&n.options.css,c=t,s.default.up(c,function(t){t&&t.nodeType!==Node.TEXT_NODE&&p(u,t)},o.jodit.editor))}})},e.prototype.addButton=function(t,o,i,n){var a,s=this,l=r.extend(!0,{},o,this.defaultControl),d=r.dom('
  • '),c="string"==typeof t?t:t.name||"empty",u=d.querySelector("a");this.jodit.options.textIcons?a=""+c+"":!1===(a=e.getIcon(c,!1))&&(a=e.getIcon("string"==typeof l.name?l.name:"empty"));var f=c.replace(/[^a-zA-Z0-9]/g,"_");d.classList.add("jodit_toolbar_btn"),d.classList.add("jodit_toolbar_btn-"+f),this.jodit.events.on(r.camelCase("can-"+f),function(t){e.__toggleButton(d,t)});var p=r.dom(a);return p&&p.nodeType!==Node.TEXT_NODE&&p.classList.add("jodit_icon","jodit_icon_"+f),u.appendChild(p),void 0!==l&&"object"==typeof l||(l={command:c}),void 0!==i&&""!==i&&(u.innerHTML=i),l.list&&(d.classList.add("jodit_with_dropdownlist"),u.appendChild(r.dom(''))),l.iconURL&&(u.style.backgroundImage="url("+l.iconURL+")"),l.tooltip?d.querySelector(".jodit_tooltip").innerHTML=this.jodit.i18n(l.tooltip):d.removeChild(d.querySelector(".jodit_tooltip")),this.__on(d,"mousedown touchend",function(t){if(t.stopImmediatePropagation(),t.preventDefault(),d.classList.contains("jodit_disabled"))return!1;l.list?(s.openList(d),r.each(l.list,function(t,e){var o;o=void 0!==s.jodit.options.controls[e]?s.addButton(e,s.jodit.options.controls[e],"",n):void 0!==s.jodit.options.controls[t]?s.addButton(t,r.extend({},s.jodit.options.controls[t],e),"",n):s.addButton(t,{exec:l.exec,command:l.command,args:[l.args&&l.args[0]||t,l.args&&l.args[1]||e]},l.template&&l.template(s.jodit,t,e),n),s.list.appendChild(o)}),d.appendChild(s.list)):void 0!==l.exec&&"function"==typeof l.exec?(l.exec(s.jodit,n||s.jodit.selection.current(),l,t,d),s.jodit.setEditorValue(),s.jodit.events.fire("hidePopup"),s.closeAll()):void 0!==l.popup&&"function"==typeof l.popup?s.openPopup(d,l.popup(s.jodit,n||s.jodit.selection.current(),l,s.closeAll)):(l.command||c)&&(s.jodit.execCommand(l.command||c,l.args&&l.args[0]||!1,l.args&&l.args[1]||null),s.closeAll())}),this.buttonList.push({control:l,btn:d,name:c}),d},e.prototype.build=function(t,e,o){var i=this,n=!1;this.container.innerHTML="",t.forEach(function(t){var e="string"==typeof t?t:t.name;if(-1===i.jodit.options.removeButtons.indexOf(e))switch(e){case"\n":i.container.appendChild(r.dom('
  • '));break;case"|":n||(n=!0,i.container.appendChild(r.dom('
  • ')));break;default:var a=t;if(n=!1,"object"!=typeof a&&void 0!==i.jodit.options.controls[a]&&(a=i.jodit.options.controls[a]),"object"!=typeof a)throw Error("Need ControlType "+a);i.container.appendChild(i.addButton(t,a,"",o))}}),this.container.parentNode!==e&&e.appendChild(this.container)},e.icons={},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var r=o(1),a=o(5),s=o(2),l=o(0),d=o(6);s.Config.prototype.dialog={zIndex:100002,resizable:!0,draggable:!0,fullsize:!1,fullsizeButton:!1};var c=function(t){function e(e,o){void 0===o&&(o={});var i=t.call(this,e)||this;i.lockSelect=function(){i.dialogbox.classList.add("jodit_dialog_box-moved")},i.unlockSelect=function(){i.dialogbox.classList.remove("jodit_dialog_box-moved")},i.destinition=document.body,i.destroyAfterClose=!1,i.moved=!1,i.iSetMaximization=!1,i.resizeble=!1,i.draggable=!1,i.startX=0,i.startY=0,i.startPoint={x:0,y:0,w:0,h:0},i.close=function(t){t&&(t.stopImmediatePropagation(),t.preventDefault()),i.jodit&&i.jodit.events&&i.jodit.events.fire(i,"beforeClose"),i.dialogbox.classList.remove("active"),i.iSetMaximization&&i.maximization(!1),i.destroyAfterClose&&i.destruct(),i.jodit&&i.jodit.events.fire(i,"afterClose")};var a=i;return a.options=e&&e.options?e.options.dialog:s.Config.prototype.dialog,a.options=n({},a.options,o),a.dialogbox=l.dom('"),a.dialogbox.__jodit_dialog=a,a.dialog=a.dialogbox.querySelector(".jodit_dialog"),a.resizer=a.dialogbox.querySelector(".jodit_dialog_resizer"),a.jodit&&a.jodit.options&&a.jodit.options.textIcons&&a.dialogbox.classList.add("jodit_text_icons"),a.dialogbox_header=a.dialogbox.querySelector(".jodit_dialog_header>h4"),a.dialogbox_content=a.dialogbox.querySelector(".jodit_dialog_content"),a.dialogbox_footer=a.dialogbox.querySelector(".jodit_dialog_footer"),a.dialogbox_close=a.dialogbox.querySelector(".jodit_dialog_header>a.jodit_close"),a.dialogbox_fullsize=l.dom(''+(r.default.modules.Toolbar.getIcon?r.default.modules.Toolbar.getIcon(o.fullsize?"fullsize":"shrink"):"")+""),a.destinition.appendChild(a.dialogbox),a.dialogbox.addEventListener("close_dialog",a.close),a.dialogbox_close.addEventListener("mousedown",a.close),a.dialogbox_fullsize.addEventListener("click",function(){var t=a.maximization();r.default.modules.Toolbar&&(a.dialogbox_fullsize.innerHTML=r.default.modules.Toolbar.getIcon(t?"shrink":"fullsize"))}),a.__on(window,"mousemove",a.onMouseMove.bind(a)).__on(window,"mouseup",a.onMouseUp.bind(a)).__on(window,"keydown",a.onKeyDown.bind(a)).__on(window,"resize",a.onResize.bind(a)),a.dialogbox.querySelector(".jodit_dialog_header").addEventListener("mousedown",a.onHeaderMouseDown.bind(a)),a.options.resizable&&a.resizer.addEventListener("mousedown",a.onResizerMouseDown.bind(a)),i}return i(e,t),e.prototype.setSize=function(t,e){t&&l.css(this.dialog,"width",t),e&&l.css(this.dialog,"height",e)},e.prototype.setPosition=function(t,e){var o=window.innerWidth,i=window.innerHeight,n=o/2-this.dialog.offsetWidth/2,r=i/2-this.dialog.offsetHeight/2;void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-n)>100||Math.abs(e-r)>100),this.dialog.style.left=(t||n)+"px",this.dialog.style.top=(e||r)+"px"},e.prototype.setElements=function(t,e){var o=[];l.asArray(e).forEach(function(e){var i=l.dom(e);o.push(i),i.parentNode!==t&&t.appendChild(i)}),[].slice.call(t.childNodes).forEach(function(e){-1===o.indexOf(e)&&t.removeChild(e)})},e.prototype.setTitle=function(t){this.setElements(this.dialogbox_header,t)},e.prototype.setContent=function(t){this.setElements(this.dialogbox_content,t)},e.prototype.setFooter=function(t){this.setElements(this.dialogbox_footer,t),this.dialog.classList.toggle("with_footer",!!t)},e.prototype.getMaxZIndexDialog=function(){var t,e,o=0,i=this;return l.$$(".jodit_dialog_box",document.body).forEach(function(n){t=n.__jodit_dialog,e=parseInt(l.css(n,"zIndex"),10),t.isOpened()&&!isNaN(e)&&e>o&&(i=t,o=e)}),i},e.prototype.setMaxZIndex=function(){var t=0,e=0;l.$$(".jodit_dialog_box",document.body).forEach(function(o){e=parseInt(l.css(o,"zIndex"),10),t=Math.max(isNaN(e)?0:e,t)}),this.dialogbox.style.zIndex=""+(t+1)},e.prototype.maximization=function(t){return"boolean"!=typeof t&&(t=!this.dialogbox.classList.contains("jodit_dialog_box-fullsize")),this.dialogbox.classList.toggle("jodit_dialog_box-fullsize",t),[document.body,document.body.parentNode].forEach(function(e){e.classList.toggle("jodit_fullsize_box",t)}),this.iSetMaximization=t,t},e.prototype.open=function(t,e,o,i){this.jodit&&this.jodit.events&&!1===this.jodit.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,this.options.fullsizeButton&&this.dialogbox_close.parentNode.appendChild(this.dialogbox_fullsize),void 0!==e&&this.setTitle(e),t&&this.setContent(t),this.dialogbox.classList.add("active"),i&&this.dialogbox.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"afterOpen"))},e.prototype.isOpened=function(){return this.dialogbox.classList.contains("active")},e.prototype.onMouseUp=function(){(this.draggable||this.resizeble)&&(this.draggable=!1,this.resizeble=!1,this.unlockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"endResize endMove"))},e.prototype.onHeaderMouseDown=function(t){this.options.draggable&&(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=l.css(this.dialog,"left"),this.startPoint.y=l.css(this.dialog,"top"),this.setMaxZIndex(),t.preventDefault(),this.lockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"startMove"))},e.prototype.onMouseMove=function(t){this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"move",[t.clientX-this.startX,t.clientY-this.startY]),t.stopImmediatePropagation(),t.preventDefault()),this.resizeble&&this.options.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"resizeDialog",[t.clientX-this.startX,t.clientY-this.startY]),t.stopImmediatePropagation(),t.preventDefault())},e.prototype.onKeyDown=function(t){if(this.isOpened()&&27===t.which){var e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}},e.prototype.onResize=function(){!this.options.resizable||this.moved||!this.isOpened()||this.offsetX||this.offsetY||this.setPosition()},e.prototype.destruct=function(){this.dialogbox.parentNode.removeChild(this.dialogbox),delete this.dialogbox,t.prototype.destruct.call(this)},e.prototype.onResizerMouseDown=function(t){this.resizeble=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.jodit.events&&this.jodit.events.fire(this,"startResize")},e}(a.default);e.default=c,e.Alert=function(t,e,o){"function"==typeof e&&(o=e,e=void 0);var i=new c,n=l.dom('
    '),a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Ok")+"");return n.appendChild(l.dom(t)),a.addEventListener("click",function(){o&&"function"==typeof o&&!1===o(i)||i.close()}),i.setFooter([a]),i.open(n,e||" ",!0,!0),a.focus(),i},r.default.Alert=e.Alert,e.Promt=function(t,e,o,i){var n=new c,a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),s=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Ok")+""),u=l.dom('
    '),f=l.dom(''),p=l.dom("");"function"==typeof e&&(o=e,e=void 0),i&&f.setAttribute("placeholder",i),p.appendChild(l.dom(t)),u.appendChild(p),u.appendChild(f),a.addEventListener("click",n.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(f.value)||n.close()};return s.addEventListener("click",h),u.addEventListener("submit",function(){return h(),!1}),n.setFooter([s,a]),n.open(u,e||" ",!0,!0),f.focus(),n},r.default.Promt=e.Promt,e.Confirm=function(t,e,o){var i,n,a=new c,s=l.dom('
    '),u=l.dom("");"function"==typeof e&&(o=e,e=void 0),u.appendChild(l.dom(t)),s.appendChild(u),i=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),i.addEventListener("click",function(){o&&o(!1),a.close()});var f=function(){o&&o(!0),a.close()};return n=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Yes")+""),n.addEventListener("click",f),s.addEventListener("submit",function(){return f(),!1}),a.setFooter([n,i]),a.open(s,e||" ",!0,!0),n.focus(),a},r.default.Confirm=e.Confirm},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(4);!function(t){t.ColorPickerWidget=function(t,e,o){var a=n.normalizeColor(o),s=n.dom('
    '),l=function(t){var e=[];return n.isPlainObject(t)?Object.keys(t).forEach(function(o){e.push('
    '),e.push(l(t[o])),e.push("
    ")}):Array.isArray(t)&&t.forEach(function(t){e.push("'+(a===t?i.default.modules.Toolbar.getIcon("eye"):"")+"")}),e.join("")};return s.appendChild(n.dom("
    "+l(t.options.colors)+"
    ")),s.appendChild(n.dom(''+i.default.modules.Toolbar.getIcon("eraser")+"")),t.__on(s,"mousedown touchstart",function(o){o.stopPropagation();var a=o.target;if("SVG"!==a.tagName.toUpperCase()&&"PATH"!==a.tagName.toUpperCase()||(a=r.default.closest(a.parentNode,"A",t.editor)),"A"===a.tagName.toUpperCase()){var l=s.querySelector("a.active");l&&(l.classList.remove("active"),l.innerHTML="");var d=a.getAttribute("data-color")||"";if(d){a.innerHTML=i.default.modules.Toolbar.getIcon("eye"),a.classList.add("active");var c=n.hexToRgb(d);a.firstChild.style.fill="rgb("+(255-c.r)+","+(255-c.g)+","+(255-c.b)+")"}e&&"function"==typeof e&&e(d),o.preventDefault()}}),s},t.TabsWidget=function(t,e){var o=n.dom('
    '),i=n.dom('
    '),r=n.dom('
    '),a=0;if(o.appendChild(r),o.appendChild(i),n.each(e,function(e,o){var s=n.dom('
    '),l=n.dom('');l.innerHTML=t.i18n(e),r.appendChild(l),s.appendChild(n.dom("function"!=typeof o?o:'
    ')),i.appendChild(s),t.__on(l,"mousedown touchstart",function(e){return n.$$("a",r).forEach(function(t){t.classList.remove("active")}),n.$$(".jodit_tab",i).forEach(function(t){t.classList.remove("active")}),l.classList.add("active"),s.classList.add("active"),"function"==typeof o&&o.call(t),e.stopPropagation(),!1}),a+=1}),a)return n.$$("a",r).forEach(function(t){t.style.width=(100/a).toFixed(10)+"%"}),r.querySelector("a:first-child").classList.add("active"),i.querySelector(".jodit_tab:first-child").classList.add("active"),o},t.ImageSelectorWidget=function(e,o,r){var a,s={};if(o.upload&&e.options.uploader&&e.options.uploader.url){var l=n.dom('
    '+e.i18n("Drop image")+"
    "+e.i18n("or click")+'
    ');e.getInstance("Uploader").bind(l,function(t){"function"==typeof o.upload&&o.upload.call(e,{baseurl:t.baseurl,files:t.files})},function(t){e.events.fire("errorMessage",[t.message])}),s[i.default.modules.Toolbar.getIcon("upload")+e.i18n("Upload")]=l}if(o.filebrowser&&(e.options.filebrowser.ajax.url||e.options.filebrowser.items.url)&&(s[i.default.modules.Toolbar.getIcon("folder")+e.i18n("Browse")]=function(){e.getInstance("FileBrowser").open(o.filebrowser)}),o.url){var d=n.dom('
    ");a=null,r&&r.nodeType!==Node.TEXT_NODE&&("IMG"===r.tagName||n.$$("img",r).length)&&(a="IMG"===r.tagName?r:n.$$("img",r)[0],n.val(d,"input[name=url]",a.getAttribute("src")),n.val(d,"input[name=text]",a.getAttribute("alt")),d.querySelector("button").innerText=e.i18n("Update")),d.addEventListener("submit",function(t){return t.preventDefault(),t.stopPropagation(),n.val(d,"input[name=url]")?("function"==typeof o.url&&o.url.call(e,n.val(d,"input[name=url]"),n.val(d,"input[name=text]")),!1):(d.querySelector("input[name=url]").focus(),d.querySelector("input[name=url]").classList.add("jodit_error"),!1)},!1),s[i.default.modules.Toolbar.getIcon("link")+" URL"]=d}return t.TabsWidget(e,s)}}(e.Widget||(e.Widget={}))},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(4);e.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell";var l=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.addSelected=function(t){t.setAttribute(e.JODIT_SELECTED_CELL_MARKER,"1")},o.restoreSelection=function(t){t.removeAttribute(e.JODIT_SELECTED_CELL_MARKER)},o.getAllSelectedCells=function(t){return r.$$("td["+e.JODIT_SELECTED_CELL_MARKER+"],th["+e.JODIT_SELECTED_CELL_MARKER+"]",t)},o.getRowsCount=function(t){return t.rows.length},o.getColumnsCount=function(t){return o.formalMatrix(t).reduce(function(t,e){return Math.max(t,e.length)},0)},o.formalMatrix=function(t,e){for(var o=[[]],i=Array.prototype.slice.call(t.rows),n=0,r=void 0;i.length>n;n+=1){var a=Array.prototype.slice.call(i[n].cells);for(r=0;a.length>r;r+=1)if(!1===function(t,i){void 0===o[i]&&(o[i]=[]);for(var n,r,a=t.colSpan,s=t.rowSpan,l=0;o[i][l];)l+=1;for(r=0;s>r;r+=1)for(n=0;a>n;n+=1){if(void 0===o[i+r]&&(o[i+r]=[]),e&&!1===e(t,i+r,l+n,a,s))return!1;o[i+r][l+n]=t}}(a[r],n))return o}return o},o.formalCoordinate=function(t,e,i){void 0===i&&(i=!1);var n=0,r=0,a=1,s=1;return o.formalMatrix(t,function(t,o,l,d,c){if(e===t)return n=o,r=l,a=d,s=c,i&&(r+=d-1,n+=c-1),!1}),[n,r,a,s]},o.appendRow=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0);var n,a=o.getColumnsCount(t),l=s.default.create("tr","",t.ownerDocument);for(n=0;a>n;n+=1)l.appendChild(s.default.create("td","",t.ownerDocument));i&&e&&e.nextSibling?e.parentNode.insertBefore(l,e.nextSibling):!i&&e?e.parentNode.insertBefore(l,e):(r.$$(":scope>tbody",t)[0]||t).appendChild(l)},o.removeRow=function(t,e){var i,n=o.formalMatrix(t),a=t.rows[e];r.each(n[e],function(o,r){if(i=!1,0>e-1||n[e-1][o]!==r)if(n[e+1]&&n[e+1][o]===r){if(r.parentNode===a&&r.parentNode.nextSibling){i=!0;for(var l=o+1;n[e+1][l]===r;)l+=1;var d=s.default.next(r.parentNode,function(t){return t.nodeType===Node.ELEMENT_NODE&&"TR"===t.tagName},t);n[e+1][l]?d.insertBefore(r,n[e+1][l]):d.appendChild(r)}}else r.parentNode&&r.parentNode.removeChild(r);else i=!0;if(i&&(r.parentNode===a||r!==n[e][o-1])){var c=r.rowSpan;c-1>1?r.setAttribute("rowspan",""+(c-1)):r.removeAttribute("rowspan")}}),a&&a.parentNode.removeChild(a)},o.appendColumn=function(t,e,i){void 0===i&&(i=!0);var n,r=o.formalMatrix(t);for(void 0===e&&(e=o.getColumnsCount(t)-1),n=0;r.length>n;n+=1){var a=s.default.create("td","",t.ownerDocument),l=!1;i?r[n].length>e+1&&r[n][e]===r[n][e+1]||(r[n][e].nextSibling?r[n][e].parentNode.insertBefore(a,r[n][e].nextSibling):r[n][e].parentNode.appendChild(a),l=!0):(0>e-1||r[n][e]!==r[n][e-1])&&(r[n][e].parentNode.insertBefore(a,r[n][e]),l=!0),l||r[n][e].setAttribute("colspan",""+(parseInt(r[n][e].getAttribute("colspan"),10)+1))}},o.removeColumn=function(t,e){var i,n=o.formalMatrix(t);r.each(n,function(t,o){if(i=!1,0>e-1||n[t][e-1]!==o[e]?o.length>e+1&&n[t][e+1]===o[e]?i=!0:o[e].parentNode&&o[e].parentNode.removeChild(o[e]):i=!0,i&&(0>t-1||o[e]!==n[t-1][e])){var r=o[e].colSpan;r-1>1?o[e].setAttribute("colspan",""+(r-1)):o[e].removeAttribute("colspan")}})},o.getSelectedBound=function(t,e){var i,n,r,a=[[1/0,1/0],[0,0]],s=o.formalMatrix(t);for(i=0;s.length>i;i+=1)for(n=0;s[i].length>n;n+=1)-1!==e.indexOf(s[i][n])&&(a[0][0]=Math.min(i,a[0][0]),a[0][1]=Math.min(n,a[0][1]),a[1][0]=Math.max(i,a[1][0]),a[1][1]=Math.max(n,a[1][1]));for(i=a[0][0];a[1][0]>=i;i+=1)for(r=1,n=a[0][1];a[1][1]>=n;n+=1){for(;s[i][n-r]&&s[i][n]===s[i][n-r];)a[0][1]=Math.min(n-r,a[0][1]),a[1][1]=Math.max(n-r,a[1][1]),r+=1;for(r=1;s[i][n+r]&&s[i][n]===s[i][n+r];)a[0][1]=Math.min(n+r,a[0][1]),a[1][1]=Math.max(n+r,a[1][1]),r+=1;for(r=1;s[i-r]&&s[i][n]===s[i-r][n];)a[0][0]=Math.min(i-r,a[0][0]),a[1][0]=Math.max(i-r,a[1][0]),r+=1;for(r=1;s[i+r]&&s[i][n]===s[i+r][n];)a[0][0]=Math.min(i+r,a[0][0]),a[1][0]=Math.max(i+r,a[1][0]),r+=1}return a},o.normalizeTable=function(t){var e,i,n,r,a=[],s=o.formalMatrix(t);for(i=0;s[0].length>i;i+=1){for(n=1e6,r=!1,e=0;s.length>e;e+=1)if(void 0!==s[e][i]){if(2>s[e][i].colSpan){r=!0;break}n=Math.min(n,s[e][i].colSpan)}if(!r)for(e=0;s.length>e;e+=1)void 0!==s[e][i]&&o.__mark(s[e][i],"colspan",s[e][i].colSpan-n+1,a)}for(e=0;s.length>e;e+=1){for(n=1e6,r=!1,i=0;s[e].length>i;i+=1)if(void 0!==s[e][i]){if(2>s[e][i].rowSpan){r=!0;break}n=Math.min(n,s[e][i].rowSpan)}if(!r)for(i=0;s[e].length>i;i+=1)void 0!==s[e][i]&&o.__mark(s[e][i],"rowspan",s[e][i].rowSpan-n+1,a)}for(e=0;s.length>e;e+=1)for(i=0;s[e].length>i;i+=1)void 0!==s[e][i]&&(s[e][i].hasAttribute("rowspan")&&1===s[e][i].rowSpan&&s[e][i].removeAttribute("rowspan"),s[e][i].hasAttribute("colspan")&&1===s[e][i].colSpan&&s[e][i].removeAttribute("colspan"),s[e][i].hasAttribute("class")&&!s[e][i].getAttribute("class")&&s[e][i].removeAttribute("class"));o.__unmark(a)},o.mergeSelected=function(t){var e,i,n,s=o.getSelectedBound(t,o.getAllSelectedCells(t)),l=0,d=[],c=0,u=0,f=[];s&&(s[0][0]-s[1][0]||s[0][1]-s[1][1])&&(o.formalMatrix(t,function(t,a,p,h,g){if(!(s[0][0]>a||a>s[1][0]||s[0][1]>p||p>s[1][1])){if(n=t,n.__i_am_already_was)return;n.__i_am_already_was=!0,a===s[0][0]&&n.style.width&&(l+=parseInt(n.offsetWidth,10)),""!==r.trim(t.innerHTML.replace(//g,""))&&d.push(t.innerHTML),h>1&&(c+=h-1),g>1&&(u+=g-1),e?o.__mark(n,"remove",1,f):(e=t,i=p)}}),c=s[1][1]-s[0][1]+1,u=s[1][0]-s[0][0]+1,e&&(c>1&&o.__mark(e,"colspan",c,f),u>1&&o.__mark(e,"rowspan",u,f),l&&(o.__mark(e,"width",(l/t.offsetWidth*100).toFixed(a.ACCURACY)+"%",f),i&&o.setColumnWidthByDelta(t,i,0,!0,f)),delete e.__i_am_already_was,e.innerHTML=d.join("
    "),o.__unmark(f),o.normalizeTable(t),r.each([].slice.call(t.rows),function(t,e){e.cells.length||e.parentNode.removeChild(e)})))},o.splitHorizontal=function(t){var e,i,n,r,a,l=[];o.getAllSelectedCells(t).forEach(function(d){i=s.default.create("td","",t.ownerDocument),i.appendChild(s.default.create("br","",t.ownerDocument)),n=s.default.create("tr","",t.ownerDocument),e=o.formalCoordinate(t,d),2>d.rowSpan?(o.formalMatrix(t,function(t,i,n){e[0]===i&&e[1]!==n&&t!==d&&o.__mark(t,"rowspan",t.rowSpan+1,l)}),s.default.after(s.default.closest(d,"tr",t),n),n.appendChild(i)):(o.__mark(d,"rowspan",d.rowSpan-1,l),o.formalMatrix(t,function(o,i,n){i>e[0]&&e[0]+d.rowSpan>i&&e[1]>n&&o.parentNode.rowIndex===i&&(a=o),i>e[0]&&o===d&&(r=t.rows[i])}),a?s.default.after(a,i):r.insertBefore(i,r.firstChild)),d.colSpan>1&&o.__mark(i,"colspan",d.colSpan,l),o.__unmark(l),o.restoreSelection(d)}),this.normalizeTable(t)},o.splitVertical=function(t){var e,i,n,r=[];o.getAllSelectedCells(t).forEach(function(l){e=o.formalCoordinate(t,l),2>l.colSpan?o.formalMatrix(t,function(t,i,n){e[1]===n&&e[0]!==i&&t!==l&&o.__mark(t,"colspan",t.colSpan+1,r)}):o.__mark(l,"colspan",l.colSpan-1,r),i=s.default.create("td","",t.ownerDocument),i.appendChild(s.default.create("br","",t.ownerDocument)),l.rowSpan>1&&o.__mark(i,"rowspan",l.rowSpan,r);var d=l.offsetWidth;s.default.after(l,i),n=d/t.offsetWidth/2,o.__mark(l,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__mark(i,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__unmark(r),o.restoreSelection(l)}),o.normalizeTable(t)},o.__mark=function(t,e,o,i){i.push(t),t.__marked_value||(t.__marked_value={}),t.__marked_value[e]=void 0===o?1:o},o.__unmark=function(t){t.forEach(function(t){t.__marked_value&&(r.each(t.__marked_value,function(e,o){switch(e){case"remove":t.parentNode.removeChild(t);break;case"rowspan":o>1?t.setAttribute("rowspan",o):t.removeAttribute("rowspan");break;case"colspan":o>1?t.setAttribute("colspan",o):t.removeAttribute("colspan");break;case"width":t.style.width=o}delete t.__marked_value[e]}),delete t.__marked_value)})},o.setColumnWidthByDelta=function(t,e,i,n,r){var s,l,d,c=o.formalMatrix(t);for(s=0;c.length>s;s+=1)l=c[s][e].offsetWidth,d=(l+i)/t.offsetWidth*100,o.__mark(c[s][e],"width",d.toFixed(a.ACCURACY)+"%",r);n||o.__unmark(r)},o}(n.default);e.default=l},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(2),r=o(0),a=o(14),s=o(5);n.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",async:!0,data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!0,xhr:function(){return new("undefined"==typeof XDomainRequest?XMLHttpRequest:XDomainRequest)}},e.default=function(t){function e(e,o){var i=t.call(this,e)||this;return i.options=r.extend(!0,{},n.Config.prototype.defaultAjaxOptions,o),i.xhr=i.options.xhr(),i}return i(e,t),e.prototype.__buildParams=function(t,e){if("string"==typeof t||window.FormData&&t instanceof window.FormData)return t;var o,i,n,r=[];for(o in t)t.hasOwnProperty(o)&&(i=e?e+"["+o+"]":o,n=t[o],r.push("object"==typeof n?this.__buildParams(n,i):encodeURIComponent(i)+"="+encodeURIComponent(n)));return r.join("&")},e.prototype.abort=function(){return this.xhr.abort(),this},e.prototype.send=function(){var t=this;return new a.default(function(e,o){var i=function(e){switch(t.options.dataType){case"json":try{e=JSON.parse(e)}catch(e){return void o.call(t.xhr,e)}}return e};t.xhr.onabort=function(){o(Error(t.xhr.statusText))},t.xhr.onerror=function(){o(Error(t.xhr.statusText))},t.xhr.ontimeout=function(){o(Error(t.xhr.statusText))},t.xhr.onload=function(){t.response=t.xhr.responseText,t.status=t.xhr.status,e.call(t.xhr,i(t.response))},t.xhr.onreadystatechange=function(){if(t.xhr.readyState===XMLHttpRequest.DONE){var n=t.xhr.responseText;t.response=n,t.status=t.xhr.status,200===t.xhr.status?e.call(t.xhr,i(n)):o.call(t.xhr,Error(t.xhr.statusText||t.jodit.i18n("Connection error!")))}},t.xhr.withCredentials=t.options.withCredentials,t.xhr.open(t.options.method,t.options.url,t.options.async),t.options.contentType&&t.xhr.setRequestHeader&&t.xhr.setRequestHeader("Content-type",t.options.contentType),t.options.headers&&t.xhr.setRequestHeader&&r.each(t.options.headers,function(e,o){t.xhr.setRequestHeader(e,o)}),setTimeout(function(){t.xhr.send(t.options.data?t.__buildParams(t.options.data):void 0)},0)})},e}(s.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.set=function(t,e,o){var i,n;o?(n=new Date,n.setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toGMTString()):i="",document.cookie=t+"="+e+i+"; path=/"},e.get=function(t){var e,o,i=t+"=",n=document.cookie.split(";");for(e=0;n.length>e;e+=1){for(o=n[e];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return null},e.remove=function(t){e.set(t,"",-1)},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(6);e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),window.removeEventListener("mouseup",o.hide)},o.context=r.dom('
    '),document.body.appendChild(o.context),o}return i(e,t),e.prototype.show=function(t,e,o){var i=this;Array.isArray(o)&&(this.context.innerHTML="",o.forEach(function(t){if(t){var e=r.dom(''+(t.icon?a.default.getIcon(t.icon):"")+"");e.addEventListener("click",function(e){return t.exec.call(i,e),i.hide(),!1}),e.querySelector("span").innerText=i.jodit.i18n(t.title),i.context.appendChild(e)}}),r.css(i.context,{left:t,top:e}),window.addEventListener("mouseup",i.hide),this.context.classList.add("jodit_context_menu-show"))},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(2),r=o(5),a=o(15),s=o(3),l=o(16);n.Config.prototype.observer={timeout:100};var d=function(){function t(t,e,o){this.observer=o,this.oldValue=t,this.newValue=e}return t.prototype.execute=function(){},t.prototype.undo=function(){this.observer.block(!0),this.observer.snapshot.restore(this.oldValue)},t.prototype.redo=function(){this.observer.block(!0),this.observer.snapshot.restore(this.newValue)},t}();e.Command=d,e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.__blocked=!1,o.__timeouts=[],o.block=function(t){void 0===t&&(t=1),!0===t||!1===t?this.__blocked=t:1===t?(this.oldblock=this.__blocked,this.__blocked=!0):0===t&&(this.__blocked=void 0!==this.oldblock&&this.oldblock)},o.changed=function(){this.jodit.getMode()===s.MODE_WYSIWYG&&(this.jodit.events.fire("canRedo",[this.stack.canRedo()]),this.jodit.events.fire("canUndo",[this.stack.canUndo()]))},o.stack=new l.Stack,o.stack.changed=function(){o.changed()},o.snapshot=new a.default(e),o.__startValue=o.snapshot.make(),o.stack.changed(),e.events.on("change afterCommand",function(t){"undo"!==t&&"redo"!==t&&o.__changeHandler()}),o}return i(e,t),e.prototype.__onChange=function(){this.__newValue=this.snapshot.make(),a.default.equal(this.__newValue,this.__startValue)||(this.stack.execute(new d(this.__startValue,this.__newValue,this)),this.__startValue=this.__newValue)},e.prototype.__changeHandler=function(){if(this.__blocked)return void this.block(!1);this.jodit.options.observer.timeout?(clearTimeout(this.__timer),this.__timer=setTimeout(this.__onChange.bind(this),this.jodit.options.observer.timeout),this.__timeouts[this.__timeouts.length]=this.__timer):this.__onChange()},e.prototype.destruct=function(){this.__timeouts.forEach(function(t){clearTimeout(t)})},e.prototype.redo=function(){this.stack.redo()},e.prototype.undo=function(){this.stack.undo()},e}(r.default)},function(t,e,o){"use strict";e.__esModule=!0;var i=0,n=1;e.default=function(){function t(t){this.handlers={0:[],1:[]},this.isFulfilled=null,this.currentParameter=null,this.currentContext=null;var e=this,o=function(t,o){null===e.isFulfilled&&(e.isFulfilled=t,e.currentParameter=o,e.currentContext=this,e.__fire_handlers(t))};try{t(function(t){o.call(this,n,t)},function(t){o.call(this,i,t)})}catch(t){o.call(this,i,t)}}return t.prototype.__fire_handlers=function(t){if(t===this.isFulfilled&&this.handlers[t].length)do{var e=this.handlers[t].shift(),o=void 0;try{o=e.call(this.currentContext,this.currentParameter)}catch(t){return o=t,this.__fire_handlers(i)}void 0!==o&&(this.currentParameter=o)}while(this.handlers[t].length)},t.prototype.then=function(t,e){return t&&this.handlers[n].push(t),e&&this.catch(e),this.__fire_handlers(n),this},t.prototype.catch=function(t){return this.handlers[i].push(t),this.__fire_handlers(i),this},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.__countElementsBefore=function(t){if(!t.parentNode)return 0;var e,o,i=t.parentNode.childNodes,n=0;for(o=0;i.length>o;o+=1){if(!e||i[o].nodeType===Node.TEXT_NODE&&""===i[o].textContent||e.nodeType===Node.TEXT_NODE&&i[o].nodeType===Node.TEXT_NODE||(n+=1),i[o]===t)return n;e=i[o]}},e.prototype.__decomposeHierarchyNodes=function(t){var o=[];if(!t.parentNode)return[];for(;t&&t!==this.jodit.editor;)o.push(e.__countElementsBefore(t)),t=t.parentNode;return o.reverse()},e.__strokeOffset=function(t,e){for(;t&&t.nodeType===Node.TEXT_NODE;)(t=t.previousSibling)&&t.nodeType===Node.TEXT_NODE&&(e+=t.textContent.length);return e},e.prototype.make=function(){var t={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.jodit.getEditorValue();var o=this.jodit.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0);t.range={startContainer:this.__decomposeHierarchyNodes(i.startContainer),startOffset:e.__strokeOffset(i.startContainer,i.startOffset),endContainer:this.__decomposeHierarchyNodes(i.endContainer),endOffset:e.__strokeOffset(i.endContainer,i.endOffset)}}return t},e.prototype.__restoreElementByLadder=function(t){var e,o=this.jodit.editor;for(e=0;o&&t.length>e;e+=1)o=o.childNodes[t[e]];return o},e.equal=function(t,e){return t.html===e.html&&JSON.stringify(t.range)===JSON.stringify(e.range)},e.prototype.restore=function(t){this.jodit.setEditorValue(t.html);try{if(t.range){var e=this.jodit.win.getSelection(),o=this.jodit.doc.createRange();o.setStart(this.__restoreElementByLadder(t.range.startContainer),t.range.startOffset),o.setEnd(this.__restoreElementByLadder(t.range.endContainer),t.range.endOffset),e.removeAllRanges(),e.addRange(o)}}catch(t){}},e}(n.default)},function(t,e,o){"use strict";e.__esModule=!0,e.Stack=function(){function t(){this.commands=[],this.stackPosition=-1,this.savePosition=-1}return t.prototype.execute=function(t){this.__clearRedo(),t.execute(),this.commands.push(t),this.stackPosition+=1,this.changed()},t.prototype.undo=function(){this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,this.changed()},t.prototype.canUndo=function(){return this.stackPosition>=0},t.prototype.redo=function(){this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),this.changed()},t.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},t.prototype.save=function(){this.savePosition=this.stackPosition,this.changed()},t.prototype.__clearRedo=function(){this.commands.length=this.stackPosition+1},t.prototype.changed=function(){},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(10),a=o(2),s=o(0),l=o(3),d=o(4);a.Config.prototype.enableDragAndDropFileToEditor=!0,a.Config.prototype.uploader={url:"",headers:null,data:null,format:"json",prepareData:function(t){return t},isSuccess:function(t){return t.success},getMessage:function(t){return void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):""},process:function(t){return{files:t.data.files||[],path:t.data.path||"",baseurl:t.data.baseurl||""}},error:function(t){this.jodit.events.fire("errorMessage",[t.message,"error",4e3])},defaultHandlerSuccess:function(t){var e=this;t.files&&t.files.length&&t.files.forEach(function(o){e.jodit.selection.insertImage(t.baseurl+o)})},defaultHandlerError:function(t){this.jodit.events.fire("errorMessage",[t.message])}},e.default=function(t){function e(e,o){var i=t.call(this,e)||this;return i.path="",i.source="default",i.options=s.extend(!0,{},a.Config.prototype.uploader,i.jodit.options.uploader,o),i.jodit.editor&&i.jodit.options.enableDragAndDropFileToEditor&&i.jodit.options.uploader&&i.jodit.options.uploader.url&&i.bind(i.jodit.editor),i}return i(e,t),e.prototype.buildData=function(t){if(void 0!==window.FormData){if(t instanceof FormData)return t;if("string"==typeof t)return t;var e=new FormData;return Object.keys(t).forEach(function(o){e.append(o,t[o])}),e}return t},e.prototype.send=function(t,e){var o=this;this.__ajax=new r.default(this.jodit,{xhr:function(){var t=new XMLHttpRequest;return void 0!==window.FormData?t.upload.addEventListener("progress",function(t){if(t.lengthComputable){var e=t.loaded/t.total;e*=100,o.jodit.progress_bar.style.display="block",o.jodit.progress_bar.style.width=e+"%",100===e&&(o.jodit.progress_bar.style.display="none")}},!1):o.jodit.progress_bar.style.display="none",t},type:"POST",data:this.buildData(t),url:this.options.url,headers:this.options.headers,contentType:(void 0===window.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8",dataType:this.options.format||"json"}),this.__ajax.send().then(e).catch(function(t){o.options.error.call(o,t)})},e.prototype.sendFiles=function(t,e,o,i){var n,r,a,l,d=this,c=t.length,u=this;if(!c)return!1;for(r=new FormData,r.append("path",u.path),r.append("source",u.source),n=0;c>n;n+=1)a=t[n].type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.append("files["+n+"]",t[n],t[n].name||(""+Math.random()).replace(".","")+"."+a);if(u.options.prepareData(r),i&&i(r),u.options.data&&s.isPlainObject(u.options.data))for(l=Object.keys(u.options.data),n=0;l.length>n;n+=1)r.append(l[n],u.options.data[l[n]]);u.send(r,function(t){if(!d.options.isSuccess.call(u,t))return void(o||u.options.defaultHandlerError).call(u,Error(u.options.getMessage(t)));"function"==typeof(e||u.options.defaultHandlerSuccess)&&(e||u.options.defaultHandlerSuccess).call(u,u.options.process.call(u,t))})},e.prototype.setPath=function(t){this.path=t},e.prototype.setSource=function(t){this.source=t},e.dataURItoBlob=function(t){var e,o=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(o.length),r=new Uint8Array(n);for(e=0;o.length>e;e+=1)r[e]=o.charCodeAt(e);return new Blob([r],{type:i})},e.prototype.bind=function(t,o,i){var n=this,r=this;r.__on(t,"paste",function(t){var n,a,c,u,f=this,p=function(t){t.append("extension",c),t.append("mimetype",a.type)};if(t.clipboardData&&t.clipboardData.files&&t.clipboardData.files.length)return r.sendFiles(t.clipboardData.files,o,i),!1;if(s.browser("ff"))return void(t.clipboardData.types.length||t.clipboardData.types[0]===l.TEXT_PLAIN||(u=d.default.create("div","",this.jodit.doc),r.jodit.selection.insertNode(u),u.focus(),setTimeout(function(){if(u.firstChild&&u.firstChild.hasAttribute("src")){var t=u.firstChild.getAttribute("src");u.parentNode.removeChild(u),f.sendFiles([e.dataURItoBlob(t)],o,i)}},200)));if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length)for(n=0;t.clipboardData.items.length>n;n+=1)if("file"===t.clipboardData.items[n].kind&&"image/png"===t.clipboardData.items[n].type){a=t.clipboardData.items[n].getAsFile(),c=a.type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.sendFiles([a],o,i,p),t.preventDefault();break}}).__on(t,"dragover",function(e){t.classList.add("draghover"),e.preventDefault()}).__on(t,"dragleave dragend",function(e){t.classList.remove("draghover"),e.preventDefault()}).__on(t,"drop",function(e){if(t.classList.remove("draghover"),e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length)e.preventDefault(),n.sendFiles(e.dataTransfer.files,o,i);else if(e.dataTransfer&&e.dataTransfer.getData(l.TEXT_PLAIN)&&"-"!==e.dataTransfer.getData(l.TEXT_PLAIN)&&t===r.jodit.editor){if(e.preventDefault(),e.stopPropagation(),!n.jodit.selection.insertCursorAtPoint(e.clientX,e.clientY))return!1;if(o||n.options.defaultHandlerSuccess){var a={baseurl:"",files:[]};a.files=[e.dataTransfer.getData(l.TEXT_PLAIN)],(o||n.options.defaultHandlerSuccess).call(n,a)}e.preventDefault()}}),t.querySelector("input[type=file]")&&r.__on(t.querySelector("input[type=file]"),"change",function(){r.sendFiles(this.files,o,i)})},e.prototype.uploadRemoteImage=function(t,e,o){var i=this,n=this;n.send({action:"uploadremote",url:t},function(t){if(n.options.isSuccess.call(n,t))"function"==typeof e?e.call(n,i.options.process(t)):i.options.defaultHandlerSuccess.call(n,i.options.process(t));else if("function"==typeof(o||n.options.defaultHandlerError))return void(o||i.options.defaultHandlerError).call(n,Error(n.options.getMessage(t)))})},e}(n.default)},function(t,e,o){"use strict";e.__esModule=!0,o(63),function(t){t.matches||(t.matches=void 0!==t.matchesSelector?t.matchesSelector:function(t){var e=this.ownerDocument.querySelectorAll(t),o=this;return Array.prototype.some.call(e,function(t){return t===o})})}(Element.prototype)},function(t,e){},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./de.ts":29,"./en.ts":30,"./ru.ts":31};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=20},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./Ajax.ts":10,"./Component.ts":5,"./ContextMenu.ts":12,"./Cookie.ts":11,"./Dialog.ts":7,"./Dom.ts":4,"./Events.ts":32,"./FileBrowser.ts":33,"./Helpers.ts":0,"./ImageEditor.ts":34,"./Observer.ts":13,"./PseudoPromise.ts":14,"./Selection.ts":35,"./Snapshot.ts":15,"./Table.ts":9,"./Toolbar.ts":6,"./Undo.ts":16,"./Uploader.ts":17,"./Widget.ts":8};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=21},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./Fullsize.ts":36,"./addNewLine.ts":37,"./autofocus.ts":38,"./backspace.ts":39,"./bold.ts":40,"./cleanHTML.ts":41,"./color.ts":42,"./enter.ts":43,"./errorMessages.ts":44,"./font.ts":45,"./formatblock.ts":46,"./iframe.ts":47,"./imageInlineToolbar.ts":48,"./imageProcessor.ts":49,"./imageProperties.ts":50,"./inlinePopup.ts":51,"./justify.ts":52,"./link.ts":53,"./mobile.ts":54,"./orderedlist.ts":55,"./paste.ts":56,"./placeholder.ts":57,"./redoundo.ts":58,"./resizer.ts":59,"./source.ts":60,"./table.ts":61,"./tableKeyboardNavigation.ts":62};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=22},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./about.svg":92,"./addcolumn.svg":93,"./addrow.svg":94,"./angle-left.svg":95,"./angle-right.svg":96,"./arrows-alt.svg":97,"./arrows-h.svg":98,"./attachment.svg":99,"./bin.svg":100,"./bold.svg":101,"./brush.svg":102,"./cancel.svg":103,"./center.svg":104,"./chain-broken.svg":105,"./check-square.svg":106,"./check.svg":107,"./crop.svg":108,"./dedent.svg":109,"./enter.svg":110,"./eraser.svg":111,"./eye.svg":112,"./folder.svg":113,"./font.svg":114,"./fontsize.svg":115,"./fullsize.svg":116,"./hr.svg":117,"./image.svg":118,"./info-circle.svg":119,"./italic.svg":120,"./justify.svg":121,"./left.svg":122,"./link.svg":123,"./lock.svg":124,"./menu.svg":125,"./merge.svg":126,"./ol.svg":127,"./paragraph.svg":128,"./pencil.svg":129,"./plus.svg":130,"./redo.svg":131,"./resize.svg":132,"./resizer.svg":133,"./right.svg":134,"./save.svg":135,"./shrink.svg":136,"./source.svg":137,"./splitg.svg":138,"./splitv.svg":139,"./strikethrough.svg":140,"./table.svg":141,"./th-list.svg":142,"./th.svg":143,"./ul.svg":144,"./underline.svg":145,"./undo.svg":146,"./unlink.svg":147,"./unlock.svg":148,"./update.svg":149,"./upload.svg":150,"./valign.svg":151,"./video.svg":152};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=23},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./btn.less":64,"./btn_group.less":65,"./context_menu.less":66,"./dialog.less":67,"./dropdownlist.less":68,"./filebrowser.less":69,"./grid.less":70,"./icon.less":71,"./image_editor.less":72,"./properties.less":73,"./toolbar.less":74,"./uploader.less":75};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=24},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./addnewline.less":76,"./errorsMessages.less":77,"./fullsize.less":78,"./placeholder.less":79,"./popupInline.less":80,"./resizer.less":81,"./source.less":82,"./table.less":83,"./texticons.less":84,"./widget.less":85};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=25},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./dark.less":86};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=26},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./about.less":87,"./colorpicker.less":88,"./form.less":89,"./progressbar.less":90,"./tabs.less":91};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=27},function(t,e,o){"use strict";e.__esModule=!0,o(19);var i=o(3);o(18);var n=o(6);t.exports=o(1).default,window.Jodit=t.exports,o(2),Object.keys(i).forEach(function(e){t.exports[e]=i[e]});var r=function(t){t.keys().forEach(t)};r(o(22)),r(o(26)),r(o(24)),r(o(27)),r(o(25));var a=o(23);a.keys().forEach(function(t){n.default.icons[t.replace(".svg","").replace("./","")]=a.apply(this,arguments)});var s=o(21);s.keys().forEach(function(e){t.exports.modules[e.replace(".ts","").replace("./","")]=s.apply(this,arguments).default});var l=o(20);l.keys().forEach(function(e){t.exports.lang[e.replace(".ts","").replace("./","")]=l.apply(this,arguments).default})},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Schreibe etwas","About Jodit":"Über Jodi","Jodit Editor":"Jodit Editor","Free Non-commercial Version":"Freie Nicht-kommerzielle Version","Jodit User's Guide":"Jodit Benutzerhandbuch","contains detailed help for using":"ausführliche Hilfe enthält für die Verwendung von","For information about the license, please go to our website:":"Für Informationen über die Lizenz, gehen Sie bitte auf unsere Webseite:","Buy full version":"Vollversion kaufen","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.",Anchor:"Anker","Open in new tab":"In neuer Registerkarte öffnen","Open editor in fullsize":"Editor öffnen in voller Größe","Clear Formatting":"Formatierung löschen","Fill color or set the text color":"Füllen Sie Farbe oder stellen Sie die Textfarbe",Redo:"Redo",Undo:"Rückgängig machen",Bold:"Fett gedruckt",Italic:"Kursiv","Insert Unordered List":"Ungeordnete Liste einfügen","Insert Ordered List":"Legen Sie Sortierte Liste","Justify Center":"einmitten","Justify Full":"Begründen Voll","Justify Left":"Begründen links","Justify Right":"Begründen Rechts","Insert Horizontal Line":"Legen Horizontale Linie","Insert Image":"Bild einfügen","Insert link":"Link einfügen","Font size":"Schriftgröße","Font family":"Schriftfamilie","Insert format block":"Insert Format Block",Normal:"Normal","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4",Quote:"Zitat",Code:"Code",Insert:"Einfügen","Insert table":"Tabelle einfügen","Change mode":"Änderungsmodus",Margins:"Die Margen",top:"oben",right:"Recht",bottom:"Boden",left:"links",Styles:"Styles",Classes:"Klassen",Align:"Ausrichten",Right:"Recht",Center:"Center",Left:"Links","--Not Set--":"--Nicht eingestellt--",Src:"src",Title:"Titel",Alternative:"Alternative (alt)",Link:"Link","Open link in new tab":"Link in neuem Tab öffnen",Image:"Image",Advansed:"Erweiterte","Image properties":"Bildeigenschaften",Cancel:"Stornieren",Ok:"OK","File Browser":"Dateibrowser","Error on load list":"Fehler beim Ladeliste","Error on load folders":"Fehler beim Laden Ordner","Are you shure?":"Bist du sicher?","Enter Directory name":"Geben Sie Verzeichnisname","Create directory":"Verzeichnis erstellen","type name":"Modellname","Drop image":"Bild Tropfen","or click":"oder klicken Sie auf","Alternative text":"Alternativer Text",Browse:"Blättern",Upload:"Hochladen",Background:"Hintergrund",Text:"Text",Top:"Oben",Middle:"Mitte",Bottom:"Boden","Insert column before":"Spalte einfügen vor","Insert column after":"Spalte einfügen nach","Insert row above":"Zeile einfügen oben","Insert row below":"Zeile unterhalb einfügen","Delete table":"Tabelle löschen","Delete row":"Zeile löschen","Delete column":"Spalte löschen","Empty cell":"Leere Zelle"}},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Start writing...","About Jodit":"","Jodit Editor":"","Free Non-commercial Version":"","Jodit User's Guide":"","contains detailed help for using":"","For information about the license, please go to our website:":"","Buy full version":"","Copyright � XDSoft.net - Chupurnov Valeriy. All rights reserved.":"",Anchor:"","Open editor in fullsize":"","Clear Formatting":"","Fill color or set the text color":"",Redo:"",Undo:"",Bold:"",Italic:"","Insert Unordered List":"","Insert Ordered List":"","Justify Center":"","Justify Full":"","Justify Left":"","Justify Right":"","Insert Horizontal Line":"","Insert Image":"","Insert link":"","Font size":"","Font family":"","Insert format block":"",Normal:"","Heading 1":"","Heading 2":"","Heading 3":"","Heading 4":"",Quote:"",Code:"","Insert table":"","Change mode":"",Margins:"",top:"",right:"",bottom:"",left:"",Styles:"",Classes:"",Align:"",Right:"",Center:"",Left:"","--Not Set--":"",Src:"",Title:"",Alternative:"",Link:"","Open link in new tab":"",Image:"",Advansed:"","Image properties":"",Cancel:"",Ok:"","File Browser":"","Error on load list":"","Error on load folders":"","Are you shure?":"","Enter Directory name":"","Create directory":"","type name":"","Drop image":"","or click":"","Alternative text":"",Browse:"",Background:"",Text:"",Top:"",Middle:"",Bottom:"","Insert column before":"","Insert column after":"","Insert row above":"","Insert row below":"","Delete table":"","Delete row":"","Delete column":"","Empty cell":""}},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Напишите что-либо","About Jodit":"О Jodit","Jodit Editor":"Редактор Jodit","Free Non-commercial Version":"Версия для не коммерческого использования","Jodit User's Guide":"Jodit Руководство пользователя","contains detailed help for using":"содержит детальную информацию по использованию","For information about the license, please go to our website:":"Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:","Buy full version":"Купить полную версию","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.",Anchor:"Анкор","Open in new tab":"Открывать ссылку в новой вкладке","Open editor in fullsize":"Открыть редактор в полном размере","Clear Formatting":"Очистить форматирование","Fill color or set the text color":"Цвет заливки или цвет текста",Redo:"Повтор",Undo:"Отмена",Bold:"Жирный",Italic:"Наклонный","Insert Unordered List":"Вставка маркированного списка","Insert Ordered List":"Вставить нумерованный список","Justify Center":"Выровнять по центру","Justify Full":"Выровнять по ширине","Justify Left":"Выровнять по левому краю","Justify Right":"Выровнять по правому краю","Insert Horizontal Line":"Вставить горизонтальную линию","Insert Image":"Вставить изображение","Insert link":"Вставить ссылку","Font size":"Размер шрифта","Font family":"Шрифт","Insert format block":"Вставить блочный элемент",Normal:"Нормальный текст","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4",Quote:"Цитата",Code:"Код",Insert:"Вставить","Insert table":"Вставить таблицу","Change mode":"Источник",Margins:"Отступы",top:"сверху",right:"справа",bottom:"снизу",left:"слева",Styles:"Стили",Classes:"Классы",Align:"Выравнивание",Right:"По правому краю",Center:"По центру",Left:"По левому краю","--Not Set--":"--не устанавливать--",Src:"src",Title:"Заголовок",Alternative:"Альтернативный текст (alt)",Link:"Ссылка","Open link in new tab":"Открывать ссылку в новом окне",Image:"Изображение",Advansed:"Расширенные","Image properties":"Свойства изображения",Cancel:"Отмена",Ok:"Ok","Your code is similar to HTML. Paste as HTML?":"Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?","Paste as HTML":"Вставить как HTML?","File Browser":"Браузер файлов","Error on load list":"Ошибка при загрузке списка изображений","Error on load folders":"Ошибка при загрузке списка директорий","Are you shure?":"Вы уверены?","Enter Directory name":"Введите название директории","Create directory":"Создать директорию","type name":"введите название","Drop image":"Перетащите сюда изображение","or click":"или нажмите","Alternative text":"Альтернативный текст",Browse:"Сервер",Upload:"Загрузка",Background:"Фон",Text:"Текст",Top:" К верху",Middle:"По середине",Bottom:"К низу","Insert column before":"Вставить столбец до","Insert column after":"Вставить столбец после","Insert row above":"Вставить ряд выше","Insert row below":"Вставить ряд ниже","Delete table":"Удалить таблицу","Delete row":"Удалять ряд","Delete column":"Удалить столбец","Empty cell":"Отчистить ячейку"}},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stack=[],e}return i(e,t),e.prototype.off=function(t,e,o){if(0===arguments.length)return this.jodit.handlers={},this;var i,n;if("string"==typeof t&&(o=e,e=t,t=this.jodit),void 0===t.handlers)return this;var r=e.split(/[\s,]+/);for(i=0;r.length>i;i+=1)if(void 0!==t.handlers[r[i]])if(void 0!==o)for(n=0;t.handlers[r[i]].length>n;n+=1)t.handlers[r[i]][n]===o&&t.handlers[r[i]].splice(n,1);else delete t.handlers[r[i]];return this},e.prototype.on=function(t,e,o,i){void 0===i&&(i=!1);var n;"string"==typeof t&&(o=e,e=t,t=this.jodit),"string"!=typeof e&&Error("Parameter list must be string");var r=e.split(/[\s,]+/);for(n=0;r.length>n;n+=1)void 0===t.handlers&&(t.handlers={}),void 0===t.handlers[r[n]]&&(t.handlers[r[n]]=[]),i?t.handlers[r[n]].unshift(o):t.handlers[r[n]].push(o);return this},e.prototype.fire=function(t,e,o){var i,n,r,a;if("string"==typeof t&&(o=e,e=t,t=this.jodit),void 0!==t.handlers){for(e=e.split(/[\s,]+/),i=0;e.length>i;i+=1)if(void 0!==t.handlers[e[i]]){for(this.stack.push(e[i]),n=0;t.handlers[e[i]]&&t.handlers[e[i]].length>n;n+=1)this.current=e[i],void 0!==(a=t.handlers[e[i]][n].apply(t,o||[]))&&(r=a);this.stack.pop()}return r}},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var r=o(1),a=o(5),s=o(7),l=o(2),d=o(0),c=o(6),u=o(12),f=o(17),p=o(10),h=o(3),g=o(11);l.Config.prototype.filebrowser={filter:function(t,e){return e=e.toLowerCase(),"string"==typeof t?-1!==t.toLowerCase().indexOf(e):"string"==typeof t.name?-1!==t.name.toLowerCase().indexOf(e):"string"!=typeof t.file||-1!==t.file.toLowerCase().indexOf(e)},sortBy:"changed",sort:function(t,e,o){var i,n=function(t,e){return e>t?-1:t>e?1:0};if("string"==typeof t)return n(t.toLowerCase(),e.toLowerCase());if(void 0===t[o]||"name"===o)return"string"==typeof t.name?n(t.name.toLowerCase(),e.name.toLowerCase()):"string"==typeof t.file?n(t.file.toLowerCase(),e.file.toLowerCase()):0;switch(o){case"changed":return i=new Date(t.changed),new Date(e.changed)-i;case"size":return d.humanSizeToBytes(t.size)-d.humanSizeToBytes(e.size)}},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:763,height:400,buttons:["upload","remove","update","select","edit","tiles","list","filter","sort"],view:"tiles",isSuccess:function(t){return t.success},getMessage:function(t){return void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,getThumbTemplate:function(t,e,o){var i,n,r,a=""+(new Date).getTime();return"string"==typeof t?(i=t,n=t):(void 0!==t.file&&(i=t.file,n=t.file),t.thumb&&(n=t.thumb)),r='
    \n '+(this.options.showFileName?''+i+"":"")+"\n "+(this.options.showFileSize&&t.size?""+t.size+"":"")+"\n "+(this.options.showFileChangeTime&&t.changed?''+t.changed+"":"")+"\n
    ",'\n '+i+'\n '+(this.options.showFileName||this.options.showFileSize&&t.size||this.options.showFileChangeTime&&t.changed?r:"")+"\n "},ajax:{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:function(t){return t},process:function(t){return t}},create:{data:{action:"create"}},getlocalfilebyurl:{data:{action:"getlocalfilebyurl"}},resize:{data:{action:"resize"}},crop:{data:{action:"crop"}},move:{data:{action:"move"}},remove:{data:{action:"remove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},uploader:null};var v="default",m="jodit_filebrowser_files_item";e.default=function(t){function e(e){var o=t.call(this,e)||this;o.currentPath="",o.currentSource=v,o.currentBaseUrl="",o.view="tiles",o.sortBy="changed",o.dragger=!1,o.filterWord="",o.getPathByUrl=function(t,e,i){var n=o;o.options.getlocalfilebyurl.data.url=t,o.send("getlocalfilebyurl",function(t){n.options.isSuccess(t)?e(t.data.path,t.data.name,t.data.source):i(t)},function(t){i(t)})},o.loadItems=function(t,e){var i=o;i.options.items.data.path=t,i.options.items.data.source=e,i.options.items.url&&(i.files.classList.add("active"),i.files.appendChild(i.loader.cloneNode(!0)),i.__ajax2&&i.__ajax2.abort&&i.__ajax2.abort(),i.__ajax2=i.send("items",function(t){var e=i.options.items.process.call(i,t);i.generateItemsBox(e.data.sources),i.someSelectedWasChanged()},function(t){s.Alert(t),i.status(i.jodit.i18n(t))}))},o.create=function(t,e,i){o.options.create.data.source=i,o.options.create.data.path=e,o.options.create.data.name=t,o.send("create",function(t){o.options.isSuccess(t)?(o.currentPath=e,o.currentSource=i,o.loadTree(e,i)):o.status(o.options.getMessage(t))},function(t){o.status(t)})},o.move=function(t,e,i){o.options.move.data.from=t,o.options.move.data.path=e,o.options.move.data.source=i,o.send("move",function(t){o.options.isSuccess(t)?o.loadTree(e,i):o.status(o.options.getMessage(t))},function(t){o.status(t)})},o.close=function(){o.dialog.close()},o.open=function(t){if(o.options.items.url){var e=0;o.__off(o.files,"dblclick").__on(o.files,"dblclick","a",o.onSelect(t)).__on(o.files,"touchstart","a",function(){var i=(new Date).getTime();h.EMULATE_DBLCLICK_TIMEOUT>i-e&&o.onSelect(t)(),e=i}),o.__off(o.buttons.select,"click").__on(o.buttons.select,"click",o.onSelect(t)),o.loadTree(o.currentPath,o.currentSource);var i=[d.dom(''+o.jodit.i18n("File Browser")+"      ")],n=void 0,a=void 0;for(n=0;o.options.buttons.length>n;n+=1){var s=o.options.buttons[n];"string"==typeof s&&void 0!==o.buttons[s]&&(o.options.editImage&&void 0!==r.default.modules.ImageEditor||"edit"!==s)?i.push(o.buttons[s]):"function"==typeof s?i.push(s.call(o)):d.isPlainObject(s)&&s.exec&&s.name&&(a=d.dom('
    '+c.default.getIcon(s.icon||s.name)+"
    "),i.push(a),a.addEventListener("click",s.exec))}o.dialog.open(o.browser,i)}},o.errorHandler=function(t){o.status(o.options.getMessage(t))},o.uploadHandler=function(){o.loadItems(o.currentPath,o.currentSource)},o.openImageEditor=function(t,e,i,n,r,a){o.jodit.getInstance("ImageEditor").open(t,function(t,s,l,d){void 0===o.options[s.action]&&(o.options[s.action]={}),void 0===o.options[s.action].data&&(o.options[s.action].data={action:s.action}),o.options[s.action].data.newname=t,o.options[s.action].data.box=s.box,o.options[s.action].data.path=i,o.options[s.action].data.name=e,o.options[s.action].data.source=n,o.send(s.action,function(t){o.options.isSuccess(t)?(o.loadTree(o.currentPath,o.currentSource),l(),r&&r()):(d(o.options.getMessage(t)),a&&a(o.options.getMessage(t)))},function(t){d(t),a&&a(t)})})},o.draggable=!1,o.start={top:0,left:0},o.client={x:0,y:0};var i=o;i.options=d.extend(!0,{},l.Config.prototype.filebrowser,i.jodit.options.filebrowser),i.dialog=new s.default(e,{fullsizeButton:!0}),i.loader=d.dom('
    '),i.browser=d.dom('
    '+(i.options.showFoldersPanel?'
    ':"")+'
    '),i.status_line=i.browser.querySelector(".jodit_filebrowser_status"),i.buttons={upload:d.dom('
    '+c.default.getIcon("plus")+'
    '),remove:d.dom('
    '+c.default.getIcon("bin")+"
    "),update:d.dom('
    '+c.default.getIcon("update")+"
    "),select:d.dom('
    '+c.default.getIcon("check")+"
    "),edit:d.dom('
    '+c.default.getIcon("pencil")+"
    "),tiles:d.dom('
    '+c.default.getIcon("th")+"
    "),list:d.dom('
    '+c.default.getIcon("th-list")+"
    "),filter:d.dom(''),sort:d.dom('")},i.tree=i.browser.querySelector(".jodit_filebrowser_tree"),i.files=i.browser.querySelector(".jodit_filebrowser_files"),i.__on([i.buttons.tiles,i.buttons.list],"click",function(t){var e=t.currentTarget;e.classList.contains("jodit_button_tiles")?(i.view="tiles",i.buttons.list.classList.add("disabled")):(i.view="list",i.buttons.tiles.classList.add("disabled")),e.classList.remove("disabled"),i.files.classList.remove("jodit_filebrowser_files_view-tiles"),i.files.classList.remove("jodit_filebrowser_files_view-list"),i.files.classList.add("jodit_filebrowser_files_view-"+i.view),g.default.set("jodit_filebrowser_view",i.view,31)}),i.__on(i.buttons.sort,"change",function(){i.sortBy=i.buttons.sort.value,g.default.set("jodit_filebrowser_sortby",i.sortBy,31),i.loadItems(i.currentPath,i.currentSource)}),i.__on(i.buttons.sort,"click mousedown",function(t){t.stopPropagation()}),i.__on(i.buttons.filter,"click mousedown",function(t){t.stopPropagation()}).__on(i.buttons.filter,"keydown",d.debounce(function(){i.filterWord=i.buttons.filter.value,i.loadItems(i.currentPath,i.currentSource)},300)),i.__on(i.buttons.remove,"click",function(){o.__getActiveElements().length&&s.Confirm(e.i18n("Are you shure?"),"",function(t){t&&(o.__getActiveElements().forEach(function(t){i.remove(i.currentPath,t.getAttribute("data-name"),t.getAttribute("data-source"))}),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource))})}),i.__on(i.buttons.edit,"click",function(){var t=o.__getActiveElements();1===t.length&&i.openImageEditor(t[0].getAttribute("href"),t[0].getAttribute("data-name"),t[0].getAttribute("data-path"),t[0].getAttribute("data-source"))}),i.__on(i.buttons.update,"click",function(){i.loadTree(o.currentPath,o.currentSource)}),i.__on(i.tree,"click","a>i.remove",function(t){var o=this.parentNode,n=o.getAttribute("data-path");return s.Confirm(e.i18n("Are you shure?"),"",function(t){t&&(i.remove(n,o.getAttribute("data-name"),o.getAttribute("data-source")),i.loadTree(i.currentPath,i.currentSource))}),t.stopImmediatePropagation(),!1}).__on(i.tree,"click","a",function(){var t=this;this.classList.contains("addfolder")?s.Promt(i.jodit.i18n("Enter Directory name"),i.jodit.i18n("Create directory"),function(e){i.create(e,t.getAttribute("data-path"),t.getAttribute("data-source"))},i.jodit.i18n("type name")):(i.currentPath=this.getAttribute("data-path"),i.currentSource=this.getAttribute("data-source"),i.loadTree(this.getAttribute("data-path"),this.getAttribute("data-source")))}).__on(o.tree,"dragstart","a",function(){i.dragger=this}).__on(o.tree,"drop","a",function(){if(i.options.moveFolder&&i.dragger){var t=i.dragger.getAttribute("data-path");if(!i.options.moveFolder&&i.dragger.classList.contains("jodit_filebrowser_tree_item"))return!1;if(i.dragger.classList.contains(m)&&(t+=i.dragger.getAttribute("data-name"),!i.options.moveFile))return!1;i.move(t,this.getAttribute("data-path"),this.getAttribute("data-source"))}});var a=new u.default(o.jodit);return i.__on(i.files,"mousedown","a>img",function(t){i.client.x=t.clientX,i.client.y=t.clientY,i.start=d.offset(this,i.jodit),i.draggable=this.cloneNode(!0),d.css(i.draggable,{"z-index":1e14,position:"fixed",display:"none",left:i.start.left,top:i.start.top,width:this.offsetWidth,height:this.offsetHeight}),document.body.appendChild(i.draggable)}).__on(i.files,"dragstart","a",function(t){i.dragger=this,t.dataTransfer.setData(h.TEXT_PLAIN,this.getAttribute("href")),t.stopPropagation()}).__on(i.files,"contextmenu","a",function(t){var e=this;if(i.options.contextMenu){var o=this;return a.show(t.pageX,t.pageY,[!!i.options.editImage&&{icon:"pencil",title:"Edit",exec:function(){i.openImageEditor(o.getAttribute("href"),o.getAttribute("data-name"),o.getAttribute("data-path"),o.getAttribute("data-source"))}},{icon:"bin",title:"Delete",exec:function(){i.remove(i.currentPath,o.getAttribute("data-name"),o.getAttribute("data-source")),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource)}},!!i.options.preview&&{icon:"eye",title:"Preview",exec:function(){var t=new s.default(i.jodit),n=d.dom('
    '),r=o.getAttribute("href"),a=i.buttons.select.cloneNode(!0),l=document.createElement("img"),u=function(){var a=function(){if(e.removeEventListener("load",a),n.innerHTML="",i.options.showPreviewNavigation){var s=d.dom(''+c.default.getIcon("angle-right")+""),f=d.dom(''+c.default.getIcon("angle-left")+"");o.previousSibling&&o.previousSibling.classList&&o.previousSibling.classList.contains(m)&&n.appendChild(f),o.nextSibling&&o.nextSibling.classList&&o.nextSibling.classList.contains(m)&&n.appendChild(s),i.__on([s,f],"click",function(){o=this.classList.contains("jodit_filebrowser_preview_navigation-next")?o.nextSibling:o.previousSibling,n.innerHTML='',r=o.getAttribute("href"),l.setAttribute("src",r),u()})}n.appendChild(l),t.setPosition()};l.addEventListener("load",a),l.complete&&a.call(l)};u(),l.setAttribute("src",r),t.setContent(n),i.options.showSelectButtonInPreview&&(a.removeAttribute("disabled"),t.setTitle(a),a.addEventListener("click",function(){i.files.querySelector("a.active").classList.add("active"),o.classList.add("active"),i.__fire(i.buttons.select,"click",document),t.close()})),t.open()}},{icon:"upload",title:"Download",exec:function(){window.open(o.getAttribute("href"))}}]),t.stopPropagation(),t.preventDefault(),!1}}).__on(i.files,"click",function(t){d.ctrlKey(t)||(o.__getActiveElements().forEach(function(t){t.classList.remove("active")}),i.someSelectedWasChanged())}).__on(i.files,"click","a",function(t){return d.ctrlKey(t)||i.__getActiveElements().forEach(function(t){t.classList.remove("active")}),this.classList.toggle("active"),i.someSelectedWasChanged(),t.stopPropagation(),!1}).__on(document,"dragover",function(t){i.isOpened()&&i.draggable&&void 0!==t.clientX&&d.css(i.draggable,{left:t.clientX+20,top:t.clientY+20,display:"block"})}).__on(window,"keydown",function(t){i.isOpened()&&46===t.which&&i.__fire(i.buttons.remove,"click",document)}).__on(window,"mouseup dragend",function(){i.draggable&&(i.draggable.parentNode.removeChild(i.draggable),i.draggable=!1)}),o.dialog.setSize(o.options.width,o.options.height),o.options.getlocalfilebyurl=d.extend(!0,{},o.options.ajax,o.options.getlocalfilebyurl),o.options.crop=d.extend(!0,{},o.options.ajax,o.options.crop),o.options.resize=d.extend(!0,{},o.options.ajax,o.options.resize),o.options.create=d.extend(!0,{},o.options.ajax,o.options.create),o.options.move=d.extend(!0,{},o.options.ajax,o.options.move),o.options.remove=d.extend(!0,{},o.options.ajax,o.options.remove),o.options.folder=d.extend(!0,{},o.options.ajax,o.options.folder),o.options.items=d.extend(!0,{},o.options.ajax,o.options.items),o.view="list"===o.options.view?"list":"tiles",g.default.get("jodit_filebrowser_view")&&(o.view="list"===g.default.get("jodit_filebrowser_view")?"list":"tiles"),o.buttons[o.view].classList.remove("disabled"),o.files.classList.add("jodit_filebrowser_files_view-"+o.view),o.sortBy=-1!==["changed","name","size"].indexOf(o.options.sortBy)?o.options.sortBy:"changed",g.default.get("jodit_filebrowser_sortby")&&(o.sortBy=-1!==["changed","name","size"].indexOf(g.default.get("jodit_filebrowser_sortby"))?g.default.get("jodit_filebrowser_sortby"):"changed"),o.buttons.sort.value=o.sortBy,o.currentBaseUrl=d.$$("base",o.jodit.doc).length?d.$$("base",o.jodit.doc)[0].getAttribute("href"):location.protocol+"//"+location.host,void 0!==r.default.modules.Uploader&&(o.uploader=new f.default(o.jodit,n({},o.jodit.options.uploader,o.options.uploader)),o.uploader.setPath(o.currentPath),o.uploader.setSource(o.currentSource),o.uploader.bind(o.browser,o.uploadHandler,o.errorHandler),o.uploader.bind(o.buttons.upload,o.uploadHandler,o.errorHandler)),o}return i(e,t),e.prototype.isOpened=function(){return this.dialog.isOpened()&&"none"!==this.browser.style.display},e.prototype.status=function(t,e){var o=this;clearTimeout(this.statustimer),this.status_line.classList.remove("success"),this.status_line.classList.add("active"),this.status_line.innerHTML=t,e&&this.status_line.classList.add("success"),this.statustimer=setTimeout(function(){o.status_line.classList.remove("active")},this.options.howLongShowMsg)},e.prototype.generateFolderTree=function(t){var e=this,o=[];d.each(t,function(t,i){t&&t!==v&&o.push('
    '+t+"
    "),i.folders.forEach(function(n){var r=''+n+"";e.options.deleteFolder&&".."!==n&&"."!==n&&(r+='×'),r+="",o.push(r)}),e.options.createNewFolder&&o.push(''+c.default.getIcon("plus")+" "+e.jodit.i18n("Add folder")+"")}),this.tree.innerHTML=o.join("")},e.prototype.generateItemsBox=function(t){var e=this,o=[];d.each(t,function(t,i){t&&t!==v&&o.push('
    '+t+(i.path?" - "+i.path:"")+"
    "),i.files&&i.files.length?("function"==typeof e.options.sort&&i.files.sort(function(t,o){return e.options.sort(t,o,e.sortBy,e.jodit)}),i.files.forEach(function(n){(void 0===e.options.filter||e.options.filter(n,e.filterWord))&&o.push(e.options.getThumbTemplate.call(e,n,i,t))})):o.push("
    "+e.jodit.i18n("There are no files")+"
    ")}),this.files.innerHTML=o.join("")},e.prototype.__getActiveElements=function(){return d.$$(":scope>a.active",this.files)},e.prototype.someSelectedWasChanged=function(){var t=this.__getActiveElements();this.buttons.remove.classList.toggle("disabled",!t.length),this.buttons.select.classList.toggle("disabled",!t.length),this.buttons.edit.classList.toggle("disabled",1!==t.length)},e.prototype.send=function(t,e,o){var i,n=d.extend(!0,{},this.options.ajax,void 0!==this.options[t]?this.options[t]:this.options.ajax);return n.data=n.prepareData.call(this,n.data),i=new p.default(this.jodit,n),i.send().then(e).catch(o),i},e.prototype.loadTree=function(t,e){var o=this;o.options.folder.data.path=t,o.options.folder.data.source=e,o.uploader&&(o.uploader.setPath(t),o.uploader.setSource(e)),o.options.showFoldersPanel&&(o.options.folder.url?(o.tree.classList.add("active"),o.tree.innerHTML="",o.tree.appendChild(o.loader.cloneNode(!0)),o.__ajax&&o.__ajax.abort&&o.__ajax.abort(),o.__ajax=this.send("folder",function(t){var e=o.options.folder.process.call(o,t);o.generateFolderTree(e.data.sources)},function(){o.status(o.jodit.i18n("Error on load folders"))})):o.tree.classList.remove("active")),this.loadItems(t,e)},e.prototype.remove=function(t,e,o){var i=this;this.options.remove.data.path=t,this.options.remove.data.name=e,this.options.remove.data.source=o,this.send("remove",function(t){t=i.options.remove.process.call(i,t),i.options.isSuccess(t)?(i.someSelectedWasChanged(),i.status(i.options.getMessage(t),!0)):i.status(i.options.getMessage(t))},function(t){i.status(t)})},e.prototype.onSelect=function(t){var e=this;return function(){var o=e.__getActiveElements();if(o.length){var i=[];o.forEach(function(t){i.push(t.getAttribute("data-url"))}),e.close(),"function"==typeof t&&t({baseurl:"",files:i})}return!1}},e}(a.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(2),a=o(0),s=o(6),l=o(7);r.Config.prototype.imageeditor={closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.resizeUseRatio=!0,o.cropUseRatio=!0,o.clicked=!1,o.activeTab="resize",o.hide=function(){o.dialog.close()},o.calcValueByPercent=function(t,e){var o,i=""+e,n=parseFloat(""+t);return(o=/^[\-+]?[0-9]+(px)?$/.exec(i))?parseInt(i,10):(o=/^([\-+]?[0-9.]+)%$/.exec(i),o?Math.round(n*(parseFloat(o[1])/100)):n||0)},o.calcCropBox=function(){var t=.8*o.crop_box.parentNode.offsetWidth,e=.8*o.crop_box.parentNode.offsetHeight,i=t,n=e;t>o.naturalWidth&&e>o.naturalHeight?(i=o.naturalWidth,n=o.naturalHeight):o.ratio>t/e?(i=t,n=o.naturalHeight*(t/o.naturalWidth)):(i=o.naturalWidth*(e/o.naturalHeight),n=e),a.css(o.crop_box,{width:i,height:n})},o.showCrop=function(){o.cropImage&&(o.calcCropBox(),o.new_w=o.calcValueByPercent(o.cropImage.offsetWidth||o.image.offsetWidth,o.options.cropDefaultWidth),o.new_h=o.cropUseRatio?o.new_w/o.ratio:o.calcValueByPercent(o.cropImage.offsetHeight||o.image.offsetHeight,o.options.cropDefaultHeight),a.css(o.cropHandler,{backgroundImage:"url("+o.cropImage.getAttribute("src")+")",width:o.new_w,height:o.new_h,left:(o.cropImage.offsetWidth||o.image.offsetWidth)/2-o.new_w/2,top:(o.cropImage.offsetHeight||o.image.offsetHeight)/2-o.new_h/2}),o.jodit.events.fire(o.cropHandler,"updatesize"))},o.cropBox={x:0,y:0,w:0,h:0},o.updateCropBox=function(){if(o.cropImage){var t=o.cropImage.offsetWidth/o.naturalWidth,e=o.cropImage.offsetHeight/o.naturalHeight;o.cropBox.x=a.css(o.cropHandler,"left")/t,o.cropBox.y=a.css(o.cropHandler,"top")/e,o.cropBox.w=o.cropHandler.offsetWidth/t,o.cropBox.h=o.cropHandler.offsetHeight/e,o.sizes.innerText=o.cropBox.w.toFixed(0)+"x"+o.cropBox.h.toFixed(0)}},o.resizeBox={w:0,h:0},o.updateResizeBox=function(){o.resizeBox.w=o.image.offsetWidth||o.naturalWidth,o.resizeBox.h=o.image.offsetHeight||o.naturalHeight},o.open=function(t,e){var i=(new Date).getTime();o.image=document.createElement("img"),a.$$("img,.jodit_icon-loader",o.resize_box).forEach(function(t){t.parentNode.removeChild(t)}),a.$$("img,.jodit_icon-loader",o.crop_box).forEach(function(t){t.parentNode.removeChild(t)}),a.css(o.cropHandler,"background","transparent"),o.onSave=e,o.resize_box.appendChild(a.dom('')),o.crop_box.appendChild(a.dom('')),/\?/.test(t)?t+="&_tst="+i:t+="?_tst="+i,o.image.setAttribute("src",t),o.dialog.open();var n=function(){o.image.removeEventListener("load",n),o.naturalWidth=o.image.naturalWidth,o.naturalHeight=o.image.naturalHeight,o.widthInput.value=""+o.naturalWidth,o.heightInput.value=""+o.naturalHeight,o.ratio=o.naturalWidth/o.naturalHeight,o.resize_box.appendChild(o.image),o.cropImage=o.image.cloneNode(),o.crop_box.appendChild(o.cropImage),a.$$(".jodit_icon-loader",o.editor).forEach(function(t){t.parentNode.removeChild(t)}),"crop"===o.activeTab&&o.showCrop(),o.jodit.events.fire(o.resizeHandler,"updatesize"),o.jodit.events.fire(o.cropHandler,"updatesize"),o.dialog.setPosition()};o.image.addEventListener("load",n),o.image.complete&&n()},o.setHandlers=function(){var t=o;t.__on([t.editor.querySelector(".jodit_bottomright"),t.cropHandler],"mousedown",function(e){t.target=e.target||e.srcElement,e.preventDefault(),e.stopImmediatePropagation(),t.clicked=!0,t.start_x=parseInt(e.clientX,10),t.start_y=parseInt(e.clientY,10),"crop"===t.activeTab?(t.top_x=a.css(t.cropHandler,"left"),t.top_y=a.css(t.cropHandler,"top"),t.width=t.cropHandler.offsetWidth,t.height=t.cropHandler.offsetHeight):(t.width=t.image.offsetWidth,t.height=t.image.offsetHeight)}),t.__off(window,".jodit_image_editor"+t.jodit.id).__on(window,"mousemove.jodit_image_editor"+t.jodit.id,a.throttle(function(e){t.clicked&&(t.diff_x=parseInt(e.clientX,10)-t.start_x,t.diff_y=parseInt(e.clientY,10)-t.start_y,"resize"===t.activeTab&&t.resizeUseRatio||"crop"===t.activeTab&&t.cropUseRatio?t.diff_x?(t.new_w=t.width+t.diff_x,t.new_h=Math.round(t.new_w/t.ratio)):(t.new_h=t.height+t.diff_y,t.new_w=Math.round(t.new_h*t.ratio)):(t.new_w=t.width+t.diff_x,t.new_h=t.height+t.diff_y),"resize"===t.activeTab?(t.new_w>t.options.resizeMinWidth&&(a.css(t.image,"width",t.new_w+"px"),t.widthInput.value=""+t.new_w),t.new_h>t.options.resizeMinHeight&&(a.css(t.image,"height",t.new_h+"px"),t.heightInput.value=""+t.new_h),o.jodit.events.fire(t.resizeHandler,"updatesize")):(t.target!==t.cropHandler?(t.top_x+t.new_w>t.cropImage.offsetWidth&&(t.new_w=t.cropImage.offsetWidth-t.top_x),t.top_y+t.new_h>t.cropImage.offsetHeight&&(t.new_h=t.cropImage.offsetHeight-t.top_y),a.css(t.cropHandler,{width:t.new_w,height:t.new_h})):(t.top_x+t.diff_x+t.cropHandler.offsetWidth>t.cropImage.offsetWidth&&(t.diff_x=t.cropImage.offsetWidth-t.top_x-t.cropHandler.offsetWidth),a.css(t.cropHandler,"left",t.top_x+t.diff_x),t.top_y+t.diff_y+t.cropHandler.offsetHeight>t.cropImage.offsetHeight&&(t.diff_y=t.cropImage.offsetHeight-t.top_y-t.cropHandler.offsetHeight),a.css(t.cropHandler,"top",t.top_y+t.diff_y)),o.jodit.events.fire(t.cropHandler,"updatesize")),e.stopImmediatePropagation())},30)).__on(window,"resize.jodit_image_editor"+t.jodit.id,function(){o.jodit.events.fire(t.resizeHandler,"updatesize"),t.showCrop(),o.jodit.events.fire(t.cropHandler,"updatesize")}).__on(window,"mouseup.jodit_image_editor"+t.jodit.id+" keydown.jodit_image_editor"+t.jodit.id,function(e){t.clicked&&(t.clicked=!1,e.stopImmediatePropagation())}),a.$$(".jodit_btn_group",t.editor).forEach(function(e){var o=e.querySelector("input");t.__on(e,"click change","button",function(){var i=this;a.$$("button",e).forEach(function(t){return t.classList.remove("active")}),i.classList.add("active"),o.checked=!!i.getAttribute("data-yes"),t.__fire(o,"change",document)})}),t.__on(o.editor,"click",".jodit_image_editor_slider-title",function(){a.$$(".jodit_image_editor_slider,.jodit_image_editor_area",t.editor).forEach(function(t){return t.classList.remove("active")});var e=this.parentNode;e.classList.add("active"),t.activeTab=e.getAttribute("data-area"),t.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_"+t.activeTab).classList.add("active"),"crop"===t.activeTab&&t.showCrop()}),t.__on(t.widthInput,"change mousedown keydown",a.debounce(function(){var e,i=parseInt(t.widthInput.value,10);i>t.jodit.options.resizer.min_width&&(a.css(t.image,"width",i+"px"),t.resizeUseRatio&&(e=Math.round(i/t.ratio))>t.jodit.options.resizer.min_height&&(a.css(t.image,"height",e+"px"),t.heightInput.value=e)),o.jodit.events.fire(t.resizeHandler,"updatesize")},200)),t.__on(t.heightInput,"change mousedown keydown",a.debounce(function(){var e,i=parseInt(t.heightInput.value,10);i>t.jodit.options.resizer.min_height&&(a.css(t.image,"height",i+"px"),t.resizeUseRatio&&(e=Math.round(i*t.ratio))>t.jodit.options.resizer.min_width&&(a.css(t.image,"width",e+"px"),t.widthInput.value=e)),o.jodit.events.fire(t.resizeHandler,"updatesize")},200)),t.editor.querySelector(".jodit_image_editor_keep_spect_ratio").addEventListener("change",function(){t.resizeUseRatio=this.checked}),t.editor.querySelector(".jodit_image_editor_keep_spect_ratio_crop").addEventListener("change",function(){t.cropUseRatio=this.checked}),t.jodit.events.on(t.resizeHandler,"updatesize",function(){a.css(t.resizeHandler,{top:0,left:0,width:(t.image.offsetWidth||t.naturalWidth)+"px",height:(t.image.offsetHeight||t.naturalHeight)+"px"}),o.updateResizeBox()}),t.jodit.events.on(t.cropHandler,"updatesize",function(){var e=a.css(t.cropHandler,"left"),o=a.css(t.cropHandler,"top"),i=t.cropHandler.offsetWidth,n=t.cropHandler.offsetHeight;0>e&&(e=0),0>o&&(o=0),e+i>t.cropImage.offsetWidth&&(i=t.cropImage.offsetWidth-e,t.cropUseRatio&&(n=i/t.ratio)),o+n>t.cropImage.offsetHeight&&(n=t.cropImage.offsetHeight-o,t.cropUseRatio&&(i=n*t.ratio)),a.css(t.cropHandler,{width:i,height:n,left:e,top:o,backgroundPosition:-e+"px "+-o+"px",backgroundSize:t.cropImage.offsetWidth+"px "+t.cropImage.offsetHeight+"px"}),t.updateCropBox()}),t.buttons.forEach(function(e){e.addEventListener("mousedown",function(t){t.stopImmediatePropagation()}),e.addEventListener("click",function(){var o={action:t.activeTab,box:"resize"===t.activeTab?t.resizeBox:t.cropBox};switch(e.getAttribute("data-action")){case"saveas":l.Promt(t.jodit.i18n("Enter new name"),t.jodit.i18n("Save in new file"),function(e){if(!a.trim(e))return l.Alert(t.jodit.i18n("The name should not be empty")),!1;t.onSave(e,o,t.hide,function(t){l.Alert(t)})});break;case"save":t.onSave(void 0,o,t.hide,function(t){l.Alert(t)});break;case"reset":"resize"===t.activeTab?(a.css(t.image,{width:null,height:null}),t.widthInput.value=""+t.naturalWidth,t.heightInput.value=""+t.naturalHeight,t.jodit.events.fire(t.resizeHandler,"updatesize")):t.showCrop()}})})},o.options=e.options.imageeditor,o.resizeUseRatio=o.options.resizeUseRatio,o.cropUseRatio=o.options.cropUseRatio,o.buttons=[a.dom('"),a.dom('"),a.dom('")],o.activeTab=o.options.resize?"resize":"crop",o.editor=a.dom('
    '+(o.options.resize?'
    ':"")+(o.options.crop?'
    ':"")+'
    '+(o.options.resize?'
    '+s.default.getIcon("resize")+e.i18n("Resize")+'
    ":"")+(o.options.crop?'
    '+s.default.getIcon("crop")+e.i18n("Crop")+'
    ":"")+"
    "),o.widthInput=o.editor.querySelector(".jodit_image_editor_width"),o.heightInput=o.editor.querySelector(".jodit_image_editor_height"),o.resize_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_resize .jodit_image_editor_box"),o.crop_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_image_editor_box"),o.sizes=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_sizes"),o.resizeHandler=o.editor.querySelector(".jodit_image_editor_resizer"),o.cropHandler=o.editor.querySelector(".jodit_image_editor_croper"),o.dialog=new l.default(e),o.dialog.setContent(o.editor),o.dialog.setSize(o.options.width,o.options.height),o.dialog.setTitle(o.buttons),o.setHandlers(),o}return i(e,t),e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(3),r=o(5),a=o(0),s=o(4);e.default=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isMarker=function(t){return s.default.isNode(t,e.jodit.win)&&"SPAN"===t.tagName&&t.getAttribute("data-"+n.MARKER_CLASS)},e.marker=function(t,o){void 0===t&&(t=!1);var i;o&&(i=o.cloneRange(),i.collapse(t));var r=e.jodit.doc.createElement("span");return r.id=n.MARKER_CLASS+"_"+ +new Date+"_"+(""+Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.setAttribute("data-"+n.MARKER_CLASS,t?"start":"end"),r.appendChild(e.jodit.doc.createTextNode(n.INVISIBLE_SPACE)),i&&i.insertNode(r),r},e.focus=function(){var t=e.jodit;if(!e.isFocused()){if(t.options.iframe&&a.isIE())for(var o=0;1e5>o&&"complete"!==t.doc.readyState;)o++;t.iframe&&t.iframe.focus(),t.win.focus(),t.editor.focus();var i=t.win.getSelection(),r=t.doc.createRange();return i.rangeCount||(t.editor.firstChild||t.editor.appendChild(t.doc.createTextNode(n.INVISIBLE_SPACE)),r.selectNodeContents(t.editor.firstChild),r.collapse(!0),i.removeAllRanges(),i.addRange(r)),!0}},e.eachSelection=function(t){var o=e.jodit.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0),n=[],r=i.endContainer===e.jodit.editor?e.jodit.editor.childNodes[i.endOffset-1]:i.endContainer;s.default.find(i.startContainer===e.jodit.editor?e.jodit.editor.childNodes[i.startOffset]:i.startContainer,function(t){if(!t||s.default.isEmptyTextNode(t)||e.isMarker(t)||n.push(t),t===r)return!0},e.jodit.editor,!0,"nextSibling",!1),n.forEach(function(e){t(e)})}},e.applyCSS=function(t,o,i){void 0===o&&(o="span");var r,l=function(t){return t&&!s.default.isEmptyTextNode(t)&&!e.isMarker(t)},d=function(t){return"FONT"!==t.nodeName&&t.nodeType===Node.ELEMENT_NODE&&!1!==a.each(i,function(e,o){return-1!==o.indexOf((""+a.css(t,e)).toLowerCase())})},c=function(t){return(RegExp("^"+t.nodeName+"$","i").test(o)||i&&d(t))&&l(t)},u=function(e){c(e)&&("SPAN"===e.nodeName&&Object.keys(t).forEach(function(o){0===r||a.css(e,o)==a.normilizeCSSValue(o,t[o])?(a.css(e,o,""),void 0===r&&(r=0)):(a.css(e,o,t[o]),void 0===r&&(r=1))}),e.getAttribute("style")&&"SPAN"===e.nodeName||(s.default.unwrap(e),void 0===r&&(r=0)))};if(e.isCollapsed()){var f=!1;if(e.current()&&s.default.closest(e.current(),o,e.jodit.editor)&&(f=!0,e.setCursorAfter(s.default.closest(e.current(),o,e.jodit.editor))),"SPAN"===o.toUpperCase()||!f){var p=s.default.create(o,n.INVISIBLE_SPACE,e.jodit.doc);e.insertNode(p),"SPAN"===o.toUpperCase()&&a.css(p,t),e.setCursorIn(p)}}else{var h=e.save();e.jodit.editor.normalize(),e.jodit.doc.execCommand("fontsize",!1,7),a.$$('font[size="7"]',e.jodit.editor).forEach(function(i){if(s.default.next(i,l,i.parentNode)||s.default.prev(i,l,i.parentNode)||!c(i.parentNode))if(s.default.next(i.firstChild,l,i)||s.default.prev(i.firstChild,l,i)||!c(i.firstChild))if(s.default.closest(i,c,e.jodit.editor)){var n=e.jodit.doc.createRange(),d=s.default.closest(i,c,e.jodit.editor);n.setStartBefore(d),n.setEndBefore(i);var f=n.extractContents();a.trim(f.textContent).length||s.default.unwrap(f.firstChild),d.parentNode.insertBefore(f,d),n.setStartAfter(i),n.setEndAfter(d);var p=n.extractContents();a.trim(p.textContent).length||s.default.unwrap(p.firstChild),s.default.after(d,p),u(d)}else{var h,g=[];s.default.find(i.firstChild,function(t){return t&&c(t)?(void 0===h&&(h=!0),g.push(t)):void 0===h&&(h=!1),!1},i,!0),g.forEach(s.default.unwrap),h||(void 0===r&&(r=1),1===r&&a.css(s.default.replace(i,o,!1,!1,e.jodit.doc),"SPAN"===o.toUpperCase()?t:{}))}else u(i.firstChild);else u(i.parentNode);i.parentNode&&s.default.unwrap(i)}),e.restore(h)}},e}return i(e,t),e.prototype.insertCursorAtPoint=function(t,e){var o;this.clear();try{var i=null;if(this.jodit.doc.caretPositionFromPoint?(o=this.jodit.doc.caretPositionFromPoint(t,e),i=this.jodit.doc.createRange(),i.setStart(o.offsetNode,o.offset)):this.jodit.doc.caretRangeFromPoint&&(o=this.jodit.doc.caretRangeFromPoint(t,e),i=this.jodit.doc.createRange(),i.setStart(o.startContainer,o.startOffset)),null!==i&&void 0!==window.getSelection){i.collapse(!0);var n=this.jodit.win.getSelection();n.removeAllRanges(),n.addRange(i)}else if(void 0!==this.jodit.doc.body.createTextRange){var r=this.jodit.doc.body.createTextRange();r.moveToPoint(t,e),r.select()}return!0}catch(t){}return!1},e.prototype.clear=function(){a.$$("span[data-"+n.MARKER_CLASS+"]",this.jodit.editor).forEach(function(t){t.parentNode.removeChild(t)})},e.prototype.restore=function(t){var e=this;if(void 0===t&&(t=[]),Array.isArray(t)){var o=this.jodit.win.getSelection();o.removeAllRanges(),t.forEach(function(t){var i=e.jodit.doc.createRange(),n=e.jodit.editor.querySelector("#"+t.endId),r=e.jodit.editor.querySelector("#"+t.startId);if(r){if(t.collapsed||!n){var a=r.previousSibling;a&&a.nodeType==Node.TEXT_NODE?i.setStart(a,a.nodeValue.length):i.setStartBefore(r),r.parentNode.removeChild(r),i.collapse(!0)}else i.setStartAfter(r),r.parentNode.removeChild(r),i.setEndBefore(n),n.parentNode.removeChild(n);o.addRange(i)}})}},e.prototype.save=function(){var t=this.jodit.win.getSelection();if(!t.rangeCount)return null;var e,o,i,n=[],r=t.rangeCount,a=[];for(e=0;r>e;e+=1)a[e]=t.getRangeAt(e),a[e].collapsed?(o=this.marker(!0,a[e]),n[e]={startId:o.id,collapsed:!0,startMarker:o.outerHTML}):(o=this.marker(!0,a[e]),i=this.marker(!1,a[e]),n[e]={startId:o.id,endId:i.id,collapsed:!1,startMarker:o.outerHTML,endMarker:i.outerHTML});for(t.removeAllRanges(),e=r-1;e>=0;--e){n[e].collapsed?(a[e].setStartAfter(this.jodit.doc.getElementById(n[e].startId)),a[e].collapse(!0)):(a[e].setStartBefore(this.jodit.doc.getElementById(n[e].startId)),a[e].setEndAfter(this.jodit.doc.getElementById(n[e].endId)));try{t.addRange(a[e].cloneRange())}catch(t){}}return n},e.prototype.isCollapsed=function(){var t,e=this.jodit.win.getSelection();for(t=0;e.rangeCount>t;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0},e.prototype.isFocused=function(){return this.jodit.doc.hasFocus&&this.jodit.doc.hasFocus()&&this.jodit.editor===this.jodit.doc.activeElement},e.prototype.current=function(){if(void 0!==this.jodit.win.getSelection){var t=this.jodit.win.getSelection();if(t.rangeCount>0){var e=t.getRangeAt(0),o=e.startContainer;if(e.startContainer.nodeType!==Node.TEXT_NODE&&e.startContainer===e.endContainer&&e.startOffset!==e.endOffset&&(o=e.startContainer.childNodes[e.startOffset]),s.default.contains(this.jodit.editor,o))return o}}return!1},e.prototype.insertNode=function(t,e){if(void 0===e&&(e=!0),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(this.focus(),!this.jodit.win.getSelection)throw Error("Jodit does'n support this browser");var o=this.jodit.win.getSelection();if(this.isCollapsed()||this.jodit.execCommand("Delete"),o.rangeCount){var i=o.getRangeAt(0);!function(t,e){for(var o=e;o;){if(o===t)return!0;o=o.parentNode}return!1}(this.jodit.editor,i.commonAncestorContainer)?this.jodit.editor.appendChild(t):(i.deleteContents(),i.insertNode(t))}else this.jodit.editor.appendChild(t);e&&this.setCursorAfter(t),this.jodit.setEditorValue()},e.prototype.insertHTML=function(t){var e,o,i=this.jodit.doc.createElement("DIV"),n=this.jodit.doc.createDocumentFragment();for(this.isFocused()||this.jodit.editor.focus(),"string"==typeof t?i.innerHTML=t:s.default.isNode(t,this.jodit.win)&&i.appendChild(t),e=i.lastChild;i.firstChild;)e=i.firstChild,n.appendChild(i.firstChild);for(this.insertNode(n,!1),this.setCursorAfter(e),o=this.jodit.editor.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&/^\s*$/.test(o.data);)o=o.previousSibling;e&&(o&&e===o&&1===e.nodeType&&this.jodit.editor.appendChild(this.jodit.doc.createElement("br")),this.setCursorAfter(e))},e.prototype.insertImage=function(t,e){void 0===e&&(e={});var o,i="string"==typeof t?a.dom("",this.jodit.doc):a.dom(t,this.jodit.doc);this.isCollapsed()||this.jodit.execCommand("Delete"),"string"==typeof t&&i.setAttribute("src",t),o=""+this.jodit.options.imageDefaultWidth,o&&"auto"!==o&&0>(o+"").indexOf("px")&&0>(o+"").indexOf("%")&&(o+="px"),e.width=o,e&&"object"==typeof e&&a.each(e,function(t,e){i.style[e]=t});var n=function(){(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",n)};i.addEventListener("load",n),i.complete&&n(),this.insertNode(i),this.jodit.events.fire("afterInsertImage",[i])},e.prototype.setCursorAfter=function(t){var e=this;if(!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===e.jodit.editor||t.parentNode===e.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var o=this.jodit.win.getSelection(),i=this.jodit.doc.createRange(),r=this.jodit.doc.createTextNode(n.INVISIBLE_SPACE);return t.nodeType!==Node.TEXT_NODE?(i.setStartAfter(t),i.insertNode(r),i.setStartAfter(r)):i.setStart(t,t.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},e.prototype.cursorInTheEdge=function(t,e,o){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===o&&(o=!1);var i=this.jodit.win.getSelection(),n=function(t){return!s.default.isEmptyTextNode(t)},r=e;if(!i.rangeCount)return!1;var a=i.getRangeAt(0),l=function(){return!1===o?t:!t}()?a.startContainer:a.endContainer;if(!1===e)r=s.default.up(l,s.default.isBlock,this.jodit.editor);else if("function"==typeof e)r=s.default.up(l,e,this.jodit.editor);else if(!s.default.isOrContains(e,a.startContainer))return null;return!(!r||(l===r?t?0!==a.startOffset:a.endOffset!==[].slice.call(r.childNodes).filter(n).length:t?l.nodeType===Node.TEXT_NODE&&0!==a.startOffset||s.default.prev(l,n,r):l.nodeType===Node.TEXT_NODE&&a.endOffset!==a.startContainer.nodeValue.length||s.default.next(l,n,r)))},e.prototype.setCursorBefore=function(t){var e=this;if(!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===e.jodit.editor||t.parentNode===e.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var o=this.jodit.win.getSelection(),i=this.jodit.doc.createRange(),r=this.jodit.doc.createTextNode(n.INVISIBLE_SPACE);return t.nodeType!==Node.TEXT_NODE?(i.setStartBefore(t),i.insertNode(r),i.selectNode(r)):i.setStart(t,t.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},e.prototype.setCursorIn=function(t,e){var o=this;if(void 0===e&&(e=!1),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===o.jodit.editor||t.parentNode===o.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var i=this.jodit.win.getSelection(),n=this.jodit.doc.createRange(),r=t,a=t;do{if(r.nodeType===Node.TEXT_NODE)break;a=r,r=r[e?"firstChild":"lastChild"]}while(r);n.selectNodeContents(r||a),n.collapse(e),i.removeAllRanges(),i.addRange(n)},e.prototype.select=function(t,e){var o=this;if(void 0===e&&(e=!1),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===o.jodit.editor||t.parentNode===o.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var i=this.jodit.win.getSelection(),n=this.jodit.doc.createRange();n[e?"selectNodeContents":"selectNode"](t),i.removeAllRanges(),i.addRange(n)},e}(r.default)},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(6),s=o(3);n.Config.prototype.fullsize=!1,n.Config.prototype.globalFullsize=!0,n.Config.prototype.controls.fullsize={exec:function(t){t.events.fire("toggleFullsize")},tooltip:"Open editor in fullsize",mode:s.MODE_SOURCE+s.MODE_WYSIWYG},i.default.plugins.fullsize=function(t){var e=!1,o=function(){e?r.css(t.container,{height:window.innerHeight,width:window.innerWidth}):r.css(t.container,{height:null,width:null})},i=function(i){if(void 0===i&&(i=!t.container.classList.contains("jodit_fullsize")),e=i,t.container.classList.toggle("jodit_fullsize",i),t.toolbar){r.css(t.toolbar.container,"width","auto");var n=r.dom(a.default.getIcon(i?"shrink":"fullsize")),s=t.toolbar.container.querySelector(".jodit_toolbar_btn-fullsize a");s&&(n.classList.add("jodit_icon"),s.innerHTML="",s.appendChild(n))}if(t.options.globalFullsize){for(var l=t.container.parentNode;l&&!(l instanceof Document);)l.classList.toggle("jodit_fullsize_box",i),l=l.parentNode;o()}t.events.fire("afterResize")};t.options.fullsize&&t.events.on("afterInit",function(){i(!0)}),t.options.globalFullsize&&t.__on(window,"resize",o),t.events.on("toggleFullsize",i),t.events.on("beforeDestruct",function(){i(!1)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(6),s=o(3),l=o(4);n.Config.prototype.addNewLine=!0,n.Config.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],i.default.plugins.addNewLine=function(t){if(t.options.addNewLine){var e,o,i=r.dom('
    '+a.default.getIcon("enter")+"
    "),n=RegExp("^("+t.options.addNewLineTagsTriggers.join("|")+")$","i"),d=!1,c=!1,u=function(){t.container.classList.contains("jodit_popup_active")||(clearTimeout(e),i.classList.toggle("jodit-add-new-line_after",!c),i.style.display="block",i.style.width=t.editor.clientWidth+"px",d=!1)},f=function(){clearTimeout(e),i.style.display="none",d=!0},p=function(t){return l.default.isBlock(t)&&!!t.childNodes.length},h=function(){d||(clearTimeout(e),e=setTimeout(f,500))};t.events.on("afterInit",function(){t.container.appendChild(i),t.__on(i,"mousemove",function(t){t.stopPropagation()}).__on(i.querySelector("span"),"mousedown touchstart",function(e){var i=t.doc.createElement(t.options.enter);i.appendChild(t.doc.createTextNode(s.INVISIBLE_SPACE)),c&&o?t.editor.insertBefore(i,o):t.editor.appendChild(i),t.selection.setCursorIn(i),t.setEditorValue(),f(),e.preventDefault()})}).on("change afterInit afterSetMode",r.debounce(function(){t.__on(t.editor,"scroll",function(){f()}).__on(t.container,"mouseleave",function(t){h()}).__on(t.editor,"mousemove",r.debounce(function(e){var a=t.doc.elementFromPoint(e.pageX-t.win.pageXOffset,e.pageY-t.win.pageYOffset);if(a&&a!==i&&l.default.isOrContains(t.editor,a)){if(!((o=a)&&o.nodeName.match(n)&&l.default.isOrContains(t.editor,o)||(o=l.default.closest(o,n,t.editor))))return void h();var s=r.offset(o,t),d=!1;10>Math.abs(e.pageY-s.top)&&(d=s.top,c=!0),10>Math.abs(e.pageY-(s.top+s.height))&&(d=s.top+s.height,c=!1),!1!==d&&(c&&!l.default.prev(o,p,t.editor)||!c&&!l.default.next(o,p,t.editor))?(i.style.top=d+"px",u()):(o=!1,h())}},t.options.observer.timeout))},t.options.observer.timeout))}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1);o(2).Config.prototype.autofocus=!1,i.default.plugins.autoFocus=function(t){var e;t.events.on("afterInit",function(){t.options.autofocus&&(t.options.observer.timeout?e=setTimeout(t.selection.focus,300):t.selection.focus())}).on("beforeDestruct",function(){clearTimeout(e)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(3),r=o(0),a=o(4);i.default.plugins.backspace=function(t){t.events.on("afterCommand",function(e){if("delete"===e){var o=t.selection.current();o&&o.firstChild&&"BR"===o.firstChild.tagName&&o.removeChild(o.firstChild),r.trim(t.editor.innerText)||t.editor.querySelector("img")||(t.editor.innerHTML="",t.selection.setCursorIn(t.editor))}}),t.events.on("keydown",function(e){if(e.which===n.KEY_BACKSPACE||e.keyCode===n.KEY_DELETE){if(!t.selection.isCollapsed())return t.execCommand("Delete"),!1;var o=t.win.getSelection(),i=!!o.rangeCount&&o.getRangeAt(0);if(i&&0!==i.startOffset&&i.startContainer.nodeType===Node.TEXT_NODE){for(var r=i.startContainer,s=r.nodeValue,l=i.startOffset;l>=0&&s[l-1]===n.INVISIBLE_SPACE;)l-=1;if(l!==i.startOffset){var d=i.startOffset;if(s=s.substr(0,l)+s.substr(d),r.nodeValue=s,s)return void i.setStart(r,l)}if(!r.previousSibling&&0===l){var c=a.default.prev(r,a.default.isBlock,t.editor);if(c){t.selection.setCursorIn(c,!1);var u=a.default.up(r,a.default.isBlock,t.editor);return u.innerHTML||u.parentNode.removeChild(u),!1}}}}})}},function(t,e,o){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var n=o(1),r=o(2);r.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},r.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},r.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},r.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},n.default.plugins.bold=function(t){t.events.on("beforeCommand",function(e){if(-1!==["bold","italic","underline","strikethrough"].indexOf(e)){var o=i({},n.default.defaultOptions.controls[e].css),r={};return Object.keys(o).forEach(function(t){r[t]=Array.isArray(o[t])?o[t][0]:o[t]}),t.selection.applyCSS(r,n.default.defaultOptions.controls[e].tags[0],n.default.defaultOptions.controls[e].css),t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0),s=o(4);n.Config.prototype.cleanHTML={replaceNBSP:!0,cleanOnPaste:!0,allowTags:!1},n.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"},i.default.plugins.cleanHTML=function(t){if(t.options.cleanHTML.cleanOnPaste&&t.events.on("processPaste",function(t,e){return a.cleanFromWord(e)}),t.options.cleanHTML.allowTags){var e=/([^\[]*)\[([^\]]+)]/,o=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,n={};"string"==typeof t.options.cleanHTML.allowTags?t.options.cleanHTML.allowTags.split(o).map(function(t){t=a.trim(t);var r=e.exec(t),s={},l=function(t){t=a.trim(t);var e=i.exec(t);e?s[e[1]]=e[2]:s[t]=!0};if(r){var d=r[2].split(o);r[1]&&(d.map(l),n[r[1].toUpperCase()]=s)}else n[t.toUpperCase()]=!0}):n=t.options.cleanHTML.allowTags,t.events.on("beforeSetElementValue",function(e){if(t.getMode()===r.MODE_WYSIWYG){var o=s.default.create("div","",t.doc),i=void 0,a=[],l=void 0,d=void 0;for(o.innerHTML=e.value,i=o.firstChild;i;){if(i.tagName){if(!n[i.tagName]){a.push(i),i=s.default.next(i,function(t){return!!t},o,!0);continue}if(!0!==n[i.tagName]&&i.attributes&&i.attributes.length){for(l=[],d=0;i.attributes.length>d;d+=1)(!n[i.tagName][i.attributes[d].name]||!0!==n[i.tagName][i.attributes[d].name]&&n[i.tagName][i.attributes[d].name]!==i.attributes[d].value)&&l.push(i.attributes[d].name);for(d=0;l.length>=d;d+=1)i.removeAttribute(l[d])}}i=s.default.next(i,function(t){return!!t},o,!0)}for(d=0;a.length>d;d+=1)a[d].parentNode&&a[d].parentNode.removeChild(a[d]);e.value=o.innerHTML}})}t.events.on("afterCommand",function(e){var o,i,n,a=t.selection;switch(e){case"insertHorizontalRule":(o=t.editor.querySelector("hr[id=null]"))&&(i=s.default.next(o,s.default.isBlock,t.editor,!1),i||(i=s.default.create(t.options.enter,"",t.doc),s.default.after(o,i)),a.setCursorIn(i));break;case"removeFormat":if(i=a.current(),n=function(e){return e.nodeType===Node.ELEMENT_NODE?(e.hasAttribute("style")&&e.removeAttribute("style"),"FONT"===e.tagName&&(s.default.each(e,n),e=s.default.replace(e,"span",!1,!1,t.doc)),e.normalize&&e.normalize()):t.options.cleanHTML.replaceNBSP&&e.nodeType===Node.TEXT_NODE&&e.nodeValue.match(r.SPACE_REG_EXP)&&(e.nodeValue=e.nodeValue.replace(r.SPACE_REG_EXP," ")),e},a.isCollapsed())for(;i&&i.nodeType!==Node.ELEMENT_NODE&&i!==t.editor;)i=n(i),i=i.parentNode;else t.win.getSelection().removeAllRanges()}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(2),a=o(8),s=a.Widget.TabsWidget,l=a.Widget.ColorPickerWidget;r.Config.prototype.controls.brush={css:{backgroundColor:function(t,e){var o=function(t){var i,r;if("object"==typeof t){for(r=Object.keys(t),i=0;r.length>i;i+=1)if(o(t[r[i]]))return!0}else if(Array.isArray(t))return-1!==t.indexOf(n.normalizeColor(e)||"");return!1};return o(t.options.colors)}},popup:function(t,e,o,i){var n,r=l(t,function(e){t.execCommand("background",!1,e),i()},""),a=l(t,function(e){t.execCommand("forecolor",!1,e),i()},"");return n="background"===t.options.colorPickerDefaultTab?{Background:r,Text:a}:{Text:a,Background:r},s(t,n)},tooltip:"Fill color or set the text color"},i.default.plugins.color=function(t){t.events.on("beforeCommand",function(e,o,i){if(/forecolor|background/.test(e)){var r=n.normalizeColor(i);switch(e){case"background":t.selection.applyCSS({backgroundColor:r||""});break;case"forecolor":t.selection.applyCSS({color:r||""})}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(3),a=o(4);e.insertParagraph=function(t,e,o){o||(o=t.options.enter);var i=t.doc.createElement(o);return i.appendChild(t.doc.createTextNode(r.INVISIBLE_SPACE)),t.selection.insertNode(i,!1),t.selection.setCursorIn(i),e&&e.parentNode&&e.parentNode.removeChild(e),i},i.default.plugins.enter=function(t){t.events.on("keyup",function(){var e=t.selection.current();if(!1!==e){var o=a.default.up(e,function(e){return e.tagName===t.options.enter.toUpperCase()},t.editor);o&&a.default.all(o,function(o){o.nodeType===Node.TEXT_NODE&&r.INVISIBLE_SPACE_REG_EXP.test(o.nodeValue)&&0!==o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,"").length&&(o.nodeValue=o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,""),o===e&&t.selection.setCursorAfter(o))})}}),t.events.on("keydown",function(o){if(o.which===r.KEY_ENTER||o.keyCode===r.KEY_ENTER){t.selection.isCollapsed()||t.execCommand("Delete"),t.selection.focus();var i=t.selection.current(),s=t.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):t.doc.createRange();i||(i=a.default.create("text",r.INVISIBLE_SPACE,t.doc),t.editor.appendChild(i),l.selectNode(i),s.removeAllRanges(),s.addRange(l));var d=void 0,c=!!i&&a.default.up(i,a.default.isBlock,t.editor);if(!c&&i&&(c=a.default.wrap(i,t.options.enter,t),s=t.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):t.doc.createRange()),c){if(!a.default.canSplitBlock(c,t.win)){var u=t.doc.createElement("br");return t.selection.insertNode(u,!1),t.selection.setCursorAfter(u),!1}if("LI"===c.nodeName&&0===n.trim(c.textContent||c.innerText).length){var f=a.default.closest(c,"ol|ul",t.editor);if(a.default.prev(c,function(t){return t&&"LI"===t.tagName},f))if(a.default.next(c,function(t){return t&&"LI"===t.tagName},f)){var p=t.doc.createRange();p.setStartBefore(f),p.setEndAfter(c);var h=p.extractContents();f.parentNode.insertBefore(h,f),d=t.selection.setCursorBefore(f)}else d=t.selection.setCursorAfter(f);else d=t.selection.setCursorBefore(f);return c.parentNode.removeChild(c),e.insertParagraph(t,d),n.$$("li",f).length||f.parentNode.removeChild(f),!1}if(t.selection.cursorInTheEdge(!0,c))d=t.selection.setCursorBefore(c),e.insertParagraph(t,d,"LI"===c.nodeName?"li":t.options.enter),t.selection.setCursorIn(c,!0);else if(t.selection.cursorInTheEdge(!1,c))d=t.selection.setCursorAfter(c),e.insertParagraph(t,d,"LI"===c.nodeName?"li":t.options.enter);else{var p=t.doc.createRange();p.setStartBefore(c),p.setEnd(l.startContainer,l.startOffset);var h=p.extractContents();c.parentNode.insertBefore(h,c),t.selection.setCursorIn(c,!0)}}else e.insertParagraph(t);return!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0);n.Config.prototype.showMessageErrors=!0,n.Config.prototype.showMessageErrorTime=3e3,n.Config.prototype.showMessageErrorOffsetPx=3,i.default.plugins.errorMessages=function(t){if(t.options.showMessageErrors){var e,o=r.dom('
    '),i=function(){e=5,[].slice.call(o.childNodes).forEach(function(i){r.css(o,"bottom",e+"px"),e+=i.offsetWidth+t.options.showMessageErrorOffsetPx})};t.workplace.appendChild(o),t.events.on("errorMessage",function(e,n,a){var s=r.dom('
    '+e+"
    ");o.appendChild(s),i(),setTimeout(function(){s.classList.remove("active"),setTimeout(function(){o.removeChild(s),i()},300)},a||t.options.showMessageErrorTime)})}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(2);r.Config.prototype.controls.fontsize={command:"fontSize",list:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],template:function(t,e,o){return o},tooltip:"Font size"},r.Config.prototype.controls.font={command:"fontname",exec:function(t,e,o){t.execCommand(o.command,!1,o.args[0])},list:{"Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},template:function(t,e,o){return''+o+""},tooltip:"Font family"},i.default.plugins.font=function(t){t.events.on("beforeCommand",function(e,o,i){if(/font/.test(e)){switch(e){case"fontsize":t.selection.applyCSS({fontSize:n.normalizeSize(i)});break;case"fontname":t.selection.applyCSS({fontFamily:i})}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(4),r=o(3);o(2).Config.prototype.controls.paragraph={command:"formatBlock",exec:function(t,e,o){t.execCommand(o.command,!1,o.args[0])},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},template:function(t,e,o){return"<"+e+' class="jodit_list_element">'+t.i18n(o)+""},tooltip:"Insert format block"},i.default.plugins.formatblock=function(t){t.events.on("beforeCommand",function(e,o,i){if("formatblock"===e){t.selection.focus();var a=!1;if(t.selection.eachSelection(function(e){var o=t.selection.save(),r=!!e&&n.default.up(e,n.default.isBlock,t.editor);if(!r&&e&&(r=n.default.wrap(e,t.options.enter,t)),!r)return t.selection.restore(o),!1;r.tagName.match(/TD|TH|TBODY|TABLE|THEAD/i)?t.selection.isCollapsed()?n.default.wrap(e,i,t):t.selection.applyCSS({},i):n.default.replace(r,i,!0,!1,t.doc),a=!0,t.selection.restore(o)}),!a){var s=n.default.create(i,r.INVISIBLE_SPACE,t.doc);t.selection.insertNode(s,!1),t.selection.setCursorIn(s)}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0);n.Config.prototype.iframe=!1,n.Config.prototype.iframeBaseUrl=!1,n.Config.prototype.iframeStyle='html{margin: 0px;}body{padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}body:after{content:"";clear:both;display:block}table{width:100%;border: none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td[data-jodit-selected-cell],th[data-jodit-selected-cell]{border: 1px double #1e88e5}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',n.Config.prototype.iframeCSSLinks=[],i.default.plugins.iframe=function(t){t.events.on("createEditor",function(){if(t.options.iframe){t.iframe=document.createElement("iframe"),t.iframe.style.display="block",t.iframe.src="about:blank",t.iframe.className="jodit_wysiwyg_iframe",t.iframe.frameBorder="0",t.workplace.appendChild(t.iframe);var e=t.iframe.contentWindow.document;if(t.doc=e,t.win=t.iframe.contentWindow,e.open(),e.write('\n \n \n '+(t.options.iframeBaseUrl?'':"")+'\n \n \n '),e.close(),t.editor=e.body,t.options.iframeCSSLinks&&t.options.iframeCSSLinks.forEach(function(t){var o=r.dom('',e);e.head.appendChild(o)}),t.options.iframeStyle){var o=e.createElement("style");o.innerHTML=t.options.iframeStyle,e.head.appendChild(o)}if(r.css(t.iframe,{width:"auto"===t.options.width?"100%":t.options.width,height:t.options.height,minHeight:t.options.minHeight}),"auto"===t.options.height){e.documentElement.style.overflowY="hidden";var i=function(e){r.css(t.iframe,"height",t.editor.offsetHeight)};t.events.on("change afterInit afterSetMode resize",i),t.__on([t.iframe,t.win,e.documentElement],"load",i),t.__on(e,"readystatechange DOMContentLoaded",i)}return r.css(t.editor,"minHeight",t.options.minHeight),function(t){t.matches||(t.matches=Element.prototype.matches)}(t.win.Element.prototype),t.__on(t.win,"mousedown click mouseup mousemove scroll",function(e){t.__fire&&t.__fire(window,e,document)}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0,o(1).default.plugins.imageInlineToolbar=function(t){t.events.on("click",function(t){})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0);i.default.plugins.imageProcessor=function(t){var e,o=function(o){t.__off(o,".imageProcessor").__on(o,"dragstart.imageProcessor",function(t){e=o,t.preventDefault()}).__on(o,"mousedown.imageProcessor",function(){e=o})};t.events.on("change afterInit",function(){t.__on(t.editor,"mousemove",n.throttle(function(o){e&&t.selection.insertCursorAtPoint(o.clientX,o.clientY)},t.options.observer.timeout)).__on(window,"mouseup",function(){e=!1}).__on(t.editor,"mouseup",function(o){var i,n=e;if(n&&o.target!==n){if(!1===t.selection.insertCursorAtPoint(o.clientX,o.clientY))return!1;i=n.parentNode&&"A"===n.parentNode.tagName&&!n.parentNode.textContent.length?n.parentNode:n,i.parentNode.removeChild(i),t.selection.insertImage(i),t.selection.select(i)}})}),t.events.on("change afterInit",n.debounce(function(){t.editor&&n.$$("img",t.editor).forEach(function(e){e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,o(e),e.complete||e.addEventListener("load",function o(){t.events&&t.events.fire&&t.events.fire("resize"),e.removeEventListener("load",o)}))})},t.options.observer.timeout))}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(7),s=o(6),l=o(4),d=o(8),c=d.Widget.TabsWidget,u=d.Widget.ImageSelectorWidget;n.Config.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},i.default.plugins.imageProperties=function(t){var e=function(e){var o,n=this,d=new a.default(t),f=r.dom(''+s.default.getIcon("cancel")+""+t.i18n("Cancel")+""),p=r.dom(''+s.default.getIcon("check")+""+t.i18n("Ok")+""),h={remove:r.dom(''+s.default.getIcon("bin")+" "+t.i18n("Delete")+"")},g=r.dom('
    '),v=r.dom('
    "),m=r.dom('
    '+(t.options.filebrowser.ajax.url||t.options.uploader.url?'
    '+(t.options.filebrowser.ajax.url||t.options.uploader.url?''+s.default.getIcon("image")+"":"")+(t.options.image.useImageEditor&&void 0!==i.default.modules.ImageEditor&&t.options.filebrowser.ajax.url?''+s.default.getIcon("crop")+"":"")+"
    ":"")+'
    '+t.i18n("Open link in new tab")+"
    "),_=n.naturalWidth/n.naturalHeight||1,b=g.querySelector("#imageWidth"),y=g.querySelector("#imageHeight"),w=function(){n.style.cssFloat&&-1!==["left","right"].indexOf(n.style.cssFloat.toLowerCase())?r.val(g,"#align",r.css(n,"float")):"block"===r.css(n,"display")&&"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&r.val(g,"#align","center")},q=function(){r.val(g,"#id",n.getAttribute("id"))},x=function(){r.val(g,"#style",n.getAttribute("style"))},j=function(){r.val(g,"#classes",(n.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,""))},C=function(){if(t.options.image.editMargins){var e=!1;r.$$(".margins",g).forEach(function(t){var o=n.style[t.id];o&&((/^[0-9]+$/.test(o)||/^[0-9]+px$/i.test(o))&&(o=parseInt(o,10)),t.value=""+o||"",e||"marginTop"===t.id||t.value===r.val(g,"#marginTop")||(g.querySelector(".jodit_lock_margin").innerHTML=s.default.getIcon("unlock"),r.$$(".margins",g).forEach(function(t){return t.classList.remove("disabled")}),e=!0))})}},E=function(){b.value=""+n.offsetWidth,y.value=""+n.offsetHeight},T=function(){n.hasAttribute("title")&&r.val(g,"#imageTitle",n.getAttribute("title")),n.hasAttribute("alt")&&r.val(g,"#imageAlt",n.getAttribute("alt")),l.default.closest(n,"a",t.editor)&&(r.val(g,"#imageLink",l.default.closest(n,"a",t.editor).getAttribute("href")),g.querySelector("#imageLinkOpenInNewTab").checked="_blank"===l.default.closest(n,"a",t.editor).getAttribute("target"))},S=function(){r.val(g,"#imageSrc",n.getAttribute("src")),g.querySelector("#imageViewSrc").setAttribute("src",n.getAttribute("src"))},k=function(){S(),T(),E(),C(),j(),q(),w(),x()},M=!0,L=!0,A={};return A[t.i18n("Image")]=m,A[t.i18n("Advansed")]=v,g.querySelector("#tabsbox").appendChild(c(t,A)),k(),t.events.on(d,"afterClose",function(){d.destruct(),n.parentNode&&t.options.image.selectImageAfterClose&&t.selection.select(n)}),h.remove.addEventListener("click",function(){n.parentNode.removeChild(n),d.close()}),r.$$(".jodit_use_image_editor",m).forEach(function(e){e.addEventListener("mousedown",function(){if(t.options.image.useImageEditor){var e=n.getAttribute("src"),o=document.createElement("a"),i=function(){if(o.host!==location.host)return void a.Confirm(t.i18n("You can only edit your own images. Download this image on the host?"),function(e){e&&t.uploader&&t.uploader.uploadRemoteImage(""+o.href,function(e){a.Alert(t.i18n("The image has been successfully uploaded to the host!"),function(){"string"==typeof e.newfilename&&(n.setAttribute("src",e.baseurl+e.newfilename),S())})},function(e){a.Alert(t.i18n("There was an error loading %s",e.message))})})};o.href=e,t.getInstance("FileBrowser").getPathByUrl(""+o.href,function(i,r,s){t.getInstance("FileBrowser").openImageEditor(o.href,r,i,s,function(){var t=(new Date).getTime();n.setAttribute("src",e+(-1!==e.indexOf("?")?"":"?")+"&_tmp="+t),S()},a.Alert)},function(t){a.Alert(t,i)})}})}),r.$$(".jodit_rechange",m).forEach(function(e){e.addEventListener("mousedown",function(o){e.classList.toggle("active"),t.toolbar.openPopup(e,u(t,{upload:function(e){e.files&&e.files.length&&n.setAttribute("src",e.baseurl+e.files[0]),k(),t.toolbar.closeAll()},filebrowser:function(e){e&&e.files&&Array.isArray(e.files)&&e.files.length&&(n.setAttribute("src",e.files[0]),t.toolbar.closeAll(),k())}},n),!0),o.stopPropagation()})}),g.querySelector(".jodit_lock_helper.jodit_lock_size").addEventListener("click",function(){M=!M,this.innerHTML=s.default.getIcon(M?"lock":"unlock"),t.__fire(b,"change",document)}),g.querySelector(".jodit_lock_helper.jodit_lock_margin").addEventListener("click",function(){L=!L,this.innerHTML=s.default.getIcon(L?"lock":"unlock"),L?r.$$(".margins",g).forEach(function(t){t.matches("#marginTop")||t.setAttribute("disabled","true")}):r.$$(".margins",g).forEach(function(t){t.matches("#marginTop")||t.removeAttribute("disabled")})}),t.__on(r.$$("#imageWidth,#imageHeight",g),"change keydown mousedown paste",function(t){M&&(clearTimeout(o),o=setTimeout(function(){var e=parseInt(b.value,10),o=parseInt(y.value,10);"imageWidth"===t.target.getAttribute("id")?y.value=""+Math.round(e/_):b.value=""+Math.round(o*_)},100))}),d.setTitle([t.i18n("Image properties"),h.remove]),d.setContent(g),f.addEventListener("click",function(){d.close()}),p.addEventListener("click",function(){var e;if(t.options.image.editStyle&&(r.val(g,"#style")?n.setAttribute("style",r.val(g,"#style")):n.removeAttribute("style")),!r.val(g,"#imageSrc"))return n.parentNode.removeChild(n),void d.close();n.setAttribute("src",r.val(g,"#imageSrc")),r.val(g,"#imageTitle")?n.setAttribute("title",r.val(g,"#imageTitle")):n.removeAttribute("title"),r.val(g,"#imageAlt")?n.setAttribute("alt",r.val(g,"#imageAlt")):n.removeAttribute("alt"),r.val(g,"#imageLink")?(l.default.closest(n,"a",t.editor)||l.default.wrap(n,"a",t),e=l.default.closest(n,"a",t.editor),e.setAttribute("href",r.val(g,"#imageLink")),g.querySelector("#imageLinkOpenInNewTab").checked?e.setAttribute("target","_blank"):e.removeAttribute("target")):l.default.closest(n,"a",t.editor)&&(e=l.default.closest(n,"a",t.editor),e.parentNode.replaceChild(n,e));var o=function(t){return t=r.trim(t),/^[0-9]+$/.test(t)?t+"px":t};r.css(n,{width:r.trim(b.value)?o(b.value):null,height:r.trim(y.value)?o(y.value):null}),t.options.image.editMargins&&(g.querySelector(".jodit_lock_margin").firstChild.classList.contains("jodit_icon_unlock")?r.$$(".margins",g).forEach(function(){r.css(n,this.id,o(this.value))}):r.css(n,"margin",o(r.val(g,"#marginTop")))),t.options.image.editClass&&(r.val(g,"#classes")?n.setAttribute("class",r.val(g,"#classes")):n.removeAttribute("class")),t.options.image.editId&&(r.val(g,"#id")?n.setAttribute("id",r.val(g,"#id")):n.removeAttribute("id"));var i=function(){"block"===r.css(n,"display")&&r.css(n,"display",""),"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&(n.style.marginLeft="",n.style.marginRight="")};t.options.image.editAlign&&(r.val(g,"#align")?-1!==["right","left"].indexOf(r.val(g,"#align").toLowerCase())?(r.css(n,"float",r.val(g,"#align")),i()):(r.css(n,"float",""),r.css(n,{display:"block","margin-left":"auto","margin-right":"auto"})):(r.css(n,"float")&&-1!==["right","left"].indexOf((""+r.css(n,"float")).toLowerCase())&&r.css(n,"float",""),i())),n.getAttribute("style")||n.removeAttribute("style"),t.setEditorValue(),d.close()}),d.setFooter([p,f]),d.setSize(500),d.open(),e&&e.preventDefault(),!1};t.events.on("afterInit",function(){t.options.image.openOnDblClick?t.__on(t.editor,"dblclick","img",e):t.__on(t.editor,"dblclick","img",function(){t.selection.select(this)})}).on("openImageProperties",function(t){e.call(t)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(6),r=o(2),a=o(0),s=o(4),l=o(9),d=o(8),c=d.Widget.ColorPickerWidget,u=d.Widget.TabsWidget;r.Config.prototype.popup={img:[{name:"bin",tooltip:"Delete",exec:function(t,e){e.parentNode.removeChild(e)}},{name:"pencil",exec:function(t,e){"img"===e.tagName.toLowerCase()&&t.events.fire(t,"openImageProperties",[e])},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec:function(t,e,o){if("img"===e.tagName.toLowerCase()){var i=o.args[1].toLowerCase();a.css(e,"vertical-align",i)}}},{name:"left",list:["Left","Right","Center","Normal"],exec:function(t,e,o){if("img"===e.tagName.toLowerCase()){var i=function(){"block"===a.css(e,"display")&&a.css(e,"display",""),"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(e.style.marginLeft="",e.style.marginRight="")},n=o.args[1].toLowerCase();"normal"!==n?-1!==["right","left"].indexOf(n)?(a.css(e,"float",n),i()):(a.css(e,"float",""),a.css(e,{display:"block","margin-left":"auto","margin-right":"auto"})):(a.css(e,"float")&&-1!==["right","left"].indexOf(a.css(e,"float").toLowerCase())&&a.css(e,"float",""),i())}},tooltip:"Horizontal align"}],table:[{name:"brush",popup:function(t,e,o,i){var n,r,s,d,f,p,h=l.default.getAllSelectedCells(e);return!!h.length&&(d=a.css(h[0],"color"),p=a.css(h[0],"background-color"),f=a.css(h[0],"border-color"),n=c(t,function(t){h.forEach(function(e){a.css(e,"background-color",t)}),i()},p),r=c(t,function(t){h.forEach(function(e){a.css(e,"color",t)}),i()},d),s=c(t,function(t){h.forEach(function(e){a.css(e,"border-color",t)}),i()},f),u(t,{Background:n,Text:r,Border:s}))},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec:function(t,e,o){var i=o.args[1].toLowerCase();l.default.getAllSelectedCells(e).forEach(function(t){a.css(t,"vertical-align",i)})},tooltip:"Vertical align"},{name:"splitv",command:"tablesplitv",tooltip:"Split vertical"},{name:"splitg",command:"tablesplitg",tooltip:"Split horizontal"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Add row"},{name:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Delete"}]},i.default.plugins.Popup=function(t){var e,o=new n.default(t),i=a.dom('
    ',document),r=function(e){t.container&&t.container.classList.toggle("jodit_popup_active",e)},l=function(){i.classList.remove("active"),r(!1)},d=function(e,n,s){var l=e.tagName.toLowerCase();void 0!==t.options.popup[l]&&(i.innerHTML="",o.build(t.options.popup[l],i,e),i.classList.add("active"),a.css(i,{left:n+"px",top:s+"px",marginLeft:-Math.round(i.offsetWidth/2)+"px"}),r(!0))},c=function(o,i,n){clearTimeout(e),t.options.observer.timeout?e=setTimeout(d.bind(t,o,i,n),t.options.observer.timeout):d(o,i,n)};t.events.on("hidePopup afterCommand keydown resize",l).on("showPopap",c).on("afterInit",function(){t.container.appendChild(i),t.__on(i,"mouseup",function(t){t.stopPropagation()});var e=!1;t.__on(t.editor,"mousedown",function(o){if("IMG"===o.target.tagName||s.default.closest(o.target,"table",t.editor)){var i="IMG"===o.target.tagName?o.target:s.default.closest(o.target,"table",t.editor),n=a.offset(i,t);c(i,Math.round(n.left+i.offsetWidth/2),Math.round(n.top+i.offsetHeight)),e=!0}else e=!1}),t.__on(window,"mouseup",function(){e||l(),e=!1})}).on("beforeDestruct",function(){clearTimeout(e)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(4),a=o(2);a.Config.prototype.controls.align={tags:["p","div","span","td","th","img"],name:"left",tooltip:"Align",list:["center","left","right","justify"]},a.Config.prototype.controls.center={command:"justifyCenter",tags:["center"],css:{"text-align":"center"},tooltip:"Align Center"},a.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},a.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},a.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},i.default.plugins.justify=function(t){t.events.on("beforeCommand",function(e){if(/justify/.test(e)){var o=function(o){if(o instanceof t.win.HTMLElement)switch(e){case"justifyfull":o.style.textAlign="justify";break;case"justifyright":o.style.textAlign="right";break;case"justifyleft":o.style.textAlign="left";break;case"justifycenter":o.style.textAlign="center"}};return t.selection.focus(),t.selection.eachSelection(function(e){if(!e&&t.editor.querySelector(".jodit_selected_cell"))return n.$$(".jodit_selected_cell",t.editor).forEach(o),!1;if(e instanceof t.win.Node){var i=!!e&&r.default.up(e,r.default.isBlock,t.editor);!i&&e&&(i=r.default.wrap(e,t.options.enter,t)),o(i)}}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(4);n.Config.prototype.link={followOnDblClick:!0,processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0},n.Config.prototype.controls.link={popup:function(t,e,o,i){var n=t.win.getSelection(),s=r.dom('
      
    ");e=!(!e||!a.default.closest(e,"A",t.editor))&&a.default.closest(e,"A",t.editor),e?(r.val(s,"input[name=url]",e.getAttribute("href")),r.val(s,"input[name=text]",e.innerText),s.querySelector("input[name=target]").checked="_blank"===e.getAttribute("target"),s.querySelector("input[name=nofollow]").checked="nofollow"===e.getAttribute("rel")):(s.querySelector(".jodit_unlink_button").style.display="none",r.val(s,"input[name=text]",""+n));var l=t.selection.save();return s.querySelector(".jodit_unlink_button").addEventListener("mousedown",function(){e&&a.default.unwrap(e),i()}),s.addEventListener("submit",function(o){o.preventDefault(),t.selection.restore(l);var n=e||a.default.create("a","",t.doc);return r.val(s,"input[name=url]")?(n.setAttribute("href",r.val(s,"input[name=url]")),n.innerText=r.val(s,"input[name=text]"),s.querySelector("input[name=target]").checked?n.setAttribute("target","_blank"):n.removeAttribute("target"),s.querySelector("input[name=nofollow]").checked?n.setAttribute("rel","nofollow"):n.removeAttribute("rel"),e||t.selection.insertNode(n),i(),!1):(s.querySelector("input[name=url]").focus(),s.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),s},tags:["a"],tooltip:"Insert link"},i.default.plugins.link=function(t){t.options.link.followOnDblClick&&t.events.on("afterInit",function(){t.__on(t.editor,"dblclick","a",function(t){this.getAttribute("href")&&(location.href=this.getAttribute("href"),t.preventDefault())})}),t.options.link.processPastedLink&&t.events.on("processPaste",function(e,o){if(r.isURL(o)){var i=void 0;return r.convertMediaURLToVideoEmbed(o)!==o?i=r.convertMediaURLToVideoEmbed(o):(i=t.doc.createElement("a"),i.setAttribute("href",o),i.innerText=o,t.options.link.openLinkDialogAfterPost&&setTimeout(function(){},100)),i}}),t.options.link.removeLinkAfterFormat&&t.events.on("afterCommand",function(e){var o,i,n=t.selection;"removeFormat"===e&&(i=n.current(),i&&"A"!==i.tagName&&(i=a.default.closest(i,"A",t.editor)),i&&"A"===i.tagName&&(o=i.innerHTML===i.innerText?a.default.create("text",i.innerText,t.doc):a.default.create("span",i.innerHTML,t.doc),i.parentNode.replaceChild(o,i),t.selection.setCursorIn(o,!0)))})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1);o(2).Config.prototype.mobileTapTimeout=300,i.default.plugins.mobile=function(t){var e,o=0;t.events.on("touchend",function(i){i.changedTouches.length&&(e=(new Date).getTime())-o>t.options.mobileTapTimeout&&(o=e,t.selection.insertCursorAtPoint(i.changedTouches[0].clientX,i.changedTouches[0].clientY))}).on("resize afterInit",function(){var e,o=t.container.offsetWidth;e=t.options.sizeLG>o?t.options.sizeMD>o?t.options.sizeSM>o?t.options.buttonsXS:t.options.buttonsSM:t.options.buttonsMD:t.options.buttons,t.toolbar.build(e.concat(t.options.extraButtons),t.container)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(4),r=o(2);r.Config.prototype.controls.ul={command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},r.Config.prototype.controls.ol={command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},i.default.plugins.orderedlist=function(t){t.events.on("afterCommand",function(e){if(/insert(un)?orderedlist/i.test(e)){var o=n.default.up(t.selection.current(),function(t){return/^UL|OL$/i.test(t.tagName)},t.editor);if(o&&o.parentNode&&"P"===o.parentNode.tagName){var i=t.selection.save();n.default.unwrap(o.parentNode),[].slice.call(o.childNodes).forEach(function(t){t.lastChild&&t.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===t.lastChild.tagName&&t.removeChild(t.lastChild)}),t.selection.restore(i)}t.setEditorValue()}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(7),r=o(0),a=o(2),s=o(3);a.Config.prototype.askBeforePasteHTML=!0,i.default.plugins.paste=function(t){t.events.on("afterInit",function(){t.editor.addEventListener("paste",function(e){if(!1===t.events.fire("beforePaste",[e]))return e.preventDefault(),!1;if(e&&e.clipboardData&&e.clipboardData.getData){var o=void 0,i=e.clipboardData.types,n="",a="";if(Array.isArray(i))for(o=0;i.length>o;o+=1)n+=i[o]+";";else n=i;/text\/html/.test(n)?a=e.clipboardData.getData("text/html"):/text\/rtf/.test(n)&&r.browser("safari")?a=e.clipboardData.getData("text/rtf"):/text\/plain/.test(n)&&!r.browser("mozilla")&&(a=r.htmlentities(e.clipboardData.getData(s.TEXT_PLAIN)).replace(/\n/g,"
    ")),(""!==a||a instanceof t.win.Node)&&(a=t.events.fire("processPaste",[e,a]),("string"==typeof a||a instanceof t.win.Node)&&t.selection.insertHTML(a),e.preventDefault(),e.stopPropagation())}return!1!==t.events.fire("afterPaste",[e])&&void 0})}),t.options.askBeforePasteHTML&&t.events.on("beforePaste",function(e){if(e&&e.clipboardData&&e.clipboardData.getData&&e.clipboardData.types[0]===s.TEXT_PLAIN){var o=e.clipboardData.getData(s.TEXT_PLAIN);if(r.isHTML(o))return n.Confirm(t.i18n("Your code is similar to HTML. Paste as HTML?"),t.i18n("Paste as HTML"),function(e){t.selection.insertHTML(e?o:r.htmlspecialchars(o)),t.setEditorValue()}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.useInputsPlaceholder=!0,n.Config.prototype.placeholder="Type something",i.default.plugins.placeholder=function(t){var e,o;if(t.options.showPlaceholder){this.destruct=function(){e.parentNode.removeChild(e),clearTimeout(o)};var i=function(){var o=0,i=0,n=t.win.getComputedStyle(t.editor);if(t.editor.firstChild&&t.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=t.win.getComputedStyle(t.editor.firstChild);o=parseInt(r.getPropertyValue("margin-top"),10),i=parseInt(r.getPropertyValue("margin-left"),10),e.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",e.style.lineHeight=r.getPropertyValue("line-height")}else e.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",e.style.lineHeight=n.getPropertyValue("line-height");a.each({display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),o),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),i)},function(t,o){e.style[t]=o})},n=function(){e.style.display="none"},s=function(){if(t.editor)return t.getMode()!==r.MODE_WYSIWYG?n():void(t.getEditorValue()?n():i())};e=a.dom(''+t.i18n(t.options.placeholder)+"",document),t.options.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(e.innerHTML=t.element.getAttribute("placeholder")),t.events.on("afterInit",function(){t.workplace.appendChild(e),i(),t.events.fire("placeholder",[e.innerHTML])}).on("change keyup mouseup keydown mousedown afterSetMode",function(){s(),o=setTimeout(s,1)})}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(13),r=o(3),a=o(0),s=o(2);s.Config.prototype.controls.redo={mode:r.MODE_SPLIT,tooltip:"Redo"},s.Config.prototype.controls.undo={mode:r.MODE_SPLIT,tooltip:"Undo"},i.default.plugins.redoundo=function(t){var e=new n.default(t),o=function(){t.events.fire("canRedo",[e.stack.canRedo()]),t.events.fire("canUndo",[e.stack.canUndo()])};t.events.on("keydown",function(e){if(a.ctrlKey(e)&&(e.which===r.KEY_Z||e.which===r.KEY_Y))return t.execCommand(e.which===r.KEY_Z?"Undo":"Redo"),e.preventDefault(),e.stopImmediatePropagation(),!1},null,!0),t.events.on("afterSetMode",function(){t.getMode()===r.MODE_WYSIWYG&&o()}).on("beforeCommand",function(i){if("redo"===i||"undo"===i)return t.getMode()===r.MODE_WYSIWYG&&(e.stack["can"+i.substr(0,1).toUpperCase()+i.substr(1)]()&&e.stack[i](),o()),!1}),this.destruct=function(){e.destruct()}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0),s=o(4);n.Config.prototype.useIframeResizer=!0,n.Config.prototype.useTableResizer=!0,n.Config.prototype.useImageResizer=!0,n.Config.prototype.resizer={min_width:10,min_height:10},i.default.plugins.Resizer=function(t){var e,o,i,n,l,d,c,u,f,p,h,g=!1,v=!1,m=!1,_=a.dom('',document),b=function(){v=!1,m=!1,o=null,_.style.display="none"},y=function(){if(m){var e=a.offset(o,t),i=parseInt(_.style.left,10),n=parseInt(_.style.top,10),r=_.offsetWidth,s=_.offsetHeight;n===e.top-1&&i===e.left-1&&r===o.offsetWidth&&s===o.offsetHeight||(_.style.top=e.top-1+"px",_.style.left=e.left-1+"px",_.style.width=o.offsetWidth+"px",_.style.height=o.offsetHeight+"px",t.events&&(t.events.fire(o,"changesize"),isNaN(i)||t.events.fire("resize")))}},w=function(){m=!0,_.style.display="block",y()},q=function(e){var i;if("IFRAME"===e.tagName)if(e.parentNode&&e.parentNode.getAttribute("data-jodit_iframe_wrapper"))e=e.parentNode;else{i=a.dom('',document),i.style.display="inline-block"===e.style.display?"inline-block":"block",i.style.width=e.offsetWidth+"px",i.style.height=e.offsetHeight+"px",s.default.wrap(e,i,t);var n=e;t.events.on(i,"changesize",function(){n.setAttribute("width",i.offsetWidth+"px"),n.setAttribute("height",i.offsetHeight+"px")}),e=i}var r;t.__on(e,"dragstart",b).__on(e,"mousedown",function(t){a.isIE()&&t.preventDefault()}).__on(e,"mousedown touchstart",function(){g=!0,o=e,w(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function t(){y(),o&&o.removeEventListener("load",t)}),clearTimeout(r),r=setTimeout(function(){g=!1},400)})};a.$$("i",_).forEach(function(r){t.__on(r,"mousedown touchstart",function(a){if(!o||!o.parentNode)return b(),!1;e=r,a.preventDefault(),a.stopImmediatePropagation(),l=o.offsetWidth,d=o.offsetHeight,c=l/d,v=!0,i=a.clientX,n=a.clientY,t.lock("resizer")})}),t.events.on("afterInit",function(){t.container.appendChild(_),t.__on(window,"mousemove touchmove",function(r){v&&(p=r.clientX-i,h=r.clientY-n,"IMG"===o.tagName?p?(f=l+(e.className.match(/left/)?-1:1)*p,u=Math.round(f/c)):(u=d+(e.className.match(/top/)?-1:1)*h,f=Math.round(u*c)):(f=l+(e.className.match(/left/)?-1:1)*p,u=d+(e.className.match(/top/)?-1:1)*h),f>t.options.resizer.min_width&&(o.style.width=_.parentNode.offsetWidth>f?f+"px":"100%"),u>t.options.resizer.min_height&&(o.style.height=u+"px"),y(),r.stopImmediatePropagation())}).__on(window,"resize",function(){m&&y()}).__on(window,"mouseup keydown touchend",function(e){m&&!g&&(v?(t.unlock(),v=!1,t.setEditorValue(),e.stopImmediatePropagation()):b())}),t.__on([window,t.editor],"scroll",function(){m&&!v&&b()})}).on("afterGetValueFromEditor",function(t){t.value=t.value.replace(/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi,"$1")}).on("change afterInit afterSetMode",a.debounce(function(){m&&(o&&o.parentNode?y():b()),a.$$("img, table, iframe",t.editor).forEach(function(e){t.getRealMode()===r.MODE_WYSIWYG&&!e.__jodit_resizer_binded&&("IFRAME"===e.tagName&&t.options.useIframeResizer||"IMG"===e.tagName&&t.options.useImageResizer||"TABLE"===e.tagName&&t.options.useTableResizer)&&(e.__jodit_resizer_binded=!0,q(e))})},t.options.observer.timeout))}},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(1),r=o(2),a=o(3),s=o(0),l=o(5);r.Config.prototype.useAceEditor=!0,r.Config.prototype.sourceEditorNativeOptions={theme:"ace/theme/textmate",mode:"ace/mode/html",highlightActiveLine:!0},r.Config.prototype.sourceEditorCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js","//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-emmet.js"],r.Config.prototype.beautifyHTMLCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.min.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-html.min.js"],r.Config.prototype.controls.source={mode:a.MODE_SPLIT,exec:function(t){t.toggleMode()},tooltip:"Change mode"},n.default.plugins.source=function(t){function e(e){var o=t.call(this,e)||this;return o.className="jodit_ace_editor",o.loadNext=function(t,e,i,n){if(void 0===i&&(i="aceReady"),void 0===n&&(n=o.className),i&&void 0===e[t]&&o.jodit&&o.jodit.events)return void o.jodit.events.fire(i);void 0!==e[t]&&s.appendScript(e[t],function(){o.loadNext(t+1,e,i,n)},n)},o.fromWYSIWYG=function(t){if(void 0===t&&(t=!1),!o.__lock&&(o.jodit.getRealMode()===a.MODE_SOURCE||!0===t)){var e=o.jodit.getEditorValue();e!==o.getMirrorValue()&&o.setMirrorValue(e)}},o.__lock=!1,o.toWYSIWYG=function(){o.__lock=!0,o.jodit.setEditorValue(o.getMirrorValue()),o.__lock=!1},o.autosize=function(){o.mirror.style.height="auto",o.mirror.style.height=o.mirror.scrollHeight+"px"},o.getNormalPosition=function(t,e){for(var o=t;o>0;){if(o--,"<"===e[o]&&void 0!==e[o+1]&&e[o+1].match(/[\w\/]+/i))return o;if(">"===e[o])return t}return t},o.tempMarkerStart="{start-jodit-selection}",o.tempMarkerEnd="{end-jodit-selection}",o.__clear=function(t){return t.replace(a.INVISIBLE_SPACE_REG_EXP,"")},o.selInfo=[],o.getSelectionStart=function(){return o.mirror.selectionStart},o.getSelectionEnd=function(){return o.mirror.selectionEnd},o.setMirrorSelectionRange=function(t,e){o.mirror.setSelectionRange(t,e)},o.saveSelection=function(){if(o.jodit.getMode()===a.MODE_WYSIWYG)o.selInfo=o.jodit.selection.save()||[],o.jodit.setEditorValue(),o.fromWYSIWYG(!0);else{o.selInfo.length=0;var t=o.getMirrorValue();if(o.getSelectionStart()===o.getSelectionEnd()){var e=o.jodit.selection.marker(!0);o.selInfo[0]={startId:e.id,collapsed:!0,startMarker:e.outerHTML};var i=o.getNormalPosition(o.getSelectionStart(),o.getMirrorValue());o.setMirrorValue(t.substr(0,i)+o.__clear(o.selInfo[0].startMarker)+t.substr(i))}else{var n=o.jodit.selection.marker(!0),r=o.jodit.selection.marker(!1);o.selInfo[0]={startId:n.id,endId:r.id,collapsed:!1,startMarker:n.outerHTML,endMarker:r.outerHTML};var i=o.getNormalPosition(o.getSelectionStart(),t),s=o.getNormalPosition(o.getSelectionEnd(),t);o.setMirrorValue(t.substr(0,i)+o.__clear(o.selInfo[0].startMarker)+t.substr(i,s-i)+o.__clear(o.selInfo[0].endMarker)+t.substr(s))}o.toWYSIWYG()}},o.restoreSelection=function(){if(o.selInfo.length){if(o.jodit.getMode()===a.MODE_WYSIWYG)return o.__lock=!0,o.jodit.selection.restore(o.selInfo),void(o.__lock=!1);o.selInfo[0].startMarker&&o.setMirrorValue(o.getMirrorValue().replace(o.__clear(o.selInfo[0].startMarker),o.tempMarkerStart)),o.selInfo[0].endMarker&&o.setMirrorValue(o.getMirrorValue().replace(o.__clear(o.selInfo[0].endMarker),o.tempMarkerEnd)),window.html_beautify&&o.setMirrorValue(window.html_beautify(o.getMirrorValue()));var t=o.getMirrorValue().indexOf(o.tempMarkerStart),e=t;o.setMirrorValue(o.getMirrorValue().replace(o.tempMarkerStart,"")),o.selInfo[0].collapsed&&-1!==t||(e=o.getMirrorValue().indexOf(o.tempMarkerEnd),-1===t&&(t=e)),o.setMirrorValue(o.getMirrorValue().replace(o.tempMarkerEnd,"")),o.setMirrorSelectionRange(t,e),o.toWYSIWYG(),o.setFocusToMirror()}},o.mirrorContainer=s.dom('
    ',document),o.mirror=s.dom('\n \n "),r={},s=t.selection.save(),l=function(e){t.selection.restore(s),t.selection.insertHTML(e)};return r[o(6).default.getIcon("link")+" "+t.i18n("Link")]=e,r[o(6).default.getIcon("source")+" "+t.i18n("Code")]=i,i.addEventListener("submit",function(t){return t.preventDefault(),n.trim(n.val(i,"textarea[name=code]"))?(l(n.val(i,"textarea[name=code]")),!1):(i.querySelector("textarea[name=code]").focus(),i.querySelector("textarea[name=code]").classList.add("jodit_error"),!1)}),e.addEventListener("submit",function(t){return t.preventDefault(),n.isURL(n.val(e,"input[name=code]"))?(l(n.convertMediaURLToVideoEmbed(n.val(e,"input[name=code]"))),!1):(e.querySelector("input[name=code]").focus(),e.querySelector("input[name=code]").classList.add("jodit_error"),!1)}),a(t,r)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"},table:{cols:10,popup:function(t,e,o,i){var r,a,s,l,d=1,c=1,u=o.cols,f=n.dom('
    '),p=f.querySelectorAll("span")[0],h=f.querySelectorAll("span")[1],g=[],v=function(t){var e=(t+1)*u;if(g.length>e){for(r=e;g.length>r;r+=1)f.removeChild(g[r]),delete g[r];g.length=e}for(r=0;e>r;r+=1)g[r]||(l=document.createElement("div"),l.setAttribute("data-index",""+r),g.push(l));g.forEach(function(t){f.appendChild(t)}),f.style.width=g[0].offsetWidth*u+"px"};v(1),g[0].className="hovered";var m=function(t,e){var o=t.target;if("DIV"===o.tagName){if(s=isNaN(e)?parseInt(o.getAttribute("data-index"),10):e,d=Math.ceil((s+1)/u),c=s%u+1,v(d),c===u||u-1>c&&u>10)return u=c===u?u+1:u-1,m(t,c+(d-1)*u-1);for(r=0;g.length>r;r+=1)g[r].className=r%u+1>c||d=r;r+=1){for(l=t.doc.createElement("tr"),a=1;c>=a;a+=1)f=t.doc.createElement("td"),f.style.width=g+"%",n||(n=f),p=t.doc.createElement("br"),f.appendChild(p),l.appendChild(t.doc.createTextNode("\n")),l.appendChild(t.doc.createTextNode("\t")),l.appendChild(f);h.appendChild(t.doc.createTextNode("\n")),h.appendChild(l)}t.selection.insertNode(t.doc.createTextNode("\n")),t.selection.insertNode(h),t.selection.setCursorIn(n),i()}}),f},tags:["table"],tooltip:"Insert table"}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(0);e.INVISIBLE_SPACE="\ufeff",e.INVISIBLE_SPACE_REG_EXP=/[\uFEFF]/g,e.SPACE_REG_EXP=/[\s\n\t\r\uFEFF\u200b]+/g,e.SPACE_REG_EXP_START=/^[\s\n\t\r\uFEFF\u200b]+/g,e.SPACE_REG_EXP_END=/[\s\n\t\r\uFEFF\u200b]+$/g,e.IS_BLOCK=/^(PRE|DIV|P|TD|TH|LI|H[1-6]|TABLE|BLOCKQUOTE)$/i,e.KEY_ENTER=13,e.KEY_BACKSPACE=8,e.KEY_DELETE=46,e.KEY_TAB=9,e.KEY_LEFT=37,e.KEY_TOP=38,e.KEY_RIGHT=39,e.KEY_BOTTOM=40,e.KEY_Z=90,e.KEY_Y=89,e.NEARBY=5,e.ACCURACY=10,e.PARAGRAPH="P",e.MODE_WYSIWYG=1,e.MODE_SOURCE=2,e.MODE_SPLIT=3,e.TEXT_PLAIN=i.isIE()?"text":"text/plain",e.MARKER_CLASS="jodit_selection_marker",e.EMULATE_DBLCLICK_TIMEOUT=300},function(t,e,o){"use strict";e.__esModule=!0;var i=o(3),n=o(0);e.default=function(){function t(){}return t.unwrap=function(t){for(var e=t.parentNode,o=t;o.firstChild;)e.insertBefore(o.firstChild,o);e.removeChild(o)},t.each=function(e,o){var i=e;do{(i=t.next(i,function(t){return!!t},e))&&o.call(i,i)}while(i)},t.create=function(t,e,o){var i;return t=t.toLowerCase(),"text"===t?i=o.createTextNode("string"==typeof e?e:""):(i=o.createElement(t),void 0!==e&&(i.innerHTML=e)),i},t.replace=function(e,o,i,r,a){void 0===i&&(i=!1),void 0===r&&(r=!1);var s="string"==typeof o?t.create(o,"",a):o;if(!r)for(;e.firstChild;)s.appendChild(e.firstChild);return i&&n.each(e.attributes,function(t,e){s.setAttribute(e.name,e.nodeValue)}),e.parentNode.replaceChild(s,e),s},t.isBlock=function(t){return t&&t.tagName&&i.IS_BLOCK.test(t.tagName)},t.canSplitBlock=function(t,e){return t&&t instanceof(e||window).HTMLElement&&this.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)},t.prev=function(e,o,i,n){return void 0===n&&(n=!0),t.find(e,o,i,!1,"previousSibling",!!n&&"lastChild")},t.next=function(e,o,i,n){return void 0===n&&(n=!0),t.find(e,o,i,void 0,void 0,n?"firstChild":"")},t.find=function(e,o,i,n,r,a){if(void 0===n&&(n=!1),void 0===r&&(r="nextSibling"),void 0===a&&(a="firstChild"),n&&o(e))return e;var s,l=e;do{if(s=l[r],o(s))return s;if(a&&s&&s[a]){var d=t.find(s[a],o,s,!0,r,a);if(d)return d}s||(s=l.parentNode),l=s}while(l&&l!==i);return!1},t.isEmptyTextNode=function(t){return t&&t.nodeType===Node.TEXT_NODE&&0===t.nodeValue.replace(i.INVISIBLE_SPACE_REG_EXP,"").length},t.isNode=function(t,e){return"object"==typeof Node?t instanceof(e||window).Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},t.up=function(t,e,o){var i=t;if(!t)return!1;do{if(e(i))return i;if(i===o)break;i=i.parentNode}while(i&&i!==o);return!1},t.closest=function(e,o,i){var n;return n="function"==typeof o?o:o instanceof RegExp?function(t){return o.test(t.tagName)}:function(t){return RegExp("^("+o+")$","i").test(t.tagName)},t.up(e,n,i)},t.after=function(t,e){var o=t.parentNode;o.lastChild===t?o.appendChild(e):o.insertBefore(e,t.nextSibling)},t.all=function(e,o){var i=e,n=i.childNodes?Array.prototype.slice.call(i.childNodes):[];if(o(i))return i;n.forEach(function(e){t.all(e,o)})},t.wrap=function(e,o,i){var n,r=e,a=e,s=i.selection.save();do{(n=t.prev(r,function(e){return e&&!t.isBlock(e)},i.editor,!1))&&(r=n)}while(n);do{(n=t.next(a,function(e){return e&&!t.isBlock(e)},i.editor,!1))&&(a=n)}while(n);var l="string"==typeof o?t.create(o,"",i.doc):o;r.parentNode.insertBefore(l,r);for(var d=r;d&&(d=r.nextSibling,l.appendChild(r),r!==a);)r=d;return i.selection.restore(s),l},t.contains=function(t,e){for(;e.parentNode;){if(e.parentNode===t)return!0;e=e.parentNode}return!1},t.isOrContains=function(e,o){return e===o||t.contains(e,o)},t}()},function(t,e,o){"use strict";e.__esModule=!0,e.default=function(){function t(t){this.__scope=[],this.__scopeNamespace={},this.classSeparator=/[\s]+/,this.jodit=t,t&&t.components&&t.components.push(this)}return t.prototype.__fire=function(t,e,o){void 0===o&&(o=document);var i=o.createEvent("HTMLEvents");"string"==typeof e?i.initEvent(e,!0,!0):(i.initEvent(e.type,e.bubbles,e.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(function(t){Object.defineProperty(i,t,{value:e[t],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:e,enumerable:!0})),t.dispatchEvent(i)},t.prototype.__off=function(t,e){if(void 0===t&&(t=!1),void 0===e&&(e=!1),e&&/^\./.test(e)){var o=e.replace(/^\./,"");return this.__scopeNamespace[o]&&this.__scopeNamespace[o].forEach(function(e){(Array.isArray(t)?t:[t]).forEach(function(t){e.element&&e.element.removeEventListener&&(!1===t||t===e.element)&&e.element.removeEventListener(e.event,e.callback)})}),this}return this.__scope.forEach(function(o){(Array.isArray(t)?t:[t]).forEach(function(t){!o.element||!o.element.removeEventListener||!1!==t&&t!==o.element||!1!==e&&e!==o.event||o.element.removeEventListener(o.event,o.callback)})}),this},t.prototype.__on=function(t,e,o,i){var n=this;"function"==typeof o&&(i=o,o=!1);var r=e?e.split(this.classSeparator):[],a=function(t){t.cancelBubble||(t.type.match(/^touch/)&&t.changedTouches&&t.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(function(e){Object.defineProperty(t,e,{value:t.changedTouches[0][e],enumerable:!0})}),t.originalEvent||(t.originalEvent=t))},s=function(t){a(t),i.call(this,t)};return r.forEach(function(e){var r="";/\./.test(e)&&(d=e.split("."),e=d[0],r=d[1]),o&&(s=function(t){a(t);for(var e=t.target;e&&e!==this;){if(e.matches(o)){if(!1===i.call(e,t))return t.preventDefault(),!1;return}e=e.parentNode}}),(Array.isArray(t)?t:[t]).forEach(function(t){t.addEventListener(e,s,!1)});var l={element:t,event:e,callback:s};void 0===n.__scopeNamespace[r]&&(n.__scopeNamespace[r]=[]),n.__scopeNamespace[r].push(l),n.__scope.push(l);var d}),this},t.prototype.destruct=function(){this.__off()},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(4);e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.__popapOpened=!1,o.__listOpened=!1,o.closeAll=function(){o.list.innerHTML="",o.popup.innerHTML="",o.popup.style.display="none",o.list.style.display="none",r.$$(".jodit_dropdown_open, .jodit_popap_open",o.container).forEach(function(t){t.classList.remove("jodit_dropdown_open","jodit_popap_open")}),o.__popapOpened&&o.jodit.selection&&o.jodit.selection.clear(),o.__popapOpened=!1,o.__listOpened=!1},o.defaultControl={template:function(t,e,i){return o.jodit.i18n(i)}},o.buttonList=[],o.initEvents=function(){o.__on(o.popup,"mousedown touchstart",function(t){t.stopPropagation()}).__on(o.list,"mousedown touchstart",function(t){t.stopPropagation()}).__on(window,"mousedown touchstart",function(){(o.__popapOpened||o.__listOpened)&&o.closeAll()}),o.jodit.events.on("mousedown keydown change afterSetMode",function(){var t=function(){o.jodit.selection&&o.checkActiveButtons(o.jodit.selection.current())};o.jodit.options.observer.timeout?setTimeout(t,o.jodit.options.observer.timeout):t()})},o.container=r.dom('
    '),o.popup=r.dom('
    '),o.list=r.dom('
      '),o.initEvents(),o}return i(e,t),e.getIcon=function(t,o){return void 0===o&&(o=""),void 0!==e.icons[t]?e.icons[t]:o},e.prototype.openPopup=function(t,e,o){void 0===o&&(o=!1),this.closeAll(),e&&(t.classList.add("jodit_popup_open"),t.appendChild(this.popup),this.__popapOpened=!0,this.popup.innerHTML="",this.popup.appendChild(r.dom(e)),this.popup.style.display="block",this.popup.classList.toggle("jodit_right",o))},e.prototype.openList=function(t){t.classList.add("jodit_dropdown_open"),this.closeAll(),this.__listOpened=!0,this.list.style.display="block"},e.__toggleButton=function(t,e){t.classList.toggle("jodit_disabled",!e),e?t.hasAttribute("disabled")&&t.removeAttribute("disabled"):t.hasAttribute("disabled")||t.setAttribute("disabled","disabled")},e.prototype.checkActiveButtons=function(t){var o=this;this.buttonList.forEach(function(i){var n=i.control,r=i.btn;r.classList.remove("jodit_active");var l=void 0===n||void 0===n.mode?a.MODE_WYSIWYG:n.mode;if(e.__toggleButton(r,l===a.MODE_SPLIT||l===o.jodit.getRealMode()),t){var d,c,u,f=function(t,e){return""+o.jodit.win.getComputedStyle(t).getPropertyValue(e)},p=function(t,e){var i=0,n=0;Object.keys(t).forEach(function(r){var a=t[r];"function"==typeof a?a(o.jodit,f(e,r).toLowerCase())&&(i+=1):-1!==a.indexOf(f(e,r).toLowerCase())&&(i+=1),n+=1}),n===i&&r.classList.add("jodit_active")};(n.tags||n.options&&n.options.tags)&&(d=n.tags||n.options&&n.options.tags,c=t,s.default.up(c,function(t){if(-1!==d.indexOf(t.nodeName.toLowerCase()))return r.classList.add("jodit_active"),!0},o.jodit.editor)),(n.css||n.options&&n.options.css)&&(u=n.css||n.options&&n.options.css,c=t,s.default.up(c,function(t){t&&t.nodeType!==Node.TEXT_NODE&&p(u,t)},o.jodit.editor))}})},e.prototype.addButton=function(t,o,i,n){var a,s=this,l=r.extend(!0,{},o,this.defaultControl),d=r.dom('
    • '),c="string"==typeof t?t:t.name||"empty",u=d.querySelector("a");this.jodit.options.textIcons?a=""+c+"":!1===(a=e.getIcon(c,!1))&&(a=e.getIcon("string"==typeof l.name?l.name:"empty"));var f=c.replace(/[^a-zA-Z0-9]/g,"_");d.classList.add("jodit_toolbar_btn"),d.classList.add("jodit_toolbar_btn-"+f),this.jodit.events.on(r.camelCase("can-"+f),function(t){e.__toggleButton(d,t)});var p=r.dom(a);return p&&p.nodeType!==Node.TEXT_NODE&&p.classList.add("jodit_icon","jodit_icon_"+f),u.appendChild(p),void 0!==l&&"object"==typeof l||(l={command:c}),void 0!==i&&""!==i&&(u.innerHTML=i),l.list&&(d.classList.add("jodit_with_dropdownlist"),u.appendChild(r.dom(''))),l.iconURL&&(u.style.backgroundImage="url("+l.iconURL+")"),l.tooltip?d.querySelector(".jodit_tooltip").innerHTML=this.jodit.i18n(l.tooltip):d.removeChild(d.querySelector(".jodit_tooltip")),this.__on(d,"mousedown touchend",function(t){if(t.stopImmediatePropagation(),t.preventDefault(),d.classList.contains("jodit_disabled"))return!1;l.list?(s.openList(d),r.each(l.list,function(t,e){var o;o=void 0!==s.jodit.options.controls[e]?s.addButton(e,s.jodit.options.controls[e],"",n):void 0!==s.jodit.options.controls[t]?s.addButton(t,r.extend({},s.jodit.options.controls[t],e),"",n):s.addButton(t,{exec:l.exec,command:l.command,args:[l.args&&l.args[0]||t,l.args&&l.args[1]||e]},l.template&&l.template(s.jodit,t,e),n),s.list.appendChild(o)}),d.appendChild(s.list)):void 0!==l.exec&&"function"==typeof l.exec?(l.exec(s.jodit,n||s.jodit.selection.current(),l,t,d),s.jodit.setEditorValue(),s.jodit.events.fire("hidePopup"),s.closeAll()):void 0!==l.popup&&"function"==typeof l.popup?s.openPopup(d,l.popup(s.jodit,n||s.jodit.selection.current(),l,s.closeAll)):(l.command||c)&&(s.jodit.execCommand(l.command||c,l.args&&l.args[0]||!1,l.args&&l.args[1]||null),s.closeAll())}),this.buttonList.push({control:l,btn:d,name:c}),d},e.prototype.build=function(t,e,o){var i=this,n=!1;this.container.innerHTML="",t.forEach(function(t){var e="string"==typeof t?t:t.name;if(-1===i.jodit.options.removeButtons.indexOf(e))switch(e){case"\n":i.container.appendChild(r.dom('
    • '));break;case"|":n||(n=!0,i.container.appendChild(r.dom('
    • ')));break;default:var a=t;if(n=!1,"object"!=typeof a&&void 0!==i.jodit.options.controls[a]&&(a=i.jodit.options.controls[a]),"object"!=typeof a)throw Error("Need ControlType "+a);i.container.appendChild(i.addButton(t,a,"",o))}}),this.container.parentNode!==e&&e.appendChild(this.container)},e.icons={},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var r=o(1),a=o(5),s=o(2),l=o(0),d=o(6);s.Config.prototype.dialog={zIndex:100002,resizable:!0,draggable:!0,fullsize:!1,fullsizeButton:!1};var c=function(t){function e(e,o){void 0===o&&(o={});var i=t.call(this,e)||this;i.lockSelect=function(){i.dialogbox.classList.add("jodit_dialog_box-moved")},i.unlockSelect=function(){i.dialogbox.classList.remove("jodit_dialog_box-moved")},i.destinition=document.body,i.destroyAfterClose=!1,i.moved=!1,i.iSetMaximization=!1,i.resizeble=!1,i.draggable=!1,i.startX=0,i.startY=0,i.startPoint={x:0,y:0,w:0,h:0},i.close=function(t){t&&(t.stopImmediatePropagation(),t.preventDefault()),i.jodit&&i.jodit.events&&i.jodit.events.fire(i,"beforeClose"),i.dialogbox.classList.remove("active"),i.iSetMaximization&&i.maximization(!1),i.destroyAfterClose&&i.destruct(),i.jodit&&i.jodit.events.fire(i,"afterClose")};var a=i;return a.options=e&&e.options?e.options.dialog:s.Config.prototype.dialog,a.options=n({},a.options,o),a.dialogbox=l.dom('"),a.dialogbox.__jodit_dialog=a,a.dialog=a.dialogbox.querySelector(".jodit_dialog"),a.resizer=a.dialogbox.querySelector(".jodit_dialog_resizer"),a.jodit&&a.jodit.options&&a.jodit.options.textIcons&&a.dialogbox.classList.add("jodit_text_icons"),a.dialogbox_header=a.dialogbox.querySelector(".jodit_dialog_header>h4"),a.dialogbox_content=a.dialogbox.querySelector(".jodit_dialog_content"),a.dialogbox_footer=a.dialogbox.querySelector(".jodit_dialog_footer"),a.dialogbox_close=a.dialogbox.querySelector(".jodit_dialog_header>a.jodit_close"),a.dialogbox_fullsize=l.dom(''+(r.default.modules.Toolbar.getIcon?r.default.modules.Toolbar.getIcon(o.fullsize?"fullsize":"shrink"):"")+""),a.destinition.appendChild(a.dialogbox),a.dialogbox.addEventListener("close_dialog",a.close),a.dialogbox_close.addEventListener("mousedown",a.close),a.dialogbox_fullsize.addEventListener("click",function(){var t=a.maximization();r.default.modules.Toolbar&&(a.dialogbox_fullsize.innerHTML=r.default.modules.Toolbar.getIcon(t?"shrink":"fullsize"))}),a.__on(window,"mousemove",a.onMouseMove.bind(a)).__on(window,"mouseup",a.onMouseUp.bind(a)).__on(window,"keydown",a.onKeyDown.bind(a)).__on(window,"resize",a.onResize.bind(a)),a.dialogbox.querySelector(".jodit_dialog_header").addEventListener("mousedown",a.onHeaderMouseDown.bind(a)),a.options.resizable&&a.resizer.addEventListener("mousedown",a.onResizerMouseDown.bind(a)),i}return i(e,t),e.prototype.setSize=function(t,e){t&&l.css(this.dialog,"width",t),e&&l.css(this.dialog,"height",e)},e.prototype.setPosition=function(t,e){var o=window.innerWidth,i=window.innerHeight,n=o/2-this.dialog.offsetWidth/2,r=i/2-this.dialog.offsetHeight/2;void 0!==t&&void 0!==e&&(this.offsetX=t,this.offsetY=e,this.moved=Math.abs(t-n)>100||Math.abs(e-r)>100),this.dialog.style.left=(t||n)+"px",this.dialog.style.top=(e||r)+"px"},e.prototype.setElements=function(t,e){var o=[];l.asArray(e).forEach(function(e){var i=l.dom(e);o.push(i),i.parentNode!==t&&t.appendChild(i)}),[].slice.call(t.childNodes).forEach(function(e){-1===o.indexOf(e)&&t.removeChild(e)})},e.prototype.setTitle=function(t){this.setElements(this.dialogbox_header,t)},e.prototype.setContent=function(t){this.setElements(this.dialogbox_content,t)},e.prototype.setFooter=function(t){this.setElements(this.dialogbox_footer,t),this.dialog.classList.toggle("with_footer",!!t)},e.prototype.getMaxZIndexDialog=function(){var t,e,o=0,i=this;return l.$$(".jodit_dialog_box",document.body).forEach(function(n){t=n.__jodit_dialog,e=parseInt(l.css(n,"zIndex"),10),t.isOpened()&&!isNaN(e)&&e>o&&(i=t,o=e)}),i},e.prototype.setMaxZIndex=function(){var t=0,e=0;l.$$(".jodit_dialog_box",document.body).forEach(function(o){e=parseInt(l.css(o,"zIndex"),10),t=Math.max(isNaN(e)?0:e,t)}),this.dialogbox.style.zIndex=""+(t+1)},e.prototype.maximization=function(t){return"boolean"!=typeof t&&(t=!this.dialogbox.classList.contains("jodit_dialog_box-fullsize")),this.dialogbox.classList.toggle("jodit_dialog_box-fullsize",t),[document.body,document.body.parentNode].forEach(function(e){e.classList.toggle("jodit_fullsize_box",t)}),this.iSetMaximization=t,t},e.prototype.open=function(t,e,o,i){this.jodit&&this.jodit.events&&!1===this.jodit.events.fire(this,"beforeOpen")||(this.destroyAfterClose=!0===o,this.options.fullsizeButton&&this.dialogbox_close.parentNode.appendChild(this.dialogbox_fullsize),void 0!==e&&this.setTitle(e),t&&this.setContent(t),this.dialogbox.classList.add("active"),i&&this.dialogbox.classList.add("jodit_modal"),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.options.fullsize&&this.maximization(!0),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"afterOpen"))},e.prototype.isOpened=function(){return this.dialogbox.classList.contains("active")},e.prototype.onMouseUp=function(){(this.draggable||this.resizeble)&&(this.draggable=!1,this.resizeble=!1,this.unlockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"endResize endMove"))},e.prototype.onHeaderMouseDown=function(t){this.options.draggable&&(this.draggable=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.x=l.css(this.dialog,"left"),this.startPoint.y=l.css(this.dialog,"top"),this.setMaxZIndex(),t.preventDefault(),this.lockSelect(),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"startMove"))},e.prototype.onMouseMove=function(t){this.draggable&&this.options.draggable&&(this.setPosition(this.startPoint.x+t.clientX-this.startX,this.startPoint.y+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"move",[t.clientX-this.startX,t.clientY-this.startY]),t.stopImmediatePropagation(),t.preventDefault()),this.resizeble&&this.options.resizable&&(this.setSize(this.startPoint.w+t.clientX-this.startX,this.startPoint.h+t.clientY-this.startY),this.jodit&&this.jodit.events&&this.jodit.events.fire(this,"resizeDialog",[t.clientX-this.startX,t.clientY-this.startY]),t.stopImmediatePropagation(),t.preventDefault())},e.prototype.onKeyDown=function(t){if(this.isOpened()&&27===t.which){var e=this.getMaxZIndexDialog();e?e.close():this.close(),t.stopImmediatePropagation()}},e.prototype.onResize=function(){!this.options.resizable||this.moved||!this.isOpened()||this.offsetX||this.offsetY||this.setPosition()},e.prototype.destruct=function(){this.dialogbox.parentNode.removeChild(this.dialogbox),delete this.dialogbox,t.prototype.destruct.call(this)},e.prototype.onResizerMouseDown=function(t){this.resizeble=!0,this.startX=t.clientX,this.startY=t.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.jodit.events&&this.jodit.events.fire(this,"startResize")},e}(a.default);e.default=c,e.Alert=function(t,e,o){"function"==typeof e&&(o=e,e=void 0);var i=new c,n=l.dom('
      '),a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Ok")+"");return n.appendChild(l.dom(t)),a.addEventListener("click",function(){o&&"function"==typeof o&&!1===o(i)||i.close()}),i.setFooter([a]),i.open(n,e||" ",!0,!0),a.focus(),i},r.default.Alert=e.Alert,e.Promt=function(t,e,o,i){var n=new c,a=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),s=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Ok")+""),u=l.dom('
      '),f=l.dom(''),p=l.dom("");"function"==typeof e&&(o=e,e=void 0),i&&f.setAttribute("placeholder",i),p.appendChild(l.dom(t)),u.appendChild(p),u.appendChild(f),a.addEventListener("click",n.close,!1);var h=function(){o&&"function"==typeof o&&!1===o(f.value)||n.close()};return s.addEventListener("click",h),u.addEventListener("submit",function(){return h(),!1}),n.setFooter([s,a]),n.open(u,e||" ",!0,!0),f.focus(),n},r.default.Promt=e.Promt,e.Confirm=function(t,e,o){var i,n,a=new c,s=l.dom('
      '),u=l.dom("");"function"==typeof e&&(o=e,e=void 0),u.appendChild(l.dom(t)),s.appendChild(u),i=l.dom(''+d.default.getIcon("cancel")+""+r.default.prototype.i18n("Cancel")+""),i.addEventListener("click",function(){o&&o(!1),a.close()});var f=function(){o&&o(!0),a.close()};return n=l.dom(''+d.default.getIcon("check")+""+r.default.prototype.i18n("Yes")+""),n.addEventListener("click",f),s.addEventListener("submit",function(){return f(),!1}),a.setFooter([n,i]),a.open(s,e||" ",!0,!0),n.focus(),a},r.default.Confirm=e.Confirm},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(4);!function(t){t.ColorPickerWidget=function(t,e,o){var a=n.normalizeColor(o),s=n.dom('
      '),l=function(t){var e=[];return n.isPlainObject(t)?Object.keys(t).forEach(function(o){e.push('
      '),e.push(l(t[o])),e.push("
      ")}):Array.isArray(t)&&t.forEach(function(t){e.push("'+(a===t?i.default.modules.Toolbar.getIcon("eye"):"")+"")}),e.join("")};return s.appendChild(n.dom("
      "+l(t.options.colors)+"
      ")),s.appendChild(n.dom(''+i.default.modules.Toolbar.getIcon("eraser")+"")),t.__on(s,"mousedown touchstart",function(o){o.stopPropagation();var a=o.target;if("SVG"!==a.tagName.toUpperCase()&&"PATH"!==a.tagName.toUpperCase()||(a=r.default.closest(a.parentNode,"A",t.editor)),"A"===a.tagName.toUpperCase()){var l=s.querySelector("a.active");l&&(l.classList.remove("active"),l.innerHTML="");var d=a.getAttribute("data-color")||"";if(d){a.innerHTML=i.default.modules.Toolbar.getIcon("eye"),a.classList.add("active");var c=n.hexToRgb(d);a.firstChild.style.fill="rgb("+(255-c.r)+","+(255-c.g)+","+(255-c.b)+")"}e&&"function"==typeof e&&e(d),o.preventDefault()}}),s},t.TabsWidget=function(t,e){var o=n.dom('
      '),i=n.dom('
      '),r=n.dom('
      '),a=0;if(o.appendChild(r),o.appendChild(i),n.each(e,function(e,o){var s=n.dom('
      '),l=n.dom('');l.innerHTML=t.i18n(e),r.appendChild(l),s.appendChild(n.dom("function"!=typeof o?o:'
      ')),i.appendChild(s),t.__on(l,"mousedown touchstart",function(e){return n.$$("a",r).forEach(function(t){t.classList.remove("active")}),n.$$(".jodit_tab",i).forEach(function(t){t.classList.remove("active")}),l.classList.add("active"),s.classList.add("active"),"function"==typeof o&&o.call(t),e.stopPropagation(),!1}),a+=1}),a)return n.$$("a",r).forEach(function(t){t.style.width=(100/a).toFixed(10)+"%"}),r.querySelector("a:first-child").classList.add("active"),i.querySelector(".jodit_tab:first-child").classList.add("active"),o},t.ImageSelectorWidget=function(e,o,r){var a,s={};if(o.upload&&e.options.uploader&&e.options.uploader.url){var l=n.dom('
      '+e.i18n("Drop image")+"
      "+e.i18n("or click")+'
      ');e.getInstance("Uploader").bind(l,function(t){"function"==typeof o.upload&&o.upload.call(e,{baseurl:t.baseurl,files:t.files})},function(t){e.events.fire("errorMessage",[t.message])}),s[i.default.modules.Toolbar.getIcon("upload")+e.i18n("Upload")]=l}if(o.filebrowser&&(e.options.filebrowser.ajax.url||e.options.filebrowser.items.url)&&(s[i.default.modules.Toolbar.getIcon("folder")+e.i18n("Browse")]=function(){e.getInstance("FileBrowser").open(o.filebrowser)}),o.url){var d=n.dom('
      ");a=null,r&&r.nodeType!==Node.TEXT_NODE&&("IMG"===r.tagName||n.$$("img",r).length)&&(a="IMG"===r.tagName?r:n.$$("img",r)[0],n.val(d,"input[name=url]",a.getAttribute("src")),n.val(d,"input[name=text]",a.getAttribute("alt")),d.querySelector("button").innerText=e.i18n("Update")),d.addEventListener("submit",function(t){return t.preventDefault(),t.stopPropagation(),n.val(d,"input[name=url]")?("function"==typeof o.url&&o.url.call(e,n.val(d,"input[name=url]"),n.val(d,"input[name=text]")),!1):(d.querySelector("input[name=url]").focus(),d.querySelector("input[name=url]").classList.add("jodit_error"),!1)},!1),s[i.default.modules.Toolbar.getIcon("link")+" URL"]=d}return t.TabsWidget(e,s)}}(e.Widget||(e.Widget={}))},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(3),s=o(4);e.JODIT_SELECTED_CELL_MARKER="data-jodit-selected-cell";var l=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.addSelected=function(t){t.setAttribute(e.JODIT_SELECTED_CELL_MARKER,"1")},o.restoreSelection=function(t){t.removeAttribute(e.JODIT_SELECTED_CELL_MARKER)},o.getAllSelectedCells=function(t){return r.$$("td["+e.JODIT_SELECTED_CELL_MARKER+"],th["+e.JODIT_SELECTED_CELL_MARKER+"]",t)},o.getRowsCount=function(t){return t.rows.length},o.getColumnsCount=function(t){return o.formalMatrix(t).reduce(function(t,e){return Math.max(t,e.length)},0)},o.formalMatrix=function(t,e){for(var o=[[]],i=Array.prototype.slice.call(t.rows),n=0,r=void 0;i.length>n;n+=1){var a=Array.prototype.slice.call(i[n].cells);for(r=0;a.length>r;r+=1)if(!1===function(t,i){void 0===o[i]&&(o[i]=[]);for(var n,r,a=t.colSpan,s=t.rowSpan,l=0;o[i][l];)l+=1;for(r=0;s>r;r+=1)for(n=0;a>n;n+=1){if(void 0===o[i+r]&&(o[i+r]=[]),e&&!1===e(t,i+r,l+n,a,s))return!1;o[i+r][l+n]=t}}(a[r],n))return o}return o},o.formalCoordinate=function(t,e,i){void 0===i&&(i=!1);var n=0,r=0,a=1,s=1;return o.formalMatrix(t,function(t,o,l,d,c){if(e===t)return n=o,r=l,a=d,s=c,i&&(r+=d-1,n+=c-1),!1}),[n,r,a,s]},o.appendRow=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!0);var n,a=o.getColumnsCount(t),l=s.default.create("tr","",t.ownerDocument);for(n=0;a>n;n+=1)l.appendChild(s.default.create("td","",t.ownerDocument));i&&e&&e.nextSibling?e.parentNode.insertBefore(l,e.nextSibling):!i&&e?e.parentNode.insertBefore(l,e):(r.$$(":scope>tbody",t)[0]||t).appendChild(l)},o.removeRow=function(t,e){var i,n=o.formalMatrix(t),a=t.rows[e];r.each(n[e],function(o,r){if(i=!1,0>e-1||n[e-1][o]!==r)if(n[e+1]&&n[e+1][o]===r){if(r.parentNode===a&&r.parentNode.nextSibling){i=!0;for(var l=o+1;n[e+1][l]===r;)l+=1;var d=s.default.next(r.parentNode,function(t){return t.nodeType===Node.ELEMENT_NODE&&"TR"===t.tagName},t);n[e+1][l]?d.insertBefore(r,n[e+1][l]):d.appendChild(r)}}else r.parentNode&&r.parentNode.removeChild(r);else i=!0;if(i&&(r.parentNode===a||r!==n[e][o-1])){var c=r.rowSpan;c-1>1?r.setAttribute("rowspan",""+(c-1)):r.removeAttribute("rowspan")}}),a&&a.parentNode.removeChild(a)},o.appendColumn=function(t,e,i){void 0===i&&(i=!0);var n,r=o.formalMatrix(t);for(void 0===e&&(e=o.getColumnsCount(t)-1),n=0;r.length>n;n+=1){var a=s.default.create("td","",t.ownerDocument),l=!1;i?r[n].length>e+1&&r[n][e]===r[n][e+1]||(r[n][e].nextSibling?r[n][e].parentNode.insertBefore(a,r[n][e].nextSibling):r[n][e].parentNode.appendChild(a),l=!0):(0>e-1||r[n][e]!==r[n][e-1])&&(r[n][e].parentNode.insertBefore(a,r[n][e]),l=!0),l||r[n][e].setAttribute("colspan",""+(parseInt(r[n][e].getAttribute("colspan"),10)+1))}},o.removeColumn=function(t,e){var i,n=o.formalMatrix(t);r.each(n,function(t,o){if(i=!1,0>e-1||n[t][e-1]!==o[e]?o.length>e+1&&n[t][e+1]===o[e]?i=!0:o[e].parentNode&&o[e].parentNode.removeChild(o[e]):i=!0,i&&(0>t-1||o[e]!==n[t-1][e])){var r=o[e].colSpan;r-1>1?o[e].setAttribute("colspan",""+(r-1)):o[e].removeAttribute("colspan")}})},o.getSelectedBound=function(t,e){var i,n,r,a=[[1/0,1/0],[0,0]],s=o.formalMatrix(t);for(i=0;s.length>i;i+=1)for(n=0;s[i].length>n;n+=1)-1!==e.indexOf(s[i][n])&&(a[0][0]=Math.min(i,a[0][0]),a[0][1]=Math.min(n,a[0][1]),a[1][0]=Math.max(i,a[1][0]),a[1][1]=Math.max(n,a[1][1]));for(i=a[0][0];a[1][0]>=i;i+=1)for(r=1,n=a[0][1];a[1][1]>=n;n+=1){for(;s[i][n-r]&&s[i][n]===s[i][n-r];)a[0][1]=Math.min(n-r,a[0][1]),a[1][1]=Math.max(n-r,a[1][1]),r+=1;for(r=1;s[i][n+r]&&s[i][n]===s[i][n+r];)a[0][1]=Math.min(n+r,a[0][1]),a[1][1]=Math.max(n+r,a[1][1]),r+=1;for(r=1;s[i-r]&&s[i][n]===s[i-r][n];)a[0][0]=Math.min(i-r,a[0][0]),a[1][0]=Math.max(i-r,a[1][0]),r+=1;for(r=1;s[i+r]&&s[i][n]===s[i+r][n];)a[0][0]=Math.min(i+r,a[0][0]),a[1][0]=Math.max(i+r,a[1][0]),r+=1}return a},o.normalizeTable=function(t){var e,i,n,r,a=[],s=o.formalMatrix(t);for(i=0;s[0].length>i;i+=1){for(n=1e6,r=!1,e=0;s.length>e;e+=1)if(void 0!==s[e][i]){if(2>s[e][i].colSpan){r=!0;break}n=Math.min(n,s[e][i].colSpan)}if(!r)for(e=0;s.length>e;e+=1)void 0!==s[e][i]&&o.__mark(s[e][i],"colspan",s[e][i].colSpan-n+1,a)}for(e=0;s.length>e;e+=1){for(n=1e6,r=!1,i=0;s[e].length>i;i+=1)if(void 0!==s[e][i]){if(2>s[e][i].rowSpan){r=!0;break}n=Math.min(n,s[e][i].rowSpan)}if(!r)for(i=0;s[e].length>i;i+=1)void 0!==s[e][i]&&o.__mark(s[e][i],"rowspan",s[e][i].rowSpan-n+1,a)}for(e=0;s.length>e;e+=1)for(i=0;s[e].length>i;i+=1)void 0!==s[e][i]&&(s[e][i].hasAttribute("rowspan")&&1===s[e][i].rowSpan&&s[e][i].removeAttribute("rowspan"),s[e][i].hasAttribute("colspan")&&1===s[e][i].colSpan&&s[e][i].removeAttribute("colspan"),s[e][i].hasAttribute("class")&&!s[e][i].getAttribute("class")&&s[e][i].removeAttribute("class"));o.__unmark(a)},o.mergeSelected=function(t){var e,i,n,s=o.getSelectedBound(t,o.getAllSelectedCells(t)),l=0,d=[],c=0,u=0,f=[];s&&(s[0][0]-s[1][0]||s[0][1]-s[1][1])&&(o.formalMatrix(t,function(t,a,p,h,g){if(!(s[0][0]>a||a>s[1][0]||s[0][1]>p||p>s[1][1])){if(n=t,n.__i_am_already_was)return;n.__i_am_already_was=!0,a===s[0][0]&&n.style.width&&(l+=parseInt(n.offsetWidth,10)),""!==r.trim(t.innerHTML.replace(//g,""))&&d.push(t.innerHTML),h>1&&(c+=h-1),g>1&&(u+=g-1),e?o.__mark(n,"remove",1,f):(e=t,i=p)}}),c=s[1][1]-s[0][1]+1,u=s[1][0]-s[0][0]+1,e&&(c>1&&o.__mark(e,"colspan",c,f),u>1&&o.__mark(e,"rowspan",u,f),l&&(o.__mark(e,"width",(l/t.offsetWidth*100).toFixed(a.ACCURACY)+"%",f),i&&o.setColumnWidthByDelta(t,i,0,!0,f)),delete e.__i_am_already_was,e.innerHTML=d.join("
      "),o.__unmark(f),o.normalizeTable(t),r.each([].slice.call(t.rows),function(t,e){e.cells.length||e.parentNode.removeChild(e)})))},o.splitHorizontal=function(t){var e,i,n,r,a,l=[];o.getAllSelectedCells(t).forEach(function(d){i=s.default.create("td","",t.ownerDocument),i.appendChild(s.default.create("br","",t.ownerDocument)),n=s.default.create("tr","",t.ownerDocument),e=o.formalCoordinate(t,d),2>d.rowSpan?(o.formalMatrix(t,function(t,i,n){e[0]===i&&e[1]!==n&&t!==d&&o.__mark(t,"rowspan",t.rowSpan+1,l)}),s.default.after(s.default.closest(d,"tr",t),n),n.appendChild(i)):(o.__mark(d,"rowspan",d.rowSpan-1,l),o.formalMatrix(t,function(o,i,n){i>e[0]&&e[0]+d.rowSpan>i&&e[1]>n&&o.parentNode.rowIndex===i&&(a=o),i>e[0]&&o===d&&(r=t.rows[i])}),a?s.default.after(a,i):r.insertBefore(i,r.firstChild)),d.colSpan>1&&o.__mark(i,"colspan",d.colSpan,l),o.__unmark(l),o.restoreSelection(d)}),this.normalizeTable(t)},o.splitVertical=function(t){var e,i,n,r=[];o.getAllSelectedCells(t).forEach(function(l){e=o.formalCoordinate(t,l),2>l.colSpan?o.formalMatrix(t,function(t,i,n){e[1]===n&&e[0]!==i&&t!==l&&o.__mark(t,"colspan",t.colSpan+1,r)}):o.__mark(l,"colspan",l.colSpan-1,r),i=s.default.create("td","",t.ownerDocument),i.appendChild(s.default.create("br","",t.ownerDocument)),l.rowSpan>1&&o.__mark(i,"rowspan",l.rowSpan,r);var d=l.offsetWidth;s.default.after(l,i),n=d/t.offsetWidth/2,o.__mark(l,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__mark(i,"width",(100*n).toFixed(a.ACCURACY)+"%",r),o.__unmark(r),o.restoreSelection(l)}),o.normalizeTable(t)},o.__mark=function(t,e,o,i){i.push(t),t.__marked_value||(t.__marked_value={}),t.__marked_value[e]=void 0===o?1:o},o.__unmark=function(t){t.forEach(function(t){t.__marked_value&&(r.each(t.__marked_value,function(e,o){switch(e){case"remove":t.parentNode.removeChild(t);break;case"rowspan":o>1?t.setAttribute("rowspan",o):t.removeAttribute("rowspan");break;case"colspan":o>1?t.setAttribute("colspan",o):t.removeAttribute("colspan");break;case"width":t.style.width=o}delete t.__marked_value[e]}),delete t.__marked_value)})},o.setColumnWidthByDelta=function(t,e,i,n,r){var s,l,d,c=o.formalMatrix(t);for(s=0;c.length>s;s+=1)l=c[s][e].offsetWidth,d=(l+i)/t.offsetWidth*100,o.__mark(c[s][e],"width",d.toFixed(a.ACCURACY)+"%",r);n||o.__unmark(r)},o}(n.default);e.default=l},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(2),r=o(0),a=o(14),s=o(5);n.Config.prototype.defaultAjaxOptions={dataType:"json",method:"GET",url:"",async:!0,data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!0,xhr:function(){return new("undefined"==typeof XDomainRequest?XMLHttpRequest:XDomainRequest)}},e.default=function(t){function e(e,o){var i=t.call(this,e)||this;return i.options=r.extend(!0,{},n.Config.prototype.defaultAjaxOptions,o),i.xhr=i.options.xhr(),i}return i(e,t),e.prototype.__buildParams=function(t,e){if("string"==typeof t||window.FormData&&t instanceof window.FormData)return t;var o,i,n,r=[];for(o in t)t.hasOwnProperty(o)&&(i=e?e+"["+o+"]":o,n=t[o],r.push("object"==typeof n?this.__buildParams(n,i):encodeURIComponent(i)+"="+encodeURIComponent(n)));return r.join("&")},e.prototype.abort=function(){return this.xhr.abort(),this},e.prototype.send=function(){var t=this;return new a.default(function(e,o){var i=function(e){switch(t.options.dataType){case"json":try{e=JSON.parse(e)}catch(e){return void o.call(t.xhr,e)}}return e};t.xhr.onabort=function(){o(Error(t.xhr.statusText))},t.xhr.onerror=function(){o(Error(t.xhr.statusText))},t.xhr.ontimeout=function(){o(Error(t.xhr.statusText))},t.xhr.onload=function(){t.response=t.xhr.responseText,t.status=t.xhr.status,e.call(t.xhr,i(t.response))},t.xhr.onreadystatechange=function(){if(t.xhr.readyState===XMLHttpRequest.DONE){var n=t.xhr.responseText;t.response=n,t.status=t.xhr.status,200===t.xhr.status?e.call(t.xhr,i(n)):o.call(t.xhr,Error(t.xhr.statusText||t.jodit.i18n("Connection error!")))}},t.xhr.withCredentials=t.options.withCredentials,t.xhr.open(t.options.method,t.options.url,t.options.async),t.options.contentType&&t.xhr.setRequestHeader&&t.xhr.setRequestHeader("Content-type",t.options.contentType),t.options.headers&&t.xhr.setRequestHeader&&r.each(t.options.headers,function(e,o){t.xhr.setRequestHeader(e,o)}),setTimeout(function(){t.xhr.send(t.options.data?t.__buildParams(t.options.data):void 0)},0)})},e}(s.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.set=function(t,e,o){var i,n;o?(n=new Date,n.setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toGMTString()):i="",document.cookie=t+"="+e+i+"; path=/"},e.get=function(t){var e,o,i=t+"=",n=document.cookie.split(";");for(e=0;n.length>e;e+=1){for(o=n[e];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return null},e.remove=function(t){e.set(t,"",-1)},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(0),a=o(6);e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.hide=function(){o.context.classList.remove("jodit_context_menu-show"),window.removeEventListener("mouseup",o.hide)},o.context=r.dom('
      '),document.body.appendChild(o.context),o}return i(e,t),e.prototype.show=function(t,e,o){var i=this;Array.isArray(o)&&(this.context.innerHTML="",o.forEach(function(t){if(t){var e=r.dom(''+(t.icon?a.default.getIcon(t.icon):"")+"");e.addEventListener("click",function(e){return t.exec.call(i,e),i.hide(),!1}),e.querySelector("span").innerText=i.jodit.i18n(t.title),i.context.appendChild(e)}}),r.css(i.context,{left:t,top:e}),window.addEventListener("mouseup",i.hide),this.context.classList.add("jodit_context_menu-show"))},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(2),r=o(5),a=o(15),s=o(3),l=o(16);n.Config.prototype.observer={timeout:100};var d=function(){function t(t,e,o){this.observer=o,this.oldValue=t,this.newValue=e}return t.prototype.execute=function(){},t.prototype.undo=function(){this.observer.block(!0),this.observer.snapshot.restore(this.oldValue)},t.prototype.redo=function(){this.observer.block(!0),this.observer.snapshot.restore(this.newValue)},t}();e.Command=d,e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.__blocked=!1,o.__timeouts=[],o.block=function(t){void 0===t&&(t=1),!0===t||!1===t?this.__blocked=t:1===t?(this.oldblock=this.__blocked,this.__blocked=!0):0===t&&(this.__blocked=void 0!==this.oldblock&&this.oldblock)},o.changed=function(){this.jodit.getMode()===s.MODE_WYSIWYG&&(this.jodit.events.fire("canRedo",[this.stack.canRedo()]),this.jodit.events.fire("canUndo",[this.stack.canUndo()]))},o.stack=new l.Stack,o.stack.changed=function(){o.changed()},o.snapshot=new a.default(e),o.__startValue=o.snapshot.make(),o.stack.changed(),e.events.on("change afterCommand",function(t){"undo"!==t&&"redo"!==t&&o.__changeHandler()}),o}return i(e,t),e.prototype.__onChange=function(){this.__newValue=this.snapshot.make(),a.default.equal(this.__newValue,this.__startValue)||(this.stack.execute(new d(this.__startValue,this.__newValue,this)),this.__startValue=this.__newValue)},e.prototype.__changeHandler=function(){if(this.__blocked)return void this.block(!1);this.jodit.options.observer.timeout?(clearTimeout(this.__timer),this.__timer=setTimeout(this.__onChange.bind(this),this.jodit.options.observer.timeout),this.__timeouts[this.__timeouts.length]=this.__timer):this.__onChange()},e.prototype.destruct=function(){this.__timeouts.forEach(function(t){clearTimeout(t)})},e.prototype.redo=function(){this.stack.redo()},e.prototype.undo=function(){this.stack.undo()},e}(r.default)},function(t,e,o){"use strict";e.__esModule=!0;var i=0,n=1;e.default=function(){function t(t){this.handlers={0:[],1:[]},this.isFulfilled=null,this.currentParameter=null,this.currentContext=null;var e=this,o=function(t,o){null===e.isFulfilled&&(e.isFulfilled=t,e.currentParameter=o,e.currentContext=this,e.__fire_handlers(t))};try{t(function(t){o.call(this,n,t)},function(t){o.call(this,i,t)})}catch(t){o.call(this,i,t)}}return t.prototype.__fire_handlers=function(t){if(t===this.isFulfilled&&this.handlers[t].length)do{var e=this.handlers[t].shift(),o=void 0;try{o=e.call(this.currentContext,this.currentParameter)}catch(t){return o=t,this.__fire_handlers(i)}void 0!==o&&(this.currentParameter=o)}while(this.handlers[t].length)},t.prototype.then=function(t,e){return t&&this.handlers[n].push(t),e&&this.catch(e),this.__fire_handlers(n),this},t.prototype.catch=function(t){return this.handlers[i].push(t),this.__fire_handlers(i),this},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.__countElementsBefore=function(t){if(!t.parentNode)return 0;var e,o,i=t.parentNode.childNodes,n=0;for(o=0;i.length>o;o+=1){if(!e||i[o].nodeType===Node.TEXT_NODE&&""===i[o].textContent||e.nodeType===Node.TEXT_NODE&&i[o].nodeType===Node.TEXT_NODE||(n+=1),i[o]===t)return n;e=i[o]}},e.prototype.__decomposeHierarchyNodes=function(t){var o=[];if(!t.parentNode)return[];for(;t&&t!==this.jodit.editor;)o.push(e.__countElementsBefore(t)),t=t.parentNode;return o.reverse()},e.__strokeOffset=function(t,e){for(;t&&t.nodeType===Node.TEXT_NODE;)(t=t.previousSibling)&&t.nodeType===Node.TEXT_NODE&&(e+=t.textContent.length);return e},e.prototype.make=function(){var t={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};t.html=this.jodit.getEditorValue();var o=this.jodit.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0);t.range={startContainer:this.__decomposeHierarchyNodes(i.startContainer),startOffset:e.__strokeOffset(i.startContainer,i.startOffset),endContainer:this.__decomposeHierarchyNodes(i.endContainer),endOffset:e.__strokeOffset(i.endContainer,i.endOffset)}}return t},e.prototype.__restoreElementByLadder=function(t){var e,o=this.jodit.editor;for(e=0;o&&t.length>e;e+=1)o=o.childNodes[t[e]];return o},e.equal=function(t,e){return t.html===e.html&&JSON.stringify(t.range)===JSON.stringify(e.range)},e.prototype.restore=function(t){this.jodit.setEditorValue(t.html);try{if(t.range){var e=this.jodit.win.getSelection(),o=this.jodit.doc.createRange();o.setStart(this.__restoreElementByLadder(t.range.startContainer),t.range.startOffset),o.setEnd(this.__restoreElementByLadder(t.range.endContainer),t.range.endOffset),e.removeAllRanges(),e.addRange(o)}}catch(t){}},e}(n.default)},function(t,e,o){"use strict";e.__esModule=!0,e.Stack=function(){function t(){this.commands=[],this.stackPosition=-1,this.savePosition=-1}return t.prototype.execute=function(t){this.__clearRedo(),t.execute(),this.commands.push(t),this.stackPosition+=1,this.changed()},t.prototype.undo=function(){this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,this.changed()},t.prototype.canUndo=function(){return this.stackPosition>=0},t.prototype.redo=function(){this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),this.changed()},t.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},t.prototype.save=function(){this.savePosition=this.stackPosition,this.changed()},t.prototype.__clearRedo=function(){this.commands.length=this.stackPosition+1},t.prototype.changed=function(){},t}()},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(10),a=o(2),s=o(0),l=o(3),d=o(4);a.Config.prototype.enableDragAndDropFileToEditor=!0,a.Config.prototype.uploader={url:"",headers:null,data:null,format:"json",prepareData:function(t){return t},isSuccess:function(t){return t.success},getMessage:function(t){return void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):""},process:function(t){return{files:t.data.files||[],path:t.data.path||"",baseurl:t.data.baseurl||""}},error:function(t){this.jodit.events.fire("errorMessage",[t.message,"error",4e3])},defaultHandlerSuccess:function(t){var e=this;t.files&&t.files.length&&t.files.forEach(function(o){e.jodit.selection.insertImage(t.baseurl+o)})},defaultHandlerError:function(t){this.jodit.events.fire("errorMessage",[t.message])}},e.default=function(t){function e(e,o){var i=t.call(this,e)||this;return i.path="",i.source="default",i.options=s.extend(!0,{},a.Config.prototype.uploader,i.jodit.options.uploader,o),i.jodit.editor&&i.jodit.options.enableDragAndDropFileToEditor&&i.jodit.options.uploader&&i.jodit.options.uploader.url&&i.bind(i.jodit.editor),i}return i(e,t),e.prototype.buildData=function(t){if(void 0!==window.FormData){if(t instanceof FormData)return t;if("string"==typeof t)return t;var e=new FormData;return Object.keys(t).forEach(function(o){e.append(o,t[o])}),e}return t},e.prototype.send=function(t,e){var o=this;this.__ajax=new r.default(this.jodit,{xhr:function(){var t=new XMLHttpRequest;return void 0!==window.FormData?t.upload.addEventListener("progress",function(t){if(t.lengthComputable){var e=t.loaded/t.total;e*=100,o.jodit.progress_bar.style.display="block",o.jodit.progress_bar.style.width=e+"%",100===e&&(o.jodit.progress_bar.style.display="none")}},!1):o.jodit.progress_bar.style.display="none",t},method:"POST",data:this.buildData(t),url:this.options.url,headers:this.options.headers,contentType:(void 0===window.FormData||"string"==typeof t)&&"application/x-www-form-urlencoded; charset=UTF-8",dataType:this.options.format||"json"}),this.__ajax.send().then(e).catch(function(t){o.options.error.call(o,t)})},e.prototype.sendFiles=function(t,e,o,i){var n,r,a,l,d=this,c=t.length,u=this;if(!c)return!1;for(r=new FormData,r.append("path",u.path),r.append("source",u.source),n=0;c>n;n+=1)a=t[n].type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.append("files["+n+"]",t[n],t[n].name||(""+Math.random()).replace(".","")+"."+a);if(u.options.prepareData(r),i&&i(r),u.options.data&&s.isPlainObject(u.options.data))for(l=Object.keys(u.options.data),n=0;l.length>n;n+=1)r.append(l[n],u.options.data[l[n]]);u.send(r,function(t){if(!d.options.isSuccess.call(u,t))return void(o||u.options.defaultHandlerError).call(u,Error(u.options.getMessage(t)));"function"==typeof(e||u.options.defaultHandlerSuccess)&&(e||u.options.defaultHandlerSuccess).call(u,u.options.process.call(u,t))})},e.prototype.setPath=function(t){this.path=t},e.prototype.setSource=function(t){this.source=t},e.dataURItoBlob=function(t){var e,o=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(o.length),r=new Uint8Array(n);for(e=0;o.length>e;e+=1)r[e]=o.charCodeAt(e);return new Blob([r],{type:i})},e.prototype.bind=function(t,o,i){var n=this,r=this;r.__on(t,"paste",function(t){var n,a,c,u,f=this,p=function(t){t.append("extension",c),t.append("mimetype",a.type)};if(t.clipboardData&&t.clipboardData.files&&t.clipboardData.files.length)return r.sendFiles(t.clipboardData.files,o,i),!1;if(s.browser("ff"))return void(t.clipboardData.types.length||t.clipboardData.types[0]===l.TEXT_PLAIN||(u=d.default.create("div","",this.jodit.doc),r.jodit.selection.insertNode(u),u.focus(),setTimeout(function(){if(u.firstChild&&u.firstChild.hasAttribute("src")){var t=u.firstChild.getAttribute("src");u.parentNode.removeChild(u),f.sendFiles([e.dataURItoBlob(t)],o,i)}},200)));if(t.clipboardData&&t.clipboardData.items&&t.clipboardData.items.length)for(n=0;t.clipboardData.items.length>n;n+=1)if("file"===t.clipboardData.items[n].kind&&"image/png"===t.clipboardData.items[n].type){a=t.clipboardData.items[n].getAsFile(),c=a.type.match(/\/([a-z0-9]+)/i)[1].toLowerCase(),r.sendFiles([a],o,i,p),t.preventDefault();break}}).__on(t,"dragover",function(e){t.classList.add("draghover"),e.preventDefault()}).__on(t,"dragleave dragend",function(e){t.classList.remove("draghover"),e.preventDefault()}).__on(t,"drop",function(e){if(t.classList.remove("draghover"),e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length)e.preventDefault(),n.sendFiles(e.dataTransfer.files,o,i);else if(e.dataTransfer&&e.dataTransfer.getData(l.TEXT_PLAIN)&&"-"!==e.dataTransfer.getData(l.TEXT_PLAIN)&&t===r.jodit.editor){if(e.preventDefault(),e.stopPropagation(),!n.jodit.selection.insertCursorAtPoint(e.clientX,e.clientY))return!1;if(o||n.options.defaultHandlerSuccess){var a={baseurl:"",files:[]};a.files=[e.dataTransfer.getData(l.TEXT_PLAIN)],(o||n.options.defaultHandlerSuccess).call(n,a)}e.preventDefault()}}),t.querySelector("input[type=file]")&&r.__on(t.querySelector("input[type=file]"),"change",function(){r.sendFiles(this.files,o,i)})},e.prototype.uploadRemoteImage=function(t,e,o){var i=this,n=this;n.send({action:"uploadremote",url:t},function(t){if(n.options.isSuccess.call(n,t))"function"==typeof e?e.call(n,i.options.process(t)):i.options.defaultHandlerSuccess.call(n,i.options.process(t));else if("function"==typeof(o||n.options.defaultHandlerError))return void(o||i.options.defaultHandlerError).call(n,Error(n.options.getMessage(t)))})},e}(n.default)},function(t,e,o){"use strict";e.__esModule=!0,o(63),function(t){t.matches||(t.matches=void 0!==t.matchesSelector?t.matchesSelector:function(t){var e=this.ownerDocument.querySelectorAll(t),o=this;return Array.prototype.some.call(e,function(t){return t===o})})}(Element.prototype)},function(t,e){},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./de.ts":29,"./en.ts":30,"./ru.ts":31};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=20},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./Ajax.ts":10,"./Component.ts":5,"./ContextMenu.ts":12,"./Cookie.ts":11,"./Dialog.ts":7,"./Dom.ts":4,"./Events.ts":32,"./FileBrowser.ts":33,"./Helpers.ts":0,"./ImageEditor.ts":34,"./Observer.ts":13,"./PseudoPromise.ts":14,"./Selection.ts":35,"./Snapshot.ts":15,"./Table.ts":9,"./Toolbar.ts":6,"./Undo.ts":16,"./Uploader.ts":17,"./Widget.ts":8};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=21},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./Fullsize.ts":36,"./addNewLine.ts":37,"./autofocus.ts":38,"./backspace.ts":39,"./bold.ts":40,"./cleanHTML.ts":41,"./color.ts":42,"./enter.ts":43,"./errorMessages.ts":44,"./font.ts":45,"./formatblock.ts":46,"./iframe.ts":47,"./imageInlineToolbar.ts":48,"./imageProcessor.ts":49,"./imageProperties.ts":50,"./inlinePopup.ts":51,"./justify.ts":52,"./link.ts":53,"./mobile.ts":54,"./orderedlist.ts":55,"./paste.ts":56,"./placeholder.ts":57,"./redoundo.ts":58,"./resizer.ts":59,"./source.ts":60,"./table.ts":61,"./tableKeyboardNavigation.ts":62};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=22},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./about.svg":92,"./addcolumn.svg":93,"./addrow.svg":94,"./angle-left.svg":95,"./angle-right.svg":96,"./arrows-alt.svg":97,"./arrows-h.svg":98,"./attachment.svg":99,"./bin.svg":100,"./bold.svg":101,"./brush.svg":102,"./cancel.svg":103,"./center.svg":104,"./chain-broken.svg":105,"./check-square.svg":106,"./check.svg":107,"./crop.svg":108,"./dedent.svg":109,"./enter.svg":110,"./eraser.svg":111,"./eye.svg":112,"./folder.svg":113,"./font.svg":114,"./fontsize.svg":115,"./fullsize.svg":116,"./hr.svg":117,"./image.svg":118,"./info-circle.svg":119,"./italic.svg":120,"./justify.svg":121,"./left.svg":122,"./link.svg":123,"./lock.svg":124,"./menu.svg":125,"./merge.svg":126,"./ol.svg":127,"./paragraph.svg":128,"./pencil.svg":129,"./plus.svg":130,"./redo.svg":131,"./resize.svg":132,"./resizer.svg":133,"./right.svg":134,"./save.svg":135,"./shrink.svg":136,"./source.svg":137,"./splitg.svg":138,"./splitv.svg":139,"./strikethrough.svg":140,"./table.svg":141,"./th-list.svg":142,"./th.svg":143,"./ul.svg":144,"./underline.svg":145,"./undo.svg":146,"./unlink.svg":147,"./unlock.svg":148,"./update.svg":149,"./upload.svg":150,"./valign.svg":151,"./video.svg":152};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=23},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./btn.less":64,"./btn_group.less":65,"./context_menu.less":66,"./dialog.less":67,"./dropdownlist.less":68,"./filebrowser.less":69,"./grid.less":70,"./icon.less":71,"./image_editor.less":72,"./properties.less":73,"./toolbar.less":74,"./uploader.less":75};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=24},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./addnewline.less":76,"./errorsMessages.less":77,"./fullsize.less":78,"./placeholder.less":79,"./popupInline.less":80,"./resizer.less":81,"./source.less":82,"./table.less":83,"./texticons.less":84,"./widget.less":85};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=25},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./dark.less":86};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=26},function(t,e,o){function i(t){return o(n(t))}function n(t){var e=r[t];if(!(e+1))throw Error("Cannot find module '"+t+"'.");return e}var r={"./about.less":87,"./colorpicker.less":88,"./form.less":89,"./progressbar.less":90,"./tabs.less":91};i.keys=function(){return Object.keys(r)},i.resolve=n,t.exports=i,i.id=27},function(t,e,o){"use strict";e.__esModule=!0,o(19);var i=o(3);o(18);var n=o(6);t.exports=o(1).default,window.Jodit=t.exports,o(2),Object.keys(i).forEach(function(e){t.exports[e]=i[e]});var r=function(t){t.keys().forEach(t)};r(o(22)),r(o(26)),r(o(24)),r(o(27)),r(o(25));var a=o(23);a.keys().forEach(function(t){n.default.icons[t.replace(".svg","").replace("./","")]=a.apply(this,arguments)});var s=o(21);s.keys().forEach(function(e){t.exports.modules[e.replace(".ts","").replace("./","")]=s.apply(this,arguments).default});var l=o(20);l.keys().forEach(function(e){t.exports.lang[e.replace(".ts","").replace("./","")]=l.apply(this,arguments).default})},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Schreibe etwas","About Jodit":"Über Jodi","Jodit Editor":"Jodit Editor","Free Non-commercial Version":"Freie Nicht-kommerzielle Version","Jodit User's Guide":"Jodit Benutzerhandbuch","contains detailed help for using":"ausführliche Hilfe enthält für die Verwendung von","For information about the license, please go to our website:":"Für Informationen über die Lizenz, gehen Sie bitte auf unsere Webseite:","Buy full version":"Vollversion kaufen","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.",Anchor:"Anker","Open in new tab":"In neuer Registerkarte öffnen","Open editor in fullsize":"Editor öffnen in voller Größe","Clear Formatting":"Formatierung löschen","Fill color or set the text color":"Füllen Sie Farbe oder stellen Sie die Textfarbe",Redo:"Redo",Undo:"Rückgängig machen",Bold:"Fett gedruckt",Italic:"Kursiv","Insert Unordered List":"Ungeordnete Liste einfügen","Insert Ordered List":"Legen Sie Sortierte Liste","Justify Center":"einmitten","Justify Full":"Begründen Voll","Justify Left":"Begründen links","Justify Right":"Begründen Rechts","Insert Horizontal Line":"Legen Horizontale Linie","Insert Image":"Bild einfügen","Insert link":"Link einfügen","Font size":"Schriftgröße","Font family":"Schriftfamilie","Insert format block":"Insert Format Block",Normal:"Normal","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4",Quote:"Zitat",Code:"Code",Insert:"Einfügen","Insert table":"Tabelle einfügen","Change mode":"Änderungsmodus",Margins:"Die Margen",top:"oben",right:"Recht",bottom:"Boden",left:"links",Styles:"Styles",Classes:"Klassen",Align:"Ausrichten",Right:"Recht",Center:"Center",Left:"Links","--Not Set--":"--Nicht eingestellt--",Src:"src",Title:"Titel",Alternative:"Alternative (alt)",Link:"Link","Open link in new tab":"Link in neuem Tab öffnen",Image:"Image",Advansed:"Erweiterte","Image properties":"Bildeigenschaften",Cancel:"Stornieren",Ok:"OK","File Browser":"Dateibrowser","Error on load list":"Fehler beim Ladeliste","Error on load folders":"Fehler beim Laden Ordner","Are you shure?":"Bist du sicher?","Enter Directory name":"Geben Sie Verzeichnisname","Create directory":"Verzeichnis erstellen","type name":"Modellname","Drop image":"Bild Tropfen","or click":"oder klicken Sie auf","Alternative text":"Alternativer Text",Browse:"Blättern",Upload:"Hochladen",Background:"Hintergrund",Text:"Text",Top:"Oben",Middle:"Mitte",Bottom:"Boden","Insert column before":"Spalte einfügen vor","Insert column after":"Spalte einfügen nach","Insert row above":"Zeile einfügen oben","Insert row below":"Zeile unterhalb einfügen","Delete table":"Tabelle löschen","Delete row":"Zeile löschen","Delete column":"Spalte löschen","Empty cell":"Leere Zelle"}},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Start writing...","About Jodit":"","Jodit Editor":"","Free Non-commercial Version":"","Jodit User's Guide":"","contains detailed help for using":"","For information about the license, please go to our website:":"","Buy full version":"","Copyright � XDSoft.net - Chupurnov Valeriy. All rights reserved.":"",Anchor:"","Open editor in fullsize":"","Clear Formatting":"","Fill color or set the text color":"",Redo:"",Undo:"",Bold:"",Italic:"","Insert Unordered List":"","Insert Ordered List":"","Justify Center":"","Justify Full":"","Justify Left":"","Justify Right":"","Insert Horizontal Line":"","Insert Image":"","Insert link":"","Font size":"","Font family":"","Insert format block":"",Normal:"","Heading 1":"","Heading 2":"","Heading 3":"","Heading 4":"",Quote:"",Code:"","Insert table":"","Change mode":"",Margins:"",top:"",right:"",bottom:"",left:"",Styles:"",Classes:"",Align:"",Right:"",Center:"",Left:"","--Not Set--":"",Src:"",Title:"",Alternative:"",Link:"","Open link in new tab":"",Image:"",Advansed:"","Image properties":"",Cancel:"",Ok:"","File Browser":"","Error on load list":"","Error on load folders":"","Are you shure?":"","Enter Directory name":"","Create directory":"","type name":"","Drop image":"","or click":"","Alternative text":"",Browse:"",Background:"",Text:"",Top:"",Middle:"",Bottom:"","Insert column before":"","Insert column after":"","Insert row above":"","Insert row below":"","Delete table":"","Delete row":"","Delete column":"","Empty cell":""}},function(t,e,o){"use strict";e.__esModule=!0,e.default={"Type something":"Напишите что-либо","About Jodit":"О Jodit","Jodit Editor":"Редактор Jodit","Free Non-commercial Version":"Версия для не коммерческого использования","Jodit User's Guide":"Jodit Руководство пользователя","contains detailed help for using":"содержит детальную информацию по использованию","For information about the license, please go to our website:":"Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:","Buy full version":"Купить полную версию","Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.":"Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.",Anchor:"Анкор","Open in new tab":"Открывать ссылку в новой вкладке","Open editor in fullsize":"Открыть редактор в полном размере","Clear Formatting":"Очистить форматирование","Fill color or set the text color":"Цвет заливки или цвет текста",Redo:"Повтор",Undo:"Отмена",Bold:"Жирный",Italic:"Наклонный","Insert Unordered List":"Вставка маркированного списка","Insert Ordered List":"Вставить нумерованный список","Justify Center":"Выровнять по центру","Justify Full":"Выровнять по ширине","Justify Left":"Выровнять по левому краю","Justify Right":"Выровнять по правому краю","Insert Horizontal Line":"Вставить горизонтальную линию","Insert Image":"Вставить изображение","Insert link":"Вставить ссылку","Font size":"Размер шрифта","Font family":"Шрифт","Insert format block":"Вставить блочный элемент",Normal:"Нормальный текст","Heading 1":"Заголовок 1","Heading 2":"Заголовок 2","Heading 3":"Заголовок 3","Heading 4":"Заголовок 4",Quote:"Цитата",Code:"Код",Insert:"Вставить","Insert table":"Вставить таблицу","Change mode":"Источник",Margins:"Отступы",top:"сверху",right:"справа",bottom:"снизу",left:"слева",Styles:"Стили",Classes:"Классы",Align:"Выравнивание",Right:"По правому краю",Center:"По центру",Left:"По левому краю","--Not Set--":"--не устанавливать--",Src:"src",Title:"Заголовок",Alternative:"Альтернативный текст (alt)",Link:"Ссылка","Open link in new tab":"Открывать ссылку в новом окне",Image:"Изображение",Advansed:"Расширенные","Image properties":"Свойства изображения",Cancel:"Отмена",Ok:"Ok","Your code is similar to HTML. Paste as HTML?":"Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?","Paste as HTML":"Вставить как HTML?","File Browser":"Браузер файлов","Error on load list":"Ошибка при загрузке списка изображений","Error on load folders":"Ошибка при загрузке списка директорий","Are you shure?":"Вы уверены?","Enter Directory name":"Введите название директории","Create directory":"Создать директорию","type name":"введите название","Drop image":"Перетащите сюда изображение","or click":"или нажмите","Alternative text":"Альтернативный текст",Browse:"Сервер",Upload:"Загрузка",Background:"Фон",Text:"Текст",Top:" К верху",Middle:"По середине",Bottom:"К низу","Insert column before":"Вставить столбец до","Insert column after":"Вставить столбец после","Insert row above":"Вставить ряд выше","Insert row below":"Вставить ряд ниже","Delete table":"Удалить таблицу","Delete row":"Удалять ряд","Delete column":"Удалить столбец","Empty cell":"Отчистить ячейку"}},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5);e.default=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stack=[],e}return i(e,t),e.prototype.off=function(t,e,o){if(0===arguments.length)return this.jodit.handlers={},this;var i,n;if("string"==typeof t&&(o=e,e=t,t=this.jodit),void 0===t.handlers)return this;var r=e.split(/[\s,]+/);for(i=0;r.length>i;i+=1)if(void 0!==t.handlers[r[i]])if(void 0!==o)for(n=0;t.handlers[r[i]].length>n;n+=1)t.handlers[r[i]][n]===o&&t.handlers[r[i]].splice(n,1);else delete t.handlers[r[i]];return this},e.prototype.on=function(t,e,o,i){void 0===i&&(i=!1);var n;"string"==typeof t&&(o=e,e=t,t=this.jodit),"string"!=typeof e&&Error("Parameter list must be string");var r=e.split(/[\s,]+/);for(n=0;r.length>n;n+=1)void 0===t.handlers&&(t.handlers={}),void 0===t.handlers[r[n]]&&(t.handlers[r[n]]=[]),i?t.handlers[r[n]].unshift(o):t.handlers[r[n]].push(o);return this},e.prototype.fire=function(t,e,o){var i,n,r,a;if("string"==typeof t&&(o=e,e=t,t=this.jodit),void 0!==t.handlers){for(e=e.split(/[\s,]+/),i=0;e.length>i;i+=1)if(void 0!==t.handlers[e[i]]){for(this.stack.push(e[i]),n=0;t.handlers[e[i]]&&t.handlers[e[i]].length>n;n+=1)this.current=e[i],void 0!==(a=t.handlers[e[i]][n].apply(t,o||[]))&&(r=a);this.stack.pop()}return r}},e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),n=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var r=o(1),a=o(5),s=o(7),l=o(2),d=o(0),c=o(6),u=o(12),f=o(17),p=o(10),h=o(3),g=o(11);l.Config.prototype.filebrowser={filter:function(t,e){return e=e.toLowerCase(),"string"==typeof t?-1!==t.toLowerCase().indexOf(e):"string"==typeof t.name?-1!==t.name.toLowerCase().indexOf(e):"string"!=typeof t.file||-1!==t.file.toLowerCase().indexOf(e)},sortBy:"changed",sort:function(t,e,o){var i,n=function(t,e){return e>t?-1:t>e?1:0};if("string"==typeof t)return n(t.toLowerCase(),e.toLowerCase());if(void 0===t[o]||"name"===o)return"string"==typeof t.name?n(t.name.toLowerCase(),e.name.toLowerCase()):"string"==typeof t.file?n(t.file.toLowerCase(),e.file.toLowerCase()):0;switch(o){case"changed":return i=new Date(t.changed),new Date(e.changed)-i;case"size":return d.humanSizeToBytes(t.size)-d.humanSizeToBytes(e.size)}},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,width:763,height:400,buttons:["upload","remove","update","select","edit","tiles","list","filter","sort"],view:"tiles",isSuccess:function(t){return t.success},getMessage:function(t){return void 0!==t.data.messages&&Array.isArray(t.data.messages)?t.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,getThumbTemplate:function(t,e,o){var i,n,r,a=""+(new Date).getTime();return"string"==typeof t?(i=t,n=t):(void 0!==t.file&&(i=t.file,n=t.file),t.thumb&&(n=t.thumb)),r='
      \n '+(this.options.showFileName?''+i+"":"")+"\n "+(this.options.showFileSize&&t.size?""+t.size+"":"")+"\n "+(this.options.showFileChangeTime&&t.changed?''+t.changed+"":"")+"\n
      ",'\n '+i+'\n '+(this.options.showFileName||this.options.showFileSize&&t.size||this.options.showFileChangeTime&&t.changed?r:"")+"\n "},ajax:{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:function(t){return t},process:function(t){return t}},create:{data:{action:"create"}},getlocalfilebyurl:{data:{action:"getlocalfilebyurl"}},resize:{data:{action:"resize"}},crop:{data:{action:"crop"}},move:{data:{action:"move"}},remove:{data:{action:"remove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},uploader:null};var v="default",m="jodit_filebrowser_files_item";e.default=function(t){function e(e){var o=t.call(this,e)||this;o.currentPath="",o.currentSource=v,o.currentBaseUrl="",o.view="tiles",o.sortBy="changed",o.dragger=!1,o.filterWord="",o.getPathByUrl=function(t,e,i){var n=o;o.options.getlocalfilebyurl.data.url=t,o.send("getlocalfilebyurl",function(t){n.options.isSuccess(t)?e(t.data.path,t.data.name,t.data.source):i(t)},function(t){i(t)})},o.loadItems=function(t,e){var i=o;i.options.items.data.path=t,i.options.items.data.source=e,i.options.items.url&&(i.files.classList.add("active"),i.files.appendChild(i.loader.cloneNode(!0)),i.__ajax2&&i.__ajax2.abort&&i.__ajax2.abort(),i.__ajax2=i.send("items",function(t){var e=i.options.items.process.call(i,t);i.generateItemsBox(e.data.sources),i.someSelectedWasChanged()},function(t){s.Alert(t),i.status(i.jodit.i18n(t))}))},o.create=function(t,e,i){o.options.create.data.source=i,o.options.create.data.path=e,o.options.create.data.name=t,o.send("create",function(t){o.options.isSuccess(t)?(o.currentPath=e,o.currentSource=i,o.loadTree(e,i)):o.status(o.options.getMessage(t))},function(t){o.status(t)})},o.move=function(t,e,i){o.options.move.data.from=t,o.options.move.data.path=e,o.options.move.data.source=i,o.send("move",function(t){o.options.isSuccess(t)?o.loadTree(e,i):o.status(o.options.getMessage(t))},function(t){o.status(t)})},o.close=function(){o.dialog.close()},o.open=function(t){if(o.options.items.url){var e=0;o.__off(o.files,"dblclick").__on(o.files,"dblclick","a",o.onSelect(t)).__on(o.files,"touchstart","a",function(){var i=(new Date).getTime();h.EMULATE_DBLCLICK_TIMEOUT>i-e&&o.onSelect(t)(),e=i}),o.__off(o.buttons.select,"click").__on(o.buttons.select,"click",o.onSelect(t)),o.loadTree(o.currentPath,o.currentSource);var i=[d.dom(''+o.jodit.i18n("File Browser")+"      ")],n=void 0,a=void 0;for(n=0;o.options.buttons.length>n;n+=1){var s=o.options.buttons[n];"string"==typeof s&&void 0!==o.buttons[s]&&(o.options.editImage&&void 0!==r.default.modules.ImageEditor||"edit"!==s)?i.push(o.buttons[s]):"function"==typeof s?i.push(s.call(o)):d.isPlainObject(s)&&s.exec&&s.name&&(a=d.dom('
      '+c.default.getIcon(s.icon||s.name)+"
      "),i.push(a),a.addEventListener("click",s.exec))}o.dialog.open(o.browser,i)}},o.errorHandler=function(t){o.status(o.options.getMessage(t))},o.uploadHandler=function(){o.loadItems(o.currentPath,o.currentSource)},o.openImageEditor=function(t,e,i,n,r,a){o.jodit.getInstance("ImageEditor").open(t,function(t,s,l,d){void 0===o.options[s.action]&&(o.options[s.action]={}),void 0===o.options[s.action].data&&(o.options[s.action].data={action:s.action}),o.options[s.action].data.newname=t,o.options[s.action].data.box=s.box,o.options[s.action].data.path=i,o.options[s.action].data.name=e,o.options[s.action].data.source=n,o.send(s.action,function(t){o.options.isSuccess(t)?(o.loadTree(o.currentPath,o.currentSource),l(),r&&r()):(d(o.options.getMessage(t)),a&&a(o.options.getMessage(t)))},function(t){d(t),a&&a(t)})})},o.draggable=!1,o.start={top:0,left:0},o.client={x:0,y:0};var i=o;i.options=d.extend(!0,{},l.Config.prototype.filebrowser,i.jodit.options.filebrowser),i.dialog=new s.default(e,{fullsizeButton:!0}),i.loader=d.dom('
      '),i.browser=d.dom('
      '+(i.options.showFoldersPanel?'
      ':"")+'
      '),i.status_line=i.browser.querySelector(".jodit_filebrowser_status"),i.buttons={upload:d.dom('
      '+c.default.getIcon("plus")+'
      '),remove:d.dom('
      '+c.default.getIcon("bin")+"
      "),update:d.dom('
      '+c.default.getIcon("update")+"
      "),select:d.dom('
      '+c.default.getIcon("check")+"
      "),edit:d.dom('
      '+c.default.getIcon("pencil")+"
      "),tiles:d.dom('
      '+c.default.getIcon("th")+"
      "),list:d.dom('
      '+c.default.getIcon("th-list")+"
      "),filter:d.dom(''),sort:d.dom('")},i.tree=i.browser.querySelector(".jodit_filebrowser_tree"),i.files=i.browser.querySelector(".jodit_filebrowser_files"),i.__on([i.buttons.tiles,i.buttons.list],"click",function(t){var e=t.currentTarget;e.classList.contains("jodit_button_tiles")?(i.view="tiles",i.buttons.list.classList.add("disabled")):(i.view="list",i.buttons.tiles.classList.add("disabled")),e.classList.remove("disabled"),i.files.classList.remove("jodit_filebrowser_files_view-tiles"),i.files.classList.remove("jodit_filebrowser_files_view-list"),i.files.classList.add("jodit_filebrowser_files_view-"+i.view),g.default.set("jodit_filebrowser_view",i.view,31)}),i.__on(i.buttons.sort,"change",function(){i.sortBy=i.buttons.sort.value,g.default.set("jodit_filebrowser_sortby",i.sortBy,31),i.loadItems(i.currentPath,i.currentSource)}),i.__on(i.buttons.sort,"click mousedown",function(t){t.stopPropagation()}),i.__on(i.buttons.filter,"click mousedown",function(t){t.stopPropagation()}).__on(i.buttons.filter,"keydown",d.debounce(function(){i.filterWord=i.buttons.filter.value,i.loadItems(i.currentPath,i.currentSource)},300)),i.__on(i.buttons.remove,"click",function(){o.__getActiveElements().length&&s.Confirm(e.i18n("Are you shure?"),"",function(t){t&&(o.__getActiveElements().forEach(function(t){i.remove(i.currentPath,t.getAttribute("data-name"),t.getAttribute("data-source"))}),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource))})}),i.__on(i.buttons.edit,"click",function(){var t=o.__getActiveElements();1===t.length&&i.openImageEditor(t[0].getAttribute("href"),t[0].getAttribute("data-name"),t[0].getAttribute("data-path"),t[0].getAttribute("data-source"))}),i.__on(i.buttons.update,"click",function(){i.loadTree(o.currentPath,o.currentSource)}),i.__on(i.tree,"click","a>i.remove",function(t){var o=this.parentNode,n=o.getAttribute("data-path");return s.Confirm(e.i18n("Are you shure?"),"",function(t){t&&(i.remove(n,o.getAttribute("data-name"),o.getAttribute("data-source")),i.loadTree(i.currentPath,i.currentSource))}),t.stopImmediatePropagation(),!1}).__on(i.tree,"click","a",function(){var t=this;this.classList.contains("addfolder")?s.Promt(i.jodit.i18n("Enter Directory name"),i.jodit.i18n("Create directory"),function(e){i.create(e,t.getAttribute("data-path"),t.getAttribute("data-source"))},i.jodit.i18n("type name")):(i.currentPath=this.getAttribute("data-path"),i.currentSource=this.getAttribute("data-source"),i.loadTree(this.getAttribute("data-path"),this.getAttribute("data-source")))}).__on(o.tree,"dragstart","a",function(){i.dragger=this}).__on(o.tree,"drop","a",function(){if(i.options.moveFolder&&i.dragger){var t=i.dragger.getAttribute("data-path");if(!i.options.moveFolder&&i.dragger.classList.contains("jodit_filebrowser_tree_item"))return!1;if(i.dragger.classList.contains(m)&&(t+=i.dragger.getAttribute("data-name"),!i.options.moveFile))return!1;i.move(t,this.getAttribute("data-path"),this.getAttribute("data-source"))}});var a=new u.default(o.jodit);return i.__on(i.files,"mousedown","a>img",function(t){i.client.x=t.clientX,i.client.y=t.clientY,i.start=d.offset(this,i.jodit),i.draggable=this.cloneNode(!0),d.css(i.draggable,{"z-index":1e14,position:"fixed",display:"none",left:i.start.left,top:i.start.top,width:this.offsetWidth,height:this.offsetHeight}),document.body.appendChild(i.draggable)}).__on(i.files,"dragstart","a",function(t){i.dragger=this,t.dataTransfer.setData(h.TEXT_PLAIN,this.getAttribute("href")),t.stopPropagation()}).__on(i.files,"contextmenu","a",function(t){var e=this;if(i.options.contextMenu){var o=this;return a.show(t.pageX,t.pageY,[!!i.options.editImage&&{icon:"pencil",title:"Edit",exec:function(){i.openImageEditor(o.getAttribute("href"),o.getAttribute("data-name"),o.getAttribute("data-path"),o.getAttribute("data-source"))}},{icon:"bin",title:"Delete",exec:function(){i.remove(i.currentPath,o.getAttribute("data-name"),o.getAttribute("data-source")),i.someSelectedWasChanged(),i.loadTree(i.currentPath,i.currentSource)}},!!i.options.preview&&{icon:"eye",title:"Preview",exec:function(){var t=new s.default(i.jodit),n=d.dom('
      '),r=o.getAttribute("href"),a=i.buttons.select.cloneNode(!0),l=document.createElement("img"),u=function(){var a=function(){if(e.removeEventListener("load",a),n.innerHTML="",i.options.showPreviewNavigation){var s=d.dom(''+c.default.getIcon("angle-right")+""),f=d.dom(''+c.default.getIcon("angle-left")+"");o.previousSibling&&o.previousSibling.classList&&o.previousSibling.classList.contains(m)&&n.appendChild(f),o.nextSibling&&o.nextSibling.classList&&o.nextSibling.classList.contains(m)&&n.appendChild(s),i.__on([s,f],"click",function(){o=this.classList.contains("jodit_filebrowser_preview_navigation-next")?o.nextSibling:o.previousSibling,n.innerHTML='',r=o.getAttribute("href"),l.setAttribute("src",r),u()})}n.appendChild(l),t.setPosition()};l.addEventListener("load",a),l.complete&&a.call(l)};u(),l.setAttribute("src",r),t.setContent(n),i.options.showSelectButtonInPreview&&(a.removeAttribute("disabled"),t.setTitle(a),a.addEventListener("click",function(){i.files.querySelector("a.active").classList.add("active"),o.classList.add("active"),i.__fire(i.buttons.select,"click",document),t.close()})),t.open()}},{icon:"upload",title:"Download",exec:function(){window.open(o.getAttribute("href"))}}]),t.stopPropagation(),t.preventDefault(),!1}}).__on(i.files,"click",function(t){d.ctrlKey(t)||(o.__getActiveElements().forEach(function(t){t.classList.remove("active")}),i.someSelectedWasChanged())}).__on(i.files,"click","a",function(t){return d.ctrlKey(t)||i.__getActiveElements().forEach(function(t){t.classList.remove("active")}),this.classList.toggle("active"),i.someSelectedWasChanged(),t.stopPropagation(),!1}).__on(document,"dragover",function(t){i.isOpened()&&i.draggable&&void 0!==t.clientX&&d.css(i.draggable,{left:t.clientX+20,top:t.clientY+20,display:"block"})}).__on(window,"keydown",function(t){i.isOpened()&&46===t.which&&i.__fire(i.buttons.remove,"click",document)}).__on(window,"mouseup dragend",function(){i.draggable&&(i.draggable.parentNode.removeChild(i.draggable),i.draggable=!1)}),o.dialog.setSize(o.options.width,o.options.height),o.options.getlocalfilebyurl=d.extend(!0,{},o.options.ajax,o.options.getlocalfilebyurl),o.options.crop=d.extend(!0,{},o.options.ajax,o.options.crop),o.options.resize=d.extend(!0,{},o.options.ajax,o.options.resize),o.options.create=d.extend(!0,{},o.options.ajax,o.options.create),o.options.move=d.extend(!0,{},o.options.ajax,o.options.move),o.options.remove=d.extend(!0,{},o.options.ajax,o.options.remove),o.options.folder=d.extend(!0,{},o.options.ajax,o.options.folder),o.options.items=d.extend(!0,{},o.options.ajax,o.options.items),o.view="list"===o.options.view?"list":"tiles",g.default.get("jodit_filebrowser_view")&&(o.view="list"===g.default.get("jodit_filebrowser_view")?"list":"tiles"),o.buttons[o.view].classList.remove("disabled"),o.files.classList.add("jodit_filebrowser_files_view-"+o.view),o.sortBy=-1!==["changed","name","size"].indexOf(o.options.sortBy)?o.options.sortBy:"changed",g.default.get("jodit_filebrowser_sortby")&&(o.sortBy=-1!==["changed","name","size"].indexOf(g.default.get("jodit_filebrowser_sortby"))?g.default.get("jodit_filebrowser_sortby"):"changed"),o.buttons.sort.value=o.sortBy,o.currentBaseUrl=d.$$("base",o.jodit.doc).length?d.$$("base",o.jodit.doc)[0].getAttribute("href"):location.protocol+"//"+location.host,void 0!==r.default.modules.Uploader&&(o.uploader=new f.default(o.jodit,n({},o.jodit.options.uploader,o.options.uploader)),o.uploader.setPath(o.currentPath),o.uploader.setSource(o.currentSource),o.uploader.bind(o.browser,o.uploadHandler,o.errorHandler),o.uploader.bind(o.buttons.upload,o.uploadHandler,o.errorHandler)),o}return i(e,t),e.prototype.isOpened=function(){return this.dialog.isOpened()&&"none"!==this.browser.style.display},e.prototype.status=function(t,e){var o=this;clearTimeout(this.statustimer),this.status_line.classList.remove("success"),this.status_line.classList.add("active"),this.status_line.innerHTML=t,e&&this.status_line.classList.add("success"),this.statustimer=setTimeout(function(){o.status_line.classList.remove("active")},this.options.howLongShowMsg)},e.prototype.generateFolderTree=function(t){var e=this,o=[];d.each(t,function(t,i){t&&t!==v&&o.push('
      '+t+"
      "),i.folders.forEach(function(n){var r=''+n+"";e.options.deleteFolder&&".."!==n&&"."!==n&&(r+='×'),r+="",o.push(r)}),e.options.createNewFolder&&o.push(''+c.default.getIcon("plus")+" "+e.jodit.i18n("Add folder")+"")}),this.tree.innerHTML=o.join("")},e.prototype.generateItemsBox=function(t){var e=this,o=[];d.each(t,function(t,i){t&&t!==v&&o.push('
      '+t+(i.path?" - "+i.path:"")+"
      "),i.files&&i.files.length?("function"==typeof e.options.sort&&i.files.sort(function(t,o){return e.options.sort(t,o,e.sortBy,e.jodit)}),i.files.forEach(function(n){(void 0===e.options.filter||e.options.filter(n,e.filterWord))&&o.push(e.options.getThumbTemplate.call(e,n,i,t))})):o.push("
      "+e.jodit.i18n("There are no files")+"
      ")}),this.files.innerHTML=o.join("")},e.prototype.__getActiveElements=function(){return d.$$(":scope>a.active",this.files)},e.prototype.someSelectedWasChanged=function(){var t=this.__getActiveElements();this.buttons.remove.classList.toggle("disabled",!t.length),this.buttons.select.classList.toggle("disabled",!t.length),this.buttons.edit.classList.toggle("disabled",1!==t.length)},e.prototype.send=function(t,e,o){var i,n=d.extend(!0,{},this.options.ajax,void 0!==this.options[t]?this.options[t]:this.options.ajax);return n.data=n.prepareData.call(this,n.data),i=new p.default(this.jodit,n),i.send().then(e).catch(o),i},e.prototype.loadTree=function(t,e){var o=this;o.options.folder.data.path=t,o.options.folder.data.source=e,o.uploader&&(o.uploader.setPath(t),o.uploader.setSource(e)),o.options.showFoldersPanel&&(o.options.folder.url?(o.tree.classList.add("active"),o.tree.innerHTML="",o.tree.appendChild(o.loader.cloneNode(!0)),o.__ajax&&o.__ajax.abort&&o.__ajax.abort(),o.__ajax=this.send("folder",function(t){var e=o.options.folder.process.call(o,t);o.generateFolderTree(e.data.sources)},function(){o.status(o.jodit.i18n("Error on load folders"))})):o.tree.classList.remove("active")),this.loadItems(t,e)},e.prototype.remove=function(t,e,o){var i=this;this.options.remove.data.path=t,this.options.remove.data.name=e,this.options.remove.data.source=o,this.send("remove",function(t){t=i.options.remove.process.call(i,t),i.options.isSuccess(t)?(i.someSelectedWasChanged(),i.status(i.options.getMessage(t),!0)):i.status(i.options.getMessage(t))},function(t){i.status(t)})},e.prototype.onSelect=function(t){var e=this;return function(){var o=e.__getActiveElements();if(o.length){var i=[];o.forEach(function(t){i.push(t.getAttribute("data-url"))}),e.close(),"function"==typeof t&&t({baseurl:"",files:i})}return!1}},e}(a.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(5),r=o(2),a=o(0),s=o(6),l=o(7);r.Config.prototype.imageeditor={closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},e.default=function(t){function e(e){var o=t.call(this,e)||this;return o.resizeUseRatio=!0,o.cropUseRatio=!0,o.clicked=!1,o.activeTab="resize",o.hide=function(){o.dialog.close()},o.calcValueByPercent=function(t,e){var o,i=""+e,n=parseFloat(""+t);return(o=/^[\-+]?[0-9]+(px)?$/.exec(i))?parseInt(i,10):(o=/^([\-+]?[0-9.]+)%$/.exec(i),o?Math.round(n*(parseFloat(o[1])/100)):n||0)},o.calcCropBox=function(){var t=.8*o.crop_box.parentNode.offsetWidth,e=.8*o.crop_box.parentNode.offsetHeight,i=t,n=e;t>o.naturalWidth&&e>o.naturalHeight?(i=o.naturalWidth,n=o.naturalHeight):o.ratio>t/e?(i=t,n=o.naturalHeight*(t/o.naturalWidth)):(i=o.naturalWidth*(e/o.naturalHeight),n=e),a.css(o.crop_box,{width:i,height:n})},o.showCrop=function(){o.cropImage&&(o.calcCropBox(),o.new_w=o.calcValueByPercent(o.cropImage.offsetWidth||o.image.offsetWidth,o.options.cropDefaultWidth),o.new_h=o.cropUseRatio?o.new_w/o.ratio:o.calcValueByPercent(o.cropImage.offsetHeight||o.image.offsetHeight,o.options.cropDefaultHeight),a.css(o.cropHandler,{backgroundImage:"url("+o.cropImage.getAttribute("src")+")",width:o.new_w,height:o.new_h,left:(o.cropImage.offsetWidth||o.image.offsetWidth)/2-o.new_w/2,top:(o.cropImage.offsetHeight||o.image.offsetHeight)/2-o.new_h/2}),o.jodit.events.fire(o.cropHandler,"updatesize"))},o.cropBox={x:0,y:0,w:0,h:0},o.updateCropBox=function(){if(o.cropImage){var t=o.cropImage.offsetWidth/o.naturalWidth,e=o.cropImage.offsetHeight/o.naturalHeight;o.cropBox.x=a.css(o.cropHandler,"left")/t,o.cropBox.y=a.css(o.cropHandler,"top")/e,o.cropBox.w=o.cropHandler.offsetWidth/t,o.cropBox.h=o.cropHandler.offsetHeight/e,o.sizes.innerText=o.cropBox.w.toFixed(0)+"x"+o.cropBox.h.toFixed(0)}},o.resizeBox={w:0,h:0},o.updateResizeBox=function(){o.resizeBox.w=o.image.offsetWidth||o.naturalWidth,o.resizeBox.h=o.image.offsetHeight||o.naturalHeight},o.open=function(t,e){var i=(new Date).getTime();o.image=document.createElement("img"),a.$$("img,.jodit_icon-loader",o.resize_box).forEach(function(t){t.parentNode.removeChild(t)}),a.$$("img,.jodit_icon-loader",o.crop_box).forEach(function(t){t.parentNode.removeChild(t)}),a.css(o.cropHandler,"background","transparent"),o.onSave=e,o.resize_box.appendChild(a.dom('')),o.crop_box.appendChild(a.dom('')),/\?/.test(t)?t+="&_tst="+i:t+="?_tst="+i,o.image.setAttribute("src",t),o.dialog.open();var n=function(){o.image.removeEventListener("load",n),o.naturalWidth=o.image.naturalWidth,o.naturalHeight=o.image.naturalHeight,o.widthInput.value=""+o.naturalWidth,o.heightInput.value=""+o.naturalHeight,o.ratio=o.naturalWidth/o.naturalHeight,o.resize_box.appendChild(o.image),o.cropImage=o.image.cloneNode(),o.crop_box.appendChild(o.cropImage),a.$$(".jodit_icon-loader",o.editor).forEach(function(t){t.parentNode.removeChild(t)}),"crop"===o.activeTab&&o.showCrop(),o.jodit.events.fire(o.resizeHandler,"updatesize"),o.jodit.events.fire(o.cropHandler,"updatesize"),o.dialog.setPosition()};o.image.addEventListener("load",n),o.image.complete&&n()},o.setHandlers=function(){var t=o;t.__on([t.editor.querySelector(".jodit_bottomright"),t.cropHandler],"mousedown",function(e){t.target=e.target||e.srcElement,e.preventDefault(),e.stopImmediatePropagation(),t.clicked=!0,t.start_x=parseInt(e.clientX,10),t.start_y=parseInt(e.clientY,10),"crop"===t.activeTab?(t.top_x=a.css(t.cropHandler,"left"),t.top_y=a.css(t.cropHandler,"top"),t.width=t.cropHandler.offsetWidth,t.height=t.cropHandler.offsetHeight):(t.width=t.image.offsetWidth,t.height=t.image.offsetHeight)}),t.__off(window,".jodit_image_editor"+t.jodit.id).__on(window,"mousemove.jodit_image_editor"+t.jodit.id,a.throttle(function(e){t.clicked&&(t.diff_x=parseInt(e.clientX,10)-t.start_x,t.diff_y=parseInt(e.clientY,10)-t.start_y,"resize"===t.activeTab&&t.resizeUseRatio||"crop"===t.activeTab&&t.cropUseRatio?t.diff_x?(t.new_w=t.width+t.diff_x,t.new_h=Math.round(t.new_w/t.ratio)):(t.new_h=t.height+t.diff_y,t.new_w=Math.round(t.new_h*t.ratio)):(t.new_w=t.width+t.diff_x,t.new_h=t.height+t.diff_y),"resize"===t.activeTab?(t.new_w>t.options.resizeMinWidth&&(a.css(t.image,"width",t.new_w+"px"),t.widthInput.value=""+t.new_w),t.new_h>t.options.resizeMinHeight&&(a.css(t.image,"height",t.new_h+"px"),t.heightInput.value=""+t.new_h),o.jodit.events.fire(t.resizeHandler,"updatesize")):(t.target!==t.cropHandler?(t.top_x+t.new_w>t.cropImage.offsetWidth&&(t.new_w=t.cropImage.offsetWidth-t.top_x),t.top_y+t.new_h>t.cropImage.offsetHeight&&(t.new_h=t.cropImage.offsetHeight-t.top_y),a.css(t.cropHandler,{width:t.new_w,height:t.new_h})):(t.top_x+t.diff_x+t.cropHandler.offsetWidth>t.cropImage.offsetWidth&&(t.diff_x=t.cropImage.offsetWidth-t.top_x-t.cropHandler.offsetWidth),a.css(t.cropHandler,"left",t.top_x+t.diff_x),t.top_y+t.diff_y+t.cropHandler.offsetHeight>t.cropImage.offsetHeight&&(t.diff_y=t.cropImage.offsetHeight-t.top_y-t.cropHandler.offsetHeight),a.css(t.cropHandler,"top",t.top_y+t.diff_y)),o.jodit.events.fire(t.cropHandler,"updatesize")),e.stopImmediatePropagation())},30)).__on(window,"resize.jodit_image_editor"+t.jodit.id,function(){o.jodit.events.fire(t.resizeHandler,"updatesize"),t.showCrop(),o.jodit.events.fire(t.cropHandler,"updatesize")}).__on(window,"mouseup.jodit_image_editor"+t.jodit.id+" keydown.jodit_image_editor"+t.jodit.id,function(e){t.clicked&&(t.clicked=!1,e.stopImmediatePropagation())}),a.$$(".jodit_btn_group",t.editor).forEach(function(e){var o=e.querySelector("input");t.__on(e,"click change","button",function(){var i=this;a.$$("button",e).forEach(function(t){return t.classList.remove("active")}),i.classList.add("active"),o.checked=!!i.getAttribute("data-yes"),t.__fire(o,"change",document)})}),t.__on(o.editor,"click",".jodit_image_editor_slider-title",function(){a.$$(".jodit_image_editor_slider,.jodit_image_editor_area",t.editor).forEach(function(t){return t.classList.remove("active")});var e=this.parentNode;e.classList.add("active"),t.activeTab=e.getAttribute("data-area"),t.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_"+t.activeTab).classList.add("active"),"crop"===t.activeTab&&t.showCrop()}),t.__on(t.widthInput,"change mousedown keydown",a.debounce(function(){var e,i=parseInt(t.widthInput.value,10);i>t.jodit.options.resizer.min_width&&(a.css(t.image,"width",i+"px"),t.resizeUseRatio&&(e=Math.round(i/t.ratio))>t.jodit.options.resizer.min_height&&(a.css(t.image,"height",e+"px"),t.heightInput.value=e)),o.jodit.events.fire(t.resizeHandler,"updatesize")},200)),t.__on(t.heightInput,"change mousedown keydown",a.debounce(function(){var e,i=parseInt(t.heightInput.value,10);i>t.jodit.options.resizer.min_height&&(a.css(t.image,"height",i+"px"),t.resizeUseRatio&&(e=Math.round(i*t.ratio))>t.jodit.options.resizer.min_width&&(a.css(t.image,"width",e+"px"),t.widthInput.value=e)),o.jodit.events.fire(t.resizeHandler,"updatesize")},200)),t.editor.querySelector(".jodit_image_editor_keep_spect_ratio").addEventListener("change",function(){t.resizeUseRatio=this.checked}),t.editor.querySelector(".jodit_image_editor_keep_spect_ratio_crop").addEventListener("change",function(){t.cropUseRatio=this.checked}),t.jodit.events.on(t.resizeHandler,"updatesize",function(){a.css(t.resizeHandler,{top:0,left:0,width:(t.image.offsetWidth||t.naturalWidth)+"px",height:(t.image.offsetHeight||t.naturalHeight)+"px"}),o.updateResizeBox()}),t.jodit.events.on(t.cropHandler,"updatesize",function(){var e=a.css(t.cropHandler,"left"),o=a.css(t.cropHandler,"top"),i=t.cropHandler.offsetWidth,n=t.cropHandler.offsetHeight;0>e&&(e=0),0>o&&(o=0),e+i>t.cropImage.offsetWidth&&(i=t.cropImage.offsetWidth-e,t.cropUseRatio&&(n=i/t.ratio)),o+n>t.cropImage.offsetHeight&&(n=t.cropImage.offsetHeight-o,t.cropUseRatio&&(i=n*t.ratio)),a.css(t.cropHandler,{width:i,height:n,left:e,top:o,backgroundPosition:-e+"px "+-o+"px",backgroundSize:t.cropImage.offsetWidth+"px "+t.cropImage.offsetHeight+"px"}),t.updateCropBox()}),t.buttons.forEach(function(e){e.addEventListener("mousedown",function(t){t.stopImmediatePropagation()}),e.addEventListener("click",function(){var o={action:t.activeTab,box:"resize"===t.activeTab?t.resizeBox:t.cropBox};switch(e.getAttribute("data-action")){case"saveas":l.Promt(t.jodit.i18n("Enter new name"),t.jodit.i18n("Save in new file"),function(e){if(!a.trim(e))return l.Alert(t.jodit.i18n("The name should not be empty")),!1;t.onSave(e,o,t.hide,function(t){l.Alert(t)})});break;case"save":t.onSave(void 0,o,t.hide,function(t){l.Alert(t)});break;case"reset":"resize"===t.activeTab?(a.css(t.image,{width:null,height:null}),t.widthInput.value=""+t.naturalWidth,t.heightInput.value=""+t.naturalHeight,t.jodit.events.fire(t.resizeHandler,"updatesize")):t.showCrop()}})})},o.options=e.options.imageeditor,o.resizeUseRatio=o.options.resizeUseRatio,o.cropUseRatio=o.options.cropUseRatio,o.buttons=[a.dom('"),a.dom('"),a.dom('")],o.activeTab=o.options.resize?"resize":"crop",o.editor=a.dom('
      '+(o.options.resize?'
      ':"")+(o.options.crop?'
      ':"")+'
      '+(o.options.resize?'
      '+s.default.getIcon("resize")+e.i18n("Resize")+'
      ":"")+(o.options.crop?'
      '+s.default.getIcon("crop")+e.i18n("Crop")+'
      ":"")+"
      "),o.widthInput=o.editor.querySelector(".jodit_image_editor_width"),o.heightInput=o.editor.querySelector(".jodit_image_editor_height"),o.resize_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_resize .jodit_image_editor_box"),o.crop_box=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_image_editor_box"),o.sizes=o.editor.querySelector(".jodit_image_editor_area.jodit_image_editor_area_crop .jodit_sizes"),o.resizeHandler=o.editor.querySelector(".jodit_image_editor_resizer"),o.cropHandler=o.editor.querySelector(".jodit_image_editor_croper"),o.dialog=new l.default(e),o.dialog.setContent(o.editor),o.dialog.setSize(o.options.width,o.options.height),o.dialog.setTitle(o.buttons),o.setHandlers(),o}return i(e,t),e}(n.default)},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(3),r=o(5),a=o(0),s=o(4);e.default=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isMarker=function(t){return s.default.isNode(t,e.jodit.win)&&"SPAN"===t.tagName&&t.getAttribute("data-"+n.MARKER_CLASS)},e.marker=function(t,o){void 0===t&&(t=!1);var i;o&&(i=o.cloneRange(),i.collapse(t));var r=e.jodit.doc.createElement("span");return r.id=n.MARKER_CLASS+"_"+ +new Date+"_"+(""+Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.setAttribute("data-"+n.MARKER_CLASS,t?"start":"end"),r.appendChild(e.jodit.doc.createTextNode(n.INVISIBLE_SPACE)),i&&i.insertNode(r),r},e.focus=function(){var t=e.jodit;if(!e.isFocused()){if(t.options.iframe&&a.isIE())for(var o=0;1e5>o&&"complete"!==t.doc.readyState;)o++;t.iframe&&t.iframe.focus(),t.win.focus(),t.editor.focus();var i=t.win.getSelection(),r=t.doc.createRange();return i.rangeCount||(t.editor.firstChild||t.editor.appendChild(t.doc.createTextNode(n.INVISIBLE_SPACE)),r.selectNodeContents(t.editor.firstChild),r.collapse(!0),i.removeAllRanges(),i.addRange(r)),!0}},e.eachSelection=function(t){var o=e.jodit.win.getSelection();if(o.rangeCount){var i=o.getRangeAt(0),n=[],r=i.endContainer===e.jodit.editor?e.jodit.editor.childNodes[i.endOffset-1]:i.endContainer;s.default.find(i.startContainer===e.jodit.editor?e.jodit.editor.childNodes[i.startOffset]:i.startContainer,function(t){if(!t||s.default.isEmptyTextNode(t)||e.isMarker(t)||n.push(t),t===r)return!0},e.jodit.editor,!0,"nextSibling",!1),n.forEach(function(e){t(e)})}},e.applyCSS=function(t,o,i){void 0===o&&(o="span");var r,l=function(t){return t&&!s.default.isEmptyTextNode(t)&&!e.isMarker(t)},d=function(t){return"FONT"!==t.nodeName&&t.nodeType===Node.ELEMENT_NODE&&!1!==a.each(i,function(e,o){return-1!==o.indexOf((""+a.css(t,e)).toLowerCase())})},c=function(t){return(RegExp("^"+t.nodeName+"$","i").test(o)||i&&d(t))&&l(t)},u=function(e){c(e)&&("SPAN"===e.nodeName&&Object.keys(t).forEach(function(o){0===r||a.css(e,o)==a.normilizeCSSValue(o,t[o])?(a.css(e,o,""),void 0===r&&(r=0)):(a.css(e,o,t[o]),void 0===r&&(r=1))}),e.getAttribute("style")&&"SPAN"===e.nodeName||(s.default.unwrap(e),void 0===r&&(r=0)))};if(e.isCollapsed()){var f=!1;if(e.current()&&s.default.closest(e.current(),o,e.jodit.editor)&&(f=!0,e.setCursorAfter(s.default.closest(e.current(),o,e.jodit.editor))),"SPAN"===o.toUpperCase()||!f){var p=s.default.create(o,n.INVISIBLE_SPACE,e.jodit.doc);e.insertNode(p),"SPAN"===o.toUpperCase()&&a.css(p,t),e.setCursorIn(p)}}else{var h=e.save();e.jodit.editor.normalize(),e.jodit.doc.execCommand("fontsize",!1,7),a.$$('font[size="7"]',e.jodit.editor).forEach(function(i){if(s.default.next(i,l,i.parentNode)||s.default.prev(i,l,i.parentNode)||!c(i.parentNode))if(s.default.next(i.firstChild,l,i)||s.default.prev(i.firstChild,l,i)||!c(i.firstChild))if(s.default.closest(i,c,e.jodit.editor)){var n=e.jodit.doc.createRange(),d=s.default.closest(i,c,e.jodit.editor);n.setStartBefore(d),n.setEndBefore(i);var f=n.extractContents();a.trim(f.textContent).length||s.default.unwrap(f.firstChild),d.parentNode.insertBefore(f,d),n.setStartAfter(i),n.setEndAfter(d);var p=n.extractContents();a.trim(p.textContent).length||s.default.unwrap(p.firstChild),s.default.after(d,p),u(d)}else{var h,g=[];s.default.find(i.firstChild,function(t){return t&&c(t)?(void 0===h&&(h=!0),g.push(t)):void 0===h&&(h=!1),!1},i,!0),g.forEach(s.default.unwrap),h||(void 0===r&&(r=1),1===r&&a.css(s.default.replace(i,o,!1,!1,e.jodit.doc),"SPAN"===o.toUpperCase()?t:{}))}else u(i.firstChild);else u(i.parentNode);i.parentNode&&s.default.unwrap(i)}),e.restore(h)}},e}return i(e,t),e.prototype.insertCursorAtPoint=function(t,e){var o;this.clear();try{var i=null;if(this.jodit.doc.caretPositionFromPoint?(o=this.jodit.doc.caretPositionFromPoint(t,e),i=this.jodit.doc.createRange(),i.setStart(o.offsetNode,o.offset)):this.jodit.doc.caretRangeFromPoint&&(o=this.jodit.doc.caretRangeFromPoint(t,e),i=this.jodit.doc.createRange(),i.setStart(o.startContainer,o.startOffset)),null!==i&&void 0!==window.getSelection){i.collapse(!0);var n=this.jodit.win.getSelection();n.removeAllRanges(),n.addRange(i)}else if(void 0!==this.jodit.doc.body.createTextRange){var r=this.jodit.doc.body.createTextRange();r.moveToPoint(t,e),r.select()}return!0}catch(t){}return!1},e.prototype.clear=function(){a.$$("span[data-"+n.MARKER_CLASS+"]",this.jodit.editor).forEach(function(t){t.parentNode.removeChild(t)})},e.prototype.restore=function(t){var e=this;if(void 0===t&&(t=[]),Array.isArray(t)){var o=this.jodit.win.getSelection();o.removeAllRanges(),t.forEach(function(t){var i=e.jodit.doc.createRange(),n=e.jodit.editor.querySelector("#"+t.endId),r=e.jodit.editor.querySelector("#"+t.startId);if(r){if(t.collapsed||!n){var a=r.previousSibling;a&&a.nodeType==Node.TEXT_NODE?i.setStart(a,a.nodeValue.length):i.setStartBefore(r),r.parentNode.removeChild(r),i.collapse(!0)}else i.setStartAfter(r),r.parentNode.removeChild(r),i.setEndBefore(n),n.parentNode.removeChild(n);o.addRange(i)}})}},e.prototype.save=function(){var t=this.jodit.win.getSelection();if(!t.rangeCount)return null;var e,o,i,n=[],r=t.rangeCount,a=[];for(e=0;r>e;e+=1)a[e]=t.getRangeAt(e),a[e].collapsed?(o=this.marker(!0,a[e]),n[e]={startId:o.id,collapsed:!0,startMarker:o.outerHTML}):(o=this.marker(!0,a[e]),i=this.marker(!1,a[e]),n[e]={startId:o.id,endId:i.id,collapsed:!1,startMarker:o.outerHTML,endMarker:i.outerHTML});for(t.removeAllRanges(),e=r-1;e>=0;--e){n[e].collapsed?(a[e].setStartAfter(this.jodit.doc.getElementById(n[e].startId)),a[e].collapse(!0)):(a[e].setStartBefore(this.jodit.doc.getElementById(n[e].startId)),a[e].setEndAfter(this.jodit.doc.getElementById(n[e].endId)));try{t.addRange(a[e].cloneRange())}catch(t){}}return n},e.prototype.isCollapsed=function(){var t,e=this.jodit.win.getSelection();for(t=0;e.rangeCount>t;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0},e.prototype.isFocused=function(){return this.jodit.doc.hasFocus&&this.jodit.doc.hasFocus()&&this.jodit.editor===this.jodit.doc.activeElement},e.prototype.current=function(){if(void 0!==this.jodit.win.getSelection){var t=this.jodit.win.getSelection();if(t.rangeCount>0){var e=t.getRangeAt(0),o=e.startContainer;if(e.startContainer.nodeType!==Node.TEXT_NODE&&e.startContainer===e.endContainer&&e.startOffset!==e.endOffset&&(o=e.startContainer.childNodes[e.startOffset]),s.default.contains(this.jodit.editor,o))return o}}return!1},e.prototype.insertNode=function(t,e){if(void 0===e&&(e=!0),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(this.focus(),!this.jodit.win.getSelection)throw Error("Jodit does'n support this browser");var o=this.jodit.win.getSelection();if(this.isCollapsed()||this.jodit.execCommand("Delete"),o.rangeCount){var i=o.getRangeAt(0);!function(t,e){for(var o=e;o;){if(o===t)return!0;o=o.parentNode}return!1}(this.jodit.editor,i.commonAncestorContainer)?this.jodit.editor.appendChild(t):(i.deleteContents(),i.insertNode(t))}else this.jodit.editor.appendChild(t);e&&this.setCursorAfter(t),this.jodit.setEditorValue()},e.prototype.insertHTML=function(t){var e,o,i=this.jodit.doc.createElement("DIV"),n=this.jodit.doc.createDocumentFragment();for(this.isFocused()||this.jodit.editor.focus(),"string"==typeof t?i.innerHTML=t:s.default.isNode(t,this.jodit.win)&&i.appendChild(t),e=i.lastChild;i.firstChild;)e=i.firstChild,n.appendChild(i.firstChild);for(this.insertNode(n,!1),this.setCursorAfter(e),o=this.jodit.editor.lastChild;o&&o.nodeType===Node.TEXT_NODE&&o.previousSibling&&/^\s*$/.test(o.data);)o=o.previousSibling;e&&(o&&e===o&&1===e.nodeType&&this.jodit.editor.appendChild(this.jodit.doc.createElement("br")),this.setCursorAfter(e))},e.prototype.insertImage=function(t,e){void 0===e&&(e={});var o,i="string"==typeof t?a.dom("",this.jodit.doc):a.dom(t,this.jodit.doc);this.isCollapsed()||this.jodit.execCommand("Delete"),"string"==typeof t&&i.setAttribute("src",t),o=""+this.jodit.options.imageDefaultWidth,o&&"auto"!==o&&0>(o+"").indexOf("px")&&0>(o+"").indexOf("%")&&(o+="px"),e.width=o,e&&"object"==typeof e&&a.each(e,function(t,e){i.style[e]=t});var n=function(){(i.offsetHeight>i.naturalHeight||i.offsetWidth>i.naturalWidth)&&(i.style.width="",i.style.height=""),i.removeEventListener("load",n)};i.addEventListener("load",n),i.complete&&n(),this.insertNode(i),this.jodit.events.fire("afterInsertImage",[i])},e.prototype.setCursorAfter=function(t){var e=this;if(!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===e.jodit.editor||t.parentNode===e.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var o=this.jodit.win.getSelection(),i=this.jodit.doc.createRange(),r=this.jodit.doc.createTextNode(n.INVISIBLE_SPACE);return t.nodeType!==Node.TEXT_NODE?(i.setStartAfter(t),i.insertNode(r),i.setStartAfter(r)):i.setStart(t,t.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},e.prototype.cursorInTheEdge=function(t,e,o){void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===o&&(o=!1);var i=this.jodit.win.getSelection(),n=function(t){return!s.default.isEmptyTextNode(t)},r=e;if(!i.rangeCount)return!1;var a=i.getRangeAt(0),l=function(){return!1===o?t:!t}()?a.startContainer:a.endContainer;if(!1===e)r=s.default.up(l,s.default.isBlock,this.jodit.editor);else if("function"==typeof e)r=s.default.up(l,e,this.jodit.editor);else if(!s.default.isOrContains(e,a.startContainer))return null;return!(!r||(l===r?t?0!==a.startOffset:a.endOffset!==[].slice.call(r.childNodes).filter(n).length:t?l.nodeType===Node.TEXT_NODE&&0!==a.startOffset||s.default.prev(l,n,r):l.nodeType===Node.TEXT_NODE&&a.endOffset!==a.startContainer.nodeValue.length||s.default.next(l,n,r)))},e.prototype.setCursorBefore=function(t){var e=this;if(!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===e.jodit.editor||t.parentNode===e.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var o=this.jodit.win.getSelection(),i=this.jodit.doc.createRange(),r=this.jodit.doc.createTextNode(n.INVISIBLE_SPACE);return t.nodeType!==Node.TEXT_NODE?(i.setStartBefore(t),i.insertNode(r),i.selectNode(r)):i.setStart(t,t.nodeValue.length),i.collapse(!0),o.removeAllRanges(),o.addRange(i),r},e.prototype.setCursorIn=function(t,e){var o=this;if(void 0===e&&(e=!1),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===o.jodit.editor||t.parentNode===o.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var i=this.jodit.win.getSelection(),n=this.jodit.doc.createRange(),r=t,a=t;do{if(r.nodeType===Node.TEXT_NODE)break;a=r,r=r[e?"firstChild":"lastChild"]}while(r);n.selectNodeContents(r||a),n.collapse(e),i.removeAllRanges(),i.addRange(n)},e.prototype.select=function(t,e){var o=this;if(void 0===e&&(e=!1),!(t instanceof this.jodit.win.Node))throw Error("Parameter node most be instance of Node");if(!s.default.up(t,function(t){return t===o.jodit.editor||t.parentNode===o.jodit.editor},this.jodit.editor))throw Error("Node element must be in editor");var i=this.jodit.win.getSelection(),n=this.jodit.doc.createRange();n[e?"selectNodeContents":"selectNode"](t),i.removeAllRanges(),i.addRange(n)},e}(r.default)},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(6),s=o(3);n.Config.prototype.fullsize=!1,n.Config.prototype.globalFullsize=!0,n.Config.prototype.controls.fullsize={exec:function(t){t.events.fire("toggleFullsize")},tooltip:"Open editor in fullsize",mode:s.MODE_SOURCE+s.MODE_WYSIWYG},i.default.plugins.fullsize=function(t){var e=!1,o=function(){e?r.css(t.container,{height:window.innerHeight,width:window.innerWidth}):r.css(t.container,{height:null,width:null})},i=function(i){if(void 0===i&&(i=!t.container.classList.contains("jodit_fullsize")),e=i,t.container.classList.toggle("jodit_fullsize",i),t.toolbar){r.css(t.toolbar.container,"width","auto");var n=r.dom(a.default.getIcon(i?"shrink":"fullsize")),s=t.toolbar.container.querySelector(".jodit_toolbar_btn-fullsize a");s&&(n.classList.add("jodit_icon"),s.innerHTML="",s.appendChild(n))}if(t.options.globalFullsize){for(var l=t.container.parentNode;l&&!(l instanceof Document);)l.classList.toggle("jodit_fullsize_box",i),l=l.parentNode;o()}t.events.fire("afterResize")};t.options.fullsize&&t.events.on("afterInit",function(){i(!0)}),t.options.globalFullsize&&t.__on(window,"resize",o),t.events.on("toggleFullsize",i),t.events.on("beforeDestruct",function(){i(!1)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(6),s=o(3),l=o(4);n.Config.prototype.addNewLine=!0,n.Config.prototype.addNewLineTagsTriggers=["table","iframe","img","hr","jodit"],i.default.plugins.addNewLine=function(t){if(t.options.addNewLine){var e,o,i=r.dom('
      '+a.default.getIcon("enter")+"
      "),n=RegExp("^("+t.options.addNewLineTagsTriggers.join("|")+")$","i"),d=!1,c=!1,u=function(){t.container.classList.contains("jodit_popup_active")||(clearTimeout(e),i.classList.toggle("jodit-add-new-line_after",!c),i.style.display="block",i.style.width=t.editor.clientWidth+"px",d=!1)},f=function(){clearTimeout(e),i.style.display="none",d=!0},p=function(t){return l.default.isBlock(t)&&!!t.childNodes.length},h=function(){d||(clearTimeout(e),e=setTimeout(f,500))};t.events.on("afterInit",function(){t.container.appendChild(i),t.__on(i,"mousemove",function(t){t.stopPropagation()}).__on(i.querySelector("span"),"mousedown touchstart",function(e){var i=t.doc.createElement(t.options.enter);i.appendChild(t.doc.createTextNode(s.INVISIBLE_SPACE)),c&&o?t.editor.insertBefore(i,o):t.editor.appendChild(i),t.selection.setCursorIn(i),t.setEditorValue(),f(),e.preventDefault()})}).on("change afterInit afterSetMode",r.debounce(function(){t.__on(t.editor,"scroll",function(){f()}).__on(t.container,"mouseleave",function(t){h()}).__on(t.editor,"mousemove",r.debounce(function(e){var a=t.doc.elementFromPoint(e.pageX-t.win.pageXOffset,e.pageY-t.win.pageYOffset);if(a&&a!==i&&l.default.isOrContains(t.editor,a)){if(!((o=a)&&o.nodeName.match(n)&&l.default.isOrContains(t.editor,o)||(o=l.default.closest(o,n,t.editor))))return void h();var s=r.offset(o,t),d=!1;10>Math.abs(e.pageY-s.top)&&(d=s.top,c=!0),10>Math.abs(e.pageY-(s.top+s.height))&&(d=s.top+s.height,c=!1),!1!==d&&(c&&!l.default.prev(o,p,t.editor)||!c&&!l.default.next(o,p,t.editor))?(i.style.top=d+"px",u()):(o=!1,h())}},t.options.observer.timeout))},t.options.observer.timeout))}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1);o(2).Config.prototype.autofocus=!1,i.default.plugins.autoFocus=function(t){var e;t.events.on("afterInit",function(){t.options.autofocus&&(t.options.observer.timeout?e=setTimeout(t.selection.focus,300):t.selection.focus())}).on("beforeDestruct",function(){clearTimeout(e)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(3),r=o(0),a=o(4);i.default.plugins.backspace=function(t){t.events.on("afterCommand",function(e){if("delete"===e){var o=t.selection.current();o&&o.firstChild&&"BR"===o.firstChild.tagName&&o.removeChild(o.firstChild),r.trim(t.editor.innerText)||t.editor.querySelector("img")||(t.editor.innerHTML="",t.selection.setCursorIn(t.editor))}}),t.events.on("keydown",function(e){if(e.which===n.KEY_BACKSPACE||e.keyCode===n.KEY_DELETE){if(!t.selection.isCollapsed())return t.execCommand("Delete"),!1;var o=t.win.getSelection(),i=!!o.rangeCount&&o.getRangeAt(0);if(i&&0!==i.startOffset&&i.startContainer.nodeType===Node.TEXT_NODE){for(var r=i.startContainer,s=r.nodeValue,l=i.startOffset;l>=0&&s[l-1]===n.INVISIBLE_SPACE;)l-=1;if(l!==i.startOffset){var d=i.startOffset;if(s=s.substr(0,l)+s.substr(d),r.nodeValue=s,s)return void i.setStart(r,l)}if(!r.previousSibling&&0===l){var c=a.default.prev(r,a.default.isBlock,t.editor);if(c){t.selection.setCursorIn(c,!1);var u=a.default.up(r,a.default.isBlock,t.editor);return u.innerHTML||u.parentNode.removeChild(u),!1}}}}})}},function(t,e,o){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,o=1,i=arguments.length;i>o;o++){e=arguments[o];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t};e.__esModule=!0;var n=o(1),r=o(2);r.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},r.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},r.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration":"underline"},tooltip:"Underline"},r.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration":"line-through"},tooltip:"Strike through"},n.default.plugins.bold=function(t){t.events.on("beforeCommand",function(e){if(-1!==["bold","italic","underline","strikethrough"].indexOf(e)){var o=i({},n.default.defaultOptions.controls[e].css),r={};return Object.keys(o).forEach(function(t){r[t]=Array.isArray(o[t])?o[t][0]:o[t]}),t.selection.applyCSS(r,n.default.defaultOptions.controls[e].tags[0],n.default.defaultOptions.controls[e].css),t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0),s=o(4);n.Config.prototype.cleanHTML={replaceNBSP:!0,cleanOnPaste:!0,allowTags:!1},n.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"},i.default.plugins.cleanHTML=function(t){if(t.options.cleanHTML.cleanOnPaste&&t.events.on("processPaste",function(t,e){return a.cleanFromWord(e)}),t.options.cleanHTML.allowTags){var e=/([^\[]*)\[([^\]]+)]/,o=/[\s]*,[\s]*/,i=/^(.*)[\s]*=[\s]*(.*)$/,n={};"string"==typeof t.options.cleanHTML.allowTags?t.options.cleanHTML.allowTags.split(o).map(function(t){t=a.trim(t);var r=e.exec(t),s={},l=function(t){t=a.trim(t);var e=i.exec(t);e?s[e[1]]=e[2]:s[t]=!0};if(r){var d=r[2].split(o);r[1]&&(d.map(l),n[r[1].toUpperCase()]=s)}else n[t.toUpperCase()]=!0}):n=t.options.cleanHTML.allowTags,t.events.on("beforeSetElementValue",function(e){if(t.getMode()===r.MODE_WYSIWYG){var o=s.default.create("div","",t.doc),i=void 0,a=[],l=void 0,d=void 0;for(o.innerHTML=e.value,i=o.firstChild;i;){if(i.tagName){if(!n[i.tagName]){a.push(i),i=s.default.next(i,function(t){return!!t},o,!0);continue}if(!0!==n[i.tagName]&&i.attributes&&i.attributes.length){for(l=[],d=0;i.attributes.length>d;d+=1)(!n[i.tagName][i.attributes[d].name]||!0!==n[i.tagName][i.attributes[d].name]&&n[i.tagName][i.attributes[d].name]!==i.attributes[d].value)&&l.push(i.attributes[d].name);for(d=0;l.length>=d;d+=1)i.removeAttribute(l[d])}}i=s.default.next(i,function(t){return!!t},o,!0)}for(d=0;a.length>d;d+=1)a[d].parentNode&&a[d].parentNode.removeChild(a[d]);e.value=o.innerHTML}})}t.events.on("afterCommand",function(e){var o,i,n,a=t.selection;switch(e){case"insertHorizontalRule":(o=t.editor.querySelector("hr[id=null]"))&&(i=s.default.next(o,s.default.isBlock,t.editor,!1),i||(i=s.default.create(t.options.enter,"",t.doc),s.default.after(o,i)),a.setCursorIn(i));break;case"removeFormat":if(i=a.current(),n=function(e){return e.nodeType===Node.ELEMENT_NODE?(e.hasAttribute("style")&&e.removeAttribute("style"),"FONT"===e.tagName&&(s.default.each(e,n),e=s.default.replace(e,"span",!1,!1,t.doc)),e.normalize&&e.normalize()):t.options.cleanHTML.replaceNBSP&&e.nodeType===Node.TEXT_NODE&&e.nodeValue.match(r.SPACE_REG_EXP)&&(e.nodeValue=e.nodeValue.replace(r.SPACE_REG_EXP," ")),e},a.isCollapsed())for(;i&&i.nodeType!==Node.ELEMENT_NODE&&i!==t.editor;)i=n(i),i=i.parentNode;else t.win.getSelection().removeAllRanges()}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(2),a=o(8),s=a.Widget.TabsWidget,l=a.Widget.ColorPickerWidget;r.Config.prototype.controls.brush={css:{backgroundColor:function(t,e){var o=function(t){var i,r;if("object"==typeof t){for(r=Object.keys(t),i=0;r.length>i;i+=1)if(o(t[r[i]]))return!0}else if(Array.isArray(t))return-1!==t.indexOf(n.normalizeColor(e)||"");return!1};return o(t.options.colors)}},popup:function(t,e,o,i){var n,r=l(t,function(e){t.execCommand("background",!1,e),i()},""),a=l(t,function(e){t.execCommand("forecolor",!1,e),i()},"");return n="background"===t.options.colorPickerDefaultTab?{Background:r,Text:a}:{Text:a,Background:r},s(t,n)},tooltip:"Fill color or set the text color"},i.default.plugins.color=function(t){t.events.on("beforeCommand",function(e,o,i){if(/forecolor|background/.test(e)){var r=n.normalizeColor(i);switch(e){case"background":t.selection.applyCSS({backgroundColor:r||""});break;case"forecolor":t.selection.applyCSS({color:r||""})}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(3),a=o(4);e.insertParagraph=function(t,e,o){o||(o=t.options.enter);var i=t.doc.createElement(o);return i.appendChild(t.doc.createTextNode(r.INVISIBLE_SPACE)),t.selection.insertNode(i,!1),t.selection.setCursorIn(i),e&&e.parentNode&&e.parentNode.removeChild(e),i},i.default.plugins.enter=function(t){t.events.on("keyup",function(){var e=t.selection.current();if(!1!==e){var o=a.default.up(e,function(e){return e.tagName===t.options.enter.toUpperCase()},t.editor);o&&a.default.all(o,function(o){o.nodeType===Node.TEXT_NODE&&r.INVISIBLE_SPACE_REG_EXP.test(o.nodeValue)&&0!==o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,"").length&&(o.nodeValue=o.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP,""),o===e&&t.selection.setCursorAfter(o))})}}),t.events.on("keydown",function(o){if(o.which===r.KEY_ENTER||o.keyCode===r.KEY_ENTER){t.selection.isCollapsed()||t.execCommand("Delete"),t.selection.focus();var i=t.selection.current(),s=t.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):t.doc.createRange();i||(i=a.default.create("text",r.INVISIBLE_SPACE,t.doc),t.editor.appendChild(i),l.selectNode(i),s.removeAllRanges(),s.addRange(l));var d=void 0,c=!!i&&a.default.up(i,a.default.isBlock,t.editor);if(!c&&i&&(c=a.default.wrap(i,t.options.enter,t),s=t.win.getSelection(),l=s.rangeCount?s.getRangeAt(0):t.doc.createRange()),c){if(!a.default.canSplitBlock(c,t.win)){var u=t.doc.createElement("br");return t.selection.insertNode(u,!1),t.selection.setCursorAfter(u),!1}if("LI"===c.nodeName&&0===n.trim(c.textContent||c.innerText).length){var f=a.default.closest(c,"ol|ul",t.editor);if(a.default.prev(c,function(t){return t&&"LI"===t.tagName},f))if(a.default.next(c,function(t){return t&&"LI"===t.tagName},f)){var p=t.doc.createRange();p.setStartBefore(f),p.setEndAfter(c);var h=p.extractContents();f.parentNode.insertBefore(h,f),d=t.selection.setCursorBefore(f)}else d=t.selection.setCursorAfter(f);else d=t.selection.setCursorBefore(f);return c.parentNode.removeChild(c),e.insertParagraph(t,d),n.$$("li",f).length||f.parentNode.removeChild(f),!1}if(t.selection.cursorInTheEdge(!0,c))d=t.selection.setCursorBefore(c),e.insertParagraph(t,d,"LI"===c.nodeName?"li":t.options.enter),t.selection.setCursorIn(c,!0);else if(t.selection.cursorInTheEdge(!1,c))d=t.selection.setCursorAfter(c),e.insertParagraph(t,d,"LI"===c.nodeName?"li":t.options.enter);else{var p=t.doc.createRange();p.setStartBefore(c),p.setEnd(l.startContainer,l.startOffset);var h=p.extractContents();c.parentNode.insertBefore(h,c),t.selection.setCursorIn(c,!0)}}else e.insertParagraph(t);return!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0);n.Config.prototype.showMessageErrors=!0,n.Config.prototype.showMessageErrorTime=3e3,n.Config.prototype.showMessageErrorOffsetPx=3,i.default.plugins.errorMessages=function(t){if(t.options.showMessageErrors){var e,o=r.dom('
      '),i=function(){e=5,[].slice.call(o.childNodes).forEach(function(i){r.css(o,"bottom",e+"px"),e+=i.offsetWidth+t.options.showMessageErrorOffsetPx})};t.workplace.appendChild(o),t.events.on("errorMessage",function(e,n,a){var s=r.dom('
      '+e+"
      ");o.appendChild(s),i(),setTimeout(function(){s.classList.remove("active"),setTimeout(function(){o.removeChild(s),i()},300)},a||t.options.showMessageErrorTime)})}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(2);r.Config.prototype.controls.fontsize={command:"fontSize",list:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],template:function(t,e,o){return o},tooltip:"Font size"},r.Config.prototype.controls.font={command:"fontname",exec:function(t,e,o){t.execCommand(o.command,!1,o.args[0])},list:{"Helvetica,sans-serif":"Helvetica","Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","'Times New Roman',Times,serif":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},template:function(t,e,o){return''+o+""},tooltip:"Font family"},i.default.plugins.font=function(t){t.events.on("beforeCommand",function(e,o,i){if(/font/.test(e)){switch(e){case"fontsize":t.selection.applyCSS({fontSize:n.normalizeSize(i)});break;case"fontname":t.selection.applyCSS({fontFamily:i})}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(4),r=o(3);o(2).Config.prototype.controls.paragraph={command:"formatBlock",exec:function(t,e,o){t.execCommand(o.command,!1,o.args[0])},list:{p:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},template:function(t,e,o){return"<"+e+' class="jodit_list_element">'+t.i18n(o)+""},tooltip:"Insert format block"},i.default.plugins.formatblock=function(t){t.events.on("beforeCommand",function(e,o,i){if("formatblock"===e){t.selection.focus();var a=!1;if(t.selection.eachSelection(function(e){var o=t.selection.save(),r=!!e&&n.default.up(e,n.default.isBlock,t.editor);if(!r&&e&&(r=n.default.wrap(e,t.options.enter,t)),!r)return t.selection.restore(o),!1;r.tagName.match(/TD|TH|TBODY|TABLE|THEAD/i)?t.selection.isCollapsed()?n.default.wrap(e,i,t):t.selection.applyCSS({},i):n.default.replace(r,i,!0,!1,t.doc),a=!0,t.selection.restore(o)}),!a){var s=n.default.create(i,r.INVISIBLE_SPACE,t.doc);t.selection.insertNode(s,!1),t.selection.setCursorIn(s)}return t.setEditorValue(),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0);n.Config.prototype.iframe=!1,n.Config.prototype.iframeBaseUrl=!1,n.Config.prototype.iframeStyle='html{margin: 0px;}body{padding:10px;background:transparent;color:#000;position:relative;z-index: 2;user-select:auto;margin:0px;overflow:auto;}body:after{content:"";clear:both;display:block}table{width:100%;border: none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}td[data-jodit-selected-cell],th[data-jodit-selected-cell]{border: 1px double #1e88e5}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',n.Config.prototype.iframeCSSLinks=[],i.default.plugins.iframe=function(t){t.events.on("createEditor",function(){if(t.options.iframe){t.iframe=document.createElement("iframe"),t.iframe.style.display="block",t.iframe.src="about:blank",t.iframe.className="jodit_wysiwyg_iframe",t.iframe.frameBorder="0",t.workplace.appendChild(t.iframe);var e=t.iframe.contentWindow.document;if(t.doc=e,t.win=t.iframe.contentWindow,e.open(),e.write('\n \n \n '+(t.options.iframeBaseUrl?'':"")+'\n \n \n '),e.close(),t.editor=e.body,t.options.iframeCSSLinks&&t.options.iframeCSSLinks.forEach(function(t){var o=r.dom('',e);e.head.appendChild(o)}),t.options.iframeStyle){var o=e.createElement("style");o.innerHTML=t.options.iframeStyle,e.head.appendChild(o)}if(r.css(t.iframe,{width:"auto"===t.options.width?"100%":t.options.width,height:t.options.height,minHeight:t.options.minHeight}),"auto"===t.options.height){e.documentElement.style.overflowY="hidden";var i=function(e){r.css(t.iframe,"height",t.editor.offsetHeight)};t.events.on("change afterInit afterSetMode resize",i),t.__on([t.iframe,t.win,e.documentElement],"load",i),t.__on(e,"readystatechange DOMContentLoaded",i)}return r.css(t.editor,"minHeight",t.options.minHeight),function(t){t.matches||(t.matches=Element.prototype.matches)}(t.win.Element.prototype),t.__on(t.win,"mousedown click mouseup mousemove scroll",function(e){t.__fire&&t.__fire(window,e,document)}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0,o(1).default.plugins.imageInlineToolbar=function(t){t.events.on("click",function(t){})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0);i.default.plugins.imageProcessor=function(t){var e,o=function(o){t.__off(o,".imageProcessor").__on(o,"dragstart.imageProcessor",function(t){e=o,t.preventDefault()}).__on(o,"mousedown.imageProcessor",function(){e=o})};t.events.on("change afterInit",function(){t.__on(t.editor,"mousemove",n.throttle(function(o){e&&t.selection.insertCursorAtPoint(o.clientX,o.clientY)},t.options.observer.timeout)).__on(window,"mouseup",function(){e=!1}).__on(t.editor,"mouseup",function(o){var i,n=e;if(n&&o.target!==n){if(!1===t.selection.insertCursorAtPoint(o.clientX,o.clientY))return!1;i=n.parentNode&&"A"===n.parentNode.tagName&&!n.parentNode.textContent.length?n.parentNode:n,i.parentNode.removeChild(i),t.selection.insertImage(i),t.selection.select(i)}})}),t.events.on("change afterInit",n.debounce(function(){t.editor&&n.$$("img",t.editor).forEach(function(e){e.__jodit_imageprocessor_binded||(e.__jodit_imageprocessor_binded=!0,o(e),e.complete||e.addEventListener("load",function o(){t.events&&t.events.fire&&t.events.fire("resize"),e.removeEventListener("load",o)}))})},t.options.observer.timeout))}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(7),s=o(6),l=o(4),d=o(8),c=d.Widget.TabsWidget,u=d.Widget.ImageSelectorWidget;n.Config.prototype.image={openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editMargins:!0,editClass:!0,editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0},i.default.plugins.imageProperties=function(t){var e=function(e){var o,n=this,d=new a.default(t),f=r.dom(''+s.default.getIcon("cancel")+""+t.i18n("Cancel")+""),p=r.dom(''+s.default.getIcon("check")+""+t.i18n("Ok")+""),h={remove:r.dom(''+s.default.getIcon("bin")+" "+t.i18n("Delete")+"")},g=r.dom('
      '),v=r.dom('
      "),m=r.dom('
      '+(t.options.filebrowser.ajax.url||t.options.uploader.url?'
      '+(t.options.filebrowser.ajax.url||t.options.uploader.url?''+s.default.getIcon("image")+"":"")+(t.options.image.useImageEditor&&void 0!==i.default.modules.ImageEditor&&t.options.filebrowser.ajax.url?''+s.default.getIcon("crop")+"":"")+"
      ":"")+'
      '+t.i18n("Open link in new tab")+"
      "),_=n.naturalWidth/n.naturalHeight||1,b=g.querySelector("#imageWidth"),y=g.querySelector("#imageHeight"),w=function(){n.style.cssFloat&&-1!==["left","right"].indexOf(n.style.cssFloat.toLowerCase())?r.val(g,"#align",r.css(n,"float")):"block"===r.css(n,"display")&&"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&r.val(g,"#align","center")},q=function(){r.val(g,"#id",n.getAttribute("id"))},x=function(){r.val(g,"#style",n.getAttribute("style"))},C=function(){r.val(g,"#classes",(n.getAttribute("class")||"").replace(/jodit_focused_image[\s]*/,""))},j=function(){if(t.options.image.editMargins){var e=!1;r.$$(".margins",g).forEach(function(t){var o=n.style[t.id];o&&((/^[0-9]+$/.test(o)||/^[0-9]+px$/i.test(o))&&(o=parseInt(o,10)),t.value=""+o||"",e||"marginTop"===t.id||t.value===r.val(g,"#marginTop")||(g.querySelector(".jodit_lock_margin").innerHTML=s.default.getIcon("unlock"),r.$$(".margins",g).forEach(function(t){return t.classList.remove("disabled")}),e=!0))})}},E=function(){b.value=""+n.offsetWidth,y.value=""+n.offsetHeight},T=function(){n.hasAttribute("title")&&r.val(g,"#imageTitle",n.getAttribute("title")),n.hasAttribute("alt")&&r.val(g,"#imageAlt",n.getAttribute("alt")),l.default.closest(n,"a",t.editor)&&(r.val(g,"#imageLink",l.default.closest(n,"a",t.editor).getAttribute("href")),g.querySelector("#imageLinkOpenInNewTab").checked="_blank"===l.default.closest(n,"a",t.editor).getAttribute("target"))},S=function(){r.val(g,"#imageSrc",n.getAttribute("src")),g.querySelector("#imageViewSrc").setAttribute("src",n.getAttribute("src"))},k=function(){S(),T(),E(),j(),C(),q(),w(),x()},L=!0,M=!0,A={};return A[t.i18n("Image")]=m,A[t.i18n("Advansed")]=v,g.querySelector("#tabsbox").appendChild(c(t,A)),k(),t.events.on(d,"afterClose",function(){d.destruct(),n.parentNode&&t.options.image.selectImageAfterClose&&t.selection.select(n)}),h.remove.addEventListener("click",function(){n.parentNode.removeChild(n),d.close()}),r.$$(".jodit_use_image_editor",m).forEach(function(e){e.addEventListener("mousedown",function(){if(t.options.image.useImageEditor){var e=n.getAttribute("src"),o=document.createElement("a"),i=function(){if(o.host!==location.host)return void a.Confirm(t.i18n("You can only edit your own images. Download this image on the host?"),function(e){e&&t.uploader&&t.uploader.uploadRemoteImage(""+o.href,function(e){a.Alert(t.i18n("The image has been successfully uploaded to the host!"),function(){"string"==typeof e.newfilename&&(n.setAttribute("src",e.baseurl+e.newfilename),S())})},function(e){a.Alert(t.i18n("There was an error loading %s",e.message))})})};o.href=e,t.getInstance("FileBrowser").getPathByUrl(""+o.href,function(i,r,s){t.getInstance("FileBrowser").openImageEditor(o.href,r,i,s,function(){var t=(new Date).getTime();n.setAttribute("src",e+(-1!==e.indexOf("?")?"":"?")+"&_tmp="+t),S()},a.Alert)},function(t){a.Alert(t,i)})}})}),r.$$(".jodit_rechange",m).forEach(function(e){e.addEventListener("mousedown",function(o){e.classList.toggle("active"),t.toolbar.openPopup(e,u(t,{upload:function(e){e.files&&e.files.length&&n.setAttribute("src",e.baseurl+e.files[0]),k(),t.toolbar.closeAll()},filebrowser:function(e){e&&e.files&&Array.isArray(e.files)&&e.files.length&&(n.setAttribute("src",e.files[0]),t.toolbar.closeAll(),k())}},n),!0),o.stopPropagation()})}),g.querySelector(".jodit_lock_helper.jodit_lock_size").addEventListener("click",function(){L=!L,this.innerHTML=s.default.getIcon(L?"lock":"unlock"),t.__fire(b,"change",document)}),g.querySelector(".jodit_lock_helper.jodit_lock_margin").addEventListener("click",function(){M=!M,this.innerHTML=s.default.getIcon(M?"lock":"unlock"),M?r.$$(".margins",g).forEach(function(t){t.matches("#marginTop")||t.setAttribute("disabled","true")}):r.$$(".margins",g).forEach(function(t){t.matches("#marginTop")||t.removeAttribute("disabled")})}),t.__on(r.$$("#imageWidth,#imageHeight",g),"change keydown mousedown paste",function(t){L&&(clearTimeout(o),o=setTimeout(function(){var e=parseInt(b.value,10),o=parseInt(y.value,10);"imageWidth"===t.target.getAttribute("id")?y.value=""+Math.round(e/_):b.value=""+Math.round(o*_)},100))}),d.setTitle([t.i18n("Image properties"),h.remove]),d.setContent(g),f.addEventListener("click",function(){d.close()}),p.addEventListener("click",function(){var e;if(t.options.image.editStyle&&(r.val(g,"#style")?n.setAttribute("style",r.val(g,"#style")):n.removeAttribute("style")),!r.val(g,"#imageSrc"))return n.parentNode.removeChild(n),void d.close();n.setAttribute("src",r.val(g,"#imageSrc")),r.val(g,"#imageTitle")?n.setAttribute("title",r.val(g,"#imageTitle")):n.removeAttribute("title"),r.val(g,"#imageAlt")?n.setAttribute("alt",r.val(g,"#imageAlt")):n.removeAttribute("alt"),r.val(g,"#imageLink")?(l.default.closest(n,"a",t.editor)||l.default.wrap(n,"a",t),e=l.default.closest(n,"a",t.editor),e.setAttribute("href",r.val(g,"#imageLink")),g.querySelector("#imageLinkOpenInNewTab").checked?e.setAttribute("target","_blank"):e.removeAttribute("target")):l.default.closest(n,"a",t.editor)&&(e=l.default.closest(n,"a",t.editor),e.parentNode.replaceChild(n,e));var o=function(t){return t=r.trim(t),/^[0-9]+$/.test(t)?t+"px":t};r.css(n,{width:r.trim(b.value)?o(b.value):null,height:r.trim(y.value)?o(y.value):null}),t.options.image.editMargins&&(g.querySelector(".jodit_lock_margin").firstChild.classList.contains("jodit_icon_unlock")?r.$$(".margins",g).forEach(function(){r.css(n,this.id,o(this.value))}):r.css(n,"margin",o(r.val(g,"#marginTop")))),t.options.image.editClass&&(r.val(g,"#classes")?n.setAttribute("class",r.val(g,"#classes")):n.removeAttribute("class")),t.options.image.editId&&(r.val(g,"#id")?n.setAttribute("id",r.val(g,"#id")):n.removeAttribute("id"));var i=function(){"block"===r.css(n,"display")&&r.css(n,"display",""),"auto"===n.style.marginLeft&&"auto"===n.style.marginRight&&(n.style.marginLeft="",n.style.marginRight="")};t.options.image.editAlign&&(r.val(g,"#align")?-1!==["right","left"].indexOf(r.val(g,"#align").toLowerCase())?(r.css(n,"float",r.val(g,"#align")),i()):(r.css(n,"float",""),r.css(n,{display:"block","margin-left":"auto","margin-right":"auto"})):(r.css(n,"float")&&-1!==["right","left"].indexOf((""+r.css(n,"float")).toLowerCase())&&r.css(n,"float",""),i())),n.getAttribute("style")||n.removeAttribute("style"),t.setEditorValue(),d.close()}),d.setFooter([p,f]),d.setSize(500),d.open(),e&&e.preventDefault(),!1};t.events.on("afterInit",function(){t.options.image.openOnDblClick?t.__on(t.editor,"dblclick","img",e):t.__on(t.editor,"dblclick","img",function(){t.selection.select(this)})}).on("openImageProperties",function(t){e.call(t)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(6),r=o(2),a=o(0),s=o(4),l=o(9),d=o(8),c=d.Widget.ColorPickerWidget,u=d.Widget.TabsWidget;r.Config.prototype.popup={img:[{name:"bin",tooltip:"Delete",exec:function(t,e){e.parentNode.removeChild(e)}},{name:"pencil",exec:function(t,e){"img"===e.tagName.toLowerCase()&&t.events.fire(t,"openImageProperties",[e])},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom"],tooltip:"Vertical align",exec:function(t,e,o){if("img"===e.tagName.toLowerCase()){var i=o.args[1].toLowerCase();a.css(e,"vertical-align",i)}}},{name:"left",list:["Left","Right","Center","Normal"],exec:function(t,e,o){if("img"===e.tagName.toLowerCase()){var i=function(){"block"===a.css(e,"display")&&a.css(e,"display",""),"auto"===e.style.marginLeft&&"auto"===e.style.marginRight&&(e.style.marginLeft="",e.style.marginRight="")},n=o.args[1].toLowerCase();"normal"!==n?-1!==["right","left"].indexOf(n)?(a.css(e,"float",n),i()):(a.css(e,"float",""),a.css(e,{display:"block","margin-left":"auto","margin-right":"auto"})):(a.css(e,"float")&&-1!==["right","left"].indexOf(a.css(e,"float").toLowerCase())&&a.css(e,"float",""),i())}},tooltip:"Horizontal align"}],table:[{name:"brush",popup:function(t,e,o,i){var n,r,s,d,f,p,h=l.default.getAllSelectedCells(e);return!!h.length&&(d=a.css(h[0],"color"),p=a.css(h[0],"background-color"),f=a.css(h[0],"border-color"),n=c(t,function(t){h.forEach(function(e){a.css(e,"background-color",t)}),i()},p),r=c(t,function(t){h.forEach(function(e){a.css(e,"color",t)}),i()},d),s=c(t,function(t){h.forEach(function(e){a.css(e,"border-color",t)}),i()},f),u(t,{Background:n,Text:r,Border:s}))},tooltip:"Background"},{name:"valign",list:["Top","Middle","Bottom"],exec:function(t,e,o){var i=o.args[1].toLowerCase();l.default.getAllSelectedCells(e).forEach(function(t){a.css(t,"vertical-align",i)})},tooltip:"Vertical align"},{name:"splitv",command:"tablesplitv",tooltip:"Split vertical"},{name:"splitg",command:"tablesplitg",tooltip:"Split horizontal"},"\n",{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Add row"},{name:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec:function(t,e,o){t.execCommand(o.args[0].toLowerCase(),!1,e)},tooltip:"Delete"}]},i.default.plugins.Popup=function(t){var e,o=new n.default(t),i=a.dom('
      ',document),r=function(e){t.container&&t.container.classList.toggle("jodit_popup_active",e)},l=function(){i.classList.remove("active"),r(!1)},d=function(e,n,s){var l=e.tagName.toLowerCase();void 0!==t.options.popup[l]&&(i.innerHTML="",o.build(t.options.popup[l],i,e),i.classList.add("active"),a.css(i,{left:n+"px",top:s+"px",marginLeft:-Math.round(i.offsetWidth/2)+"px"}),r(!0))},c=function(o,i,n){clearTimeout(e),t.options.observer.timeout?e=setTimeout(d.bind(t,o,i,n),t.options.observer.timeout):d(o,i,n)};t.events.on("hidePopup afterCommand keydown resize",l).on("showPopap",c).on("afterInit",function(){t.container.appendChild(i),t.__on(i,"mouseup",function(t){t.stopPropagation()});var e=!1;t.__on(t.editor,"mousedown",function(o){if("IMG"===o.target.tagName||s.default.closest(o.target,"table",t.editor)){var i="IMG"===o.target.tagName?o.target:s.default.closest(o.target,"table",t.editor),n=a.offset(i,t);c(i,Math.round(n.left+i.offsetWidth/2),Math.round(n.top+i.offsetHeight)),e=!0}else e=!1}),t.__on(window,"mouseup",function(){e||l(),e=!1})}).on("beforeDestruct",function(){clearTimeout(e)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(0),r=o(4),a=o(2);a.Config.prototype.controls.align={tags:["p","div","span","td","th","img"],name:"left",tooltip:"Align",list:["center","left","right","justify"]},a.Config.prototype.controls.center={command:"justifyCenter",tags:["center"],css:{"text-align":"center"},tooltip:"Align Center"},a.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},a.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},a.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},i.default.plugins.justify=function(t){t.events.on("beforeCommand",function(e){if(/justify/.test(e)){var o=function(o){if(o instanceof t.win.HTMLElement)switch(e){case"justifyfull":o.style.textAlign="justify";break;case"justifyright":o.style.textAlign="right";break;case"justifyleft":o.style.textAlign="left";break;case"justifycenter":o.style.textAlign="center"}};return t.selection.focus(),t.selection.eachSelection(function(e){if(!e&&t.editor.querySelector(".jodit_selected_cell"))return n.$$(".jodit_selected_cell",t.editor).forEach(o),!1;if(e instanceof t.win.Node){var i=!!e&&r.default.up(e,r.default.isBlock,t.editor);!i&&e&&(i=r.default.wrap(e,t.options.enter,t)),o(i)}}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(0),a=o(4);n.Config.prototype.link={followOnDblClick:!0,processVideoLink:!0,processPastedLink:!0,openLinkDialogAfterPost:!0,removeLinkAfterFormat:!0},n.Config.prototype.controls.link={popup:function(t,e,o,i){var n=t.win.getSelection(),s=r.dom('
        
      ");e=!(!e||!a.default.closest(e,"A",t.editor))&&a.default.closest(e,"A",t.editor),e?(r.val(s,"input[name=url]",e.getAttribute("href")),r.val(s,"input[name=text]",e.innerText),s.querySelector("input[name=target]").checked="_blank"===e.getAttribute("target"),s.querySelector("input[name=nofollow]").checked="nofollow"===e.getAttribute("rel")):(s.querySelector(".jodit_unlink_button").style.display="none",r.val(s,"input[name=text]",""+n));var l=t.selection.save();return s.querySelector(".jodit_unlink_button").addEventListener("mousedown",function(){e&&a.default.unwrap(e),i()}),s.addEventListener("submit",function(o){o.preventDefault(),t.selection.restore(l);var n=e||a.default.create("a","",t.doc);return r.val(s,"input[name=url]")?(n.setAttribute("href",r.val(s,"input[name=url]")),n.innerText=r.val(s,"input[name=text]"),s.querySelector("input[name=target]").checked?n.setAttribute("target","_blank"):n.removeAttribute("target"),s.querySelector("input[name=nofollow]").checked?n.setAttribute("rel","nofollow"):n.removeAttribute("rel"),e||t.selection.insertNode(n),i(),!1):(s.querySelector("input[name=url]").focus(),s.querySelector("input[name=url]").classList.add("jodit_error"),!1)}),s},tags:["a"],tooltip:"Insert link"},i.default.plugins.link=function(t){t.options.link.followOnDblClick&&t.events.on("afterInit",function(){t.__on(t.editor,"dblclick","a",function(t){this.getAttribute("href")&&(location.href=this.getAttribute("href"),t.preventDefault())})}),t.options.link.processPastedLink&&t.events.on("processPaste",function(e,o){if(r.isURL(o)){var i=void 0;return r.convertMediaURLToVideoEmbed(o)!==o?i=r.convertMediaURLToVideoEmbed(o):(i=t.doc.createElement("a"),i.setAttribute("href",o),i.innerText=o,t.options.link.openLinkDialogAfterPost&&setTimeout(function(){},100)),i}}),t.options.link.removeLinkAfterFormat&&t.events.on("afterCommand",function(e){var o,i,n=t.selection;"removeFormat"===e&&(i=n.current(),i&&"A"!==i.tagName&&(i=a.default.closest(i,"A",t.editor)),i&&"A"===i.tagName&&(o=i.innerHTML===i.innerText?a.default.create("text",i.innerText,t.doc):a.default.create("span",i.innerHTML,t.doc),i.parentNode.replaceChild(o,i),t.selection.setCursorIn(o,!0)))})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1);o(2).Config.prototype.mobileTapTimeout=300,i.default.plugins.mobile=function(t){var e,o=0;t.events.on("touchend",function(i){i.changedTouches.length&&(e=(new Date).getTime())-o>t.options.mobileTapTimeout&&(o=e,t.selection.insertCursorAtPoint(i.changedTouches[0].clientX,i.changedTouches[0].clientY))}).on("resize afterInit",function(){var e,o=t.container.offsetWidth;e=t.options.sizeLG>o?t.options.sizeMD>o?t.options.sizeSM>o?t.options.buttonsXS:t.options.buttonsSM:t.options.buttonsMD:t.options.buttons,t.toolbar.build(e.concat(t.options.extraButtons),t.container)})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(4),r=o(2);r.Config.prototype.controls.ul={command:"insertUnorderedList",controlName:"ul",tags:["ul"],tooltip:"Insert Unordered List"},r.Config.prototype.controls.ol={command:"insertOrderedList",controlName:"ol",tags:["ol"],tooltip:"Insert Ordered List"},i.default.plugins.orderedlist=function(t){t.events.on("afterCommand",function(e){if(/insert(un)?orderedlist/i.test(e)){var o=n.default.up(t.selection.current(),function(t){return/^UL|OL$/i.test(t.tagName)},t.editor);if(o&&o.parentNode&&"P"===o.parentNode.tagName){var i=t.selection.save();n.default.unwrap(o.parentNode),[].slice.call(o.childNodes).forEach(function(t){t.lastChild&&t.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===t.lastChild.tagName&&t.removeChild(t.lastChild)}),t.selection.restore(i)}t.setEditorValue()}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(7),r=o(0),a=o(2),s=o(3);a.Config.prototype.askBeforePasteHTML=!0,i.default.plugins.paste=function(t){t.events.on("afterInit",function(){t.editor.addEventListener("paste",function(e){if(!1===t.events.fire("beforePaste",[e]))return e.preventDefault(),!1;if(e&&e.clipboardData&&e.clipboardData.getData){var o=void 0,i=e.clipboardData.types,n="",a="";if(Array.isArray(i))for(o=0;i.length>o;o+=1)n+=i[o]+";";else n=i;/text\/html/.test(n)?a=e.clipboardData.getData("text/html"):/text\/rtf/.test(n)&&r.browser("safari")?a=e.clipboardData.getData("text/rtf"):/text\/plain/.test(n)&&!r.browser("mozilla")&&(a=r.htmlentities(e.clipboardData.getData(s.TEXT_PLAIN)).replace(/\n/g,"
      ")),(""!==a||a instanceof t.win.Node)&&(a=t.events.fire("processPaste",[e,a]),("string"==typeof a||a instanceof t.win.Node)&&t.selection.insertHTML(a),e.preventDefault(),e.stopPropagation())}return!1!==t.events.fire("afterPaste",[e])&&void 0})}),t.options.askBeforePasteHTML&&t.events.on("beforePaste",function(e){if(e&&e.clipboardData&&e.clipboardData.getData&&e.clipboardData.types[0]===s.TEXT_PLAIN){var o=e.clipboardData.getData(s.TEXT_PLAIN);if(r.isHTML(o))return n.Confirm(t.i18n("Your code is similar to HTML. Paste as HTML?"),t.i18n("Paste as HTML"),function(e){t.selection.insertHTML(e?o:r.htmlspecialchars(o)),t.setEditorValue()}),!1}})}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0);n.Config.prototype.showPlaceholder=!0,n.Config.prototype.useInputsPlaceholder=!0,n.Config.prototype.placeholder="Type something",i.default.plugins.placeholder=function(t){var e,o;if(t.options.showPlaceholder){this.destruct=function(){e.parentNode.removeChild(e),clearTimeout(o)};var i=function(){var o=0,i=0,n=t.win.getComputedStyle(t.editor);if(t.editor.firstChild&&t.editor.firstChild.nodeType===Node.ELEMENT_NODE){var r=t.win.getComputedStyle(t.editor.firstChild);o=parseInt(r.getPropertyValue("margin-top"),10),i=parseInt(r.getPropertyValue("margin-left"),10),e.style.fontSize=parseInt(r.getPropertyValue("font-size"),10)+"px",e.style.lineHeight=r.getPropertyValue("line-height")}else e.style.fontSize=parseInt(n.getPropertyValue("font-size"),10)+"px",e.style.lineHeight=n.getPropertyValue("line-height");a.each({display:"block",marginTop:Math.max(parseInt(n.getPropertyValue("margin-top"),10),o),marginLeft:Math.max(parseInt(n.getPropertyValue("margin-left"),10),i)},function(t,o){e.style[t]=o})},n=function(){e.style.display="none"},s=function(){if(t.editor)return t.getMode()!==r.MODE_WYSIWYG?n():void(t.getEditorValue()?n():i())};e=a.dom(''+t.i18n(t.options.placeholder)+"",document),t.options.useInputsPlaceholder&&t.element.hasAttribute("placeholder")&&(e.innerHTML=t.element.getAttribute("placeholder")),t.events.on("afterInit",function(){t.workplace.appendChild(e),i(),t.events.fire("placeholder",[e.innerHTML])}).on("change keyup mouseup keydown mousedown afterSetMode",function(){s(),o=setTimeout(s,1)})}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(13),r=o(3),a=o(0),s=o(2);s.Config.prototype.controls.redo={mode:r.MODE_SPLIT,tooltip:"Redo"},s.Config.prototype.controls.undo={mode:r.MODE_SPLIT,tooltip:"Undo"},i.default.plugins.redoundo=function(t){var e=new n.default(t),o=function(){t.events.fire("canRedo",[e.stack.canRedo()]),t.events.fire("canUndo",[e.stack.canUndo()])};t.events.on("keydown",function(e){if(a.ctrlKey(e)&&(e.which===r.KEY_Z||e.which===r.KEY_Y))return t.execCommand(e.which===r.KEY_Z?"Undo":"Redo"),e.preventDefault(),e.stopImmediatePropagation(),!1},null,!0),t.events.on("afterSetMode",function(){t.getMode()===r.MODE_WYSIWYG&&o()}).on("beforeCommand",function(i){if("redo"===i||"undo"===i)return t.getMode()===r.MODE_WYSIWYG&&(e.stack["can"+i.substr(0,1).toUpperCase()+i.substr(1)]()&&e.stack[i](),o()),!1}),this.destruct=function(){e.destruct()}}},function(t,e,o){"use strict";e.__esModule=!0;var i=o(1),n=o(2),r=o(3),a=o(0);n.Config.prototype.useIframeResizer=!0,n.Config.prototype.useTableResizer=!0,n.Config.prototype.useImageResizer=!0,n.Config.prototype.resizer={min_width:10,min_height:10},i.default.plugins.Resizer=function(t){var e,o,i,n,s,l,d,c,u,f,p,h=!1,g=!1,v=!1,m=a.dom('',document),_=function(){g=!1,v=!1,o=null,m.style.display="none"},b=function(){if(v){var e=a.offset(o,t),i=parseInt(m.style.left,10),n=parseInt(m.style.top,10),r=m.offsetWidth,s=m.offsetHeight;n===e.top-1&&i===e.left-1&&r===o.offsetWidth&&s===o.offsetHeight||(m.style.top=e.top-1+"px",m.style.left=e.left-1+"px",m.style.width=o.offsetWidth+"px",m.style.height=o.offsetHeight+"px",t.events&&(t.events.fire(o,"changesize"),isNaN(i)||t.events.fire("resize")))}},y=function(){v=!0,m.style.display="block",b()},w=function(e){var i;if("IFRAME"===e.tagName)if(e.parentNode&&e.parentNode.getAttribute("data-jodit_iframe_wrapper"))e=e.parentNode;else{i=a.dom('',t.doc),i.style.display="inline-block"===e.style.display?"inline-block":"block",i.style.width=e.offsetWidth+"px",i.style.height=e.offsetHeight+"px",e.parentNode.insertBefore(i,e),i.appendChild(e);var n=e;t.events.on(i,"changesize",function(){n.setAttribute("width",i.offsetWidth+"px"),n.setAttribute("height",i.offsetHeight+"px")}),e=i}var r;t.__on(e,"dragstart",_).__on(e,"mousedown",function(t){a.isIE()&&t.preventDefault()}).__on(e,"mousedown touchstart",function(){h=!0,o=e,y(),"IMG"!==o.tagName||o.complete||o.addEventListener("load",function t(){b(),o&&o.removeEventListener("load",t)}),clearTimeout(r),r=setTimeout(function(){h=!1},400)})};a.$$("i",m).forEach(function(r){t.__on(r,"mousedown touchstart",function(a){if(!o||!o.parentNode)return _(),!1;e=r,a.preventDefault(),a.stopImmediatePropagation(),s=o.offsetWidth,l=o.offsetHeight,d=s/l,g=!0,i=a.clientX,n=a.clientY,t.lock("resizer")})}),t.events.on("afterInit",function(){t.container.appendChild(m),t.__on(t.editor,"keydown",function(e){v&&e.keyCode===r.KEY_DELETE&&o&&"table"!==o.tagName.toLowerCase()&&("JODIT"!==o.tagName?t.selection.select(o):(o.parentNode.removeChild(o),_(),e.preventDefault()))}).__on(window,"mousemove touchmove",function(r){g&&(f=r.clientX-i,p=r.clientY-n,"IMG"===o.tagName?f?(u=s+(e.className.match(/left/)?-1:1)*f,c=Math.round(u/d)):(c=l+(e.className.match(/top/)?-1:1)*p,u=Math.round(c*d)):(u=s+(e.className.match(/left/)?-1:1)*f,c=l+(e.className.match(/top/)?-1:1)*p),u>t.options.resizer.min_width&&(o.style.width=m.parentNode.offsetWidth>u?u+"px":"100%"),c>t.options.resizer.min_height&&(o.style.height=c+"px"),b(),r.stopImmediatePropagation())}).__on(window,"resize",function(){v&&b()}).__on(window,"mouseup keydown touchend",function(e){v&&!h&&(g?(t.unlock(),g=!1,t.setEditorValue(),e.stopImmediatePropagation()):_())}),t.__on([window,t.editor],"scroll",function(){v&&!g&&_()})}).on("afterGetValueFromEditor",function(t){t.value=t.value.replace(/]+data-jodit_iframe_wrapper[^>]+>(.*?]+>[\s\n\r]*<\/iframe>.*?)<\/jodit>/gi,"$1")}).on("change afterInit afterSetMode",a.debounce(function(){v&&(o&&o.parentNode?b():_()),a.$$("img, table, iframe",t.editor).forEach(function(e){t.getRealMode()===r.MODE_WYSIWYG&&!e.__jodit_resizer_binded&&("IFRAME"===e.tagName&&t.options.useIframeResizer||"IMG"===e.tagName&&t.options.useImageResizer||"TABLE"===e.tagName&&t.options.useTableResizer)&&(e.__jodit_resizer_binded=!0,w(e))})},t.options.observer.timeout))}},function(t,e,o){"use strict";var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function i(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}();e.__esModule=!0;var n=o(1),r=o(2),a=o(3),s=o(0),l=o(5);r.Config.prototype.useAceEditor=!0,r.Config.prototype.sourceEditorNativeOptions={theme:"ace/theme/textmate",mode:"ace/mode/html",highlightActiveLine:!0},r.Config.prototype.sourceEditorCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js","//cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ext-emmet.js"],r.Config.prototype.beautifyHTMLCDNUrlsJS=["//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify.min.js","//cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.12/beautify-html.min.js"],r.Config.prototype.controls.source={mode:a.MODE_SPLIT,exec:function(t){t.toggleMode()},tooltip:"Change mode"},n.default.plugins.source=function(t){function e(e){var o=t.call(this,e)||this;return o.className="jodit_ace_editor",o.loadNext=function(t,e,i,n){if(void 0===i&&(i="aceReady"),void 0===n&&(n=o.className),i&&void 0===e[t]&&o.jodit&&o.jodit.events)return void o.jodit.events.fire(i);void 0!==e[t]&&s.appendScript(e[t],function(){o.loadNext(t+1,e,i,n)},n)},o.fromWYSIWYG=function(t){if(void 0===t&&(t=!1),!o.__lock&&(o.jodit.getRealMode()===a.MODE_SOURCE||!0===t)){var e=o.jodit.getEditorValue();e!==o.getMirrorValue()&&o.setMirrorValue(e)}},o.__lock=!1,o.toWYSIWYG=function(){o.__lock=!0,o.jodit.setEditorValue(o.getMirrorValue()),o.__lock=!1},o.autosize=function(){o.mirror.style.height="auto",o.mirror.style.height=o.mirror.scrollHeight+"px"},o.getNormalPosition=function(t,e){for(var o=t;o>0;){if(o--,"<"===e[o]&&void 0!==e[o+1]&&e[o+1].match(/[\w\/]+/i))return o;if(">"===e[o])return t}return t},o.tempMarkerStart="{start-jodit-selection}",o.tempMarkerEnd="{end-jodit-selection}",o.__clear=function(t){return t.replace(a.INVISIBLE_SPACE_REG_EXP,"")},o.selInfo=[],o.getSelectionStart=function(){return o.mirror.selectionStart},o.getSelectionEnd=function(){return o.mirror.selectionEnd},o.setMirrorSelectionRange=function(t,e){o.mirror.setSelectionRange(t,e)},o.saveSelection=function(){if(o.jodit.getMode()===a.MODE_WYSIWYG)o.selInfo=o.jodit.selection.save()||[],o.jodit.setEditorValue(),o.fromWYSIWYG(!0);else{o.selInfo.length=0;var t=o.getMirrorValue();if(o.getSelectionStart()===o.getSelectionEnd()){var e=o.jodit.selection.marker(!0);o.selInfo[0]={startId:e.id,collapsed:!0,startMarker:e.outerHTML};var i=o.getNormalPosition(o.getSelectionStart(),o.getMirrorValue());o.setMirrorValue(t.substr(0,i)+o.__clear(o.selInfo[0].startMarker)+t.substr(i))}else{var n=o.jodit.selection.marker(!0),r=o.jodit.selection.marker(!1);o.selInfo[0]={startId:n.id,endId:r.id,collapsed:!1,startMarker:n.outerHTML,endMarker:r.outerHTML};var i=o.getNormalPosition(o.getSelectionStart(),t),s=o.getNormalPosition(o.getSelectionEnd(),t);o.setMirrorValue(t.substr(0,i)+o.__clear(o.selInfo[0].startMarker)+t.substr(i,s-i)+o.__clear(o.selInfo[0].endMarker)+t.substr(s))}o.toWYSIWYG()}},o.restoreSelection=function(){if(o.selInfo.length){if(o.jodit.getMode()===a.MODE_WYSIWYG)return o.__lock=!0,o.jodit.selection.restore(o.selInfo),void(o.__lock=!1);o.selInfo[0].startMarker&&o.setMirrorValue(o.getMirrorValue().replace(o.__clear(o.selInfo[0].startMarker),o.tempMarkerStart)),o.selInfo[0].endMarker&&o.setMirrorValue(o.getMirrorValue().replace(o.__clear(o.selInfo[0].endMarker),o.tempMarkerEnd)),window.html_beautify&&o.setMirrorValue(window.html_beautify(o.getMirrorValue()));var t=o.getMirrorValue().indexOf(o.tempMarkerStart),e=t;o.setMirrorValue(o.getMirrorValue().replace(o.tempMarkerStart,"")),o.selInfo[0].collapsed&&-1!==t||(e=o.getMirrorValue().indexOf(o.tempMarkerEnd),-1===t&&(t=e)),o.setMirrorValue(o.getMirrorValue().replace(o.tempMarkerEnd,"")),o.setMirrorSelectionRange(t,e),o.toWYSIWYG(),o.setFocusToMirror()}},o.mirrorContainer=s.dom('
      ',document),o.mirror=s.dom('