!function(){"use strict";vare=tinymce.util.Tools.resolve("tinymce.PluginManager"),d={hasDimensions:function(e){return!1!==e.settings.image_dimensions},hasAdvTab:function(e){return!0===e.settings.image_advtab},getPrependUrl:function(e){returne.getParam("image_prepend_url","")},getClassList:function(e){returne.getParam("image_class_list")},hasDescription:function(e){return!1!==e.settings.image_description},hasImageTitle:function(e){return!0===e.settings.image_title},hasImageCaption:function(e){return!0===e.settings.image_caption},getImageList:function(e){returne.getParam("image_list",!1)},hasUploadUrl:function(e){returne.getParam("images_upload_url",!1)},hasUploadHandler:function(e){returne.getParam("images_upload_handler",!1)},getUploadUrl:function(e){returne.getParam("images_upload_url")},getUploadHandler:function(e){returne.getParam("images_upload_handler")},getUploadBasePath:function(e){returne.getParam("images_upload_base_path")},getUploadCredentials:function(e){returne.getParam("images_upload_credentials")}},a="undefined"!=typeofwindow?window:Function("return this;")(),r=function(e,t){for(varn=t!==undefined&&null!==t?t:a,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];returnn},i=function(e,t){varn=e.split(".");returnr(n,t)},t={getOrDie:function(e,t){varn=i(e,t);if(n===undefined||null===n)throwe+" not available on this browser";returnn}};functiono(){returnnew(t.getOrDie("FileReader"))}varn=tinymce.util.Tools.resolve("tinymce.util.Promise"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=tinymce.util.Tools.resolve("tinymce.util.XHR"),u=function(e,t){returnMath.max(parseInt(e,10),parseInt(t,10))},g={getImageSize: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(u(r.width,r.clientWidth),u(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},buildListItems:function(e,a,t){returnfunctionn(e,r){returnr=r||[],f.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||[])},removePixelSuffix:function(e){returne&&(e=e.replace(/px$/,"")),e},addPixelSuffix:function(e){return0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},mergeMargins: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},createImageList:function(e,t){varn=d.getImageList(e);"string"==typeofn?l.send({url:n,success:function(e){t(JSON.parse(e))}}):"function"==typeofn?n(t):t(n)},waitLoadImage: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.hasDimensions(e)||e.dom.setAttribs(n,{width:n.clientWidth,height:n.clientHeight}),r()},n.onerror=r},blobToDataUri:function(r){returnnewn(function(e,t){varn=newo;n.onload=function(){e(n.result)},n.onerror=function(){t(o.error.message)},n.readAsDataURL(r)})}},s=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),c=function(t){returnfunction(e){returnfunction(e){if(null===e)return"null";vart=typeofe;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},m={isString:c("string"),isObject:c("object"