/home/ivoiecob/email.hirewise-va.com/static/js/6010.app.7f8a52cd6f04566b4edf.min.js
(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[6010],{"1+/O":(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("sdEb"),r={getTimeListStepHour:function(e,t){return e=e||"HH:mm",t=t||"k",i.map(["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"],function(s){var i=o(s,"HH:mm");return{text:i.format(e),value:i.format(t)}})},getTimeListStepHalfHour:function(e){return i.map(["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"],function(t){var s=o(t,"HH:mm").format(e);return{text:s,value:s}})},getDateFormatForDatePicker:function(e){return e.replace("MM","mm").replace("DD","dd").replace("YYYY","yy").replace("Month","MM")}};e.exports=r},DSoz:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("M4cL"),r=s("p09A"),n=s("ERH9"),a=s("uQaC"),l=s("yU9o"),h=s("/Odb"),c=s("PMEU");function u(e,t,s,a,h,c,u,d,p,m,g){this.active=r.observable(!1),this.fSelectCallback=t||function(){},this.fDeleteCallback=s||function(){},this.fDblClickCallback=!l.isMobile()&&a?a:function(){},this.fEnterCallback=h||function(){},this.bResetCheckedOnClick=!!u,this.bCheckOnSelect=!!d,this.bUnselectOnCtrl=!!p,this.bDisableMultiplySelection=!!m,this.bChangeOnSelect=void 0===g||!!g,this.useKeyboardKeys=r.observable(!1),this.list=r.observableArray([]),e&&e.subscribe&&e.subscribe(function(e){this.list(e)},this),this.multiplyLineFactor=c,this.oLast=null,this.oListScope=null,this.oScrollScope=null,this.iTimer=0,this.iFactor=1,this.KeyUp=Enums.Key.Up,this.KeyDown=Enums.Key.Down,this.KeyLeft=Enums.Key.Up,this.KeyRight=Enums.Key.Down,this.multiplyLineFactor&&(this.multiplyLineFactor.subscribe?this.multiplyLineFactor.subscribe(function(e){this.iFactor=0<e?e:1},this):this.iFactor=n.pInt(this.multiplyLineFactor),this.KeyUp=Enums.Key.Up,this.KeyDown=Enums.Key.Down,this.KeyLeft=Enums.Key.Left,this.KeyRight=Enums.Key.Right,o("html").hasClass("rtl")&&(this.KeyLeft=Enums.Key.Right,this.KeyRight=Enums.Key.Left)),this.sActionSelector="",this.sSelectableSelector="",this.sCheckboxSelector="";var b=this;this.listChecked=r.computed({read:function(){return i.filter(this.list(),function(e){var t=e&&e.checked&&e.checked(),s=e&&e.selected&&e.selected();return t||b.bCheckOnSelect&&s})},write:function(e){e=!!e,i.each(this.list(),function(t){t.checked(e)}),this.list.valueHasMutated()},owner:this}),this.checkAll=r.computed({read:function(){return 0<this.listChecked().length},write:function(e){this.listChecked(!!e)},owner:this}),this.selectorHook=r.observable(null),this.selectorHook.subscribe(function(){this.active()&&this.selectorHook()&&this.selectorHook().selected(!1)},this,"beforeChange"),this.selectorHook.subscribe(function(){this.active()&&this.selectorHook()&&this.selectorHook().selected(!0)},this),this.itemSelected=r.computed({read:this.selectorHook,write:function(e){this.selectorHook(e),e&&(b.scrollToSelected(),this.oLast=e)},owner:this}),this.list.subscribe(function(e){var t=this.itemSelected();Array.isArray(e)&&t&&e.find(function(e){return"function"==typeof t.isEqual?t.isEqual(e):t===e})||this.itemSelected(null)},this),this.listCheckedOrSelected=r.computed({read:function(){var e=this.itemSelected(),t=this.listChecked();return 0<t.length?t:e?[e]:[]},write:function(e){e?this.listChecked(!0):(this.itemSelected(null),this.listChecked(!1))},owner:this}),this.listCheckedAndSelected=r.computed({read:function(){var e=[],t=this.itemSelected(),s=this.listChecked();return s&&(e=s.slice(0)),t&&-1===i.indexOf(s,t)&&e.push(t),e},write:function(e){e?this.listChecked(!0):(this.itemSelected(null),this.listChecked(!1))},owner:this}),this.isIncompleteChecked=r.computed(function(){var e=this.list().length,t=this.listChecked().length;return 0<e&&0<t&&e>t},this),this.onKeydownBound=i.bind(this.onKeydown,this)}u.prototype.iTimer=0,u.prototype.bResetCheckedOnClick=!1,u.prototype.bCheckOnSelect=!1,u.prototype.bUnselectOnCtrl=!1,u.prototype.bDisableMultiplySelection=!1,u.prototype.getLastOrSelected=function(){var e=0,t=null;return i.each(this.list(),function(s){s&&i.isFunction(s.checked)&&(s.checked()&&e++,s.selected()&&(t=s))}),0===e&&t?t:this.oLast},u.prototype.unbind=function(){this.active(!1),this.itemSelected()&&this.itemSelected().selected(!1),o(document).off("keydown",this.onKeydownBound),o(this.oListScope).off()},u.prototype.initOnApplyBindings=function(e,t,s,i,n){this.active(!0),o(document).on("keydown",this.onKeydownBound),this.oListScope=i,this.oScrollScope=n,this.sActionSelector=e,this.sSelectableSelector=t,this.sCheckboxSelector=s;var a=this,l=function(e,t,s){var i=0,o=0,r=null,n=!1,l=!1,h=[],c=!1;if(t=t||null,s&&s.shiftKey&&null!==t&&null!==e&&t!==e)for(h=a.list(),c=t.checked(),i=0,o=h.length;i<o;i++)n=!1,(r=h[i])!==e&&r!==t||(n=!0),n&&(l=!l),(l||n)&&r&&r.checked&&r.checked(c);t&&(a.oLast=t)};o(this.oListScope).on("dblclick",e,function(e){var t=r.dataFor(this);!t||!e||e.ctrlKey||e.altKey||e.shiftKey||a.onDblClick(t)}),h.mobileDevice&&o(this.oListScope).on("touchstart",e,function(e){if(e){var t=e.timeStamp,s=t-(o(this).data("lastTouch")||t),i=e.originalEvent&&e.originalEvent.touches?e.originalEvent.touches.length:0;o(this).data("lastTouch",t),!s||s>250||i>1||(e.preventDefault(),o(this).trigger("dblclick"))}}),o(this.oListScope).on("click",e,function(e){var t=!0,s=null,i=a.getLastOrSelected(),o=r.dataFor(this);o&&e&&(e.shiftKey?(t=!1,a.bDisableMultiplySelection||(null===a.oLast&&(a.oLast=o),o.checked(!o.checked()),l(i,o,e))):(e.ctrlKey||e.metaKey)&&(t=!1,a.bDisableMultiplySelection||(a.oLast=o,!(s=a.itemSelected())||s.checked()||o.checked()||s.checked(!0),a.bUnselectOnCtrl&&o===a.itemSelected()?(o.checked(!o.selected()),a.itemSelected(null)):o.checked(!o.checked()))),t&&a.selectionFunc(o))}),o(this.oListScope).on("click",s,function(e){var t=r.dataFor(this);t&&e&&!a.bDisableMultiplySelection&&(e.shiftKey?(null===a.oLast&&(a.oLast=t),l(a.getLastOrSelected(),t,e)):a.oLast=t),e&&e.stopPropagation&&e.stopPropagation()}),o(this.oListScope).on("dblclick",s,function(e){e&&e.stopPropagation&&e.stopPropagation()})},u.prototype.getResultSelection=function(e,t){var s=this,r=!1,n=!1,a=null,l=this.iFactor,h=!!this.multiplyLineFactor,c=0,u=0,d=[];if(!e&&-1<o.inArray(t,[this.KeyUp,this.KeyDown,this.KeyLeft,this.KeyRight,Enums.Key.PageUp,Enums.Key.PageDown,Enums.Key.Home,Enums.Key.End]))(d=this.list())&&0<d.length&&(-1<o.inArray(t,[this.KeyDown,this.KeyRight,Enums.Key.PageUp,Enums.Key.Home])?a=d[0]:-1<o.inArray(t,[this.KeyUp,this.KeyLeft,Enums.Key.PageDown,Enums.Key.End])&&(a=d[d.length-1]));else if(e&&0<(u=(d=this.list())?d.length:0))if(Enums.Key.Home===t||Enums.Key.PageUp===t||Enums.Key.End===t||Enums.Key.PageDown===t||h&&(Enums.Key.Left===t||Enums.Key.Right===t)||!h&&(Enums.Key.Up===t||Enums.Key.Down===t))i.each(d,function(i){if(!r)switch(t){case s.KeyUp:case s.KeyLeft:e===i?r=!0:a=i;break;case Enums.Key.Home:case Enums.Key.PageUp:a=i,r=!0;break;case s.KeyDown:case s.KeyRight:n?(a=i,r=!0):e===i&&(n=!0);break;case Enums.Key.End:case Enums.Key.PageDown:a=i}});else if(h&&this.KeyDown===t){for(;c<u;c++)if(e===d[c]){u-1<(c+=l)&&(c-=l),a=d[c];break}}else if(h&&this.KeyUp===t)for(c=u;c>=0;c--)if(e===d[c]){0>(c-=l)&&(c+=l),a=d[c];break}return a},u.prototype.shiftClickResult=function(e,t,s){if(t){var r=!!this.multiplyLineFactor,n=!1,a=!1;-1<o.inArray(s,r?[Enums.Key.Left,Enums.Key.Right]:[Enums.Key.Up,Enums.Key.Down])?t.checked(!t.checked()):-1<o.inArray(s,r?[Enums.Key.Up,Enums.Key.Down,Enums.Key.PageUp,Enums.Key.PageDown,Enums.Key.Home,Enums.Key.End]:[Enums.Key.Left,Enums.Key.Right,Enums.Key.PageUp,Enums.Key.PageDown,Enums.Key.Home,Enums.Key.End])&&(a=!t.checked(),i.each(this.list(),function(s){var i=!1;s!==e&&t!==s||(n=!n,i=!0),(n||i)&&(s.checked(a),i=!1)}),r&&e&&(s===Enums.Key.Up||s===Enums.Key.Down)&&e.checked(!e.checked()))}},u.prototype.clickNewSelectPosition=function(e,t){var s=this.itemSelected(),i=this.getResultSelection(s,e);i&&(t&&this.shiftClickResult(i,s,e),this.selectionFunc(i))},u.prototype.onKeydown=function(e){var t=!0,s=0;return this.useKeyboardKeys()&&e&&!a.isTextFieldFocused()&&!c.hasOpenedMaximizedPopups()&&(s=e.keyCode,e.ctrlKey||this.KeyUp!==s&&this.KeyDown!==s&&this.KeyLeft!==s&&this.KeyRight!==s&&Enums.Key.PageUp!==s&&Enums.Key.PageDown!==s&&Enums.Key.Home!==s&&Enums.Key.End!==s?Enums.Key.Del!==s||e.ctrlKey||e.shiftKey?Enums.Key.Enter===s?0<this.list().length&&!e.ctrlKey&&(this.onEnter(this.itemSelected()),t=!1):!e.ctrlKey||e.altKey||e.shiftKey||Enums.Key.a!==s||(this.checkAll(!(this.checkAll()&&!this.isIncompleteChecked())),t=!1):0<this.list().length&&(this.onDelete(),t=!1):(this.clickNewSelectPosition(s,e.shiftKey),t=!1)),t},u.prototype.onDelete=function(){this.fDeleteCallback.call(this,this.listCheckedOrSelected())},u.prototype.onEnter=function(e){e&&this.fEnterCallback.call(this,e)},u.prototype.selectionFunc=function(e){this.bChangeOnSelect&&this.itemSelected(null),this.bResetCheckedOnClick&&this.listChecked(!1),this.bChangeOnSelect&&this.itemSelected(e),this.fSelectCallback.call(this,e)},u.prototype.onDblClick=function(e){this.fDblClickCallback.call(this,e)},u.prototype.koCheckAll=function(){return r.computed({read:this.checkAll,write:this.checkAll,owner:this})},u.prototype.koCheckAllIncomplete=function(){return r.computed({read:this.isIncompleteChecked,write:this.isIncompleteChecked,owner:this})},u.prototype.scrollToSelected=function(){if(!(this.oListScope&&this.oScrollScope&&this.oScrollScope[0]&&this.oScrollScope[0].isConnected))return!1;var e=o(this.sSelectableSelector,this.oScrollScope),t=e[0]?e[0].offsetTop:void 0,s=this.oScrollScope.height(),i=this.oScrollScope.scrollTop(),r=e.outerHeight();return!(t&&t>=i&&t<=i+s-r||(t<i+s&&t+r>i+s?this.oScrollScope.scrollTop(t+r+20-s):this.oScrollScope.scrollTop(t-20),0))},e.exports=u},"FZR+":(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("M4cL"),r=s("p09A"),n=s("uQaC"),a=s("yU9o");function l(e,t){this.bShown=!1,this.currentPage=r.observable(1),this.count=r.observable(e),this.perPage=r.observable(t),this.firstPage=r.observable(1),this.lastPage=r.observable(1),this.pagesCount=r.computed(function(){var e=this.perPage()>0?Math.ceil(this.count()/this.perPage()):0;return e>0?e:1},this),r.computed(function(){var e=20,t=4,s=this.pagesCount(),i=this.currentPage(),o=i,r=i;if(s>1)for(;e--,1<o&&(o--,t--),0!==t&&(s>r&&(r++,t--),0!==t)&&0!==e;);this.firstPage(o),this.lastPage(r)},this),this.visibleFirst=r.computed(function(){return this.firstPage()>1},this),this.visibleLast=r.computed(function(){return this.lastPage()<this.pagesCount()},this),this.clickPage=i.bind(this.clickPage,this),this.pages=r.computed(function(){var e=this.firstPage(),t=[];if(this.firstPage()<this.lastPage())for(;e<=this.lastPage();e++)t.push({number:e,current:e===this.currentPage(),clickFunc:this.clickPage});return t},this),a.isMobile()||this.hotKeysBind()}l.prototype.ViewTemplate="CoreWebclient_PageSwitcherView",l.prototype.hotKeysBind=function(){o(document).on("keydown",o.proxy(function(e){if(this.bShown&&!n.isTextFieldFocused()){var t=e.keyCode;e.ctrlKey&&t===Enums.Key.Left?this.clickPreviousPage():e.ctrlKey&&t===Enums.Key.Right&&this.clickNextPage()}},this))},l.prototype.hide=function(){this.bShown=!1},l.prototype.show=function(){this.bShown=!0},l.prototype.clear=function(){this.currentPage(1),this.count(0)},l.prototype.setCount=function(e){this.count(e),this.currentPage()>this.pagesCount()&&this.currentPage(this.pagesCount())},l.prototype.setPage=function(e,t){this.perPage(t),e>this.pagesCount()?this.currentPage(this.pagesCount()):this.currentPage(e)},l.prototype.clickPage=function(e){var t=e.number;t<1&&(t=1),t>this.pagesCount()&&(t=this.pagesCount()),this.currentPage(t)},l.prototype.clickFirstPage=function(){this.currentPage(1)},l.prototype.clickPreviousPage=function(){var e=this.currentPage()-1;e<1&&(e=1),this.currentPage(e)},l.prototype.clickNextPage=function(){var e=this.currentPage()+1;e>this.pagesCount()&&(e=this.pagesCount()),this.currentPage(e)},l.prototype.clickLastPage=function(){this.currentPage(this.pagesCount())},e.exports=l},HVVA:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("p09A"),r=s("LKDt"),n=s("yU9o"),a=s("5D2l"),l=s("ioSH"),h=s("D2Gh"),c=s("KIwC"),u=s("PMEU"),d=s("k0bD"),p=s("Fj7m"),m=s("eGl8"),g=s("Ua3z");function b(){this.folderList=m.folderList,this.folderFullName=o.computed(function(){var e=m.getCurrentFolder();return e?e.fullName():""},this),this.unifiedInboxAllowed=p.unifiedInboxAllowed,this.oUnifiedInbox=m.oUnifiedInbox,this.manageFoldersHash=o.computed(function(){if(a.isModuleEnabled("SettingsWebclient")){var e=p.getCurrent();if(e&&e.allowManageFolders())return l.buildHashFromArray(["settings","mail-accounts","account",e.hash(),"folders"])}return"#"},this),this.quotaProc=o.observable(-1),this.quotaDesc=o.observable(""),this.bShowQuotaBarTextAsTooltip=c.ShowQuotaBarTextAsTooltip,c.ShowQuotaBar&&o.computed(function(){m.quotaChangeTrigger();var e=p.getCurrent(),t=e?e.quota():0,s=e?e.usedSpace():0,i=0<t?Math.ceil(s/t*100):-1;return i=100<i?100:i,this.quotaProc(i),this.quotaDesc(-1<i?r.i18n("COREWEBCLIENT/INFO_QUOTA",{PROC:i,QUOTA:r.getFriendlySize(1024*t)}):""),c.QuotaWarningPerc>0&&-1!==i&&c.QuotaWarningPerc>100-i&&h.showError(r.i18n("COREWEBCLIENT/WARNING_QUOTA_ALMOST_REACHED"),!0),!0},this),this.visibleNewFolderButton=o.computed(function(){return g.AllowAddNewFolderOnMainScreen&&this.folderList().collection().length>0},this),this.underNewMessageButtonControllers=o.observableArray([]),this.underInboxFolderControllers=o.observableArray([]),this.folderListControllers=o.computed(function(){return this.underNewMessageButtonControllers().concat(this.underInboxFolderControllers())},this),n.broadcastEvent("MailWebclient::RegisterFolderListController",i.bind(function(e,t){this.registerController(e,t)},this))}b.prototype.ViewTemplate="MailWebclient_FoldersView",b.prototype.onShow=function(){this.folderListControllers().forEach(function(e){i.isFunction(e.onShow)&&e.onShow()})},b.prototype.onRoute=function(e){this.folderListControllers().forEach(function(t){i.isFunction(t.onRoute)&&t.onRoute(e)})},b.prototype.addNewFolder=function(){u.showPopup(d)},b.prototype.registerController=function(e,t){switch(t){case"UnderNewMessageButton":this.underNewMessageButtonControllers.push(e);break;case"UnderInboxFolder":this.underInboxFolderControllers.push(e)}},e.exports=b},Qz84:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("M4cL"),r=s("p09A"),n=s("LKDt"),a=s("ERH9"),l=s("uQaC"),h=s("yU9o"),c=s("ioSH"),u=s("zVyH"),d=s("db2p"),p=s("sXLm"),m=s("dpSB"),g=s("Fj7m"),b=s("eGl8"),f=s("Ua3z"),y=s("HVVA"),S=s("sLMx"),M=s("nM5h");function C(){var e=this;d.call(this,"MailWebclient"),h.broadcastEvent("MailWebclient::ConstructView::before",{Name:this.ViewConstructorName,View:this,MailCache:b}),this.browserTitle=r.computed(function(){return g.getEmail()+" - "+n.i18n("MAILWEBCLIENT/HEADING_BROWSER_TAB")}),this.folderList=b.folderList,this.domFoldersMoveTo=r.observable(null),this.openMessageInNewWindowBound=i.bind(this.openMessageInNewWindow,this),this.oFolderList=new y,this.isUnifiedFolderCurrent=b.oUnifiedInbox.selected,this.oBaseMessageList=new S(this.openMessageInNewWindowBound),this.messageList=r.observable(this.oBaseMessageList),this.isSearchMultiFolders=r.computed(function(){return this.messageList().searchFoldersMode()===Enums.SearchFoldersMode.Sub||this.messageList().searchFoldersMode()===Enums.SearchFoldersMode.All},this),this.oBaseMessagePaneView=M,this.messagePane=r.observable(this.oBaseMessagePaneView),this.messagePane().openMessageInNewWindowBound=this.openMessageInNewWindowBound,this.messagePane.subscribe(function(){this.bindMessagePane(),this.messagePane().expandMessagePaneWidth=this.expandMessagePaneWidth},this),this.expandListPaneWidth=r.observable(!1),this.expandMessagePaneWidth=r.observable(!1),this.messagePane().expandMessagePaneWidth=this.expandMessagePaneWidth,b.currentMessage.subscribe(function(){b.currentMessage()||this.expandMessagePaneWidth(!1)},this),this.isEnableGroupOperations=r.computed(function(){return e.messageList().isEnableGroupOperations()}),this.sCustomBigButtonModule="",this.fCustomBigButtonHandler=null,this.customBigButtonText=r.observable(""),this.bigButtonCommand=l.createCommand(this,function(){i.isFunction(this.fCustomBigButtonHandler)?this.fCustomBigButtonHandler():this.executeCompose()}),this.bigButtonText=r.computed(function(){return""!==this.customBigButtonText()?this.customBigButtonText():n.i18n("MAILWEBCLIENT/ACTION_NEW_MESSAGE")},this),this.isTemplateFolder=r.computed(function(){return b.isTemplateFolder(b.getCurrentFolderFullname())},this),this.checkMailCommand=l.createCommand(this,this.executeCheckMail),this.checkMailIndicator=r.observable(!0).extend({throttle:50}),r.computed(function(){this.checkMailIndicator(b.checkMailStarted()||b.messagesLoading())},this),this.customModulesDisabledMark=r.observableArray([]),this.visibleMarkTool=r.computed(function(){return!this.isTemplateFolder()&&!a.isNonEmptyArray(this.customModulesDisabledMark())},this),this.markAsReadCommand=l.createCommand(this.messageList(),function(){e.messageList().executeMarkAsRead()},this.isEnableGroupOperations),this.markAsUnreadCommand=l.createCommand(this.messageList(),function(){e.messageList().executeMarkAsUnread()},this.isEnableGroupOperations),this.markAllReadCommand=l.createCommand(this.messageList(),function(){e.messageList().executeMarkAllRead()}),this.customModulesDisabledMove=r.observableArray([]),this.visibleMoveTool=r.computed(function(){return!b.oUnifiedInbox.selected()&&!a.isNonEmptyArray(this.customModulesDisabledMove())},this),this.needToCopyDraggedItems=r.observable(!1),this.moveToFolderTemplate="MailWebclient_Messages_MoveButtonView",this.moveToFolderCommand=l.createCommand(this,function(){},this.isEnableGroupOperations),this.deleteCommand=l.createCommand(this.messageList(),function(){e.messageList().executeDelete()},this.isEnableGroupOperations),this.selectedCount=r.computed(function(){return this.messageList().checkedUids().length},this),this.emptyTrashCommand=l.createCommand(b,b.executeEmptyTrash,function(){return e.messageList().isNotEmptyList()}),this.emptySpamCommand=l.createCommand(b,b.executeEmptySpam,function(){return e.messageList().isNotEmptyList()}),this.spamCommand=l.createCommand(this.messageList(),function(){e.messageList().executeSpam()},this.isEnableGroupOperations),this.notSpamCommand=l.createCommand(this.messageList(),function(){e.messageList().executeNotSpam()},this.isEnableGroupOperations),this.isSpamFolder=r.computed(function(){return b.getCurrentFolderType()===Enums.FolderTypes.Spam},this),this.customModulesDisabledSpam=r.observableArray([]),this.allowedSpamAction=r.computed(function(){return f.AllowSpamFolder&&this.folderList().spamFolder()&&!this.isSpamFolder()&&!this.isTemplateFolder()&&!a.isNonEmptyArray(this.customModulesDisabledSpam())},this),this.allowedNotSpamAction=r.computed(function(){return f.AllowSpamFolder&&this.isSpamFolder()&&!this.isTemplateFolder()},this),this.isTrashFolder=r.computed(function(){return b.getCurrentFolderType()===Enums.FolderTypes.Trash},this),f.HorizontalLayout&&o("html").addClass("layout-horiz-split"),h.subscribeEvent("CoreWebclient::GetDebugInfo",i.bind(function(e){e.Info.push("checkMailStarted: "+b.checkMailStarted()+", messagesLoading: "+b.messagesLoading())},this)),h.broadcastEvent("MailWebclient::ConstructView::after",{Name:this.ViewConstructorName,View:this})}i.extendOwn(C.prototype,d.prototype),C.prototype.ViewTemplate=f.HorizontalLayout?"MailWebclient_MailHorizontalLayoutView":"MailWebclient_MailView",C.prototype.ViewConstructorName="CMailView",C.prototype.hasUnsavedChanges=function(){return this.messagePane()&&i.isFunction(this.messagePane().hasUnsavedChanges)&&this.messagePane().hasUnsavedChanges()},C.prototype.discardChanges=function(){this.messagePane()&&i.isFunction(this.messagePane().discardChanges)&&this.messagePane().discardChanges()},C.prototype.setCustomPreviewPane=function(e,t){this.messagePane().__customModuleName!==e&&(i.isFunction(this.messagePane().onHide)&&this.messagePane().onHide(),t.__customModuleName=e,this.messagePane(t),i.isFunction(this.messagePane().onShow)&&this.messagePane().onShow())},C.prototype.removeCustomPreviewPane=function(e){this.messagePane().__customModuleName===e&&(i.isFunction(this.messagePane().onHide)&&this.messagePane().onHide(),this.messagePane(this.oBaseMessagePaneView),i.isFunction(this.messagePane().onShow)&&this.messagePane().onShow())},C.prototype.setCustomMessageList=function(e,t){this.messageList().__customModuleName!==e&&(t.__customModuleName=e,this.changeMessageList(t))},C.prototype.removeCustomMessageList=function(e){this.messageList().__customModuleName===e&&this.changeMessageList(this.oBaseMessageList)},C.prototype.changeMessageList=function(e){i.isFunction(this.messageList().onHide)&&this.messageList().onHide(),i.isFunction(this.messageList().unbind)&&this.messageList().unbind(),this.messageList(e),i.isFunction(this.messageList().onBind)&&this.messageList().onBind(this.$viewDom),i.isFunction(this.messageList().onShow)&&this.messageList().onShow()},C.prototype.setCustomBigButton=function(e,t,s){this.sCustomBigButtonModule=e,this.fCustomBigButtonHandler=t,this.customBigButtonText(s)},C.prototype.removeCustomBigButton=function(e){this.sCustomBigButtonModule===e&&(this.sCustomBigButtonModule="",this.fCustomBigButtonHandler=null,this.customBigButtonText(""))},C.prototype.resetDisabledTools=function(e,t){-1!==o.inArray("spam",t)?this.customModulesDisabledSpam(i.union(this.customModulesDisabledSpam(),[e])):this.customModulesDisabledSpam(i.without(this.customModulesDisabledSpam(),e)),-1!==o.inArray("move",t)?this.customModulesDisabledMove(i.union(this.customModulesDisabledMove(),[e])):this.customModulesDisabledMove(i.without(this.customModulesDisabledMove(),e)),-1!==o.inArray("mark",t)?this.customModulesDisabledMark(i.union(this.customModulesDisabledMark(),[e])):this.customModulesDisabledMark(i.without(this.customModulesDisabledMark(),e))},C.prototype.executeCompose=function(){p.composeMessage()},C.prototype.executeCheckMail=function(){b.checkMessageFlags(),b.executeCheckMail(!0)},C.prototype.openMessageInNewWindow=function(e){if(e&&e.longUid){var t=e.accountId(),s=e.folder(),o=e.longUid(),r=this.folderList().getFolderByFullName(s),n=(null==r?void 0:r.type())===Enums.FolderTypes.Drafts,a="";this.isUnifiedFolderCurrent()&&(s=b.oUnifiedInbox.fullName(),n=!1),n?a=c.buildHashFromArray(m.getComposeFromMessage("drafts",t,s,o)):(a=c.buildHashFromArray(m.getViewMessage(t,s,o)),i.isFunction(this.messagePane().passReplyDataToNewTab)&&this.messagePane().passReplyDataToNewTab(e.longUid())),u.openTab("?message-newtab"+a)}},C.prototype.resizeDblClick=function(e,t){l.calmEvent(t),l.removeSelection(),this.expandListPaneWidth(!this.expandListPaneWidth())},C.prototype.onRoute=function(e){if(g.hasAccount()){var t=m.parseMailbox(e);g.changeCurrentAccountByHash(t.AccountHash),i.isFunction(this.oFolderList.onRoute)&&this.oFolderList.onRoute(e),this.messageList().onRoute(e),i.isFunction(this.messagePane().onRoute)&&this.messagePane().onRoute(e,t),t.MailtoCompose&&(h.isMobile()?(e=m.getComposeWithToField(e[2]),c.replaceHash(e),setTimeout(function(){c.clearPreviousHash()},0)):(p.composeMessageToAddresses(e[2]),c.replaceHash(m.getMailbox())))}else c.replaceHash(["settings","mail-accounts","account","create"])},C.prototype.onShow=function(){i.isFunction(this.oFolderList.onShow)&&this.oFolderList.onShow(),this.messageList().onShow(),i.isFunction(this.messagePane().onShow)&&this.messagePane().onShow()},C.prototype.onHide=function(){this.messageList().onHide(),i.isFunction(this.messagePane().onHide)&&this.messagePane().onHide()},C.prototype.bindMessagePane=function(){i.isFunction(this.messagePane().onBind)&&(this.messagePane().onBind(this.$viewDom),this.messagePane().__bound=!0)},C.prototype.onBind=function(){var e=this.messageList();e.onBind(this.$viewDom),this.bindMessagePane(),o(this.domFoldersMoveTo()).on("click","span.folder",function(t){var s=o(this).data("folder");b.getCurrentFolderFullname()!==s&&(t.ctrlKey?e.executeCopyToFolder(s):e.executeMoveToFolder(s))}),h.isMobile()||this.hotKeysBind()},C.prototype.hotKeysBind=function(){o(document).on("keydown",o.proxy(function(e){var t=e.keyCode,s=e&&!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!l.isTextFieldFocused()&&this.shown(),i=this.messageList(),o=i.collection()[0],r=o&&b.currentMessage()&&o.longUid()===b.currentMessage().longUid();s&&t===Enums.Key.s||s&&r&&t===Enums.Key.Up?(e.preventDefault(),this.searchFocus()):i.isFocused()&&e&&t===Enums.Key.Down&&o?(e.preventDefault(),i.isFocused(!1),i.routeForMessage(o)):s&&t===Enums.Key.n&&(this.executeCompose(),e.preventDefault())},this))},C.prototype.routeMessageView=function(e,t){c.setHash(m.getMailbox(e,this.messageList().oPageSwitcher.currentPage(),t))},C.prototype.dragAndDropHelper=function(e,t){e&&e.checked(!0);var s=l.draggableItems(),i=this.messageList().checkedOrSelectedUids(),r=i.length;return s.data("p7-message-list-folder",b.getCurrentFolderFullname()),s.data("p7-message-list-uids",i),this.needToCopyDraggedItems(t),o(".count-text",s).text(n.i18n("MAILWEBCLIENT/LABEL_DRAG_MESSAGES_PLURAL",{COUNT:t?"+ "+r:r},null,r)),s},C.prototype.messagesDrop=function(e,t,s){if(e){var i=s&&s.helper?s.helper:null,o=i?i.data("p7-message-list-folder"):"",r=i?i.data("p7-message-list-uids"):null;o&&r&&(l.uiDropHelperAnim(t,s),this.needToCopyDraggedItems()?this.messageList().executeCopyToFolder(e.fullName()):this.messageList().executeMoveToFolder(e.fullName()),this.uncheckMessages())}},C.prototype.searchFocus=function(){this.messageList().selector.useKeyboardKeys()&&!l.isTextFieldFocused()&&this.messageList().isFocused(!0)},C.prototype.onVolumerClick=function(e,t){t.stopPropagation()},C.prototype.uncheckMessages=function(){i.each(b.messages(),function(e){e.checked(!1)})},e.exports=C},TQgg:(e,t,s)=>{"use strict";var i=s("a7T2");void 0===window.Enums&&(window.Enums={}),i.extendOwn(window.Enums,{FolderFilter:{Flagged:"flagged",Unseen:"unseen"},FolderTypes:{Inbox:1,Sent:2,Drafts:3,Spam:4,Trash:5,Virus:6,Starred:7,Template:8,System:9,User:10,AllInboxes:11},SearchFoldersMode:{Current:"",Sub:"sub",All:"all"},Importance:{Low:5,Normal:3,High:1},Sensitivity:{Nothing:0,Confidential:1,Private:2,Personal:3},AnotherMessageComposedAnswer:{Discard:"Discard",SaveAsDraft:"SaveAsDraft",Cancel:"Cancel"},ReplyType:{Reply:"reply",ReplyAll:"reply-all",Resend:"resend",Forward:"forward",ForwardAsAttach:"eml"},UseSignature:{Off:"0",On:"1"},MailErrors:{CannotMoveMessageQuota:4008},ServerOwnerType:{Account:"account",Tenant:"tenant",SuperAdmin:"superadmin"},StarredMessagesSource:{InboxOnly:"inbox_only",AllFolders:"all_folders"}})},W8zK:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("p09A"),r=s("LKDt"),n=s("ERH9"),a=s("Z9uT"),l=s("MYiO"),h=s("PMEU"),c=s("D2Gh"),u=s("dpSB"),d=s("P7bQ"),p=s("eGl8");function m(){this.unsubscribeOneClick=o.observable(!1),this.unsubscribeUrl=o.observable(""),this.unsubscribeEmail=o.observable(""),this.allowUnsubscribe=o.observable(!1),o.computed(function(){var e=p.currentMessage();e&&e.completelyFilled()&&(this.unsubscribeOneClick(n.pBool(e.unsubscribe.OneClick)),this.unsubscribeUrl(n.pString(e.unsubscribe.Url)),this.unsubscribeEmail(n.pString(e.unsubscribe.Email)),this.allowUnsubscribe(this.unsubscribeOneClick()||""!==this.unsubscribeUrl()||""!==this.unsubscribeEmail()))},this).extend({rateLimit:100})}m.prototype.ViewTemplate="MailWebclient_Message_UnsubscribeButtonView",m.prototype.unsubscribe=function(){var e=p.currentMessage();if(e)if(this.unsubscribeOneClick()){var t={AccountID:e.accountId(),Folder:e.folder(),Uid:e.uid()};d.send("Unsubscribe",t,this.onUnsubscribeResponse,this)}else this.unsubscribeEmail()?this.unsubscribeWithEmail():this.unsubscribeUrl()&&window.open(this.unsubscribeUrl(),"_blank")},m.prototype.onUnsubscribeResponse=function(e,t){e&&e.Result?c.showReport(r.i18n("MAILWEBCLIENT/REPORT_UNSUBSCRIBE_MESSAGE_SUCCESS")):a.showErrorByCode(e,r.i18n("MAILWEBCLIENT/ERROR_UNSUBSCRIBE_MESSAGE_FAIL"))},m.prototype.unsubscribeWithEmail=function(){var e=this,t=u.parseToAddr(this.unsubscribeEmail()),s={RECIPIENT:i.compact([t.to,t.cc,t.bcc]).join(", "),SUBJECT:t.subject},o=t.subject?r.i18n("MAILWEBCLIENT/CONFIRM_UNSUBSCRIBE_WITH_EMAIL_AND_SUBJECT",s):r.i18n("MAILWEBCLIENT/CONFIRM_UNSUBSCRIBE_WITH_EMAIL",s),n=r.i18n("MAILWEBCLIENT/ACTION_SEND");h.showPopup(l,[o,function(s){s&&e.sendUnsubscribeEmail(t)},"",n])},m.prototype.sendUnsubscribeEmail=function(e){var t={To:e.to,Cc:e.cc,Bcc:e.bcc,Subject:e.subject,Text:e.body};d.send("SendMessage",t,this.onUnsubscribeResponse,this)},e.exports=new m},cR1d:(e,t,s)=>{var i=s("p09A"),o=s("ioSH");function r(e){this.sName="",this.visible=i.observable(!0),this.baseHash=i.observable(""),this.hash=i.observable(""),this.linkText=i.observable(e),this.isCurrent=i.observable(!1),this.recivedAnim=i.observable(!1).extend({autoResetToFalse:500}),this.unseenCount=i.observable(0),this.allowChangeTitle=i.observable(!1),this.inactiveTitle=i.observable(""),this.excludedHashes=i.observableArray([])}r.prototype.ViewTemplate="CoreWebclient_HeaderItemView",r.prototype.setName=function(e){this.sName=e.toLowerCase(),""===this.baseHash()?(this.hash(o.buildHashFromArray([e.toLowerCase()])),this.baseHash(this.hash())):this.hash(this.baseHash())},e.exports=r},dBPG:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("M4cL"),r=s("p09A"),n=s("5D2l").run("MailWebclient","getComposeMessageToAddresses");i.isFunction(n)&&(r.bindingHandlers.makeLinkComposeMailTo={update:function(e,t,s,i,r){var a=o(e),l=t();a.show(),a.hasClass("button")||a.addClass("link"),a.click(function(){n(l)})}}),r.bindingHandlers.moveToFolderFilter={init:function(e,t,s,r,n){var a=o(e),l=t(),h=o(e).find(l.container),c=i.isArray(l.options)?l.options:l.options(),u=l.value?l.value():"";i.find(c,function(e){return e[l.optionsValue]===u})||(u="",l.value("")),a.removeClass("expand"),h.empty(),i.each(c,function(e){var t=o('<span class="item"></span>').text(e[l.optionsText]).data("value",e[l.optionsValue]);u===e[l.optionsValue]&&t.addClass("selected"),e.jq=t,h.append(t)}),h.on("click",".item",function(){var e=o(this).data("value");l.value(e)}),a.click(function(){a.toggleClass("expand"),a.hasClass("expand")&&i.defer(function(){o(document).one("click",function(){a.removeClass("expand")})})})},update:function(e,t){var s=o(e),r=t(),n=i.isArray(r.options)?r.options:r.options(),a=r.value?r.value():"",l=i.find(n,function(e){return e[r.optionsValue]===a}),h=s.find(".link");i.each(n,function(e){e.jq&&e.jq.toggleClass("selected",a===e[r.optionsValue])}),l&&h.text(o.trim(l[r.optionsText]))}}},jFqX:(e,t,s)=>{"use strict";var i=s("LKDt"),o={getMonthNamesArray:function(){for(var e=i.i18n("COREWEBCLIENT/LIST_MONTH_NAMES").split(" "),t=e.length;t<12;t++)e[t]="";return e},daysInMonth:function(e,t){return 0<e&&13>e&&0<t?new Date(t,e,0).getDate():31}};e.exports=o},k0bD:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("p09A"),r=s("LKDt"),n=s("uQaC"),a=s("Z9uT"),l=s("69av"),h=s("Fj7m"),c=s("P7bQ"),u=s("eGl8");function d(){l.call(this),this.isCreating=o.observable(!1),u.folderListLoading.subscribe(function(){-1===u.folderListLoading.indexOf(u.editedFolderList().iAccountId)&&this.isCreating()&&(i.isFunction(this.fCallback)&&this.fCallback(this.folderName(),this.parentFolder()),this.isCreating(!1),this.closePopup())},this),this.options=o.observableArray([]),this.parentFolder=o.observable(""),this.folderName=o.observable(""),this.folderNameFocus=o.observable(!1),this.fCallback=null,this.defaultOptionsAfterRender=n.defaultOptionsAfterRender}i.extendOwn(d.prototype,l.prototype),d.prototype.PopupTemplate="MailWebclient_Settings_CreateFolderPopup",d.prototype.onOpen=function(e){this.options(u.editedFolderList().getOptions(r.i18n("MAILWEBCLIENT/LABEL_NO_PARENT_FOLDER"),!0,!1,!0)),this.fCallback=e,this.folderName(""),this.folderNameFocus(!0)},d.prototype.create=function(){var e=""===this.parentFolder()?u.editedFolderList().sNamespaceFolder:this.parentFolder(),t={AccountID:h.editedId(),FolderNameInUtf8:this.folderName(),FolderParentFullNameRaw:e,Delimiter:u.editedFolderList().sDelimiter};this.folderNameFocus(!1),this.isCreating(!0),c.send("CreateFolder",t,this.onCreateFolderResponse,this)},d.prototype.onCreateFolderResponse=function(e,t){e.Result?u.getFolderList(h.editedId()):(this.isCreating(!1),a.showErrorByCode(e,r.i18n("MAILWEBCLIENT/ERROR_CREATE_FOLDER")))},d.prototype.cancelPopup=function(){this.isCreating()||(i.isFunction(this.fCallback)&&this.fCallback("",""),this.closePopup())},e.exports=new d},nM5h:(e,t,s)=>{"use strict";var i=s("a7T2"),o=s("M4cL"),r=s("p09A"),n=s("LKDt"),a=s("ERH9"),l=s("3cxN"),h=s("uQaC"),c=s("yU9o"),u=s("5D2l"),d=s("jIlg"),p=s("ioSH"),m=s("oJUS"),g=s("KIwC"),b=s("zVyH"),f=s("db2p"),y=s("sXLm"),S=s("dpSB"),M=s("Panx"),C=s("yHWv"),E=s("Fj7m"),F=s("P7bQ"),v=s("eGl8"),A=s("fcI1"),L=s("tnf/"),T=s("Ua3z"),w=s("3boL"),I=c.isNewTab()&&window.opener&&window.opener.MainTabMailMethods;function D(){f.call(this,"MailWebclient"),this.bNewTab=c.isNewTab(),this.isLoading=r.observable(!1),this.bAllowSearchMessagesBySubject=T.AllowSearchMessagesBySubject,v.folderList.subscribe(this.onFolderListSubscribe,this),this.messages=v.messages,this.messages.subscribe(this.onMessagesSubscribe,this),this.currentMessage=v.currentMessage,this.currentMessage.subscribe(this.onCurrentMessageSubscribe,this),g.timeFormat.subscribe(this.onCurrentMessageSubscribe,this),g.dateFormat.subscribe(this.onCurrentMessageSubscribe,this),this.displayedMessageUid=r.observable(""),this.browserTitle=r.computed(function(){var e=this.currentMessage(),t=e?e.subject():"";return(t?t+" - ":"")+E.getEmail()+" - "+n.i18n("MAILWEBCLIENT/HEADING_MESSAGE_BROWSER_TAB")},this),this.isCurrentMessage=r.computed(function(){return!!this.currentMessage()},this),this.isCurrentMessageLoaded=r.computed(function(){return this.isCurrentMessage()&&!this.isLoading()},this),this.visibleNoMessageSelectedText=r.computed(function(){return this.messages().length>0&&!this.isCurrentMessage()},this),this.prevMessageUid=v.prevMessageUid,this.nextMessageUid=v.nextMessageUid,this.isEnablePrevMessage=r.computed(function(){return c.isNewTab()&&a.isNonEmptyString(this.prevMessageUid())},this),this.isEnableNextMessage=r.computed(function(){return c.isNewTab()&&a.isNonEmptyString(this.nextMessageUid())},this),this.isEnableDelete=this.isCurrentMessage,this.isEnableReply=this.isCurrentMessageLoaded,this.isEnableReplyAll=this.isCurrentMessageLoaded,this.isEnableResend=this.isCurrentMessageLoaded,this.isEnableForward=this.isCurrentMessageLoaded,this.isEnablePrint=this.isCurrentMessageLoaded,this.isEnableSave=function(){return this.isCurrentMessage()&&""!==this.currentMessage().sDownloadAsEmlUrl},this.deleteCommand=h.createCommand(this,this.executeDeleteMessage,this.isEnableDelete),this.prevMessageCommand=h.createCommand(this,this.executePrevMessage,this.isEnablePrevMessage),this.nextMessageCommand=h.createCommand(this,this.executeNextMessage,this.isEnableNextMessage),this.replyCommand=h.createCommand(this,this.executeReply,this.isEnableReply),this.replyAllCommand=h.createCommand(this,this.executeReplyAll,this.isEnableReplyAll),this.resendCommand=h.createCommand(this,this.executeResend,this.isEnableResend),this.forwardCommand=h.createCommand(this,this.executeForward,this.isEnableForward),this.printCommand=h.createCommand(this,this.executePrint,this.isEnablePrint),this.saveCommand=h.createCommand(this,this.executeSave,this.isEnableSave),this.forwardAsAttachment=h.createCommand(this,this.executeForwardAsAttachment,this.isCurrentMessageLoaded),this.messageToolbarControllers=r.observableArray([]),this.registerController(L,"OnMessageToolbar"),this.moreCommand=h.createCommand(this,null,this.isCurrentMessageLoaded),this.moreSectionCommands=r.observableArray([]),c.broadcastEvent("MailWebclient::AddMoreSectionCommand",i.bind(function(e){var t=i.extend({Text:"",CssClass:"",Handler:function(){},Visible:!0},e);t.Command=h.createCommand(this,t.Handler,this.isCurrentMessageLoaded),this.moreSectionCommands.push(t)},this)),this.oUnsubscribeButtonView=s("W8zK"),this.visiblePicturesControl=r.observable(!1),this.visibleShowPicturesLink=r.observable(!1),this.visibleConfirmationControl=r.computed(function(){return this.currentMessage()&&""!==this.currentMessage().readingConfirmationAddressee()&&this.currentMessage()&&this.currentMessage().readingConfirmationAddressee()!==E.getEmail()},this),this.isCurrentNotDraftOrSent=r.computed(function(){var e=v.getCurrentFolder();return e&&e.fullName().length>0&&e.type()!==Enums.FolderTypes.Drafts&&e.type()!==Enums.FolderTypes.Sent},this),this.isCurrentSentFolder=r.computed(function(){var e=v.getCurrentFolder();return!!e&&e.fullName().length>0&&e.type()===Enums.FolderTypes.Sent},this),this.isCurrentNotDraftFolder=r.computed(function(){var e=v.getCurrentFolder();return!!e&&e.fullName().length>0&&e.type()!==Enums.FolderTypes.Drafts},this),this.isCurrentTemplateFolder=r.computed(function(){return v.isTemplateFolder(v.getCurrentFolderFullname())},this),this.topControllers=r.observableArray(),this.bodyControllers=r.observableArray(),this.bottomControllers=r.observableArray(),this.controllers=r.computed(function(){return i.union(this.topControllers(),this.bodyControllers(),this.bottomControllers(),this.messageToolbarControllers())},this),this.disableAllSendTools=r.computed(function(){var e=!1;return i.each(this.controllers(),function(t){i.isFunction(t.disableAllSendTools)&&t.disableAllSendTools()&&(e=!0)}),e},this),this.isVisibleReplyTool=r.computed(function(){return!this.disableAllSendTools()&&this.isCurrentNotDraftOrSent()&&!this.isCurrentTemplateFolder()},this),this.isVisibleResendTool=r.computed(function(){return!this.disableAllSendTools()&&this.isCurrentSentFolder()&&!this.isCurrentTemplateFolder()},this),this.isVisibleForwardTool=r.computed(function(){return!this.disableAllSendTools()&&this.isCurrentNotDraftFolder()&&!this.isCurrentTemplateFolder()},this),this.accountId=r.observable(0),this.folder=r.observable(""),this.uid=r.observable(""),this.subject=r.observable(""),this.emptySubject=r.computed(function(){return""===o.trim(this.subject())},this),this.subjectForDisplay=r.computed(function(){return this.emptySubject()?n.i18n("MAILWEBCLIENT/LABEL_NO_SUBJECT"):this.subject()},this),this.importance=r.observable(Enums.Importance.Normal),this.oFromAddr=r.observable(null),this.from=r.observable(""),this.fromEmail=r.observable(""),this.fullFrom=r.observable(""),this.to=r.observable(""),this.aToAddr=r.observableArray([]),this.cc=r.observable(""),this.aCcAddr=r.observableArray([]),this.bcc=r.observable(""),this.aBccAddr=r.observableArray([]),this.allRecipients=r.observableArray([]),this.currentAccountEmail=r.observable(),this.sMeSender=T.UseMeRecipientForMessages?n.i18n("MAILWEBCLIENT/LABEL_ME_SENDER"):null,this.sMeRecipient=T.UseMeRecipientForMessages?n.i18n("MAILWEBCLIENT/LABEL_ME_RECIPIENT"):null,this.fullDate=r.observable(""),this.midDate=r.observable(""),this.textBody=r.observable(""),this.textBodyForNewWindow=r.observable(""),this.domTextBody=r.observable(null),this.rtlMessage=r.observable(!1),this.contentHasFocus=r.observable(!1),c.broadcastEvent("MailWebclient::RegisterMessagePaneController",i.bind(function(e,t){this.registerController(e,t)},this)),this.fakeHeader=r.computed(function(){var e=!!i.find(this.topControllers(),function(e){return!!e.visible&&e.visible()});return!(this.visiblePicturesControl()||this.visibleConfirmationControl()||e)},this),this.sAttachmentsSwitcherViewTemplate=c.isMobile()?"MailWebclient_Message_AttachmentsSwitcherView":"",this.sQuickReplyViewTemplate=c.isMobile()||!T.AllowQuickReply?"":"MailWebclient_Message_QuickReplyView",this.attachments=r.observableArray([]),this.notInlineAttachments=r.computed(function(){return i.filter(this.attachments(),function(e){return!e.linked()})},this),this.notInlineAttachmentsInString=r.computed(function(){return i.map(this.notInlineAttachments(),function(e){return e.fileName()},this).join(", ")},this),this.allAttachmentsDownloadMethods=r.observableArray([]),this.visibleDownloadAllAttachmentsSeparately=r.computed(function(){return this.notInlineAttachments().length>1},this),this.visibleExtendedDownload=r.computed(function(){return this.visibleDownloadAllAttachmentsSeparately()||this.allAttachmentsDownloadMethods().length>0},this),c.broadcastEvent("MailWebclient::AddAllAttachmentsDownloadMethod",i.bind(function(e){this.allAttachmentsDownloadMethods.push(e)},this)),this.detailsVisible=r.observable(m.getData("aurora_mail_is-message-details-visible")),this.detailsTooltip=r.computed(function(){return this.detailsVisible()?n.i18n("COREWEBCLIENT/ACTION_HIDE_DETAILS"):n.i18n("COREWEBCLIENT/ACTION_SHOW_DETAILS")},this),this.hasNotInlineAttachments=r.computed(function(){return this.notInlineAttachments().length>0},this),this.hasBodyText=r.computed(function(){return this.textBody().length>0},this),this.visibleAddMenu=r.observable(!1),this.replyText=r.observable(""),this.replyTextFocus=r.observable(!1),this.replyPaneVisible=r.computed(function(){return this.currentMessage()&&this.currentMessage().completelyFilled()},this),this.replySendingStarted=r.observable(!1),this.replySavingStarted=r.observable(!1),this.replyAutoSavingStarted=r.observable(!1),this.requiresPostponedSending=r.observable(!1),this.replyAutoSavingStarted.subscribe(function(){!this.replyAutoSavingStarted()&&this.requiresPostponedSending()&&(C.sendPostponedMail(this.replyDraftUid()),this.requiresPostponedSending(!1))},this),this.hasReplyAllCcAddrs=r.observable(!1),this.placeholderText=r.computed(function(){return this.hasReplyAllCcAddrs()?n.i18n("MAILWEBCLIENT/LABEL_QUICK_REPLY_ALL"):n.i18n("MAILWEBCLIENT/LABEL_QUICK_REPLY")},this),this.sendButtonText=r.computed(function(){return this.hasReplyAllCcAddrs()?n.i18n("MAILWEBCLIENT/ACTION_SEND_ALL"):n.i18n("MAILWEBCLIENT/ACTION_SEND")},this),r.computed(function(){(!this.replyTextFocus()||this.replyAutoSavingStarted()||this.replySavingStarted()||this.replySendingStarted())&&this.stopAutosaveTimer(),!this.replyTextFocus()||this.replyAutoSavingStarted()||this.replySavingStarted()||this.replySendingStarted()||this.startAutosaveTimer()},this),this.saveButtonText=r.computed(function(){return this.replyAutoSavingStarted()?n.i18n("MAILWEBCLIENT/ACTION_SAVE_IN_PROGRESS"):n.i18n("MAILWEBCLIENT/ACTION_SAVE")},this),this.replyDraftUid=r.observable(""),this.replyLoadingText=r.computed(function(){return this.replySendingStarted()?n.i18n("COREWEBCLIENT/INFO_SENDING"):this.replySavingStarted()?n.i18n("MAILWEBCLIENT/INFO_SAVING"):""},this),this.isEnableSendQuickReply=r.computed(function(){return this.isCurrentMessageLoaded()&&""!==this.replyText()&&!this.replySendingStarted()},this),this.isEnableSaveQuickReply=r.computed(function(){return this.isEnableSendQuickReply()&&!this.replySavingStarted()&&!this.replyAutoSavingStarted()},this),this.saveQuickReplyCommand=h.createCommand(this,this.executeSaveQuickReply,this.isEnableSaveQuickReply),this.sendQuickReplyCommand=h.createCommand(this,this.executeSendQuickReply,this.isEnableSendQuickReply),this.domMessageHeader=r.observable(null),this.domQuickReply=r.observable(null),this.domMessageForPrint=r.observable(null),this.replyTextFocusThrottled=r.observable(!1).extend({throttle:50}),this.replyTextFocus.subscribe(function(){this.replyTextFocusThrottled(this.replyTextFocus())},this),this.isQuickReplyActive=r.computed(function(){return this.replyText().length>0||this.replyTextFocusThrottled()},this),this.visibleAttachments=r.observable(!1),this.showMessage=function(){this.visibleAttachments(!1)},this.showAttachments=function(){this.visibleAttachments(!0)},this.sDefaultFontName=T.DefaultFontName,d.registerDayOfMonthFunction(i.bind(this.updateMomentDate,this)),c.broadcastEvent("MailWebclient::ConstructView::after",{Name:"CMessagePaneView",View:this})}i.extendOwn(D.prototype,f.prototype),D.prototype.ViewTemplate=c.isNewTab()?"MailWebclient_MessagePaneScreenView":"MailWebclient_MessagePaneView",D.prototype.ViewConstructorName="CMessagePaneView",D.prototype.resizeDblClick=function(e,t){""!==t.target.className&&t.target.className.search(/add_contact|icon|link|title|subject|link|date|from/)&&(h.calmEvent(t),h.removeSelection(),this.expandMessagePaneWidth&&this.expandMessagePaneWidth(!this.expandMessagePaneWidth()))},D.prototype.notifySender=function(){if(this.currentMessage()&&""!==this.currentMessage().readingConfirmationAddressee()){var e=n.i18n("MAILWEBCLIENT/LABEL_RETURN_RECEIPT_MAIL_TEXT",{EMAIL:E.getEmail(),SUBJECT:this.subject()}).replace(/\\r\\n/g,"\n");F.send("SendMessage",{To:this.currentMessage().readingConfirmationAddressee(),Subject:n.i18n("MAILWEBCLIENT/LABEL_RETURN_RECEIPT_MAIL_SUBJECT"),Text:e,ConfirmFolder:this.currentMessage().folder(),ConfirmUid:this.currentMessage().longUid()}),this.currentMessage().readingConfirmationAddressee("")}},D.prototype.onFolderListSubscribe=function(){c.isNewTab()&&this.onMessagesSubscribe()},D.prototype.onMessagesSubscribe=function(){!this.currentMessage()&&this.uid()&&this.uid().length>0&&v.setCurrentMessage(this.accountId(),this.folder(),this.uid())},D.prototype.passReplyDataToNewTab=function(e){this.currentMessage()&&this.currentMessage().longUid()===e&&""!==this.replyText()&&(A.passReplyData(e,{ReplyText:this.replyText(),ReplyDraftUid:this.replyDraftUid()}),this.replyText(""),this.replyDraftUid(""))},D.prototype.onCurrentMessageSubscribe=function(){var e=this.currentMessage(),t=e?E.getAccount(e.accountId()):null,s=null;if(I&&e?(s=I.getReplyData(e.longUid()))&&(this.replyText(s.ReplyText),this.replyDraftUid(s.ReplyDraftUid)):e&&e.longUid()===this.displayedMessageUid()||(this.replyText(""),this.replyDraftUid("")),e&&this.uid()===e.uid()){if(this.hasReplyAllCcAddrs(C.hasReplyAllCcAddrs(e)),this.subject(e.subject()),this.importance(e.importance()),this.from(e.oFrom.getDisplay()),this.fromEmail(e.oFrom.getFirstEmail()),this.fullFrom(e.oFrom.getFull()),e.oFrom.aCollection.length>0?this.oFromAddr(e.oFrom.aCollection[0]):this.oFromAddr(null),this.to(e.oTo.getFull()),this.aToAddr(e.oTo.aCollection),this.cc(e.oCc.getFull()),this.aCcAddr(e.oCc.aCollection),this.bcc(e.oBcc.getFull()),this.aBccAddr(e.oBcc.aCollection),this.currentAccountEmail(t.email()),this.allRecipients(i.uniq(i.union(this.aToAddr(),this.aCcAddr(),this.aBccAddr()))),this.midDate(e.oDateModel.getMidDate()),this.fullDate(e.oDateModel.getFullDate()),this.isLoading(""!==e.longUid()&&!e.completelyFilled()),this.setMessageBody(),T.DisableRtlRendering||this.rtlMessage(e.rtl()),c.isNewTab()){var r=[];i.each(e.attachments(),i.bind(function(e){var t=new w(e.iAccountId);t.copyProperties(e),r.push(t)},this)),this.attachments(r)}else this.attachments(e.attachments());if(!e.completelyFilled()||e.truncated()){var n=e.completelyFilled()?e.truncated:e.completelyFilled;c.isNewTab()?e.completelyFilledNewTabSubscription=n.subscribe(this.onCurrentMessageSubscribe,this):e.completelyFilledSubscription=n.subscribe(this.onCurrentMessageSubscribe,this)}else e.completelyFilledSubscription?(e.completelyFilledSubscription.dispose(),e.completelyFilledSubscription=void 0):e.completelyFilledNewTabSubscription&&(e.completelyFilledNewTabSubscription.dispose(),e.completelyFilledNewTabSubscription=void 0)}else this.hasReplyAllCcAddrs(!1),this.isLoading(!1),o(this.domTextBody()).empty().data("displayed-message-uid",""),this.displayedMessageUid(""),this.rtlMessage(!1),this.attachments([]),this.visiblePicturesControl(!1),this.visibleShowPicturesLink(!1);this.doAfterPopulatingMessage()},D.prototype.updateMomentDate=function(){var e=this.currentMessage();e&&e.oDateModel&&(this.midDate(e.oDateModel.getMidDate()),this.fullDate(e.oDateModel.getFullDate()))},D.prototype.setMessageBody=function(){if(this.currentMessage()){var e=this.currentMessage(),t=e.text(),s=o(this.domTextBody()),i=null,r="",a=t.length,l=[];this.textBody(t),s.data("displayed-message-uid")===e.longUid()&&(l=this.getBlockquotesStatus()),s.empty(),e.isPlain()||a>5e6?(s.html(t),this.visiblePicturesControl(!1)):(r=(i=e.getDomText()).length>0?i.html():"",s.append(r),this.visiblePicturesControl(e.hasExternals()&&!e.isExternalsAlwaysShown()),this.visibleShowPicturesLink(!e.isExternalsShown()),n.htmlStartsWithBlockquote(r)||this.doHidingBlockquotes(l)),s.data("displayed-message-uid",e.longUid()),this.displayedMessageUid(e.longUid())}},D.prototype.getBlockquotesStatus=function(){var e=[];return o(o("blockquote",o(this.domTextBody())).get()).each(function(){var t=o(this);t.hasClass("blockquote_before_toggle")&&e.push(t.hasClass("collapsed"))}),e},D.prototype.doHidingBlockquotes=function(e){var t=0;o(o("blockquote",o(this.domTextBody())).get()).each(function(){var s=o(this),i=s.parents("blockquote"),r=o('<span class="blockquote_toggle"></span>').html(n.i18n("MAILWEBCLIENT/ACTION_SHOW_QUOTED_TEXT")),a=!0;0===i.length&&s.height()>120&&(s.addClass("blockquote_before_toggle").after(r).wrapInner('<div class="blockquote_content"></div>'),r.bind("click",function(){a?(s.height("auto"),r.html(n.i18n("MAILWEBCLIENT/ACTION_HIDE_QUOTED_TEXT")),a=!1):(s.height(80),r.html(n.i18n("MAILWEBCLIENT/ACTION_SHOW_QUOTED_TEXT")),a=!0),s.toggleClass("collapsed",a)}),t<e.length&&(a=e[t],t++),s.height(a?80:"auto").toggleClass("collapsed",a))})},D.prototype.onRoute=function(e){var t=S.parseMailbox(e),s=t.Folder,i=t.Uid,o=v.getMessageActualIdentifiers(v.currentAccountId(),s,i);E.changeCurrentAccountByHash(t.AccountHash),""!==this.replyText()&&this.uid()!==o.sUid&&this.saveReplyMessage(!1),this.accountId(o.iAccountId),this.uid(o.sUid),this.folder(o.sFolder),v.setCurrentMessage(o.iAccountId,o.sFolder,o.sUid),c.isNewTab&&v.setCurrentFolder(t.Folder,t.Filters),this.contentHasFocus(!0)},D.prototype.showPictures=function(){v.showExternalPictures(!1),this.visibleShowPicturesLink(!1),this.setMessageBody()},D.prototype.alwaysShowPictures=function(){var e=this.currentMessage()?this.currentMessage().oFrom.getFirstEmail():"";e.length>0&&F.send("SetEmailSafety",{Email:e}),v.showExternalPictures(!0),this.visiblePicturesControl(!1),this.setMessageBody()},D.prototype.openInNewWindow=function(){this.openMessageInNewWindowBound(this.currentMessage())},D.prototype.getReplyHtmlText=function(){return'<div style="font-family: '+this.sDefaultFontName+'; font-size: 16px">'+C.getHtmlFromText(this.replyText())+"</div>"},D.prototype.executeReplyOrForward=function(e){this.currentMessage()&&(C.setReplyData(this.getReplyHtmlText(),this.replyDraftUid()),this.replyText(""),this.replyDraftUid(""),y.composeMessageAsReplyOrForward(e,this.currentMessage().accountId(),this.currentMessage().folder(),this.currentMessage().longUid()))},D.prototype.executeDeleteMessage=function(){this.currentMessage()&&(I?I.deleteMessage(this.currentMessage().longUid(),function(){window.close()}):c.isMobile()&&M.deleteMessages([this.currentMessage().longUid()],c))},D.prototype.executePrevMessage=function(){this.isEnablePrevMessage()&&p.setHash(S.getViewMessage(v.currentAccountId(),v.getCurrentFolderFullname(),this.prevMessageUid()))},D.prototype.executeNextMessage=function(){this.isEnableNextMessage()&&p.setHash(S.getViewMessage(v.currentAccountId(),v.getCurrentFolderFullname(),this.nextMessageUid()))},D.prototype.executeReply=function(){this.executeReplyOrForward(Enums.ReplyType.Reply)},D.prototype.executeReplyAll=function(){this.executeReplyOrForward(Enums.ReplyType.ReplyAll)},D.prototype.executeResend=function(){this.executeReplyOrForward(Enums.ReplyType.Resend)},D.prototype.executeForward=function(){this.executeReplyOrForward(Enums.ReplyType.Forward)},D.prototype.executePrint=function(){var e=this.currentMessage(),t=e?b.open("",this.subject()+"-print"):null,s="";e&&t&&(this.textBodyForNewWindow(e.getConvertedHtml(l.getAppPath(),!0)),s=o(this.domMessageForPrint()).html(),t.document.title=this.subject(),o(t.document.body).html(s),t.print())},D.prototype.executeSave=function(){this.isEnableSave()&&this.currentMessage()&&l.downloadByUrl(this.currentMessage().sDownloadAsEmlUrl,!0)},D.prototype.executeForwardAsAttachment=function(){this.currentMessage()&&y.composeMessageWithEml(this.currentMessage())},D.prototype.changeAddMenuVisibility=function(){var e=!this.visibleAddMenu();this.visibleAddMenu(e)},D.prototype.onSendOrSaveMessageResponse=function(e,t){var s=C.onSendOrSaveMessageResponse(e,t,this.requiresPostponedSending());switch(s.Method){case"SendMessage":this.replySendingStarted(!1),s.Result&&this.replyText("");break;case"SaveMessage":s.Result&&this.replyDraftUid(s.NewUid),this.replySavingStarted(!1),this.replyAutoSavingStarted(!1)}},D.prototype.executeSendQuickReply=function(){this.isEnableSendQuickReply()&&(this.replySendingStarted(!0),this.requiresPostponedSending(this.replyAutoSavingStarted()),C.sendReplyMessage("SendMessage",this.getReplyHtmlText(),this.replyDraftUid(),this.onSendOrSaveMessageResponse,this,this.requiresPostponedSending()),this.replyTextFocus(!1))},D.prototype.executeSaveQuickReply=function(){this.saveReplyMessage(!1)},D.prototype.saveReplyMessage=function(e){this.isEnableSaveQuickReply()&&(e?this.replyAutoSavingStarted(!0):this.replySavingStarted(!0),C.sendReplyMessage("SaveMessage",this.getReplyHtmlText(),this.replyDraftUid(),this.onSendOrSaveMessageResponse,this))},D.prototype.stopAutosaveTimer=function(){window.clearTimeout(this.autoSaveTimer)},D.prototype.startAutosaveTimer=function(){if(this.isEnableSaveQuickReply()){var e=i.bind(this.saveReplyMessage,this,!0);this.stopAutosaveTimer(),T.AllowAutosaveInDrafts&&(this.autoSaveTimer=window.setTimeout(e,1e3*T.AutoSaveIntervalSeconds))}},D.prototype.executeAllAttachmentsDownloadMethod=function(e){var t=this.currentMessage();if(t){var s=t.notInlineAttachments(),i=s.map(function(e){return e.hash()});e(t.accountId(),i,s)}},D.prototype.downloadAllAttachmentsSeparately=function(){this.currentMessage()&&this.currentMessage().downloadAllAttachmentsSeparately()},D.prototype.onShow=function(){this.bShown=!0},D.prototype.onHide=function(){this.bShown=!1,this.accountId(0),this.folder(""),this.uid(""),i.each(this.controllers(),i.bind(function(e){i.isFunction(e.onHide)&&e.onHide()},this))},D.prototype.onBind=function(e){u.run("SessionTimeoutWeblient","registerFunction",[i.bind(function(){""!==this.replyText()&&this.saveReplyMessage(!1)},this)]),this.$MailViewDom=i.isUndefined(e)?this.$viewDom:e,this.$MailViewDom.on("mousedown","a",function(e){if(e&&3!==e.which){var t=o(this).attr("href");if(t&&"mailto:"===t.toString().toLowerCase().substr(0,7))return y.composeMessageToAddresses(t.toString()),!1}return!0}),c.isMobile()||this.hotKeysBind()},D.prototype.hotKeysBind=function(){o(document).on("keydown",o.proxy(function(e){var t=this.bShown&&e&&!(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!h.isTextFieldFocused()&&this.isEnableReply();t&&e.keyCode===Enums.Key.q?(e.preventDefault(),this.replyTextFocus(!0)):t&&e.keyCode===Enums.Key.r&&(e.preventDefault(),this.executeReply())},this))},D.prototype.showSourceHeaders=function(){var e=this.currentMessage(),t=e&&e.completelyFilled()?b.open("",this.subject()+"-headers"):null;t&&o(t.document.body).html("<pre>"+n.encodeHtml(e.sourceHeaders())+"</pre>")},D.prototype.switchDetailsVisibility=function(){this.detailsVisible(!this.detailsVisible()),m.setData("aurora_mail_is-message-details-visible",this.detailsVisible())},D.prototype.registerController=function(e,t){switch(t){case"OnMessageToolbar":this.messageToolbarControllers.push(e);break;case"BeforeMessageHeaders":this.topControllers.push(e);break;case"BeforeMessageBody":this.bodyControllers.push(e);break;case"AfterMessageBody":this.bottomControllers.push(e)}i.isFunction(e.assignMessagePaneExtInterface)&&e.assignMessagePaneExtInterface(this.getExtInterface())},D.prototype.getExtInterface=function(){return{changeText:i.bind(function(e){var t=this.currentMessage();t&&this.isCurrentMessageLoaded()&&(t.changeText(e),this.setMessageBody())},this)}},D.prototype.doAfterPopulatingMessage=function(){var e=this.currentMessage(),t=e&&!this.isLoading()?{iAccountId:e.accountId(),sFolderFullName:e.folder(),sMessageUid:e.uid(),aToEmails:e.oTo.getEmails(),bPlain:e.isPlain(),sRawText:e.textRaw(),sText:e.text(),sAccountEmail:E.getEmail(e.accountId()),sFromEmail:e.oFrom.getFirstEmail(),iSensitivity:e.sensitivity(),aExtend:e.aExtend}:null;i.each(this.controllers(),i.bind(function(e){i.isFunction(e.doAfterPopulatingMessage)&&e.doAfterPopulatingMessage(t)},this)),u.run("ContactsWebclient","applyContactsCards",[this.$MailViewDom.find("span.address")])},D.prototype.searchBySubject=function(){if(T.AllowSearchMessagesBySubject&&this.currentMessage()){var e=this.currentMessage().folder(),t=this.currentMessage().longUid(),s="",r=this.currentMessage().subject().split(":"),n=T.PrefixesToRemoveBeforeSearchMessagesBySubject,a=[];0===n.length?s=r:(i.each(r,function(e){if(a.length>0)a.push(e);else{var t=!1,s=o.trim(e);i.each(n,function(e){var i=new RegExp("^"+e+"(\\[\\d*\\]){0,1}$","i");t=t||i.test(s)}),t||a.push(e)}}),s=o.trim(a.join(":"))),p.setHash(S.getMailbox(e,1,t,s,""))}},e.exports=new D},sLMx:(e,t,s)=>{"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var s=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=s){var i,o,r,n,a=[],l=!0,h=!1;try{if(r=(s=s.call(e)).next,0===t){if(Object(s)!==s)return;l=!1}else for(;!(l=(i=r.call(s)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){h=!0,o=e}finally{try{if(!l&&null!=s.return&&(n=s.return(),Object(n)!==n))return}finally{if(h)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var s={}.toString.call(e).slice(8,-1);return"Object"===s&&e.constructor&&(s=e.constructor.name),"Map"===s||"Set"===s?Array.from(e):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var s=0,i=Array(t);s<t;s++)i[s]=e[s];return i}var r=s("a7T2"),n=s("M4cL"),a=s("p09A"),l=s("sdEb"),h=s("uQaC"),c=s("jFqX"),u=s("LKDt"),d=s("ERH9"),p=s("Z9uT"),m=s("yU9o"),g=s("/Odb"),b=s("hr1f"),f=s("DSoz"),y=s("5D2l"),S=s("ioSH"),M=s("D2Gh"),C=s("KIwC"),E=s("ebd4"),F=s("FZR+"),v=s("sXLm"),A=s("dpSB"),L=s("Panx"),T=s("t/bC"),w=s("Fj7m"),I=s("eGl8"),D=s("Ua3z"),k=s("1+/O");function x(e){var t=this;this.disableMoveMessages=a.computed(function(){var e=I.getCurrentFolder();return!e||e.disableMoveFrom()},this),this.bVisibleSortByTool=D.MessagesSortBy.Allow&&D.MessagesSortBy.List.length>0,this.sSortBy=D.MessagesSortBy.DefaultSortBy,this.iSortOrder=D.MessagesSortBy.DefaultSortOrder,this.sortBy=a.observable(D.MessagesSortBy.DefaultSortBy),this.sortOrder=a.observable(D.MessagesSortBy.DefaultSortOrder),this.aSortList=[],r.each(D.MessagesSortBy.List,function(e){this.aSortList.push({sText:u.i18n("MAILWEBCLIENT/"+e.LangConst),sSortBy:e.SortBy})}.bind(this)),this.uploaderArea=a.observable(null),this.bDragActive=a.observable(!1),this.bDragActiveComp=a.computed(function(){return this.bDragActive()},this),this.openMessageInNewWindowBound=e,this.isFocused=a.observable(!1),this.messagesContainer=a.observable(null),this.currentMessage=I.currentMessage,this.currentMessage.subscribe(function(){this.isFocused(!1),this.selector.itemSelected(this.currentMessage())},this),this.folderList=I.folderList,this.folderList.subscribe(function(){setTimeout(this.onFolderListSubscribe.bind(this))},this),this.folderFullName=a.observable(""),this.folderType=a.observable(Enums.FolderTypes.User),this.filters=a.observable(""),this.isStarredFolder=a.computed(function(){return t.filters()===Enums.FolderFilter.Flagged}),this.isStarredInAllFolders=a.computed(function(){return t.isStarredFolder()&&D.AllowChangeStarredMessagesSource&&D.StarredMessagesSource===Enums.StarredMessagesSource.AllFolders}),this.isStarredFolder.subscribe(function(){t.isStarredFolder()&&t.selectedSearchFoldersMode(t.isStarredInAllFolders()?"all":"")}),this.allowAdvancedSearch=a.computed(function(){return!y.isModuleIncluded("MailNotesPlugin")||"Notes"!==this.folderFullName()},this),this.searchHighlightedInputFormatted=a.observable(""),this.searchHighlightedInput=a.observable(""),this.searchHighlightedInput.subscribe(function(){t.searchHighlightedInputFormatted(T.formattedDateSearchHighlightedInput(t.searchHighlightedInput()))}),this.searchInput=a.computed({read:function(){return t.isStarredInAllFolders()?"".concat(t.searchHighlightedInputFormatted()," folders:all"):t.searchHighlightedInputFormatted()},write:function(e){t.isStarredInAllFolders()?t.searchHighlightedInput(e.replace("folders:all","")):t.searchHighlightedInput(e)}}),this.searchInputFrom=a.observable(""),this.searchInputTo=a.observable(""),this.searchInputSubject=a.observable(""),this.searchInputText=a.observable(""),this.searchSpan=a.observable(""),this.highlightTrigger=a.observable(""),this.selectedSearchFoldersMode=a.observable(""),this.selectedSearchFoldersModeText=a.computed(function(){return this.selectedSearchFoldersMode()===Enums.SearchFoldersMode.Sub?u.i18n("MAILWEBCLIENT/LABEL_SEARCH_CURRENT_FOLDER_AND_SUBFOLDERS"):this.selectedSearchFoldersMode()===Enums.SearchFoldersMode.All?u.i18n("MAILWEBCLIENT/LABEL_SEARCH_ALL_FOLDERS"):u.i18n("MAILWEBCLIENT/LABEL_SEARCH_CURRENT_FOLDER")},this),this.uidList=I.uidList,this.uidList.subscribe(function(){this.uidList().searchCountSubscription&&(this.uidList().searchCountSubscription.dispose(),this.uidList().searchCountSubscription=void 0),this.uidList().searchCountSubscription=this.uidList().resultCount.subscribe(function(){this.uidList().resultCount()>=0&&this.oPageSwitcher.setCount(this.uidList().resultCount())},this),this.uidList().resultCount()>=0&&this.oPageSwitcher.setCount(this.uidList().resultCount())},this),this.useThreading=a.computed(function(){var e=w.getCurrent(),t=I.getCurrentFolder(),s=t&&t.withoutThreads(),i=""===this.uidList().search()&&""===this.uidList().filters();return e&&e.threadingIsAvailable()&&!s&&i},this),this.collection=I.messages,this._search=a.observable(""),this.search=a.computed({read:function(){return n.trim(this._search())},write:this._search,owner:this}),this.searchFoldersMode=a.observable(""),this.messageListParamsChanged=a.observable(!1).extend({autoResetToFalse:100}),this.isEmptyList=a.computed(function(){return 0===this.collection().length},this),this.isNotEmptyList=a.computed(function(){return 0!==this.collection().length},this),this.isSearch=a.computed(function(){return this.search().length>0},this),this.isUnseenFilter=a.computed(function(){return this.filters()===Enums.FolderFilter.Unseen},this),this.isLoading=I.messagesLoading,this.isError=I.messagesLoadingError,this.visibleInfoLoading=a.computed(function(){return!this.isSearch()&&this.isLoading()},this),this.visibleInfoSearchLoading=a.computed(function(){return this.isSearch()&&this.isLoading()},this),this.visibleInfoSearchList=a.computed(function(){return this.isSearch()&&!this.isUnseenFilter()&&!this.isLoading()&&!this.isEmptyList()},this),this.visibleInfoMessageListEmpty=a.computed(function(){return!this.isLoading()&&!this.isSearch()&&""===this.filters()&&this.isEmptyList()&&!this.isError()},this),this.visibleInfoStarredFolderEmpty=a.computed(function(){return!this.isLoading()&&!this.isSearch()&&this.isStarredFolder()&&this.isEmptyList()&&!this.isError()},this),this.visibleInfoSearchEmpty=a.computed(function(){return this.isSearch()&&!this.isUnseenFilter()&&this.isEmptyList()&&!this.isError()&&!this.isLoading()},this),this.visibleInfoMessageListError=a.computed(function(){return!this.isSearch()&&this.isError()},this),this.visibleInfoSearchError=a.computed(function(){return this.isSearch()&&this.isError()},this),this.visibleInfoUnseenFilterList=a.computed(function(){return this.isUnseenFilter()&&(this.isLoading()||!this.isEmptyList())},this),this.visibleInfoUnseenFilterEmpty=a.computed(function(){return this.isUnseenFilter()&&this.isEmptyList()&&!this.isError()&&!this.isLoading()},this),this.allowClearSearch=a.observable(!0),this.searchText=a.computed(function(){var e={SEARCH:this.calculateSearchStringForDescription(),FOLDER:I.getCurrentFolder()?u.encodeHtml(I.getCurrentFolder().displayName()):""};return this.allowClearSearch(!0),this.searchFoldersMode()===Enums.SearchFoldersMode.Sub?I.oUnifiedInbox.selected()?u.i18n("MAILWEBCLIENT/INFO_SEARCH_UNIFIED_SUBFOLDERS_RESULT",e):"folders:sub"===n.trim(this.search())?u.i18n("MAILWEBCLIENT/INFO_MESSAGES_FROM_SUBFOLDERS",e):u.i18n("MAILWEBCLIENT/INFO_SEARCH_SUBFOLDERS_RESULT",e):this.searchFoldersMode()===Enums.SearchFoldersMode.All?I.oUnifiedInbox.selected()?u.i18n("MAILWEBCLIENT/INFO_SEARCH_UNIFIED_ALL_FOLDERS_RESULT",e):"folders:all"===n.trim(this.search())?(this.isStarredFolder()&&this.allowClearSearch(!1),u.i18n("MAILWEBCLIENT/INFO_MESSAGES_FROM_ALL_FOLDERS",e)):u.i18n("MAILWEBCLIENT/INFO_SEARCH_ALL_FOLDERS_RESULT",e):u.i18n("MAILWEBCLIENT/INFO_SEARCH_RESULT",e)},this),this.unseenFilterText=a.computed(function(){return""===this.search()?u.i18n("MAILWEBCLIENT/INFO_UNREAD_MESSAGES",{FOLDER:I.getCurrentFolder()?u.encodeHtml(I.getCurrentFolder().displayName()):""}):u.i18n("MAILWEBCLIENT/INFO_UNREAD_MESSAGES_SEARCH_RESULT",{SEARCH:this.calculateSearchStringForDescription(),FOLDER:I.getCurrentFolder()?u.encodeHtml(I.getCurrentFolder().displayName()):""})},this),this.unseenFilterEmptyText=a.computed(function(){return""===this.search()?u.i18n("MAILWEBCLIENT/INFO_NO_UNREAD_MESSAGES"):u.i18n("MAILWEBCLIENT/INFO_NO_UNREAD_MESSAGES_FOUND")},this),this.isEnableGroupOperations=a.observable(!1).extend({throttle:250}),this.selector=new f(this.collection,r.bind(this.routeForMessage,this),r.bind(this.onDeletePress,this),r.bind(this.onMessageDblClick,this),r.bind(this.onEnterPress,this),null,!1,!1,!1,!1,!1),this.checkedUids=a.computed(function(){var e=this.selector.listChecked(),t=r.map(e,function(e){return e.longUid()}),s=I.getCurrentFolder(),i=s?s.getThreadCheckedUidsFromList(e):[];return r.union(t,i)},this),this.checkedOrSelectedUids=a.computed(function(){var e=this.checkedUids();return 0===e.length&&I.currentMessage()&&r.isFunction(I.currentMessage().deleted)&&!I.currentMessage().deleted()&&(e=[I.currentMessage().longUid()]),e},this),a.computed(function(){this.isEnableGroupOperations(0<this.selector.listCheckedOrSelected().length)},this),this.checkAll=this.selector.koCheckAll(),this.checkAllIncomplite=this.selector.koCheckAllIncomplete(),this.pageSwitcherLocked=a.observable(!1),this.oPageSwitcher=new F(0,D.MailsPerPage),this.oPageSwitcher.currentPage.subscribe(function(e){var t=I.getCurrentFolderFullname(),s=!m.isMobile()&&this.currentMessage()?this.currentMessage().longUid():"",i=this.search();this.pageSwitcherLocked()||this.changeRoutingForMessageList(t,e,s,i,this.filters(),this.sortBy(),this.sortOrder())},this),this.currentPage=a.observable(0),g.firefox||g.ie?this.listChangedThrottle=a.observable(!1).extend({throttle:10}):this.listChangedThrottle=a.observable(!1),this.firstCompleteCollection=a.observable(!0),this.collection.subscribe(function(){this.collection().length>0&&(d.isNonEmptyArray(this.aRouteParams)?(this.onRoute(this.aRouteParams),this.aRouteParams=[]):this.firstCompleteCollection(!1))},this),this.listChanged=a.computed(function(){return[this.firstCompleteCollection(),I.currentAccountId(),this.folderFullName(),this.filters(),this.search(),this.oPageSwitcher.currentPage()]},this),this.listChanged.subscribe(function(){this.listChangedThrottle(!this.listChangedThrottle())},this),this.bAdvancedSearch=a.observable(!1),this.searchAttachmentsCheckbox=a.observable(!1),this.searchAttachments=a.observable(""),this.searchAttachments.subscribe(function(e){this.searchAttachmentsCheckbox(!!e)},this),this.searchAttachmentsFocus=a.observable(!1),this.searchFromFocus=a.observable(!1),this.searchSubjectFocus=a.observable(!1),this.searchToFocus=a.observable(!1),this.searchTextFocus=a.observable(!1),this.searchTrigger=a.observable(null),this.searchDateStartFocus=a.observable(!1),this.searchDateEndFocus=a.observable(!1),this.searchDateStartDom=a.observable(null),this.searchDateStartTimestamp=a.observable(""),this.searchDateStart=a.observable(""),this.searchDateStart.subscribe(function(e){e&&t.searchDateStartTimestamp(l(e,h.getDateFormatForMoment(C.dateFormat())).toDate().getTime()/1e3)}),this.searchDateEndDom=a.observable(null),this.searchDateEndTimestamp=a.observable(""),this.searchDateEnd=a.observable(""),this.searchDateEnd.subscribe(function(e){e&&t.searchDateEndTimestamp(l(e,h.getDateFormatForMoment(C.dateFormat())).toDate().getTime()/1e3)}),this.dateFormatDatePicker=a.computed(function(){return k.getDateFormatForDatePicker(C.dateFormat())}),C.dateFormat.subscribe(function(){var e=new E,s=new E;t.searchDateStartTimestamp()&&(e.parse(t.searchDateStartTimestamp()),t.searchDateStart(e.getShortDate())),t.searchDateEndTimestamp()&&(s.parse(t.searchDateEndTimestamp()),t.searchDateEnd(s.getShortDate())),t.createDatePickerObject(t.searchDateStartDom(),t.searchDateStart),t.createDatePickerObject(t.searchDateEndDom(),t.searchDateEnd),t.searchHighlightedInputFormatted(T.formattedDateSearchHighlightedInput(t.searchHighlightedInput()))}),this.attachmentsPlaceholder=a.computed(function(){return u.i18n("MAILWEBCLIENT/LABEL_HAS_ATTACHMENTS")},this),this.customMessageItemViewTemplate=a.observable(""),m.broadcastEvent("MailWebclient::ConstructView::after",{Name:this.ViewConstructorName,View:this,MailCache:I})}s("okSt"),x.prototype.ViewTemplate="MailWebclient_MessagesView",x.prototype.ViewConstructorName="CMessageListView",x.prototype.addNewAccount=function(){m.Api.createMailAccount(w.getEmail())},x.prototype.createDatePickerObject=function(e,t){n(e).datepicker("destroy"),n(e).datepicker({showOtherMonths:!0,selectOtherMonths:!0,monthNames:c.getMonthNamesArray(),dayNamesMin:u.i18n("COREWEBCLIENT/LIST_DAY_NAMES_MIN").split(" "),nextText:"",prevText:"",firstDay:d.pInt(y.run("CalendarWebclient","getWeekStartsOn")),showOn:"focus",dateFormat:this.dateFormatDatePicker(),onClose:function(e){a.isObservable(t)&&t(e)}}),n(e).mousedown(function(){n("#ui-datepicker-div").toggle()})},x.prototype.changeRoutingForMessageList=function(e,t,s,i,o,r,n){S.setHash(A.getMailbox(e,t,s,i,o,r,n))&&i.length>0&&this.search()===i&&this.listChangedThrottle(!this.listChangedThrottle())},x.prototype.onEnterPress=function(e){e.threadNextLoadingVisible()?e.loadNextMessages():e.openThread()},x.prototype.onMessageDblClick=function(e){if(!this.isSavingDraft(e)){var t=this.folderList().getFolderByFullName(e.folder()),s={Message:e,Cancel:!1};m.broadcastEvent("MailWebclient::MessageDblClick::before",s),s.Cancel||(t.type()===Enums.FolderTypes.Drafts||I.isTemplateFolder(e.folder())?v.composeMessageFromDrafts(e.accountId(),e.folder(),e.longUid()):this.openMessageInNewWindowBound(e))}},x.prototype.onFolderListSubscribe=function(){this.setCurrentFolder(),this.requestMessageList()},x.prototype.onShow=function(e){this.selector.useKeyboardKeys(!0),this.oPageSwitcher.show(),this.oJua&&this.oJua.setDragAndDropEnabledStatus(!0)},x.prototype.onHide=function(e){this.selector.useKeyboardKeys(!1),this.oPageSwitcher.hide(),this.oJua&&this.oJua.setDragAndDropEnabledStatus(!1)},x.prototype.onRoute=function(e){var t=A.parseMailbox(e),s=this.folderFullName()||this.folderList().inboxFolderFullName(),i=function(e,t){if(e===Enums.FolderFilter.Flagged&&D.AllowChangeStarredMessagesSource)if(/(^|\s)folders:all(\s|$)/.test(t)){if(D.StarredMessagesSource===Enums.StarredMessagesSource.InboxOnly)return t.replace("folders:all","")}else if(D.StarredMessagesSource===Enums.StarredMessagesSource.AllFolders)return"".concat(t," folders:all");return t}(t.Filters,t.Search),o=this.currentPage()!==t.Page||s!==t.Folder||this.filters()!==t.Filters||t.Filters===Enums.FolderFilter.Unseen&&I.waitForUnseenMessages()||this.search()!==i||this.sSortBy!==t.SortBy||this.iSortOrder!==t.SortOrder,r=D.MailsPerPage!==this.oPageSwitcher.perPage();this.pageSwitcherLocked(!0),s!==t.Folder||this.search()!==i||this.filters()!==t.Filters?this.oPageSwitcher.clear():this.oPageSwitcher.setPage(t.Page,D.MailsPerPage),this.pageSwitcherLocked(!1),i!==t.Search?S.replaceHash(A.getMailbox(t.Folder,this.oPageSwitcher.currentPage(),t.Uid,i,t.Filters)):t.Page!==this.oPageSwitcher.currentPage()&&(0===this.folderList().iAccountId?this.aRouteParams=e:S.replaceHash(A.getMailbox(t.Folder,this.oPageSwitcher.currentPage(),t.Uid,i,t.Filters))),this.currentPage(this.oPageSwitcher.currentPage()),this.folderFullName(t.Folder),this.filters(t.Filters),this.search(i),this.searchInput(this.search()),this.setSearchFolderMode(),this.searchSpan.notifySubscribers(),this.sSortBy=t.SortBy,this.iSortOrder=t.SortOrder,this.sortBy(t.SortBy),this.sortOrder(t.SortOrder),this.setCurrentFolder(),(o||r||0===this.collection().length)&&(t.Filters===Enums.FolderFilter.Unseen&&I.waitForUnseenMessages(!0),this.requestMessageList(),this.messageListParamsChanged(!0)),this.highlightTrigger.notifySubscribers(!0)},x.prototype.setSearchFolderMode=function(){/(^|\s)folders:all(\s|$)/.test(this.search())?this.searchFoldersMode(Enums.SearchFoldersMode.All):/(^|\s)folders:sub(\s|$)/.test(this.search())?this.searchFoldersMode(Enums.SearchFoldersMode.Sub):this.searchFoldersMode(Enums.SearchFoldersMode.Current)},x.prototype.setCurrentFolder=function(){I.setCurrentFolder(this.folderFullName(),this.filters()),this.folderType(I.getCurrentFolderType())},x.prototype.requestMessageList=function(){var e=I.getCurrentFolderFullname(),t=this.oPageSwitcher.currentPage();e.length>0?I.changeCurrentMessageList(e,t,this.search(),this.filters(),this.sortBy(),this.sortOrder()):I.checkCurrentFolderList()},x.prototype.calculateSearchStringFromAdvancedForm=function(){var e=this.searchInputFrom(),t=this.searchInputTo(),s=this.searchInputSubject(),o=this.searchInputText(),r=this.searchAttachmentsCheckbox(),a=i(T.changeDateStartAndDateEndformatForSend(this.searchDateStart(),this.searchDateEnd()),2),l=a[0],h=a[1],c=[],u=function(e){return(-1<(e=n.trim(e).replace(/"/g,'\\"')).indexOf(" ")||-1<e.indexOf('"'))&&(e='"'+e+'"'),e};return""!==e&&c.push("from:"+u(e)),""!==t&&c.push("to:"+u(t)),""!==s&&c.push("subject:"+u(s)),""!==o&&c.push("text:"+u(o)),r&&c.push("has:attachments"),""===l&&""===h||c.push("date:"+u(l)+"/"+u(h)),this.selectedSearchFoldersMode()!==Enums.SearchFoldersMode.Sub&&this.selectedSearchFoldersMode()!==Enums.SearchFoldersMode.All||c.push("folders:"+this.selectedSearchFoldersMode()),c.join(" ")},x.prototype.manualChangeSearchString=function(e){var t=["date:","subject:","text:","from:","to:","has:","folders:"],s=new RegExp("\\s("+t.join("|")+")","g"),o=(" "+e).split(s),r="";if(o.length>1)for(var n=1;n<o.length;n+=2){var a=o[n],l=o[n+1];if(a===t[0]){var h=i(l.split(" - "),2),c=h[0],u=h[1],d=i(T.changeDateStartAndDateEndformatForSend(c,u),2),p=d[0],m=d[1];(p||m)&&(r+=a+p+"/"+m+" ")}else r+=a+l+" "}else r=e;return r},x.prototype.onSearchClick=function(){var e=I.getCurrentFolderFullname(),t=this.searchInput();this.allowAdvancedSearch()&&this.bAdvancedSearch()?(t=this.calculateSearchStringFromAdvancedForm(),this.bAdvancedSearch(!1)):t=this.manualChangeSearchString(t),this.changeRoutingForMessageList(e,1,"",t,this.filters())},x.prototype.onRetryClick=function(){this.requestMessageList()},x.prototype.onClearSearchClick=function(){var e=I.getCurrentFolderFullname(),t=this.currentMessage()?this.currentMessage().longUid():"";this.clearAdvancedSearch(),this.changeRoutingForMessageList(e,1,t,"",this.filters(),this.sortBy(),this.sortOrder())},x.prototype.onClearFilterClick=function(){var e=I.getCurrentFolderFullname(),t=this.currentMessage()?this.currentMessage().longUid():"";this.clearAdvancedSearch(),this.changeRoutingForMessageList(e,1,t,"","",this.sortBy(),this.sortOrder())},x.prototype.onStopSearchClick=function(){this.onClearSearchClick()},x.prototype.isSavingDraft=function(e){return I.getCurrentFolder().type()===Enums.FolderTypes.Drafts&&e.longUid()===I.savingDraftUid()},x.prototype.routeForMessage=function(e){if(e&&e.longUid&&!this.isSavingDraft(e)){var t=I.getCurrentFolder(),s=I.getCurrentFolderFullname(),i=this.oPageSwitcher.currentPage(),o=e.longUid(),r=this.currentMessage()?this.currentMessage().longUid():"",n=this.search();""!==o&&o!==r&&(m.isMobile()&&t.type()===Enums.FolderTypes.Drafts?S.setHash(A.getComposeFromMessage("drafts",e.accountId(),e.folder(),e.longUid())):(this.changeRoutingForMessageList(s,i,o,n,this.filters(),this.sortBy(),this.sortOrder()),m.isMobile()&&I.currentMessage()&&o===I.currentMessage().longUid()&&I.currentMessage.valueHasMutated()))}},x.prototype.unbind=function(){this.selector.unbind()},x.prototype.onBind=function(e){var t=this,s=r.bind(function(e){e&&e.stopPropagation&&e.stopPropagation()},this);n(".message_list",e).on("click",function(){t.isFocused(!1)}).on("click",".message_sub_list .item .flag",function(e){t.onFlagClick(a.dataFor(this)),e&&e.stopPropagation&&e.stopPropagation()}).on("dblclick",".message_sub_list .item .flag",s).on("click",".message_sub_list .item .thread-pin",s).on("dblclick",".message_sub_list .item .thread-pin",s),this.selector.initOnApplyBindings(".message_sub_list .item",".message_sub_list .item.selected",".message_sub_list .item .custom_checkbox",n(".message_list",e),n(".message_list_scroll.scroll-inner",e)),r.delay(r.bind(function(){this.createDatePickerObject(this.searchDateStartDom(),this.searchDateStart),this.createDatePickerObject(this.searchDateEndDom(),this.searchDateEnd)},this),1e3),this.initUploader()},x.prototype.onFlagClick=function(e){this.isSavingDraft(e)||I.executeGroupOperation("SetMessageFlagged",[e.longUid()],"flagged",!e.flagged())},x.prototype.executeMarkAsRead=function(){I.executeGroupOperation("SetMessagesSeen",this.checkedOrSelectedUids(),"seen",!0)},x.prototype.executeMarkAsUnread=function(){I.executeGroupOperation("SetMessagesSeen",this.checkedOrSelectedUids(),"seen",!1)},x.prototype.executeMarkAllRead=function(){I.executeGroupOperation("SetAllMessagesSeen",[],"seen",!0)},x.prototype.executeMoveToFolder=function(e){var t=I.getFolderByFullName(I.currentAccountId(),e),s=this.checkedOrSelectedUids(),i=I.getUidsSeparatedByFolders(s);t&&r.each(i,function(e){if(I.currentAccountId()===e.iAccountId){var s=I.getFolderByFullName(I.currentAccountId(),e.sFolder);s&&I.moveMessagesToFolder(s,t,e.aUids)}})},x.prototype.executeCopyToFolder=function(e){var t=I.getFolderByFullName(I.currentAccountId(),e),s=this.checkedOrSelectedUids(),i=I.getUidsSeparatedByFolders(s);t&&r.each(i,function(e){if(I.currentAccountId()===e.iAccountId){var s=I.getFolderByFullName(I.currentAccountId(),e.sFolder);s&&I.copyMessagesToFolder(s,t,e.aUids)}})},x.prototype.onDeletePress=function(e){var t=r.map(e,function(e){return e.longUid()});t.length>0&&this.deleteMessages(t)},x.prototype.executeDelete=function(){this.deleteMessages(this.checkedOrSelectedUids())},x.prototype.deleteMessages=function(e){var t="",s=null;I.uidList().filters()!==Enums.FolderFilter.Unseen&&1===e.length&&I.currentMessage()&&e[0]===I.currentMessage().longUid()&&""===(t=I.prevMessageUid())&&(t=I.nextMessageUid()),e.length>0&&L.deleteMessages(e,function(){""!==t&&(s=r.find(this.collection(),function(e){return e&&r.isFunction(e.longUid)&&(e.longUid()===t||e.uid()===t)}))&&this.routeForMessage(s)}.bind(this))},x.prototype.executeSpam=function(){var e=this.checkedOrSelectedUids(),t=I.getUidsSeparatedByFolders(e);r.each(t,function(e){var t=I.oFolderListItems[e.iAccountId],s=t?t.spamFolder():null,i=t?t.getFolderByFullName(e.sFolder):null;i&&s&&i.fullName()!==s.fullName()&&I.moveMessagesToFolder(i,s,e.aUids)})},x.prototype.executeNotSpam=function(){var e=I.getCurrentFolder(),t=this.folderList().inboxFolder(),s=this.checkedOrSelectedUids(),i=I.getUidsSeparatedByFolders(s);t&&e&&e.fullName()!==t.fullName()&&r.each(i,function(s){e.iAccountId===s.iAccountId&&e.fullName()===s.sFolder&&I.moveMessagesToFolder(e,t,s.aUids)})},x.prototype.executeSort=function(e){var t=this.sortBy();this.sortBy(e),t===e?this.sortOrder(this.sortOrder()===Enums.SortOrder.Asc?Enums.SortOrder.Desc:Enums.SortOrder.Asc):this.sortOrder(D.MessagesSortBy.DefaultSortOrder);var s=I.getCurrentFolderFullname(),i=this.oPageSwitcher.currentPage();this.changeRoutingForMessageList(s,i,"",this.search(),this.filters(),this.sortBy(),this.sortOrder())},x.prototype.clearAdvancedSearch=function(){this.searchInputFrom(""),this.searchInputTo(""),this.searchInputSubject(""),this.searchInputText(""),this.bAdvancedSearch(!1),this.searchAttachmentsCheckbox(!1),this.searchAttachments(""),this.searchDateStart(""),this.searchDateEnd(""),this.selectedSearchFoldersMode(this.isStarredInAllFolders()?"all":"")},x.prototype.onAdvancedSearchClick=function(){this.bAdvancedSearch(!this.bAdvancedSearch())},x.prototype.calculateSearchStringForDescription=function(){return u.encodeHtml(this.searchHighlightedInputFormatted().replace(/(^|\s)folders:(all|sub)(\s|$)/,""))},x.prototype.initUploader=function(){var e=this;this.uploaderArea()&&(this.oJua=new b({action:"?/Api/",name:"jua-uploader",queueSize:2,dragAndDropElement:this.uploaderArea(),disableAjaxUpload:!1,disableFolderDragAndDrop:!1,disableDragAndDrop:!1,hidden:r.extendOwn({Module:D.ServerModuleName,Method:"UploadMessage",Parameters:function(){return JSON.stringify({AccountID:I.currentAccountId(),Folder:e.folderFullName()})}},m.getCommonRequestParameters())}),this.oJua.on("onDrop",r.bind(this.onFileDrop,this)).on("onComplete",r.bind(this.onFileUploadComplete,this)).on("onBodyDragEnter",r.bind(this.bDragActive,this,!0)).on("onBodyDragLeave",r.bind(this.bDragActive,this,!1)))},x.prototype.onFileDrop=function(e){e&&e.File&&e.File.type&&0===e.File.type.indexOf("message/")||M.showError(u.i18n("MAILWEBCLIENT/ERROR_FILE_NOT_EML"))},x.prototype.onFileUploadComplete=function(e,t,s){t&&s&&!s.ErrorCode?I.executeCheckMail(!0):p.showErrorByCode(s||{},u.i18n("COREWEBCLIENT/ERROR_UPLOAD_FILE"))},x.prototype.selectFolderSearch=function(e){this.selectedSearchFoldersMode(e)},e.exports=x},"t/bC":(e,t,s)=>{"use strict";var i=s("uQaC"),o=s("KIwC"),r=s("sdEb"),n={},a="YYYY.MM.DD";n.formattedDateSearchHighlightedInput=function(e){var t=i.getDateFormatForMoment(o.dateFormat()),s=e.match(/date:([^/]*)(\/([^/]*))?/),n="",l="";if(s){var h=r(s[1],a);n=h.isValid()?h.format(t):s[1];var c=r(s[3],a);l=c.isValid()?c.format(t):s[3]}if(!n&&!l)return e;var u=e.match(/(\w+):(\S+)/g),d=[];return u&&u.forEach(function(e){var t=e.split(":"),s="date"===t[0]?n+" - "+l:t[1];d.push(t[0]+":"+s)}),d.join(" ")},n.changeDateStartAndDateEndformatForSend=function(e,t){var s=r(null==e?void 0:e.trim(),i.getDateFormatForMoment(o.dateFormat())),n=r(null==t?void 0:t.trim(),i.getDateFormatForMoment(o.dateFormat()));return[s.isValid()&&s.format(a)||"",n.isValid()&&n.format(a)||""]},e.exports=n},"tnf/":(e,t,s)=>{"use strict";var i=s("p09A"),o=s("LKDt"),r=s("uQaC"),n=s("P7bQ"),a=s("Z9uT"),l=s("D2Gh"),h=s("Fj7m"),c=s("eGl8");function u(){this.allowSpamButtons=i.observable(!1),this.isCurrentMessageLoaded=i.observable(!1),this.neverSpamCommand=r.createCommand(this,this.neverSpam,this.isCurrentMessageLoaded),this.alwaysSpamCommand=r.createCommand(this,this.alwaysSpam,this.isCurrentMessageLoaded)}u.prototype.ViewTemplate="MailWebclient_Message_SpamButtonsView",u.prototype.doAfterPopulatingMessage=function(e){var t=c.currentMessage(),s=t?h.getAccount(t.accountId()):h.getCurrent(),i=!!s&&s.enableAllowBlockLists(),o=c.isTemplateFolder(t&&t.folder());this.allowSpamButtons(i&&!o),this.isCurrentMessageLoaded(!!e)},u.prototype.neverSpam=function(){var e=c.currentMessage().oFrom.getFirstEmail(),t={AccountID:h.editedId(),Email:e};n.send("AddEmailToAllowList",t,function(t){t&&t.Result?l.showReport(o.i18n("MAILWEBCLIENT/REPORT_ADD_EMAIL_TO_ALLOWLIST_SUCCESS",{EMAIL:e})):a.showErrorByCode(t,o.i18n("MAILWEBCLIENT/ERROR_ADD_EMAIL_TO_ALLOWLIST",{EMAIL:e}))},this)},u.prototype.alwaysSpam=function(){var e=c.currentMessage().oFrom.getFirstEmail(),t={AccountID:h.editedId(),Email:e};n.send("AddEmailToBlockList",t,function(t){t&&t.Result?l.showReport(o.i18n("MAILWEBCLIENT/REPORT_ADD_EMAIL_TO_BLOCKLIST_SUCCESS",{EMAIL:e})):a.showErrorByCode(t,o.i18n("MAILWEBCLIENT/ERROR_ADD_EMAIL_TO_BLOCKLIST",{EMAIL:e}))},this)},e.exports=new u}}]);