!function(){"use strict";function c(e){"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){var t;e.fullName&&e.email?e.full=e.fullName+" <"+e.email+">":e.email?e.full="<"+e.email+">":e.full="",e.signature&&(t=angular.element("
"+e.signature+"
"),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim())}),c.$log.debug("Account: "+JSON.stringify(e,void 0,2)))}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,s,n,i,a,o,r){return angular.extend(c,{$q:e,$timeout:t,$log:s,$$resource:new i(n.activeUser("folderURL")+"Mail",n.activeUser()),$Preferences:a,$Mailbox:o,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var s=[];return angular.forEach(e,function(e,t){e.id=t,s[t]=new c(e)}),c.$accounts=s},c.refreshUnseenCount=function(e){var t,s=1===c.$Preferences.defaults.SOGoMailFetchAllUnseenCountFolders,n=c.$Preferences.defaults.SOGoRefreshViewCheck;if(s)t=[];else{if(!e)throw Error("SOGoMailFetchAllUnseenCountFolders is disabled and no folders list provided");t=e}_.forEach(c.$accounts,function(e){s?_.forEach(e.$$flattenMailboxes,function(e){t.push(e.id)}):(_.includes(t,e.id+"/folderINBOX")||t.push(e.id+"/folderINBOX"),_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(e.unseenCount)&&!_.includes(t,e.id)&&t.push(e.id)}))}),c.$$resource.post("","unseenCount",{mailboxes:t}).then(function(t){_.forEach(c.$accounts,function(e){_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(t[e.id])&&(e.unseenCount=t[e.id])})})}),n&&"manually"!=n&&(c.$refreshUnseenCount&&c.$timeout.cancel(c.$refreshUnseenCount),c.$refreshUnseenCount=c.$timeout(angular.bind(this,c.refreshUnseenCount,e),1e3*n.timeInterval()))},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t=this.$flattenMailboxes();return 0<=e&&e"+e.signature+""),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()):e.textSignature="",e.textSignature},c.prototype.$hasCertificate=function(){return this.security&&this.security.hasCertificate},c.prototype.$certificate=function(){var t=this;return this.$hasCertificate()?this.$$certificate?c.$q.when(this.$$certificate):c.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e}):c.$q.reject()},c.prototype.$removeCertificate=function(){var e=this;return c.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){e.security.hasCertificate=!1})},c.prototype.updateQuota=function(e){var t,s;e.maxQuota?(t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,s=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100)):e.maxMessages&&(t=Math.round(1e4*e.messagesCount/e.maxMessages)/100,s=l("messageQuotasFormat").formatted(t,e.maxMessages)),this.$quota={percent:t,description:s}},c.prototype.$newMessage=function(n){var i=this;return c.$$resource.fetch(this.id.toString(),"compose").then(function(e){return c.$log.debug("New message (compose): "+JSON.stringify(e,void 0,2)),new c.$Message(e.accountId,i.$getMailboxByPath(e.mailboxPath),e)}).then(function(s){return c.$$resource.fetch(s.$absolutePath({asDraft:!0}),"edit").then(function(e){var t=c.$Preferences.defaults.AuxiliaryMailAccounts[i.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0)),c.$log.debug("New message (edit): "+JSON.stringify(e,void 0,2)),angular.extend(s.editable,e),s.isNew=!0,n&&n.mailto&&(angular.isObject(n.mailto)?angular.extend(s.editable,n.mailto):s.$parseMailto(n.mailto)),s})})},c.prototype.$addDelegate=function(e){var t=this,s=c.$q.defer(),n={uid:e.uid};return!e.uid||-1<_.indexOf(_.map(this.delegates,"uid"),e.uid)?s.resolve():c.$$resource.fetch(this.id.toString(),"addDelegate",n).then(function(){t.delegates.push(e),s.resolve(t.users)},function(e,t){s.reject(l("An error occured, please try again."))}),s.promise},c.prototype.$removeDelegate=function(t){var s=this,e={uid:t};return c.$$resource.fetch(this.id.toString(),"removeDelegate",e).then(function(){var e=_.indexOf(_.map(s.delegates,"uid"),t);0<=e&&s.delegates.splice(e,1)})},c.prototype.$omit=function(){var s={},t=[],n=!1;return angular.forEach(this,function(e,t){"constructor"!=t&&"identities"!=t&&"$"!=t[0]&&(s[t]=angular.copy(e))}),_.forEach(this.identities,function(e){e.isReadOnly||t.push(_.pick(e,["email","fullName","replyTo","signature","isDefault"])),e.isDefault&&(n=e)}),s.identities=t,n&&s.forceDefaultIdentity||delete s.forceDefaultIdentity,s}}(),function(){"use strict";function d(e,t){this.$account=e,"function"!=typeof t.then?(this.init(t),this.name&&!this.path&&(e=d.$$resource.create("createFolder",this.name),this.$unwrap(e))):this.$unwrap(t)}d.$factory=["$q","$timeout","$log","sgSettings","Resource","Message","Acl","Preferences","sgMailbox_PRELOAD","sgMailbox_BATCH_DELETE_LIMIT",function(e,t,s,n,i,a,o,r,l,c){return angular.extend(d,{$q:e,$timeout:t,$log:s,$$resource:new i(n.activeUser("folderURL")+"Mail",n.activeUser()),$Message:a,$$Acl:o,$Preferences:r,$query:{sort:"arrival",asc:0},selectedFolder:null,$refreshTimeout:null,$virtualMode:!1,$virtualPath:!1,PRELOAD:l,BATCH_DELETE_LIMIT:c}),r.settings.Mail.SortingState&&(d.$query.sort=r.settings.Mail.SortingState[0],d.$query.asc=parseInt(r.settings.Mail.SortingState[1])),d}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").constant("sgMailbox_PRELOAD",{LOOKAHEAD:50,SIZE:100}).constant("sgMailbox_BATCH_DELETE_LIMIT",1e3).factory("Mailbox",d.$factory),d.$find=function(e,t){t=t&&t.all?this.$$resource.fetch(e.id.toString(),"viewAll"):this.$$resource.fetch(e.id.toString(),"view");return d.$unwrapCollection(e,t)},d.$unwrapCollection=function(n,e){var s=[],i=function(e,t){t.isSentFolder=t.isSentFolder||"sent"==t.type;for(var s=0;sr.uids.length-1)&&(c.$topIndex=0),r.syncToken&&(c.$syncToken=r.syncToken),r.deleted&&(_.forEachRight(r.deleted,function(e,t){e=c.uidsMap[e.toString()];(e<0||!c.$messages[e])&&r.deleted.splice(t,1)}),r.deleted.length&&c.$_deleteMessages(r.deleted)),r.changed){var i,o=0;if(_.forEach(r.changed,function(e){angular.isUndefined(c.uidsMap[e.toString()])&&(c.uidsMap[e]=o,c.$messages.splice(o,0,{uid:e}),n=!0,o++)}),0",e.name.length<10?e.shortname=e.name:e.name.split(" ").length&&(e.shortname=_.first(_.last(e.name.split(/, */)).split(/ +/)).replace("'",""))):e.email&&(e.full="<"+e.email+">",e.shortname=e.email.split("@")[0]),e.image=r.$avatar(e.email,32),0<=_.indexOf(s,e.email)&&(e.shortname=l("me"))})})},r.prototype.$shortRecipients=function(s){var t=this,n=[],i=0,a=0;return _.forEach(["to","cc","bcc"],function(e){a+=t[e]?t[e].length:0,_.forEach(t[e],function(e,t){i"}),n={to:e},_.forEach(["subject","body"],function(e){var t=new RegExp(e+"=([^&]+)");e="body"==e?"text":e,(i=t.exec(s))&&(n[e]=decodeURIComponent(i[1]))}),_.forEach(["cc","bcc"],function(e){var t=new RegExp(e+"=([^&]+)");(i=t.exec(s))&&(n[e]=_.map(decodeURIComponent(i[1]).split(","),function(e){return"<"+e.trim()+">"}))}),angular.extend(this.editable,n))},r.prototype.$reply=function(){return this.$newDraft("reply")},r.prototype.$replyAll=function(){return this.$newDraft("replyall")},r.prototype.$forward=function(){return this.$newDraft("forward")},r.prototype.$newDraft=function(n){var i=this;return r.$$resource.fetch(this.$absolutePath(),n).then(function(e){var t,s;return r.$log.debug("New "+n+": "+JSON.stringify(e,void 0,2)),t=i.$mailbox.$account.$getMailboxByPath(e.mailboxPath),s=new r(e.accountId,t,e),r.$$resource.fetch(s.$absolutePath({asDraft:!0}),"edit").then(function(e){r.$log.debug("New "+n+": "+JSON.stringify(e,void 0,2)+" original UID: "+i.uid);var t=r.$Preferences.defaults.AuxiliaryMailAccounts[i.$mailbox.$account.id];return t.security&&(t.security.alwaysSign&&(e.sign=!0),t.security.alwaysEncrypt&&(e.encrypt=!0)),e.isHTML&&(t=(t=(t=(t=(t=(t=(t=e.text).replace(/<\/?html[^>]*>/g,"")).replace(/<\/?body[^>]*>/g,"")).replace(/]*>.*<\/meta>/g,"")).replace(/]*>.*<\/link>/g,"")).replace(/]*>.*<\/base>/g,"")).replace(/]*>.*<\/title>/g,""),e.text=t),angular.extend(s.editable,e),s.origin={message:i,action:n},s})})},r.prototype.$save=function(){var t=this,e=this.$omit();return r.$log.debug("save = "+JSON.stringify(e,void 0,2)),r.$$resource.save(this.$absolutePath({asDraft:!0}),e).then(function(e){r.$log.debug("save = "+JSON.stringify(e,void 0,2)),t.$setUID(e.uid),t.$reload(),t.isNew=!1})},r.prototype.$send=function(){var t=this,e=this.$omit();return r.$log.debug("send = "+JSON.stringify(e,void 0,2)),r.$$resource.post(this.$absolutePath({asDraft:!0}),"send",e).then(function(e){return"success"==e.status?(angular.isDefined(t.origin)&&(t.origin.action.startsWith("reply")?t.origin.message.isanswered=!0:"forward"==t.origin.action&&(t.origin.message.isforwarded=!0)),e):r.$q.reject(e.data)})},r.prototype.$unwrap=function(e){var t=this;return this.$loaded=r.STATUS.DELAYED_LOADING,r.$timeout(function(){t.$loaded!=r.STATUS.LOADED&&(t.$loaded=r.STATUS.LOADING)},r.STATUS.DELAYED_MS),this.$futureMessageData=e.then(function(e){return 0===t.isread&&(t.isread=!0,t.$mailbox.unseenCount--),r.$timeout(function(){return delete t.$parts,t.$loaded=r.STATUS.LOADED,t.init(e),t})}),this.$futureMessageData},r.prototype.$omit=function(e){var s={},n=e&&e.privateAttributes,e=n?this:this.editable;return angular.forEach(e,function(e,t){_.includes(["to","cc","bcc"],t)&&!n?s[t]=_.map(e,function(e){return e.toString()}):("constructor"!=t&&"$"!=t[0]||n)&&(s[t]=e)}),s},r.prototype.downloadArchive=function(){var e={uids:[this.uid]},t={filename:this.subject+".zip"};return r.$$resource.download(this.$mailbox.id,"saveMessages",e,t)},r.prototype.download=function(){var e={filename:this.subject+".eml"};return r.$$resource.download(this.$absolutePath(),"export",void 0,e)},r.prototype.downloadAttachmentsArchive=function(){var e={filename:l("attachments")+"-"+this.uid+".zip"};return r.$$resource.download(this.$absolutePath(),"archiveAttachments",null,e)}}(),function(){"use strict";function d(){this.show=!1,this.message=null,this.elements=[]}d.$factory=["$document","$timeout","$mdPanel","sgHotkeys",function(e,t,s,n){return angular.extend(d,{$document:e,$timeout:t,$mdPanel:s,sgHotkeys:n}),new d}],d.prototype.setMessage=function(e){this.message=e},d.prototype.registerImage=function(e){this.elements.push(e)},d.prototype.registerHotkeys=function(e){this.keys=[d.sgHotkeys.createHotkey({key:"left",description:l("View previous item"),callback:angular.bind(e,e.previousImage)}),d.sgHotkeys.createHotkey({key:"right",description:l("View next item"),callback:angular.bind(e,e.nextImage)})],_.forEach(this.keys,function(e){d.sgHotkeys.registerHotkey(e)})},d.prototype.showGallery=function(e,t){var s=this,n=d.$mdPanel,i=angular.element(this.message.$content()[t].content).find("img")[0].src,a=function(e,t){_.forEach(e,function(e){"UIxMailPartImageViewer"==e.type?t.push(e):"string"!=typeof e.content&&a(e.content,t)})},o=[];a(this.message.$content(),o);var r=_.findIndex(o,function(e){return 0<=i.indexOf(e.viewURL)});angular.element(d.$document[0].body).addClass("sg-image-gallery-backdrop");var c=n.newPanelPosition().absolute(),t=n.newPanelAnimation().openFrom(e.target).duration(100).withAnimation(n.animation.FADE),e={attachTo:angular.element(document.body),locals:{lastIndex:o.length-1,images:o,selectedIndex:r,selectedImage:o[r]},bindToController:!0,controller:u,controllerAs:"$panelCtrl",position:c,animation:t,targetEvent:e,fullscreen:!0,hasBackdrop:!0,template:['','
',' '," arrow_back"," ",' image','
',' '," file_download"," ","
",'
',' '," navigate_before"," ",' ',' '," navigate_next"," ","
",'
','
',' ',"
","
","
"].join(""),trapFocus:!0,clickOutsideToClose:!0,escapeToClose:!0,focusOnOpen:!0,onOpenComplete:function(){s.show=!0,_.forEach(d.$document.find("sg-image-gallery")[0].getElementsByClassName("sg-image-thumbnail"),function(e){var t=e.children[0];angular.element(t).one("load",function(){t.naturalWidtht.length?(n=_.difference(s,t),_.forEach(n,function(e){S.message.addTag(e)})):s.lengths.$lastVisibleIndex&&(s.$topIndex=t-(s.$lastVisibleIndex-s.$topIndex))})):i.go("mail.account.mailbox").then(function(){n=null,delete s.$selectedMessage})}catch(e){}}S.closePopup()}i=e.messageCtrl?(s=e.mailboxCtrl.selectedFolder,n=e.messageCtrl.message,e.messageCtrl.$state):(s=g,n=f,c),(s=C.$virtualMode?C.selectedFolder:s).$deleteMessages([n]).then(t,function(e){F(v.confirm(l("Warning"),l("The message could not be moved to the trash folder. Would you like to delete it immediately?"),{ok:l("Delete")}).then(function(){s.$deleteMessages([n],{withoutTrash:!0}).then(t).finally(function(){F(null)})}).finally(function(){F(null)}))})},this._showMailEditorInPopup=function(e){return!$.isPopup&&"popup"==y.defaults.SOGoMailComposeWindow&&(this.openInPopup(e),!0)},this.close=function(){var e=C.$virtualMode?"mail.account.virtualMailbox":"mail.account.mailbox";c.go(e).then(function(){S.message=null,delete g.$selectedMessage})},this.reply=function(e){this._showMailEditorInPopup("reply")||P(e,this.message.$reply())},this.replyAll=function(e){this._showMailEditorInPopup("replyall")||P(e,this.message.$replyAll())},this.forward=function(e){this._showMailEditorInPopup("forward")||P(e,this.message.$forward())},this.edit=function(e){this._showMailEditorInPopup("edit")||this.message.$editableContent().then(function(){P(e,S.message)})},this.openInPopup=function(e){var t=[$.baseURL(),"UIxMailPopupView#!/Mail",this.message.accountId,p(p(this.message.$mailbox.path)),this.message.uid].join("/"),s=this.message.$absolutePath();e&&(t+="/"+e),n.open(t,s,["width=680","height=520","resizable=1","scrollbars=1","toolbar=0","location=0","directories=0","status=0","menubar=0","copyhistory=0"].join(","))},this.closePopup=function(){n.document.body.classList.contains("popup")&&n.close()},this.newMessage=function(t,e){"A"===t.target.tagName&&(t.stopPropagation(),t.preventDefault()),this.account.$newMessage({mailto:e}).then(function(e){P(t,e)})},this.toggleRawSource=function(e){this.showRawSource||this.message.$rawSource?this.showRawSource=!this.showRawSource:w.$$resource.post(this.message.id,"viewsource").then(function(e){S.message.$rawSource=e,S.showRawSource=!0})},this.print=function(e){n.print()},this.convertToEvent=function(e){return T(e,"appointment")},this.convertToTask=function(e){return T(e,"task")}}e.$inject=["$window","$scope","$q","$state","$mdMedia","$mdDialog","$mdPanel","sgConstant","stateAccounts","stateAccount","stateMailbox","stateMessage","sgHotkeys","encodeUriFilter","sgSettings","ImageGallery","sgFocus","Dialog","Preferences","Calendar","Component","Account","Mailbox","Message","AddressBook","Card"],angular.module("SOGo.MailerUI").controller("MessageController",e)}(),function(){"use strict";function e(e,s,t,n,i,a,o,r,c,u,d,h,g,f,m,p,$,b,v){var y=this;function M(){var e,t={};try{s.opener&&"$mailboxController"in s.opener&&"selectedFolder"in s.opener.$mailboxController&&("draft"==s.opener.$mailboxController.selectedFolder.type?(t.draftMailboxCtrl=s.opener.$mailboxController,"$messageController"in s.opener&&s.opener.$messageController.message.uid==d.uid&&(t.draftMessageCtrl=s.opener.$messageController)):d.origin&&(e=d.origin.message,s.opener.$mailboxController.selectedFolder.$id()==e.$mailbox.$id()&&(t.originMailboxCtrl=s.opener.$mailboxController)))}catch(e){}return t}function x(){y.uploader.url=y.message.$absolutePath({asDraft:!0,withResourcePath:!0})+"/save"}function C(){var e,t,s=y.message.editable.attachmentAttrs;if(s)for(e=0;e",s="
[ \n]?"," "):(s=t="\n"," "),i=e&&e.signature?t+t+"--"+n+t+e.signature:"",!_.find(this.identities,function(e,t){if(e.signature){e=new RegExp(s+s+"--"+n+s+e.signature.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&"));if(0<=y.message.editable.text.search(e))return y.message.editable.text=y.message.editable.text.replace(e,i),!0}return!1})&&0 |
',' '," "," ",'

'," {{$ctrl.mailbox.$icon}}",' ',' ',"

",' ',' '," ",' more_vert'].join(""),controller:"sgMailboxListItemController",controllerAs:"$ctrl"}})}(),function(){function e(t,e,s){var n=this;this.$onInit=function(){var e=["uid","isread","isflagged","flags","loading"];"draft"==(this.MailboxService=s).selectedFolder.type&&e.push("subject"),t.$watch(function(){return n.message?[_.pick(n.message,e)]:null},function(e,t){n.message&&n.onUpdate()},!0)},this.onUpdate=function(){this.message.loading?e.addClass("sg-skeleton"):(e.removeClass("sg-skeleton"),this.message.isread?e.removeClass("unread"):e.addClass("unread"),s.selectedFolder.isSelectedMessage(this.message.uid,this.message.$mailbox.path)?e.addClass("md-default-theme md-accent md-bg md-hue-2"):e.removeClass("md-default-theme md-accent md-bg md-hue-2"))},this.setVisibility=function(e,t){t?e.classList.remove("ng-hide"):e.classList.add("ng-hide")}}e.$inject=["$scope","$element","Mailbox"],angular.module("SOGo.MailerUI").controller("sgMessageListItemController",e).directive("sgMessageListItem",function(){return{restrict:"C",scope:{},bindToController:{message:"=sgMessage"},controller:"sgMessageListItemController"}})}(),function(){function e(n,l,e,t,c,s,i,a,o){var u=this;this.$postLink=function(){var t,e,s,o,r;this.parentController=n.parentController,o=this.parentController.onUpdate,r=this.parentController.setVisibility,_.forEach(l.find("div"),function(e){e.classList.contains("sg-tile-content")?t=angular.element(e):e.classList.contains("sg-tile-icons")&&(s=angular.element(e))}),e=t.find("button")[0],this.threadButton=e,e=angular.element(e),this.threadIconElement=e.find("md-icon")[0],this.threadCountElement=e.find("span")[0],this.priorityIconElement=t.find("md-icon")[0],i.$virtualMode&&(this.mailboxNameElement=t.find("span")[0],this.mailboxNameElement.classList.remove("ng-hide")),this.senderElement=t.find("span")[1],_.forEach(t.find("div"),function(e){e.classList.contains("sg-tile-subject")?u.subjectElement=e:e.classList.contains("sg-tile-size")?u.sizeElement=e:e.classList.contains("sg-tile-date")&&(u.dateElement=e)}),_.forEach(s.find("md-icon"),function(e){"star"==e.textContent?u.flagIconElement=e:"reply"==e.textContent?u.answerIconElement=e:"forward"==e.textContent?u.forwardIconElement=e:"attach_file"==e.textContent&&(u.attachmentIconElement=e)}),this.parentController.onUpdate=function(){var e;if(u.message=u.parentController.message,!u.message.loading){var t=l[0].querySelector(".sg-category-dot-container"),s=angular.element(t),n=c.nodesToArray(t.querySelectorAll(".sg-category-dot"));for(_.forEach(n,function(e){t.removeChild(e)}),e=0;e')).css("background-color",u.service.$tags[a][1]),s.append(i))}u.mailboxNameElement&&(u.mailboxNameElement.innerHTML=u.message.$mailbox.$displayName),u.MailboxService.selectedFolder.isSentFolder?u.senderElement.innerHTML=u.message.$shortAddress("to").encodeEntities():u.senderElement.innerHTML=u.message.$shortAddress("from").encodeEntities(),u.message.priority&&u.message.priority.level<3?(u.priorityIconElement.classList.remove("ng-hide"),u.message.priority.level<2?u.priorityIconElement.classList.add("md-warn"):u.priorityIconElement.classList.remove("md-warn")):u.priorityIconElement.classList.add("ng-hide"),u.message.first?(u.threadButton.classList.remove("ng-hide"),u.threadCountElement.innerHTML=u.message.threadCount,u.message.collapsed&&u.threadIconElement.classList.remove("md-rotate-180-ccw")):u.threadButton.classList.add("ng-hide"),u.subjectElement.innerHTML=u.message.subject.encodeEntities(),u.sizeElement.innerHTML=u.message.size,u.dateElement.innerHTML=u.message.relativedate,r(u.flagIconElement,u.message.isflagged),r(u.answerIconElement,u.message.isanswered),r(u.forwardIconElement,u.message.isforwarded),r(u.attachmentIconElement,u.message.hasattachment)}angular.bind(u.parentController,o)()},this.service=a,this.MailboxService=i},this.toggleThread=function(){this.message.collapsed?this.threadIconElement.classList.add("md-rotate-180-ccw"):this.threadIconElement.classList.remove("md-rotate-180-ccw"),this.message.toggleThread()}}e.$inject=["$scope","$element","$parse","$state","$mdUtil","$mdToast","Mailbox","Message","encodeUriFilter"],angular.module("SOGo.MailerUI").controller("sgMessageListItemMainController",e).directive("sgMessageListItemMain",function(){return{restrict:"C",require:"^^sgMessageListItem",scope:{},template:['
','
',"
",' \x3c!-- mailbox --\x3e',' error'," \x3c!-- sender or recipient --\x3e","
",'
\x3c!-- date --\x3e
',"
",'
','
\x3c!-- categories --\x3e
','
\x3c!-- subject --\x3e
','
\x3c!-- size --\x3e
',' ',' expand_more'," ","
","
",'
',' star',' reply',' forward',' attach_file',"
",'
',' \x3c!-- message loading progress --\x3e',"
"].join(""),link:function(e,t,s,n){e.parentController=n},controller:"sgMessageListItemMainController",controllerAs:"$ctrl"}})}(),function(){"use strict";function e(e,t){var s=this;this.$postLink=function(){t.registerImage(e),e.on("click",this.showImage)},this.showImage=function(e){"IMG"==e.target.tagName&&t.showGallery(e,s.partIndex)}}e.$inject=["$element","ImageGallery"],angular.module("SOGo.MailerUI").directive("sgZoomableImage",function(){return{restrict:"A",bindToController:{partIndex:"=sgZoomableImage"},controller:e}})}(); //# sourceMappingURL=Mailer.services.js.map