!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=function(e){return!1!==e.settings.image_dimensions},i=function(e){return!0===e.settings.image_advtab},g=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},l=function(e){returne.getParam("image_list",!1)},u=function(e){returne.getParam("images_upload_url",!1)},c=function(e){returne.getParam("images_upload_handler",!1)},s=function(e){returne.getParam("images_upload_url")},m=function(e){returne.getParam("images_upload_handler")},f=function(e){returne.getParam("images_upload_base_path")},p=function(e){returne.getParam("images_upload_credentials")},h="undefined"!=typeofwindow?window:Function("return this;")(),v=function(e,t){returnfunction(e,t){for(varn=t!==undefined&&null!==t?t:h,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];returnn}(e.split("."),t)},t={getOrDie:function(e,t){varn=v(e,t);if(n===undefined||null===n)throwe+" not available on this browser";returnn}};functionb(){returnnew(t.getOrDie("FileReader"))}vary,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||[])},A=function(e){returne&&(e=e.replace(/px$/,"")),e},T=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},I=function(e,t){varn=l(e);"string"==typeofn?C.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeofn?n(t):t(n)},O=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},L=function(r){returnnewx(function(e,t){varn=newb;n.onload=function(){e(n.result)},n.onerror=function(){t(b.error.message)},n.readAsDataURL(r)})},P=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),U=Object.prototype.hasOwnProperty,E=(y=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)U.call(a,o)&&(n[o]=y(n[o],a[o]))}returnn}),k=P.DOM,M=function(e){returne.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?A(e.style.marginLeft):""},D=function(e){returne.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?A(e.style.marginTop):""},z=function(e){r