!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("5",tinymce.util.Tools.resolve),g("1",["5"],function(a){returna("tinymce.PluginManager")}),g("2",["5"],function(a){returna("tinymce.dom.DOMUtils")}),g("3",["5"],function(a){returna("tinymce.EditorManager")}),g("4",["5"],function(a){returna("tinymce.util.Tools")}),g("0",["1","2","3","4"],function(a,b,c,d){returna.add("save",function(a){functione(){vard;if(d=b.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty())returnc.triggerSave(),a.getParam("save_onsavecallback")?(a.execCallback("save_onsavecallback",a),voida.nodeChanged()):void(d?(a.setDirty(!1),d.onsubmit&&!d.onsubmit()||("function"==typeofd.submit?d.submit():f(a.translate("Error: Form submit field collision."))),a.nodeChanged()):f(a.translate("Error: No form element found.")))}functionf(b){a.notificationManager.open({text:b,type:"error"})}functiong(){varb=d.trim(a.startContent);returna.getParam("save_oncancelcallback")?voida.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),voida.nodeChanged())}functionh(){varb=this;a.on("nodeChange dirty",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",e),a.addCommand("mceCancel",g),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:h}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:h}),a.addShortcut("Meta+S","","mceSave")}),function(){}}),d("0")()}();