!function(){"use strict";vari,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},l=function(e){return!0===e.settings.image_advtab},m=function(e){returne.getParam("image_prepend_url","")},n=function(e){returne.getParam("image_class_list")},r=function(e){return!1!==e.settings.image_description},a=function(e){return!0===e.settings.image_title},o=function(e){return!0===e.settings.image_caption},u=function(e){returne.getParam("image_list",!1)},c=function(e){returne.getParam("images_upload_url",!1)},s=function(e){returne.getParam("images_upload_handler",!1)},g=function(e){returne.getParam("images_upload_url")},f=function(e){returne.getParam("images_upload_handler")},p=function(e){returne.getParam("images_upload_base_path")},h=function(e){returne.getParam("images_upload_credentials")},v="undefined"!=typeofwindow?window:Function("return this;")(),b=function(e,t){returnfunction(e,t){for(varn=t!==undefined&&null!==t?t:v,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];returnn}(e.split("."),t)},y={getOrDie:function(e,t){varn=b(e,t);if(n===undefined||null===n)throwe+" not available on this browser";returnn}},x=tinymce.util.Tools.resolve("tinymce.util.Promise"),w=tinymce.util.Tools.resolve("tinymce.util.Tools"),C=tinymce.util.Tools.resolve("tinymce.util.XHR"),S=function(e,t){returnMath.max(parseInt(e,10),parseInt(t,10))},N=function(e,n){varr=document.createElement("img");functiont(e,t){r.parentNode&&r.parentNode.removeChild(r),n({width:e,height:t})}r.onload=function(){t(S(r.width,r.clientWidth),S(r.height,r.clientHeight))},r.onerror=function(){t(0,0)};vara=r.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left="0px",a.width=a.height="auto",document.body.appendChild(r),r.src=e},_=function(e,a,t){returnfunctionn(e,r){returnr=r||[],w.each(e,function(e){vart={text:e.text||e.title};e.menu?t.menu=n(e.menu):(t.value=e.value,a(t)),r.push(t)}),r}(e,t||[])},T=function(e){returne&&(e=e.replace(/px$/,"")),e},A=function(e){return0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},R=function(e){if(e.margin){vart=e.margin.split(" ");switch(t.length){case1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}deletee.margin}returne},t=function(e,t){varn=u(e);"string"==typeofn?C.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeofn?n(t):t(n)},I=function(e,t,n){functionr(){n.onload=n.onerror=null,e.selection&&(e.selection.select(n),e.nodeChanged())}n.onload=function(){t.width||t.height||!d(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},O=function(r){returnnewx(function(e,t){varn=new(y.getOrDie("FileReader"));n.onload=function(){e(n.result)},n.onerror=function(){t(n.error.message)},n.readAsDataURL(r)})},L=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),P=Object.prototype.hasOwnProperty,U=(i=function(e,t){returnt},function(){for(vare=newArray(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)thrownewError("Can't merge zero objects");for(varn={},r=0;r<e.length;r++){vara=e[r];for(varoina)P.call(a,o)&&(n[o]=i(n[o],a[o]))}returnn}),E=L.DOM,k=function(e){returne.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?T(e.style.marginLeft):""},M=function(e){returne.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?T(e.style.marginTop):""},D=function(e){returne.style.borderWidth?T(e.