!function(){vara={},b=function(b){for(varc=a[b],e=c.deps,f=c.defn,g=e.length,h=newArray(g),i=0;i<g;++i)h[i]=d(e[i]);varj=f.apply(null,h);if(void0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeofb)throw"module id must be a string";if(void0===c)throw"no dependencies for "+b;if(void0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void0}},d=function(c){vard=a[c];if(void0===d)throw"module ["+c+"] was undefined";returnvoid0===d.instance&&b(c),d.instance},e=function(a,b){for(varc=a.length,e=newArray(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};varg=c,h=function(a,b){g(a,[],function(){returnb})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){returna("tinymce.Env")}),g("2",["6"],function(a){returna("tinymce.PluginManager")}),g("3",["6"],function(a){returna("tinymce.util.JSON")}),g("4",["6"],function(a){returna("tinymce.util.Tools")}),g("5",["6"],function(a){returna("tinymce.util.XHR")}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){returnb.add("image",function(b){functionf(a,b){functionc(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}vard=document.createElement("img");d.onload=function(){c(Math.max(d.width,d.clientWidth),Math.max(d.height,d.clientHeight))},d.onerror=function(){c()};vare=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}functiong(a,b,c){functione(a,c){returnc=c||[],d.each(a,function(a){vard={text:a.text||a.title};a.menu?d.menu=e(a.menu):(d.value=a.value,b(d)),c.push(d)}),c}returne(a,c||[])}functionh(a){returnfunction(){vard=b.settings.image_list;"string"==typeofd?e.send({url:d,success:function(b){a(c.parse(b))}}):"function"==typeofd?d(a):a(d)}}functioni(c){functione(){vara,b,c,d;a=o.find("#width")[0],b=o.find("#height")[0],a&&b&&(c=a.value(),d=b.value(),o.find("#constrain")[0].checked()&&r&&s&&c&&d&&(r!=c?(d=Math.round(c/r*d),isNaN(d)||b.value(d)):(c=Math.round(d/s*c),isNaN(c)||a.value(c))),r=c,s=d)}functionh(){functiona(a){functionc(){a.onload=a.onerror=null,b.selection&&(b.selection.select(a),b.nodeChanged())}a.onload=function(){v.width||v.height||!x||w.setAttribs(a,{width:a.clientWidth,height:a.clientHeight}),c()},a.onerror=c}varc,f;m(),e(),v=d.extend(v,o.toJSON()),v.alt||(v.alt=""),v.title||(v.title=""),""===v.width&&(v.width=null),""===v.height&&(v.height=null),v.style||(v.style=null),v={src:v.src,alt:v.alt,title:v.title,width:v.width,height:v.height,style:v.style,caption:v.caption,"class":v["class"]},b.undoManager.transact(function(){functiond(a){returnb.schema.getTextBlockElements()[a.nodeName]}if(!v.src)returnvoid(p&&(w.remove(p),b.focus(),b.nodeChanged()));if(""===v.title&&(v.title=null),p?w.setAttribs(p,v):(v.id="__mcenew",b.focus(),b.selection.setContent(w.createHTML("img",v)),p=w.get("__mcenew"),w.setAttrib(p,"id",null)),b.editorUpload.uploadImagesAuto(),v.caption===!1&&w.is(p.parentNode,"figure.image")&&(c=p.parentNode,w.insertAfter(p,c),w.remove(c)),v.caption!==!0)a(p);elseif(!w.is(p.parentNode,"figure.image")){f=p,p=p.cloneNode(!0),c=w.create("figure",{"class":"image"}),c.appendChild(p),c.appendChild(w.create("figcaption",{contentEditable:!0},"Caption")),c.contentEditable=!1;vare=w.getParent(f,d);e?w.split(e,f,c):w.replace(c,f),b.selection.select(c)}})}functioni(a){returna&&(a=a.replace(/px$/,"")),a}functionj(a){varc,e,g,h=a.meta||{};t&&t.value(b.convertURL(this.value(),"src")),d.each(h,function(a,b){o.find("#"+b).value(a)}),h.width||h.height||(c=b.convertURL(this.value(),"src"),e=b.settings.image_prepend_url,g=newRegExp("^(?:[a-z]+:)?//","i"),e&&!g.test(c)&&c.substring(0,e.length)!==e&&(c=e+c),this.value(c),f(b.documentBaseURI.toAbsolute(this.value()),function(a){a.width&&a.height&&x&&(r=a.width,s=a.height,o.find("#width").value(r),o.find("#height").value(s))}))}functionk(a){a.meta=o.toJSON()}functionl(a){if(a.margin){varb=a.margin.split(" ");switch(b.length){case1:a["margin-top"]=a["margin-top"]||b[0