(function(){"use strict";page.using={texts:["button_text","email_text"],types:["Emails"]};var e,t;page.onLoad=function(){e=u8.Base.Widgets.Popup.getFromElement(window,{closeCancelable:false});$assert(e,"This page is expected to be called from within a popup.");var s=e.__data,i=e.__options;$assert(s&&i);this.commandBindings=$.extend(this.commandBindings,{apply:a,cancel:n});$("#buttons").utml({itemOptions:{parent:this}});t=new u8.Crm.Widgets.EmailMessageEditor($el("editor"),{parent:this,data:s,options:i})};function a(){if(!t.apply()){return}e.close()}function n(){e.close({cancel:true,cancelable:false})}})();