/home/ivoiecob/email.hirewise-va.com/static/js/SettingsWebclient.app.f5594df39070380ba81d.min.js
(self.webpackChunkafterlogic_aurora_platform=self.webpackChunkafterlogic_aurora_platform||[]).push([[9511],{"7tcO":(e,t,i)=>{"use strict";var s=i("a7T2"),n=i("ERH9");e.exports={HashModuleName:"settings",TabsOrder:["common","mail","mail-accounts","contacts","calendar","files","mobilesync","outlooksync","helpdesk","openpgp"],init:function(e){var t=e.SettingsWebclient;s.isEmpty(t)||(this.TabsOrder=n.pArray(t.TabsOrder,this.TabsOrder))}}},FKMi:(e,t,i)=>{"use strict";var s=i("a7T2"),n=i("M4cL"),a=i("p09A"),o=i("yU9o"),r=i("ioSH"),h=i("db2p"),u=i("7tcO"),c=n("html");function b(){h.call(this,"SettingsWebclient"),this.tabs=a.observableArray([]),this.currentTab=a.observable(null),o.subscribeEvent("OpenSettingTab",s.bind(function(e){this.changeTab(e.Name)},this)),o.broadcastEvent("SettingsWebclient::ConstructView::after",{Name:this.ViewConstructorName,View:this})}s.extendOwn(b.prototype,h.prototype),b.prototype.ViewTemplate="SettingsWebclient_SettingsView",b.prototype.ViewConstructorName="CSettingsView",b.prototype.registerTab=function(e,t,i){var n=u.TabsOrder.length,a=e(),o=s.findWhere(this.tabs(),{name:t});s.isEmpty(a)||(a.SettingsTabName=t,a.SettingsTabTitle=i,o&&(s.isArray(o.sections)&&(s.each(o.sections,function(e){a.addSettingsSection(e)}),delete o.sections),o.view=a)),o||this.tabs.push({view:a,name:t}),this.tabs(s.sortBy(this.tabs(),function(e){var t=s.indexOf(u.TabsOrder,e.name);return-1!==t?t:n}))},b.prototype.registerTabSection=function(e,t){var i=s.findWhere(this.tabs(),{name:t}),n=e();i?i.view.addSettingsSection(n):(this.registerTab(function(){return{visible:a.observable(!1)}},t,""),(i=s.findWhere(this.tabs(),{name:t}))&&(s.isArray(i.sections)||(i.sections=[]),i.sections.push(n)))},b.prototype.hasUnsavedChanges=function(){var e=this.currentTab();return e&&e.view&&s.isFunction(e.view.hasUnsavedChanges)&&e.view.hasUnsavedChanges()},b.prototype.discardChanges=function(){var e=this.currentTab();e&&e.view&&s.isFunction(e.view.revert)&&e.view.revert()},b.prototype.onShow=function(){c.addClass("non-adjustable")},b.prototype.onHide=function(){var e=this.currentTab();e&&s.isFunction(e.view.hide)&&e.view.hide(function(){},function(){}),c.removeClass("non-adjustable")},b.prototype.onRoute=function(e){var t=e.shift(),i=this.currentTab(),n=s.find(this.tabs(),function(e){return e.name===t}),a=function(){n&&(s.isFunction(n.view.showTab)&&n.view.showTab(e),this.currentTab(n),n.name!==t&&r.replaceHashDirectly([u.HashModuleName,n.name]))}.bind(this),o=s.bind(function(){i&&r.replaceHashDirectly([u.HashModuleName,i.name])},this),h=!0;i&&t===i.name?s.isFunction(i.view.showTab)&&i.view.showTab(e):(n&&n.view.visible&&!n.view.visible()&&(n=s.find(this.tabs(),function(e){return!e.view.visible||e.view.visible()})),n?i&&s.isFunction(i.view.hide)&&(i.view.hide(a,o),h=!1):i||(n=s.find(this.tabs(),function(e){return!e.view.visible||e.view.visible()})),h&&a())},b.prototype.changeTab=function(e){r.setHash([u.HashModuleName,e])},b.prototype.setAddHash=function(e){r.setHash(s.union([u.HashModuleName,this.currentTab()?this.currentTab().name:""],e))},e.exports=new b},"NKD+":(e,t,i)=>{"use strict";var s=i("a7T2"),n=i("p09A"),a=i("LKDt"),o=i("8QQh"),r=i("Z9uT"),h=i("D2Gh"),u=i("PMEU"),c=i("MYiO");function b(e){this.sServerModule=e||"Core",this.isSaving=n.observable(!1),this.visible=n.observable(!0),this.sSavedState="",this.bShown=!1,this.SettingsTabName="",this.SettingsTabTitle="",this.aSettingsSections=[]}b.prototype.ViewTemplate="",b.prototype.addSettingsSection=function(e){this.aSettingsSections.push(e)},b.prototype.showTab=function(e){this.bShown=!0,this.revert(),s.isFunction(this.onShow)&&this.onShow(e),s.each(this.aSettingsSections,function(t){s.isFunction(t.onShow)&&t.onShow(e)})},b.prototype.hasUnsavedChanges=function(){var e=this.getCurrentState()!==this.sSavedState;return s.each(this.aSettingsSections,function(t){s.isFunction(t.getCurrentState)&&(e=e||t.getCurrentState()!==t.sSavedState)}),e},b.prototype.hide=function(e,t){this.hasUnsavedChanges()?u.showPopup(c,[a.i18n("COREWEBCLIENT/CONFIRM_DISCARD_CHANGES"),s.bind(function(i){i?(this.bShown=!1,e(),this.revert()):s.isFunction(t)&&t()},this)]):(this.bShown=!1,e())},b.prototype.getCurrentValues=function(){return[]},b.prototype.getCurrentState=function(){return this.getCurrentValues().join(":")},b.prototype.updateSavedState=function(){this.sSavedState=this.getCurrentState()},b.prototype.revertGlobalValues=function(){},b.prototype.revert=function(){s.each(this.aSettingsSections,function(e){s.isFunction(e.revert)&&e.revert()}),this.revertGlobalValues(),this.updateSavedState()},b.prototype.getParametersForSave=function(){return{}},b.prototype.save=function(){s.isFunction(this.validateBeforeSave)&&!this.validateBeforeSave()||(this.isSaving(!0),o.send(this.sServerModule,"UpdateSettings",this.getParametersForSave(),this.onResponse,this))},b.prototype.applySavedValues=function(e){},b.prototype.onResponse=function(e,t){if(this.isSaving(!1),e.Result){var i=t.Parameters;this.updateSavedState(),this.applySavedValues(i),h.showReport(a.i18n("COREWEBCLIENT/REPORT_SETTINGS_UPDATE_SUCCESS"))}else r.showErrorByCode(e,a.i18n("COREWEBCLIENT/ERROR_SAVING_SETTINGS_FAILED"))},b.prototype.setAccessLevel=function(e,t){},e.exports=b},cR1d:(e,t,i)=>{var s=i("p09A"),n=i("ioSH");function a(e){this.sName="",this.visible=s.observable(!0),this.baseHash=s.observable(""),this.hash=s.observable(""),this.linkText=s.observable(e),this.isCurrent=s.observable(!1),this.recivedAnim=s.observable(!1).extend({autoResetToFalse:500}),this.unseenCount=s.observable(0),this.allowChangeTitle=s.observable(!1),this.inactiveTitle=s.observable(""),this.excludedHashes=s.observableArray([])}a.prototype.ViewTemplate="CoreWebclient_HeaderItemView",a.prototype.setName=function(e){this.sName=e.toLowerCase(),""===this.baseHash()?(this.hash(n.buildHashFromArray([e.toLowerCase()])),this.baseHash(this.hash())):this.hash(this.baseHash())},e.exports=a},lC9n:(e,t,i)=>{"use strict";e.exports=function(e){var t=i("yU9o"),s=null;if(t.isUserNormalOrTenant()){var n=i("7tcO");return n.init(e),{getScreens:function(){var e={};return e[n.HashModuleName]=function(){return i("FKMi")},e},getHeaderItem:function(){if(null===s){var e=i("LKDt"),t=i("cR1d");s=new t(e.i18n("COREWEBCLIENT/HEADING_SETTINGS_TABNAME"))}return{item:s,name:n.HashModuleName}},registerSettingsTab:function(e,t,s){i("FKMi").registerTab(e,t,s)},registerSettingsTabSection:function(e,t,s){i("FKMi").registerTabSection(e,t,s)},getAbstractSettingsFormViewClass:function(){return i("NKD+")},setAddHash:function(e){i("FKMi").setAddHash(e)}}}return null}}}]);