v1.3.9.484

+ Default Domain (AdminPanel/Login Screen)
+ Use short login form (AdminPanel/Domain)
+ Add unminified css file (app.css)
* update jquery (1.10.3)
* update jquery-ui (1.10.1)
* update Lazy Load plugin (1.9.0)
* update mousewheel plugin (3.1.4)
- remove headjs
This commit is contained in:
RainLoop Team 2013-11-07 01:09:36 +04:00
parent 45f3bf61e2
commit de5ff0bcdd
437 changed files with 9457 additions and 1860 deletions

View file

@ -1 +1 @@
1.3.8.476
1.3.9.484

View file

@ -1 +0,0 @@
600ddea78fde5db1d72498a9a612c2e5efc1229f

View file

@ -1 +0,0 @@
1.3.8.476

View file

@ -1,103 +0,0 @@
<!DOCTYPE html>
<html id="id-html">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<noscript>
<meta http-equiv="refresh" content="0; URL={{BaseAppIndexFile}}?/NoScript" />
</noscript>
<!--[if lte IE 7]>
<meta http-equiv="refresh" content="0; URL={{BaseAppIndexFile}}?/BadBrowser" />
<![endif]-->
<script type="text/javascript">
if (!navigator || !navigator.cookieEnabled) {
document.location.replace('{{BaseAppIndexFile}}?/NoCookie');
}
</script>
<meta name="robots" content="noindex, nofollow, noodp" />
<meta name="google" content="notranslate" />
<title></title>
<link rel="shortcut icon" href="{{BaseAppFaviconFile}}" />
<link type="text/css" rel="stylesheet" href="{{BaseAppMainCssLink}}" />
<link type="text/css" rel="stylesheet" id="rlThemeLink" />
<script type="text/javascript" src="{{BaseAppBootScriptLink}}"></script>
<script type="text/javascript">
document.write(unescape('%3Csc' + 'ript type="text/jav' + 'ascr' + 'ipt" sr' + 'c="{{BaseAppDataScriptLink}}' + (window.__rlah ? window.__rlah() || '0' : '0') + '/"%3E%3C/' + 'scr' + 'ipt%3E'));
</script>
<script type="text/javascript">
var fShowError = function () {
var oR = document.getElementById('rl-loading'),
oL = document.getElementById('rl-loading-error');
if (oR) {oR.style.display = 'none';}
if (oL) {oL.style.display = 'block';}
if (window.SimplePace) {window.SimplePace.set(100);}
};
if (window.rainloopAppData && window.rainloopAppData['NewThemeLink']) {
document.getElementById('rlThemeLink').href = window.rainloopAppData['NewThemeLink'];
}
if (head && window.rainloopAppData && window.rainloopAppData['TemplatesLink']) {
head.js('{{BaseAppLibsScriptLink}}');
if (window.rainloopAppData['TemplatesLink']) {
head.js(window.rainloopAppData['TemplatesLink']);
}
if (window.rainloopAppData['LangLink']) {
head.js(window.rainloopAppData['LangLink']);
}
head.js('{{BaseAppMainScriptLink}}', function () {
if (window.rainloopAppData['PluginsLink']) {
head.js(window.rainloopAppData['PluginsLink'], function () {
if (window.__RLBOOT) {
window.__RLBOOT(function (bV) {
if (!bV) {
fShowError();
}
});
}
});
} else {
if (window.__RLBOOT) {
window.__RLBOOT(function (bV) {
if (!bV) {
fShowError();
}
});
}
}
});
} else {
fShowError();
}
</script>
</head>
<body class="thm-body">
<div id="rl-loading" class="thm-loading">RainLoop</div>
<div id="rl-loading-error" class="thm-loading">
An Error occurred,<br />please refresh the page and try again.
</div>
<div id="rl-content">
<div id="rl-popups"></div>
<div id="rl-center">
<div id="rl-top"></div>
<div id="rl-top-resizer-left">
<div id="rl-left"></div>
</div>
<div id="rl-top-resizer-right">
<div id="rl-right"></div>
</div>
<div id="rl-bottom"></div>
</div>
</div>
<div id="rl-templates"></div>
<div id="rl-hidden"></div>
</body>
</html>

File diff suppressed because one or more lines are too long

View file

@ -1,156 +0,0 @@
(function(h,j,d,ga,A,i){function p(){this.sBase="#/";this.sCdnStaticDomain=e.settingsGet("CdnStaticDomain");this.sVersion=e.settingsGet("Version");this.sSpecSuffix=e.settingsGet("AuthAccountHash")||"0";this.sServer=(e.settingsGet("IndexFile")||"./")+"?";this.sCdnStaticDomain=""===this.sCdnStaticDomain?this.sCdnStaticDomain:"/"===this.sCdnStaticDomain.substr(-1)?this.sCdnStaticDomain:this.sCdnStaticDomain+"/"}function O(){}function P(){}function Q(){var a=i.find([P,O],function(a){return a.supported()});
a&&(this.oDriver=new a)}function ha(){}function u(a,b){this.sPosition=c.pString(a);this.sTemplate=c.pString(b);this.viewModelName="";this.viewModelVisibility=d.observable(!1);"Popups"===this.sPosition&&(this.modalVisibility=d.observable(!1));this.viewModelDom=null}function x(a,b){this.sScreenName=a;this.aViewModels=c.isArray(b)?b:[]}function q(){this.sDefaultScreenName="";this.oScreens={};this.oCurrentScreen=this.oBoot=null;this.popupVisibility=d.observable(!1);this.popupVisibility.subscribe(function(a){e&&
e.popupVisibility(a)})}function t(a,b){this.email=a||"";this.name=b||"";this.privateType=null;this.clearDuplicateName()}function C(){u.call(this,"Popups","PopupsDomain");this.edit=d.observable(!1);this.saving=d.observable(!1);this.savingError=d.observable("");this.whiteListPage=d.observable(!1);this.testing=d.observable(!1);this.testingDone=d.observable(!1);this.testingImapError=d.observable(!1);this.testingSmtpError=d.observable(!1);this.imapServerFocus=d.observable(!1);this.smtpServerFocus=d.observable(!1);
this.name=d.observable("");this.imapServer=d.observable("");this.imapPort=d.observable(m.Values.ImapDefaulPort);this.imapSecure=d.observable(f.ServerSecure.None);this.smtpServer=d.observable("");this.smtpPort=d.observable(m.Values.SmtpDefaulPort);this.smtpSecure=d.observable(f.ServerSecure.None);this.smtpAuth=d.observable(!0);this.whiteList=d.observable("");this.imapServerFocus.subscribe(function(a){a&&(""!==this.name()&&""===this.imapServer())&&this.imapServer(this.name())},this);this.smtpServerFocus.subscribe(function(a){a&&
(""!==this.imapServer()&&""===this.smtpServer())&&this.smtpServer(this.imapServer())},this);this.headerText=d.computed(function(){var a=this.name();return this.edit()?'Edit Domain "'+a+'"':"Add Domain"+(""===a?"":' "'+a+'"')},this);this.domainIsComputed=d.computed(function(){return""!==this.name()&&""!==this.imapServer()&&""!==this.imapPort()&&""!==this.smtpServer()&&""!==this.smtpPort()},this);this.canBeTested=d.computed(function(){return!this.testing()&&this.domainIsComputed()},this);this.canBeSaved=
d.computed(function(){return!this.saving()&&this.domainIsComputed()},this);this.createOrAddCommand=c.createCommand(this,function(){this.saving(!0);e.remote().createOrUpdateDomain(i.bind(this.onDomainCreateOrSaveResponse,this),!this.edit(),this.name(),this.imapServer(),this.imapPort(),this.imapSecure(),this.smtpServer(),this.smtpPort(),this.smtpSecure(),this.smtpAuth(),this.whiteList())},this.canBeSaved);this.testConnectionCommand=c.createCommand(this,function(){this.whiteListPage(!1);this.testingDone(!1);
this.testingImapError(!1);this.testingSmtpError(!1);this.testing(!0);e.remote().testConnectionForDomain(i.bind(this.onTestConnectionResponse,this),this.imapServer(),this.imapPort(),this.imapSecure(),this.smtpServer(),this.smtpPort(),this.smtpSecure(),this.smtpAuth())},this.canBeTested);this.whiteListCommand=c.createCommand(this,function(){this.whiteListPage(!this.whiteListPage())})}function R(){u.call(this,"Popups","PopupsPlugin");var a=this;this.onPluginSettingsUpdateResponse=i.bind(this.onPluginSettingsUpdateResponse,
this);this.saveError=d.observable("");this.name=d.observable("");this.readme=d.observable("");this.configures=d.observableArray([]);this.hasReadme=d.computed(function(){return""!==this.readme()},this);this.hasConfiguration=d.computed(function(){return 0<this.configures().length},this);this.readmePopoverConf={placement:"top",trigger:"hover",title:"About",content:function(){return a.readme()}};this.saveCommand=c.createCommand(this,function(){var a={};a.Name=this.name();i.each(this.configures(),function(g){var c=
g.value();if(!1===c||!0===c)c=c?"1":"0";a["_"+g.Name]=c},this);this.saveError("");e.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse,a)},this.hasConfiguration)}function S(){u.call(this,"Popups","PopupsActivate");var a=this;this.domain=d.observable("");this.key=d.observable("");this.key.focus=d.observable(!1);this.activationSuccessed=d.observable(!1);this.licenseTrigger=e.data().licenseTrigger;this.activateProcess=d.observable(!1);this.activateText=d.observable("");this.activateText.isError=
d.observable(!1);this.key.subscribe(function(){this.activateText("");this.activateText.isError(!1)},this);this.activationSuccessed.subscribe(function(a){a&&this.licenseTrigger(!this.licenseTrigger())},this);this.activateCommand=c.createCommand(this,function(){this.activateProcess(!0);this.validateSubscriptionKey()?e.remote().licensingActivate(function(b,g){a.activateProcess(!1);f.StorageResultType.Success===b&&g.Result?!0===g.Result?(a.activationSuccessed(!0),a.activateText("Subscription Key Activated Successfully"),
a.activateText.isError(!1)):(a.activateText(g.Result),a.activateText.isError(!0),a.key.focus(!0)):(g.ErrorCode?a.activateText(c.getNotification(g.ErrorCode)):a.activateText(c.getNotification(f.Notification.UnknownError)),a.activateText.isError(!0),a.key.focus(!0))},this.domain(),this.key()):(this.activateProcess(!1),this.activateText("Invalid Subscription Key"),this.activateText.isError(!0),this.key.focus(!0))},function(){return!this.activateProcess()&&""!==this.domain()&&""!==this.key()&&!this.activationSuccessed()})}
function T(){u.call(this,"Popups","PopupsLanguages");this.exp=d.observable(!1);this.languages=d.computed(function(){var a=e.data().mainLanguage();return i.map(e.data().languages(),function(b){return{key:b,selected:b===a,fullName:c.convertLangName(b)}})})}function U(){u.call(this,"Right","AdminLogin");this.login=d.observable("");this.password=d.observable("");this.loginError=d.observable(!1);this.passwordError=d.observable(!1);this.loginFocus=d.observable(!1);this.login.subscribe(function(){this.loginError(!1)},
this);this.password.subscribe(function(){this.passwordError(!1)},this);this.submitRequest=d.observable(!1);this.submitError=d.observable("");this.submitCommand=c.createCommand(this,function(){this.loginError(""===c.trim(this.login()));this.passwordError(""===c.trim(this.password()));if(this.loginError()||this.passwordError())return!1;this.submitRequest(!0);e.remote().adminLogin(i.bind(function(a,b){f.StorageResultType.Success===a&&b&&"AdminLogin"===b.Action?b.Result?e.loginAndLogoutReload():b.ErrorCode&&
(this.submitRequest(!1),this.submitError(c.getNotification(b.ErrorCode))):(this.submitRequest(!1),this.submitError(c.getNotification(f.Notification.UnknownError)))},this),this.login(),this.password());return!0},function(){return!this.submitRequest()})}function Y(a){u.call(this,"Left","AdminMenu");this.menu=a.menu}function Z(){u.call(this,"Right","AdminPane");this.adminDomain=d.observable(e.settingsGet("AdminDomain"));this.version=d.observable(e.settingsGet("Version"))}function ia(){var a=e.data();
this.mainLanguage=a.mainLanguage;this.mainTheme=a.mainTheme;this.language=a.language;this.theme=a.theme;this.allowThemes=a.allowThemes;this.allowCustomTheme=a.allowCustomTheme;this.allowCustomLogin=a.allowCustomLogin;this.allowLanguagesOnLogin=a.allowLanguagesOnLogin;this.allowLanguagesOnSettings=a.allowLanguagesOnSettings;this.allowAdditionalAccounts=a.allowAdditionalAccounts;this.determineUserLanguage=a.determineUserLanguage;this.title=d.observable(e.settingsGet("Title"));this.themesOptions=d.computed(function(){return i.map(a.themes(),
function(a){return{optValue:a,optText:c.convertThemeName(a)}})});this.languagesOptions=d.computed(function(){return i.map(a.languages(),function(a){return{optValue:a,optText:c.convertLangName(a)}})});this.contactsSupported=e.settingsGet("ContactsIsSupported");this.contactsIsAllowed=e.settingsGet("ContactsIsAllowed");this.titleTrigger=d.observable(f.SaveSettingsStep.Idle);this.languageTrigger=d.observable(f.SaveSettingsStep.Idle);this.themeTrigger=d.observable(f.SaveSettingsStep.Idle)}function D(){var a=
e.data();this.domains=a.domains;this.domainsLoading=a.domainsLoading;this.iDomainForDeletionTimeout=0;this.visibility=d.computed(function(){return a.domainsLoading()?"visible":"hidden"},this);this.domainForDeletion=d.observable(null).extend({toggleSubscribe:[this,function(a){a&&a.deleteAccess(!1)},function(a){a&&(a.deleteAccess(!0),this.startDomainForDeletionTimeout())}]})}function L(){this.licensing=e.data().licensing;this.licensingProcess=e.data().licensingProcess;this.licenseValid=e.data().licenseValid;
this.licenseExpired=e.data().licenseExpired;this.licenseError=e.data().licenseError;this.licenseTrigger=e.data().licenseTrigger;this.adminDomain=d.observable("");this.subscriptionEnabled=d.observable(!!e.settingsGet("SubscriptionEnabled"));this.licenseTrigger.subscribe(function(){this.subscriptionEnabled()&&e.reloadLicensing(!0)},this)}function M(){this.csrfProtection=d.observable(!!e.settingsGet("UseTokenProtection"));this.usageStatistics=d.observable(!!e.settingsGet("UsageStatistics"));this.adminLogin=
d.observable(e.settingsGet("AdminLogin"));this.adminPassword=d.observable("");this.adminPasswordNew=d.observable("");this.adminPasswordUpdateError=d.observable(!1);this.adminPasswordUpdateSuccess=d.observable(!1);this.adminPassword.subscribe(function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1)},this);this.adminPasswordNew.subscribe(function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1)},this);this.onNewAdminPasswordResponse=i.bind(this.onNewAdminPasswordResponse,
this);this.saveNewAdminPasswordCommand=c.createCommand(this,function(){this.adminPasswordUpdateError(!1);this.adminPasswordUpdateSuccess(!1);e.remote().saveNewAdminPassword(this.onNewAdminPasswordResponse,{Password:this.adminPassword(),NewPassword:this.adminPasswordNew()})},function(){return""!==this.adminPassword()&&""!==this.adminPasswordNew()})}function ja(){var a=e.data();this.googleEnable=a.googleEnable;this.googleClientID=a.googleClientID;this.googleClientSecret=a.googleClientSecret;this.googleTrigger1=
d.observable(f.SaveSettingsStep.Idle);this.googleTrigger2=d.observable(f.SaveSettingsStep.Idle);this.facebookEnable=a.facebookEnable;this.facebookAppID=a.facebookAppID;this.facebookAppSecret=a.facebookAppSecret;this.facebookTrigger1=d.observable(f.SaveSettingsStep.Idle);this.facebookTrigger2=d.observable(f.SaveSettingsStep.Idle);this.twitterEnable=a.twitterEnable;this.twitterConsumerKey=a.twitterConsumerKey;this.twitterConsumerSecret=a.twitterConsumerSecret;this.twitterTrigger1=d.observable(f.SaveSettingsStep.Idle);
this.twitterTrigger2=d.observable(f.SaveSettingsStep.Idle);this.dropboxEnable=a.dropboxEnable;this.dropboxApiKey=a.dropboxApiKey;this.dropboxTrigger1=d.observable(f.SaveSettingsStep.Idle)}function F(){var a=e.data();this.enabledPlugins=d.observable(!!e.settingsGet("EnabledPlugins"));this.pluginsError=d.observable("");this.plugins=a.plugins;this.pluginsLoading=a.pluginsLoading;this.visibility=d.computed(function(){return a.pluginsLoading()?"visible":"hidden"},this);this.onPluginLoadRequest=i.bind(this.onPluginLoadRequest,
this);this.onPluginDisableRequest=i.bind(this.onPluginDisableRequest,this)}function J(){var a=e.data();this.packagesError=d.observable("");this.packages=a.packages;this.packagesLoading=a.packagesLoading;this.packagesReal=a.packagesReal;this.packagesMainUpdatable=a.packagesMainUpdatable;this.packagesCurrent=d.computed(function(){return i.filter(this.packages(),function(a){return a&&""!==a.installed&&!a.compare})},this);this.packagesAvailableForUpdate=d.computed(function(){return i.filter(this.packages(),
function(a){return a&&""!==a.installed&&!!a.compare})},this);this.packagesAvailableForInstallation=d.computed(function(){return i.filter(this.packages(),function(a){return a&&""===a.installed})},this);this.visibility=d.computed(function(){return a.packagesLoading()?"visible":"hidden"},this)}function aa(){c.initDataConstructorBySettings(this)}function ba(){c.initDataConstructorBySettings(this);this.domainsLoading=d.observable(!1).extend({throttle:100});this.domains=d.observableArray([]);this.pluginsLoading=
d.observable(!1).extend({throttle:100});this.plugins=d.observableArray([]);this.packagesReal=d.observable(!0);this.packagesMainUpdatable=d.observable(!0);this.packagesLoading=d.observable(!1).extend({throttle:100});this.packages=d.observableArray([]);this.licensing=d.observable(!1);this.licensingProcess=d.observable(!1);this.licenseValid=d.observable(!1);this.licenseExpired=d.observable(0);this.licenseError=d.observable("");this.licenseTrigger=d.observable(!1)}function G(){this.oRequests={}}function n(){this.oRequests=
{};this.oRequests={}}function E(){this.oEmailsPicsHashes={};this.oServices={}}function ka(){E.call(this)}function H(a){x.call(this,"settings",a);this.menu=d.observableArray([]);this.oViewModelPlace=this.oCurrentSubScreen=null}function ca(){x.call(this,"login",[U])}function da(){H.call(this,[Y,Z])}function v(){this.oLocal=this.oLink=this.oPlugins=this.oSettings=null;this.isLocalAutocomplete=!0;this.popupVisibility=d.observable(!1);this.iframe=j('<iframe style="display:none" src="javascript:;" />').appendTo("body");
I.on("error",function(a){e&&(a&&a.originalEvent&&a.originalEvent.message&&-1===c.inArray(a.originalEvent.message,["Uncaught Error: Error calling method on NPObject."]))&&e.remote().jsError(c.emptyFunction,a.originalEvent.message,a.originalEvent.filename,a.originalEvent.lineno,location&&location.toString?location.toString():"",K.attr("class"))})}function w(){v.call(this);this.oCache=this.oRemote=this.oData=null}var m={},f={},l={},c={},o={},k={},B={settings:[],"settings-removed":[],"settings-disabled":[]},
r=null,V=h.rainloopAppData||{},ea=h.rainloopI18N||{},K=j("html"),I=j(h),la=j(h.document),W=h.Notification&&h.Notification.requestPermission?h.Notification:null,e=null;k.minuteTick=d.observable(!0);k.fiveMinuteTick=d.observable(!0);k.langChangeTick=d.observable(!0);k.iAjaxErrorCount=0;k.iTokenErrorCount=0;k.iMessageBodyCacheCount=0;k.bUnload=!1;k.sUserAgent=(navigator.userAgent||"").toLowerCase();k.bIsiOSDevice=-1<k.sUserAgent.indexOf("iphone")||-1<k.sUserAgent.indexOf("ipod")||-1<k.sUserAgent.indexOf("ipad");
k.bIsAndroidDevice=-1<k.sUserAgent.indexOf("android");k.bMobileDevice=k.bIsiOSDevice||k.bIsAndroidDevice;k.bDisableNanoScroll=k.bMobileDevice;k.bAnimationSupported=!k.bMobileDevice&&K.hasClass("csstransitions");k.sAnimationType="";m.Defaults={};m.Values={};m.DataImages={};m.Defaults.MessagesPerPage=20;m.Defaults.MessagesPerPageArray=[10,20,30,50,100];m.Defaults.DefaultAjaxTimeout=2E4;m.Defaults.SearchAjaxTimeout=12E4;m.Defaults.SendMessageAjaxTimeout=2E5;m.Defaults.SaveMessageAjaxTimeout=2E5;m.Values.UnuseOptionValue=
"__UNUSE__";m.Values.GmailFolderName="[Gmail]";m.Values.ClientSideCookieIndexName="rlcsc";m.Values.ImapDefaulPort=143;m.Values.ImapDefaulSecurePort=993;m.Values.SmtpDefaulPort=25;m.Values.SmtpDefaulSecurePort=465;m.Values.iMessageBodyCacheLimit=15;m.DataImages.UserDotPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2P8DwQACgAD/il4QJ8AAAAASUVORK5CYII=";m.DataImages.TranspPic="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIW2NkAAIAAAoAAggA9GkAAAAASUVORK5CYII=";
f.StorageResultType={Success:"success",Abort:"abort",Error:"error",Unload:"unload"};f.State={Empty:10,Login:20,Auth:30};f.StateType={Webmail:0,Admin:1};f.FolderType={Inbox:10,SentItems:11,Draft:12,Trash:13,Spam:14,User:99};f.LoginSignMeTypeAsString={DefaultOff:"defaultoff",DefaultOn:"defaulton",Unused:"unused"};f.LoginSignMeType={DefaultOff:0,DefaultOn:1,Unused:2};f.ComposeType={Empty:"empty",Reply:"reply",ReplyAll:"replyall",Forward:"forward",ForwardAsAttachment:"forward-as-attachment",Draft:"draft"};
f.UploadErrorCode={Normal:0,FileIsTooBig:1,FilePartiallyUploaded:2,FileNoUploaded:3,MissingTempFolder:4,FileOnSaveingError:5,FileType:98,Unknown:99};f.SetSystemFoldersNotification={None:0,Sent:1,Draft:2,Spam:3,Trash:4};f.ClientSideKeyName={FoldersLashHash:0,MessagesInboxLastHash:1,MailBoxListSize:2,ExpandedFolders:3,FolderListSize:4};f.EventKeyCode={Backspace:8,Enter:13,Esc:27,PageUp:33,PageDown:34,Left:37,Right:39,Up:38,Down:40,End:35,Home:36,Insert:45,Delete:46,A:65,S:83};f.MessageSetAction={SetSeen:0,
UnsetSeen:1,SetFlag:2,UnsetFlag:3};f.MessageSelectAction={All:0,None:1,Invert:2,Unseen:3,Seen:4,Flagged:5,Unflagged:6};f.DesktopNotifications={Allowed:0,NotAllowed:1,Denied:2,NotSupported:9};f.MessagePriority={Low:5,Normal:3,High:1};f.EditorDefaultType={Html:"Html",Plain:"Plain"};f.CustomThemeType={Light:"Light",Dark:"Dark"};f.ServerSecure={None:0,SSL:1,TLS:2};f.SearchDateType={All:-1,Days3:3,Days7:7,Month:30};f.EmailType={Defailt:0,Facebook:1,Google:2};f.SaveSettingsStep={Animate:-2,Idle:-1,TrueResult:1,
FalseResult:0};f.InterfaceAnimation={None:"None",Normal:"Normal",Full:"Full"};f.Notification={InvalidToken:101,AuthError:102,AccessError:103,ConnectionError:104,CaptchaError:105,SocialFacebookLoginAccessDisable:106,SocialTwitterLoginAccessDisable:107,SocialGoogleLoginAccessDisable:108,DomainNotAllowed:109,AccountNotAllowed:110,CantGetMessageList:201,CantGetMessage:202,CantDeleteMessage:203,CantMoveMessage:204,CantSaveMessage:301,CantSendMessage:302,InvalidRecipients:303,CantCreateFolder:400,CantRenameFolder:401,
CantDeleteFolder:402,CantSubscribeFolder:403,CantUnsubscribeFolder:404,CantDeleteNonEmptyFolder:405,CantSaveSettings:501,CantSavePluginSettings:502,DomainAlreadyExists:601,CantInstallPackage:701,CantDeletePackage:702,InvalidPluginPackage:703,UnsupportedPluginPackage:704,LicensingServerIsUnavailable:710,LicensingExpired:711,LicensingBanned:712,DemoSendMessageError:750,AccountAlreadyExists:801,MailServerError:901,UnknownNotification:999,UnknownError:999};c.trim=j.trim;c.inArray=j.inArray;c.isArray=
i.isArray;c.isFunc=i.isFunction;c.isUnd=i.isUndefined;c.isNull=i.isNull;c.emptyFunction=function(){};c.isNormal=function(a){return!c.isUnd(a)&&!c.isNull(a)};c.windowResize=i.debounce(function(a){c.isUnd(a)?I.resize():h.setTimeout(function(){I.resize()},a)},50);c.isPosNumeric=function(a,b){return c.isNormal(a)?c.isUnd(b)||b?/^[0-9]*$/.test(a.toString()):/^[1-9]+[0-9]*$/.test(a.toString()):!1};c.pInt=function(a){return c.isNormal(a)&&""!==a?h.parseInt(a,10):0};c.pString=function(a){return c.isNormal(a)?
a+"":""};c.isNonEmptyArray=function(a){return c.isArray(a)&&0<a.length};c.exportPath=function(a,b,g){for(var s=null,a=a.split("."),g=g||h;a.length&&(s=a.shift());)!a.length&&!c.isUnd(b)?g[s]=b:g=g[s]?g[s]:g[s]={}};c.pImport=function(a,b,g){a[b]=g};c.pExport=function(a,b,g){return c.isUnd(a[b])?g:a[b]};c.encodeHtml=function(a){return c.isNormal(a)?a.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""};c.splitPlainText=function(a,
b){for(var g="",s="",d=a,e=0,f=0,b=c.isUnd(b)?100:b;d.length>b;)s=d.substring(0,b),e=s.lastIndexOf(" "),f=s.lastIndexOf("\n"),-1!==f&&(e=f),-1===e&&(e=b),g+=s.substring(0,e)+"\n",d=d.substring(e+1);return g+d};var X={};c.timeOutAction=function(a,b,g){c.isUnd(X[a])&&(X[a]=0);h.clearTimeout(X[a]);X[a]=h.setTimeout(b,g)};var fa={};c.timeOutActionSecond=function(a,b,g){fa[a]||(fa[a]=h.setTimeout(function(){b();fa[a]=0},g))};var z=!1;c.audio=function(a,b){if(!1===z)if(k.bIsiOSDevice)z=null;else{var g=
!1,c=!1,d=h.Audio?new h.Audio:null;d&&d.canPlayType&&d.play?((g=""!==d.canPlayType('audio/mpeg; codecs="mp3"'))||(c=""!==d.canPlayType('audio/ogg; codecs="vorbis"')),g||c?(z=d,z.preload="none",z.loop=!1,z.autoplay=!1,z.muted=!1,z.src=g?a:b):z=null):z=null}return z};c.hos=function(a,b){return a&&Object.hasOwnProperty?Object.hasOwnProperty.call(a,b):!1};c.i18n=function(a,b,g){var d="",a=c.isUnd(ea[a])?c.isUnd(g)?a:g:ea[a];if(!c.isUnd(b)&&!c.isNull(b))for(d in b)c.hos(b,d)&&(a=a.replace("%"+d+"%",b[d]));
return a};c.i18nToNode=function(a){i.defer(function(){j(".i18n",a).each(function(){var a=j(this),g="";(g=a.data("i18n-text"))?a.text(c.i18n(g)):((g=a.data("i18n-html"))&&a.html(c.i18n(g)),(g=a.data("i18n-placeholder"))&&a.attr("placeholder",c.i18n(g)))})})};c.i18nToDoc=function(){h.rainloopI18N&&(ea=h.rainloopI18N||{},c.i18nToNode(la),k.langChangeTick(!k.langChangeTick()));h.rainloopI18N={}};c.initOnStartOrLangChange=function(a,b,c){a&&a.call(b);c?k.langChangeTick.subscribe(function(){a&&a.call(b);
c.call(b)}):a&&k.langChangeTick.subscribe(a,b)};c.inFocus=function(){var a=document.activeElement;return a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName||"IFRAME"===a.tagName||"DIV"===a.tagName&&"editorHtmlArea"===a.className&&a.contentEditable)};c.removeInFocus=function(){if(document&&document.activeElement&&document.activeElement.blur){var a=j(document.activeElement);(a.is("input")||a.is("textarea"))&&document.activeElement.blur()}};c.removeSelection=function(){if(h&&h.getSelection){var a=h.getSelection();
a&&a.removeAllRanges&&a.removeAllRanges()}else document&&(document.selection&&document.selection.empty)&&document.selection.empty()};c.replySubjectAdd=function(a,b){var g=null,d=c.trim(b);null!==(g=(new h.RegExp("^"+a+"[\\s]?\\:(.*)$","gi")).exec(b))&&!c.isUnd(g[1])?d=a+"[2]: "+g[1]:null!==(g=(new h.RegExp("^("+a+"[\\s]?[\\[\\(]?)([\\d]+)([\\]\\)]?[\\s]?\\:.*)$","gi")).exec(b))&&!c.isUnd(g[1])&&!c.isUnd(g[2])&&!c.isUnd(g[3])?(c.pInt(g[2]),d=g[1]+(c.pInt(g[2])+1)+g[3]):d=a+": "+b;return d};c.roundNumber=
function(a,b){return Math.round(a*Math.pow(10,b))/Math.pow(10,b)};c.friendlySize=function(a){a=c.pInt(a);return 1073741824<=a?c.roundNumber(a/1073741824,1)+"GB":1048576<=a?c.roundNumber(a/1048576,1)+"MB":1024<=a?c.roundNumber(a/1024,0)+"KB":a+"B"};c.log=function(a){h.console&&h.console.log&&h.console.log(a)};c.getNotification=function(a){a=c.pInt(a);return c.isUnd(l[a])?"":l[a]};c.initNotificationLanguage=function(){l[f.Notification.InvalidToken]=c.i18n("NOTIFICATIONS/INVALID_TOKEN");l[f.Notification.AuthError]=
c.i18n("NOTIFICATIONS/AUTH_ERROR");l[f.Notification.AccessError]=c.i18n("NOTIFICATIONS/ACCESS_ERROR");l[f.Notification.ConnectionError]=c.i18n("NOTIFICATIONS/CONNECTION_ERROR");l[f.Notification.CaptchaError]=c.i18n("NOTIFICATIONS/CAPTCHA_ERROR");l[f.Notification.SocialFacebookLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_FACEBOOK_LOGIN_ACCESS_DISABLE");l[f.Notification.SocialTwitterLoginAccessDisable]=c.i18n("NOTIFICATIONS/SOCIAL_TWITTER_LOGIN_ACCESS_DISABLE");l[f.Notification.SocialGoogleLoginAccessDisable]=
c.i18n("NOTIFICATIONS/SOCIAL_GOOGLE_LOGIN_ACCESS_DISABLE");l[f.Notification.DomainNotAllowed]=c.i18n("NOTIFICATIONS/DOMAIN_NOT_ALLOWED");l[f.Notification.AccountNotAllowed]=c.i18n("NOTIFICATIONS/ACCOUNT_NOT_ALLOWED");l[f.Notification.CantGetMessageList]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE_LIST");l[f.Notification.CantGetMessage]=c.i18n("NOTIFICATIONS/CANT_GET_MESSAGE");l[f.Notification.CantDeleteMessage]=c.i18n("NOTIFICATIONS/CANT_DELETE_MESSAGE");l[f.Notification.CantMoveMessage]=c.i18n("NOTIFICATIONS/CANT_MOVE_MESSAGE");
l[f.Notification.CantSaveMessage]=c.i18n("NOTIFICATIONS/CANT_SAVE_MESSAGE");l[f.Notification.CantSendMessage]=c.i18n("NOTIFICATIONS/CANT_SEND_MESSAGE");l[f.Notification.InvalidRecipients]=c.i18n("NOTIFICATIONS/INVALID_RECIPIENTS");l[f.Notification.CantCreateFolder]=c.i18n("NOTIFICATIONS/CANT_CREATE_FOLDER");l[f.Notification.CantRenameFolder]=c.i18n("NOTIFICATIONS/CANT_RENAME_FOLDER");l[f.Notification.CantDeleteFolder]=c.i18n("NOTIFICATIONS/CANT_DELETE_FOLDER");l[f.Notification.CantDeleteNonEmptyFolder]=
c.i18n("NOTIFICATIONS/CANT_DELETE_NON_EMPTY_FOLDER");l[f.Notification.CantSubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_SUBSCRIBE_FOLDER");l[f.Notification.CantUnsubscribeFolder]=c.i18n("NOTIFICATIONS/CANT_UNSUBSCRIBE_FOLDER");l[f.Notification.CantSaveSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_SETTINGS");l[f.Notification.CantSavePluginSettings]=c.i18n("NOTIFICATIONS/CANT_SAVE_PLUGIN_SETTINGS");l[f.Notification.DomainAlreadyExists]=c.i18n("NOTIFICATIONS/DOMAIN_ALREADY_EXISTS");l[f.Notification.CantInstallPackage]=
c.i18n("NOTIFICATIONS/CANT_INSTALL_PACKAGE");l[f.Notification.CantDeletePackage]=c.i18n("NOTIFICATIONS/CANT_DELETE_PACKAGE");l[f.Notification.InvalidPluginPackage]=c.i18n("NOTIFICATIONS/INVALID_PLUGIN_PACKAGE");l[f.Notification.UnsupportedPluginPackage]=c.i18n("NOTIFICATIONS/UNSUPPORTED_PLUGIN_PACKAGE");l[f.Notification.LicensingServerIsUnavailable]=c.i18n("NOTIFICATIONS/LICENSING_SERVER_IS_UNAVAILABLE");l[f.Notification.LicensingExpired]=c.i18n("NOTIFICATIONS/LICENSING_EXPIRED");l[f.Notification.LicensingBanned]=
c.i18n("NOTIFICATIONS/LICENSING_BANNED");l[f.Notification.DemoSendMessageError]=c.i18n("NOTIFICATIONS/DEMO_SEND_MESSAGE_ERROR");l[f.Notification.AccountAlreadyExists]=c.i18n("NOTIFICATIONS/ACCOUNT_ALREADY_EXISTS");l[f.Notification.MailServerError]=c.i18n("NOTIFICATIONS/MAIL_SERVER_ERROR");l[f.Notification.UnknownNotification]=c.i18n("NOTIFICATIONS/UNKNOWN_ERROR");l[f.Notification.UnknownError]=c.i18n("NOTIFICATIONS/UNKNOWN_ERROR")};c.getUploadErrorDescByCode=function(a){var b="";switch(c.pInt(a)){case f.UploadErrorCode.FileIsTooBig:b=
c.i18n("UPLOAD/ERROR_FILE_IS_TOO_BIG");break;case f.UploadErrorCode.FilePartiallyUploaded:b=c.i18n("UPLOAD/ERROR_FILE_PARTIALLY_UPLOADED");break;case f.UploadErrorCode.FileNoUploaded:b=c.i18n("UPLOAD/ERROR_NO_FILE_UPLOADED");break;case f.UploadErrorCode.MissingTempFolder:b=c.i18n("UPLOAD/ERROR_MISSING_TEMP_FOLDER");break;case f.UploadErrorCode.FileOnSaveingError:b=c.i18n("UPLOAD/ERROR_ON_SAVING_FILE");break;case f.UploadErrorCode.FileType:b=c.i18n("UPLOAD/ERROR_FILE_TYPE");break;default:b=c.i18n("UPLOAD/ERROR_UNKNOWN")}return b};
c.killCtrlAandS=function(a){if(a=a||h.event){var b=a.target||a.srcElement,c=a.keyCode||a.which;if(a.ctrlKey&&c===f.EventKeyCode.S)a.preventDefault();else if((!b||!b.tagName||!b.tagName.match(/INPUT|TEXTAREA/i))&&a.ctrlKey&&c===f.EventKeyCode.A)h.getSelection?h.getSelection().removeAllRanges():h.document.selection&&h.document.selection.clear&&h.document.selection.clear(),a.preventDefault()}};c.createCommand=function(a,b,g){var s=b?function(){s.canExecute&&s.canExecute()&&b.apply(a,Array.prototype.slice.call(arguments));
return!1}:function(){};s.enabled=d.observable(!0);g=c.isUnd(g)?!0:g;s.canExecute=c.isFunc(g)?d.computed(function(){return s.enabled()&&g.call(a)}):d.computed(function(){return s.enabled()&&!!g});return s};c.initDataConstructorBySettings=function(a){a.editorDefaultType=d.observable(f.EditorDefaultType.Html);a.showImages=d.observable(!1);a.interfaceAnimation=d.observable(f.InterfaceAnimation.Full);k.sAnimationType=f.InterfaceAnimation.Full;a.allowThemes=d.observable(!0);a.allowCustomLogin=d.observable(!1);
a.allowLanguagesOnSettings=d.observable(!0);a.allowLanguagesOnLogin=d.observable(!0);a.desktopNotifications=d.observable(!1);a.useThreads=d.observable(!0);a.replySameFolder=d.observable(!0);a.usePreviewPane=d.observable(!0);a.useCheckboxesInList=d.observable(!0);a.interfaceAnimation.subscribe(function(a){if(k.bMobileDevice||a===f.InterfaceAnimation.None)K.removeClass("rl-anim rl-anim-full").addClass("no-rl-anim"),k.sAnimationType=f.InterfaceAnimation.None;else switch(a){case f.InterfaceAnimation.Full:K.removeClass("no-rl-anim").addClass("rl-anim rl-anim-full");
k.sAnimationType=a;break;case f.InterfaceAnimation.Normal:K.removeClass("no-rl-anim rl-anim-full").addClass("rl-anim"),k.sAnimationType=a}});a.interfaceAnimation.valueHasMutated();a.desktopNotificationsPermisions=d.computed(function(){a.desktopNotifications();var b=f.DesktopNotifications.NotSupported;if(W&&W.permission)switch(W.permission.toLowerCase()){case "granted":b=f.DesktopNotifications.Allowed;break;case "denied":b=f.DesktopNotifications.Denied;break;case "default":b=f.DesktopNotifications.NotAllowed}else h.webkitNotifications&&
h.webkitNotifications.checkPermission&&(b=h.webkitNotifications.checkPermission());return b});a.useDesktopNotifications=d.computed({read:function(){return a.desktopNotifications()&&f.DesktopNotifications.Allowed===a.desktopNotificationsPermisions()},write:function(b){b?(b=a.desktopNotificationsPermisions(),f.DesktopNotifications.Allowed===b?a.desktopNotifications(!0):f.DesktopNotifications.NotAllowed===b?W.requestPermission(function(){a.desktopNotifications.valueHasMutated();f.DesktopNotifications.Allowed===
a.desktopNotificationsPermisions()?a.desktopNotifications()?a.desktopNotifications.valueHasMutated():a.desktopNotifications(!0):a.desktopNotifications()?a.desktopNotifications(!1):a.desktopNotifications.valueHasMutated()}):a.desktopNotifications(!1)):a.desktopNotifications(!1)}});a.language=d.observable("");a.languages=d.observableArray([]);a.mainLanguage=d.computed({read:a.language,write:function(b){b!==a.language()?-1<c.inArray(b,a.languages())?a.language(b):0<a.languages().length&&a.language(a.languages()[0]):
a.language.valueHasMutated()}});a.theme=d.observable("");a.themes=d.observableArray([]);a.mainTheme=d.computed({read:a.theme,write:function(b){if(b!==a.theme()){var g=a.themes();-1<c.inArray(b,g)?a.theme(b):0<g.length&&a.theme(g[0])}else a.theme.valueHasMutated()}});a.allowCustomTheme=d.observable(!0);a.allowAdditionalAccounts=d.observable(!0);a.determineUserLanguage=d.observable(!1);a.messagesPerPage=d.observable(m.Defaults.MessagesPerPage);a.mainMessagesPerPage=a.messagesPerPage;a.mainMessagesPerPage=
d.computed({read:a.messagesPerPage,write:function(b){-1<c.inArray(c.pInt(b),m.Defaults.MessagesPerPageArray)?b!==a.messagesPerPage()&&a.messagesPerPage(b):a.messagesPerPage.valueHasMutated()}});a.facebookEnable=d.observable(!1);a.facebookAppID=d.observable("");a.facebookAppSecret=d.observable("");a.twitterEnable=d.observable(!1);a.twitterConsumerKey=d.observable("");a.twitterConsumerSecret=d.observable("");a.googleEnable=d.observable(!1);a.googleClientID=d.observable("");a.googleClientSecret=d.observable("");
a.dropboxEnable=d.observable(!1);a.dropboxApiKey=d.observable("");a.contactsIsSupported=d.observable(!1);a.contactsIsAllowed=d.observable(!1)};c.createMomentDate=function(a){return d.computed(function(){k.minuteTick();return this.moment().fromNow()},a)};c.createMomentShortDate=function(a){return d.computed(function(){var a="",a=moment(),g=this.moment(),d=this.momentDate();return a=4>=a.diff(g,"hours")?d:a.format("L")===g.format("L")?c.i18n("MESSAGE_LIST/TODAY_AT",{TIME:g.format("LT")}):a.clone().subtract("days",
1).format("L")===g.format("L")?c.i18n("MESSAGE_LIST/YESTERDAY_IN",{TIME:g.format("LT")}):a.year()===g.year()?g.format("D MMM."):g.format("LL")},a)};c.isFolderExpanded=function(a){var b=e.local().get(f.ClientSideKeyName.ExpandedFolders);return i.isArray(b)&&-1!==i.indexOf(b,a)};c.setExpandedFolder=function(a,b){var c=e.local().get(f.ClientSideKeyName.ExpandedFolders);i.isArray(c)||(c=[]);b?(c.push(a),c=i.uniq(c)):c=i.without(c,a);e.local().set(f.ClientSideKeyName.ExpandedFolders,c)};c.initLayoutResizer=
function(a,b,c,d,f,N,h,k){var d=d||300,f=f||500,N=N||f-d/2,h=h||300,y=0,l=j(a),m=j(b),o=j(c),b=e.local().get(k)||N,p=function(a,b,c){if(b||c)a=o.width(),b=b?100*(b.size.width/a):null,null===b&&c&&(b=100*(l.width()/a)),null!==b&&(l.css({width:"",height:"",right:""+(100-b)+"%"}),m.css({width:"",height:"",left:""+b+"%"}))};b&&l.width(b);y=o.width()-h;y=f>y?y:f;l.resizable({minWidth:d,maxWidth:y,handles:"e",resize:p,stop:p});p(null,null,!0);I.resize(i.throttle(function(b,c){c&&(c.element&&c.element[0].id&&
"#"+c.element[0].id===""+a)&&(y=o.width()-h,y=f>y?y:f,l.resizable("option","maxWidth",y),c.size&&c.size.width&&e.local().set(k,c.size.width),p(null,null,!0))},400))};c.initBlockquoteSwitcher=function(a){if(a){var b=j("blockquote:not(.rl-bq-switcher)",a).filter(function(){return 0===j(this).parent().closest("blockquote",a).length});b&&0<b.length&&b.each(function(){var a=j(this),b=a.height();if(0===b||100<b)a.addClass("rl-bq-switcher hidden-bq"),j('<span class="rlBlockquoteSwitcher"><i class="icon-ellipsis" /></span>').insertBefore(a).click(function(){a.toggleClass("hidden-bq");
c.windowResize()}).after("<br />").before("<br />")})}};c.removeBlockquoteSwitcher=function(a){a&&(j(a).find("blockquote.rl-bq-switcher").each(function(){j(this).removeClass("rl-bq-switcher hidden-bq")}),j(a).find(".rlBlockquoteSwitcher").each(function(){j(this).remove()}))};c.extendAsViewModel=function(a,b){b&&(b.__name=a,o.regViewModelHook(a,b),i.extend(b.prototype,u.prototype))};c.addSettingsViewModel=function(a,b,c,d,e){a.__rlSettingsData={Label:c,Template:b,Route:d,IsDefault:!!e};B.settings.push(a)};
c.removeSettingsViewModel=function(a){B["settings-removed"].push(a)};c.disableSettingsViewModel=function(a){B["settings-disabled"].push(a)};c.convertThemeName=function(a){return c.trim(a.replace(/[^a-zA-Z]/g," ").replace(/([A-Z])/g," $1").replace(/[\s]+/g," "))};c.convertLangName=function(a){return c.i18n("LANGS_NAMES/LANG_"+a.toUpperCase().replace(/[^a-zA-Z0-9]+/,"_"),null,a)};c.fakeMd5=function(a){for(var b="",a=c.isUnd(a)?32:c.pInt(a);b.length<a;)b+="0123456789abcdefghijklmnopqrstuvwxyz".substr(h.Math.round(36*
h.Math.random()),1);return b};c.convertPlainTextToHtml=function(a){return a.toString().replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/\r/g,"").replace(/\n/g,"<br />")};c.draggeblePlace=function(){return j('<div class="draggablePlace"><span class="text"></span>&nbsp;<i class="icon-envelope icon-white"></i></div>').appendTo("#rl-hidden")};c.defautOptionsAfterRender=function(a,b){b&&!c.isUnd(b.disable)&&d.applyBindingsToNode(a,{disable:b.disable},b)};c.windowPopupKnockout=function(a,
b,g,d){var e=null,f=h.open(""),i="__OpenerApplyBindingsUid"+c.fakeMd5()+"__",k=j("#"+b);h[i]=function(){if(f&&f.document.body&&k&&k[0]){var b=j(f.document.body);j("#rl-content",b).html(k.html());j("html",f.document).addClass("external "+j("html").attr("class"));c.i18nToNode(b);q.prototype.applyExternal(a,j("#rl-content",b)[0]);h[i]=null;d(f)}};f.document.open();f.document.write('<html><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="user-scalable=no" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="robots" content="noindex, nofollow, noodp" /><title>'+
c.encodeHtml(g)+'</title></head><body><div id="rl-content"></div></body></html>');f.document.close();e=f.document.createElement("script");e.type="text/javascript";e.innerHTML="if(window&&window.opener&&window.opener['"+i+"']){window.opener['"+i+"']();window.opener['"+i+"']=null}";f.document.getElementsByTagName("head")[0].appendChild(e)};c.settingsSaveHelperFunction=function(a,b,g,d){g=g||null;d=c.isUnd(d)?1E3:c.pInt(d);return function(c,e,h,j,y){b.call(g,e&&e.Result?f.SaveSettingsStep.TrueResult:
f.SaveSettingsStep.FalseResult);a&&a.call(g,c,e,h,j,y);i.delay(function(){b.call(g,f.SaveSettingsStep.Idle)},d)}};c.settingsSaveHelperSimpleFunction=function(a,b){return c.settingsSaveHelperFunction(null,a,b,1E3)};c.resizeAndCrop=function(a,b,c){var d=new Image;d.onload=function(){var a=[0,0],d=document.createElement("canvas"),e=d.getContext("2d");d.width=b;d.height=b;a=this.width>this.height?[this.width-this.height,0]:[0,this.height-this.width];e.fillStyle="#fff";e.fillRect(0,0,b,b);e.drawImage(this,
a[0]/2,a[1]/2,this.width-a[0],this.height-a[1],0,0,b,b);c(d.toDataURL("image/jpeg"))};d.src=a};d.bindingHandlers.tooltip={init:function(a,b){if(!k.bMobileDevice){var g=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},html:!0,trigger:"hover",title:function(){return'<span class="tooltip-class '+g+'">'+c.i18n(d.utils.unwrapObservable(b()))+"</span>"}})}}};d.bindingHandlers.tooltip2={init:function(a,b){var c=j(a).data("tooltip-class")||"";j(a).tooltip({delay:{show:500,hide:100},
html:!0,title:function(){return'<span class="tooltip-class '+c+'">'+b()()+"</span>"}})}};d.bindingHandlers.popover={init:function(a,b){j(a).popover(d.utils.unwrapObservable(b()))}};d.bindingHandlers.resizecrop={init:function(a){j(a).addClass("resizecrop").resizecrop({width:"100",height:"100",wrapperCSS:{"border-radius":"10px"}})},update:function(a,b){b()();j(a).resizecrop({width:"100",height:"100"})}};d.bindingHandlers.onEnter={init:function(a,b,c,d){j(a).on("keypress",function(c){c&&13===h.parseInt(c.keyCode,
10)&&(j(a).trigger("change"),b().call(d))})}};d.bindingHandlers.onEsc={init:function(a,b,c,d){j(a).on("keypress",function(c){c&&27===h.parseInt(c.keyCode,10)&&(j(a).trigger("change"),b().call(d))})}};d.bindingHandlers.modal={init:function(a,b){j(a).modal({keyboard:!1,show:d.utils.unwrapObservable(b())}).on("hidden",function(){b()(!1)})},update:function(a,b){var c=d.utils.unwrapObservable(b());j(a).modal(c?"show":"hide");i.delay(function(){j(a).toggleClass("popup-active",c)},1)}};d.bindingHandlers.i18nInit=
{init:function(a){c.i18nToNode(a)}};d.bindingHandlers.i18nUpdate={update:function(a,b){d.utils.unwrapObservable(b());c.i18nToNode(a)}};d.bindingHandlers.link={update:function(a,b){j(a).attr("href",d.utils.unwrapObservable(b()))}};d.bindingHandlers.title={update:function(a,b){j(a).attr("title",d.utils.unwrapObservable(b()))}};d.bindingHandlers.textF={init:function(a,b){j(a).text(d.utils.unwrapObservable(b()))}};d.bindingHandlers.initDom={init:function(a,b){b()(a)}};d.bindingHandlers.initResizeTrigger=
{init:function(a,b){var c=d.utils.unwrapObservable(b());j(a).css({height:c[1],"min-height":c[1]})},update:function(a,b){var g=d.utils.unwrapObservable(b()),e=c.pInt(g[1]),f=0,f=j(a).offset().top;0<f&&(f+=c.pInt(g[2]),f=I.height()-f,e<f&&(e=f),j(a).css({height:e,"min-height":e}))}};d.bindingHandlers.appendDom={update:function(a,b){j(a).hide().empty().append(d.utils.unwrapObservable(b())).show()}};d.bindingHandlers.draggable={init:function(a,b,g){if(!k.bMobileDevice){var e=(g=g())&&g.droppableSelector?
g.droppableSelector:"",g={distance:20,handle:".dragHandle",cursorAt:{top:22,left:3},refreshPositions:!0,scroll:!0};e&&(g.drag=function(a){j(e).each(function(){var b=null,g=null,d=j(this),g=d.offset(),b=g.top+d.height();h.clearInterval(d.data("timerScroll"));d.data("timerScroll",!1);if(a.pageX>=g.left&&a.pageX<=g.left+d.width()&&(a.pageY>=b-100&&a.pageY<=b&&(b=function(){d.scrollTop(d.scrollTop()+3);c.windowResize()},d.data("timerScroll",h.setInterval(b,10)),b()),a.pageY>=g.top&&a.pageY<=g.top+100))g=
function(){d.scrollTop(d.scrollTop()-3);c.windowResize()},d.data("timerScroll",h.setInterval(g,10)),g()})},g.stop=function(){j(e).each(function(){h.clearInterval(j(this).data("timerScroll"));j(this).data("timerScroll",!1)})});g.helper=function(a){return b()(a&&a.target?d.dataFor(a.target):null)};j(a).draggable(g).on("mousedown",function(){c.removeInFocus()})}}};d.bindingHandlers.droppable={init:function(a,b,c){if(!k.bMobileDevice){var d=b(),e=(b=c())&&b.droppableOver?b.droppableOver:null,f=b&&b.droppableOut?
b.droppableOut:null,b={tolerance:"pointer",hoverClass:"droppableHover"};d&&(b.drop=function(a,b){d(a,b)},e&&(b.over=function(a,b){e(a,b)}),f&&(b.out=function(a,b){f(a,b)}),j(a).droppable(b))}}};d.bindingHandlers.nano={init:function(a){k.bDisableNanoScroll||j(a).addClass("nano").nanoScroller({iOSNativeScrolling:!1,preventPageScrolling:!0})}};d.bindingHandlers.saveTrigger={init:function(a){j(a).append('&nbsp;&nbsp;<i class="icon-spinner-2 animated"></i><i class="icon-remove error"></i><i class="icon-ok success"></i>').addClass("settings-saved-trigger")},
update:function(a,b){var c=d.utils.unwrapObservable(b()),e=j(a);switch(c.toString()){case "1":e.find(".animated,.error").hide().removeClass("visible").end().find(".success").show().addClass("visible");break;case "0":e.find(".animated,.success").hide().removeClass("visible").end().find(".error").show().addClass("visible");break;case "-2":e.find(".error,.success").hide().removeClass("visible").end().find(".animated").show().addClass("visible");break;default:e.find(".animated").hide().end().find(".error,.success").removeClass("visible")}}};
d.bindingHandlers.select2={init:function(a,b){var g=0,f=null,ma=new h.RegExp(/[a-zA-Z0-9\.\-_]+@[a-zA-Z0-9\.\-_]+/),N=new h.RegExp(/(.+) [<]?([^\s<@]+@[a-zA-Z0-9\.\-_]+)[>]?/),k=function(){return""},l=function(a){e.getAutocomplete(a.term,a.page,function(b,c){a.callback({more:!!c,results:i.map(b,function(a){var b=a.toLine(!1);return{id:b,text:b,c:a}})})})};j(a).addClass("ko-select2").select2({query:function(a){a&&(0===g?(l(a),g=h.setTimeout(c.emptyFunction,100)):(h.clearInterval(g),g=h.setTimeout(function(){l(a)},
100)))},formatSelection:function(a,b){var c=a&&a.c?a.c.select2Selection(b):a.text;if(null!==c)return c},formatResult:function(a,b,c,g){b=a&&a.c?a.c.select2Result(b):"";return""===b?g(a.text):b},createSearchChoice:function(a,b){return 0===b.length&&ma.test(a)?{id:a,text:a}:null},formatNoMatches:k,formatSearching:function(){return c.i18n("SUGGESTIONS/SEARCHING_DESC")},formatInputTooShort:k,formatSelectionTooBig:k,multiple:!0,tokenSeparators:[",",";"],minimumInputLength:2,selectOnBlur:!1,closeOnSelect:!0,
openOnEnter:!1});d.utils.domNodeDisposal.addDisposeCallback(a,function(){j(a).select2("destroy")});j(a).on("change",function(){for(var a=j(this).select2("data"),g=0,d=a.length,e=null,h=[];g<d;g++)if((e=a[g])&&e.id)e.c||(e.c=new t,(f=N.exec(c.trim(e.id)))&&!c.isUnd(f[2])?(e.c.name=f[1],e.c.email=f[2]):e.c.email=e.id),h.push(e.c);b()(h)})},update:function(a,b){for(var c=d.utils.unwrapObservable(b()),e=0,f=c.length,h=null,i="",k=[];e<f;e++)h=c[e],i=h.toLine(!1),k.push({id:i,text:i,c:h});j(a).select2("data",
k)}};d.bindingHandlers.command={init:function(a,b,c,e){var f=j(a),h=b();if(!h||!h.enabled||!h.canExecute)throw Error("You are not using command function");f.addClass("command");d.bindingHandlers[f.is("form")?"submit":"click"].init.apply(e,arguments)},update:function(a,b){var c=!0,d=j(a),e=b(),c=e.enabled();d.toggleClass("command-not-enabled",!c);c&&(c=e.canExecute(),d.toggleClass("command-can-not-be-execute",!c));d.toggleClass("command-disabled disable disabled",!c);(d.is("input")||d.is("button"))&&
d.prop("disabled",!c)}};d.extenders.trimmer=function(a){var b=d.computed({read:a,write:function(b){a(c.trim(b.toString()))},owner:this});b(a());return b};d.extenders.reversible=function(a){var b=a();a.commit=function(){b=a()};a.reverse=function(){a(b)};a.commitedValue=function(){return b};return a};d.extenders.toggleSubscribe=function(a,b){a.subscribe(b[1],b[0],"beforeChange");a.subscribe(b[2],b[0]);return a};d.extenders.falseTimeout=function(a,b){a.iTimeout=0;a.subscribe(function(g){g&&(h.clearTimeout(a.iTimeout),
a.iTimeout=h.setTimeout(function(){a(!1);a.iTimeout=0},c.pInt(b)))});return a};d.observable.fn.validateEmail=function(){this.hasError=d.observable(!1);this.subscribe(function(a){a=c.trim(a);this.hasError(""!==a&&!/^[^@\s]+@[^@\s]+$/.test(a))},this);this.valueHasMutated();return this};d.observable.fn.validateFunc=function(a){this.hasFuncError=d.observable(!1);c.isFunc(a)&&(this.subscribe(function(b){this.hasFuncError(!a(b))},this),this.valueHasMutated());return this};p.prototype.root=function(){return this.sBase};
p.prototype.attachmentDownload=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};p.prototype.attachmentPreview=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/View/"+a};p.prototype.attachmentPreviewAsPlain=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};p.prototype.upload=function(){return this.sServer+"/Upload/"+this.sSpecSuffix+"/"};p.prototype.uploadBackground=function(){return this.sServer+"/UploadBackground/"+this.sSpecSuffix+"/"};
p.prototype.append=function(){return this.sServer+"/Append/"+this.sSpecSuffix+"/"};p.prototype.change=function(a){return this.sServer+"/Change/"+this.sSpecSuffix+"/"+h.encodeURIComponent(a)+"/"};p.prototype.ajax=function(a){return this.sServer+"/Ajax/"+this.sSpecSuffix+"/"+a};p.prototype.messageViewLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/ViewAsPlain/"+a};p.prototype.messageDownloadLink=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/Download/"+a};p.prototype.inbox=
function(){return this.sBase+"mailbox/Inbox"};p.prototype.settings=function(a){var b=this.sBase+"settings";!c.isUnd(a)&&""!==a&&(b+="/"+a);return b};p.prototype.admin=function(a){var b=this.sBase;switch(a){case "AdminDomains":b+="domains";break;case "AdminSecurity":b+="security";break;case "AdminLicensing":b+="licensing"}return b};p.prototype.mailBox=function(a,b,g){var b=c.isNormal(b)?c.pInt(b):1,g=c.pString(g),d=this.sBase+"mailbox/";""!==a&&(d+=encodeURI(a));1<b&&(d=d.replace(/[\/]+$/,""),d+="/p"+
b);""!==g&&(d=d.replace(/[\/]+$/,""),d+="/"+encodeURI(g));return d};p.prototype.phpInfo=function(){return this.sServer+"Info"};p.prototype.langLink=function(a){return this.sServer+"/Lang/0/"+encodeURI(a)+"/"+this.sVersion+"/"};p.prototype.getUserPicUrlFromHash=function(a){return this.sServer+"/Raw/"+this.sSpecSuffix+"/UserPic/"+a+"/"+this.sVersion+"/"};p.prototype.emptyContactPic=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/empty-contact.png"};
p.prototype.sound=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/sounds/"+a};p.prototype.themePreviewLink=function(a){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/themes/"+encodeURI(a)+"/images/preview.png"};p.prototype.notificationMailIcon=function(){return(""===this.sCdnStaticDomain?"rainloop/v/":this.sCdnStaticDomain)+this.sVersion+"/static/css/images/icom-message-notification.png"};p.prototype.socialGoogle=
function(){return this.sServer+"SocialGoogle"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};p.prototype.socialTwitter=function(){return this.sServer+"SocialTwitter"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};p.prototype.socialFacebook=function(){return this.sServer+"SocialFacebook"+(""!==this.sSpecSuffix?"/"+this.sSpecSuffix+"/":"")};o.oViewModelsHooks={};o.oSimpleHooks={};o.regViewModelHook=function(a,b){b&&(b.__hookName=a)};o.addHook=function(a,b){c.isFunc(b)&&(c.isArray(o.oSimpleHooks[a])||
(o.oSimpleHooks[a]=[]),o.oSimpleHooks[a].push(b))};o.runHook=function(a,b){c.isArray(o.oSimpleHooks[a])&&(b=b||[],i.each(o.oSimpleHooks[a],function(a){a.apply(null,b)}))};o.mainSettingsGet=function(a){return e?e.settingsGet(a):null};o.remoteRequest=function(a,b,c,d,f,h){e&&e.remote().defaultRequest(a,b,c,d,f,h)};o.settingsGet=function(a,b){var g=o.mainSettingsGet("Plugins");return(g=g&&c.isUnd(g[a])?null:g[a])?c.isUnd(g[b])?null:g[b]:null};O.supported=function(){return!0};O.prototype.set=function(a,
b){var c=j.cookie(m.Values.ClientSideCookieIndexName),d=!1,e=null;try{(e=null===c?null:JSON.parse(c))||(e={}),e[a]=b,j.cookie(m.Values.ClientSideCookieIndexName,JSON.stringify(e),{expires:30}),d=!0}catch(f){}return d};O.prototype.get=function(a){var b=j.cookie(m.Values.ClientSideCookieIndexName),g=null;try{g=(g=null===b?null:JSON.parse(b))&&!c.isUnd(g[a])?g[a]:null}catch(d){}return g};P.supported=function(){return!!h.localStorage};P.prototype.set=function(a,b){var c=h.localStorage[m.Values.ClientSideCookieIndexName]||
null,d=!1,e=null;try{(e=null===c?null:JSON.parse(c))||(e={}),e[a]=b,h.localStorage[m.Values.ClientSideCookieIndexName]=JSON.stringify(e),d=!0}catch(f){}return d};P.prototype.get=function(a){var b=h.localStorage[m.Values.ClientSideCookieIndexName]||null,d=null;try{d=(d=null===b?null:JSON.parse(b))&&!c.isUnd(d[a])?d[a]:null}catch(e){}return d};Q.prototype.oDriver=null;Q.prototype.set=function(a,b){return this.oDriver?this.oDriver.set("p"+a,b):!1};Q.prototype.get=function(a){return this.oDriver?this.oDriver.get("p"+
a):null};ha.prototype.bootstart=function(){};u.prototype.sPosition="";u.prototype.sTemplate="";u.prototype.viewModelName="";u.prototype.viewModelDom=null;u.prototype.viewModelTemplate=function(){return this.sTemplate};u.prototype.viewModelPosition=function(){return this.sPosition};u.prototype.cancelCommand=u.prototype.closeCommand=function(){};x.prototype.oCross=null;x.prototype.sScreenName="";x.prototype.aViewModels=[];x.prototype.viewModels=function(){return this.aViewModels};x.prototype.screenName=
function(){return this.sScreenName};x.prototype.routes=function(){return null};x.prototype.__cross=function(){return this.oCross};x.prototype.__start=function(){var a=this.routes(),b=null,d=null;c.isNonEmptyArray(a)&&(d=i.bind(this.onRoute||c.emptyFunction,this),b=ga.create(),i.each(a,function(a){b.addRoute(a[0],d).rules=a[1]}),this.oCross=b)};q.prototype.sDefaultScreenName="";q.prototype.oScreens={};q.prototype.oBoot=null;q.prototype.oCurrentScreen=null;q.prototype.showLoading=function(){j("#rl-loading").show()};
q.prototype.hideLoading=function(){j("#rl-loading").hide()};q.prototype.routeOff=function(){A.changed.active=!1};q.prototype.routeOn=function(){A.changed.active=!0};q.prototype.setBoot=function(a){c.isNormal(a)&&(this.oBoot=a);return this};q.prototype.screen=function(a){return""!==a&&!c.isUnd(this.oScreens[a])?this.oScreens[a]:null};q.prototype.delegateRun=function(a,b,d){a&&a[b]&&a[b].apply(a,c.isArray(d)?d:[])};q.prototype.buildViewModel=function(a,b){if(a&&!a.__builded){var g=new a(b),f=g.viewModelPosition(),
h=j("#rl-content #rl-"+f.toLowerCase()),i=null;a.__builded=!0;a.__vm=g;g.data=e.data();g.viewModelName=a.__name;h&&1===h.length?(i=j("<div>").addClass("rl-view-model").addClass("RL-"+g.viewModelTemplate()).hide().attr("data-bind",'template: {name: "'+g.viewModelTemplate()+'"}, i18nInit: true'),i.appendTo(h),g.viewModelDom=i,a.__dom=i,"Popups"===f&&(g.cancelCommand=g.closeCommand=c.createCommand(g,function(){r.hideScreenPopup(a)})),o.runHook("view-model-pre-build",[a.__name,g,i]),d.applyBindings(g,
i[0]),this.delegateRun(g,"onBuild",[i]),o.runHook("view-model-post-build",[a.__name,g,i])):c.log("Cannot find view model position: "+f)}return a?a.__vm:null};q.prototype.applyExternal=function(a,b){a&&b&&d.applyBindings(a,b)};q.prototype.hideScreenPopup=function(a){a&&(a.__vm&&a.__dom)&&(a.__dom.hide(),a.__vm.modalVisibility(!1),this.delegateRun(a.__vm,"onHide"),this.popupVisibility(!1),i.defer(function(){a.__dom.find(".ko-select2").select2("close")}))};q.prototype.showScreenPopup=function(a,b){a&&
(this.buildViewModel(a),a.__vm&&a.__dom&&(a.__dom.show(),a.__vm.modalVisibility(!0),this.delegateRun(a.__vm,"onShow",b||[]),this.popupVisibility(!0),o.runHook("view-model-on-show",[a.__name,a.__vm,b||[]])))};q.prototype.screenOnRoute=function(a,b){var d=this,e=null,f=null;""===c.pString(a)&&(a=this.sDefaultScreenName);if(""!==a){e=this.screen(a);if(!e&&(e=this.screen(this.sDefaultScreenName)))b=a+"/"+b,a=this.sDefaultScreenName;e&&e.__started&&(e.__builded||(e.__builded=!0,c.isNonEmptyArray(e.viewModels())&&
i.each(e.viewModels(),function(a){this.buildViewModel(a,e)},this),this.delegateRun(e,"onBuild")),i.defer(function(){if(d.oCurrentScreen){d.delegateRun(d.oCurrentScreen,"onHide");c.isNonEmptyArray(d.oCurrentScreen.viewModels())&&i.each(d.oCurrentScreen.viewModels(),function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.hide();a.__vm.viewModelVisibility(false);d.delegateRun(a.__vm,"onHide")}})}d.oCurrentScreen=e;if(d.oCurrentScreen){d.delegateRun(d.oCurrentScreen,"onShow");o.runHook("screen-on-show",
[d.oCurrentScreen.screenName(),d.oCurrentScreen]);c.isNonEmptyArray(d.oCurrentScreen.viewModels())&&i.each(d.oCurrentScreen.viewModels(),function(a){if(a.__vm&&a.__dom&&"Popups"!==a.__vm.viewModelPosition()){a.__dom.show();a.__vm.viewModelVisibility(true);d.delegateRun(a.__vm,"onShow");o.runHook("view-model-on-show",[a.__name,a.__vm])}},d)}(f=e.__cross())&&f.parse(b)}))}};q.prototype.startScreens=function(a){i.each(a,function(a){var c=(a=new a)?a.screenName():"";a&&""!==c&&(""===this.sDefaultScreenName&&
(this.sDefaultScreenName=c),this.oScreens[c]=a)},this);i.each(this.oScreens,function(a){a&&(!a.__started&&a.__start)&&(a.__started=!0,a.__start(),o.runHook("screen-pre-start",[a.screenName(),a]),this.delegateRun(a,"onStart"),o.runHook("screen-post-start",[a.screenName(),a]))},this);a=ga.create();a.addRoute(/^([a-zA-Z0-9\-]*)\/?(.*)$/,i.bind(this.screenOnRoute,this));A.initialized.add(a.parse,a);A.changed.add(a.parse,a);A.init()};q.prototype.setHash=function(a,b){a="#"===a.substr(0,1)?a.substr(1):
a;a="/"===a.substr(0,1)?a.substr(1):a;(c.isUnd(b)?0:b)?(A.changed.active=!1,A.setHash(a),A.changed.active=!0):(A.changed.active=!0,A.setHash(a))};q.prototype.bootstart=function(){this.oBoot&&this.oBoot.bootstart&&this.oBoot.bootstart();return this};r=new q;t.newInstanceFromJson=function(a){var b=new t;return b.initByJson(a)?b:null};t.prototype.name="";t.prototype.email="";t.prototype.privateType=null;t.prototype.validate=function(){return""!==this.name||""!==this.email};t.prototype.hash=function(a){return"#"+
(a?"":this.name)+"#"+this.email+"#"};t.prototype.clearDuplicateName=function(){this.name===this.email&&(this.name="")};t.prototype.type=function(){if(null===this.privateType&&(this.email&&"@facebook.com"===this.email.substr(-13)&&(this.privateType=f.EmailType.Facebook),null===this.privateType))this.privateType=f.EmailType.Default;return this.privateType};t.prototype.search=function(a){return-1<(this.name+" "+this.email).toLowerCase().indexOf(a.toLowerCase())};t.prototype.parse=function(a){var a=c.trim(a),
b=/(?:"([^"]+)")? ?<?(.*?@[^>,]+)>?,? ?/g.exec(a);b?(this.name=b[1]||"",this.email=b[2]||"",this.clearDuplicateName()):/^[^@]+@[^@]+$/.test(a)&&(this.name="",this.email=a)};t.prototype.initByJson=function(a){var b=!1;a&&"Object/Email"===a["@Object"]&&(this.name=c.trim(a.Name),this.email=c.trim(a.Email),b=""!==this.email,this.clearDuplicateName());return b};t.prototype.toLine=function(a,b){var d="";""!==this.email&&(b=c.isUnd(b)?!1:!!b,a&&""!==this.name?d=b?'<a href="mailto:'+c.encodeHtml('"'+this.name+
'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.name)+"</a>":this.name:(d=this.email,""!==this.name?d=b?c.encodeHtml('"'+this.name+'" <')+'<a href="mailto:'+c.encodeHtml('"'+this.name+'" <'+this.email+">")+'" target="_blank" tabindex="-1">'+c.encodeHtml(d)+"</a>"+c.encodeHtml(">"):'"'+this.name+'" <'+d+">":b&&(d='<a href="mailto:'+c.encodeHtml(this.email)+'" target="_blank" tabindex="-1">'+c.encodeHtml(this.email)+"</a>")));return d};t.prototype.select2Result=function(){var a=
"",b=e.cache().getUserPic(this.email),a=""!==b?a+('<img class="select2-user-pic pull-left" src="'+c.encodeHtml(b)+'" />'):a+('<img class="select2-user-pic pull-left" src="'+e.link().emptyContactPic()+'" />');f.EmailType.Facebook===this.type()?(a+=""+(0<this.name.length?this.name:this.email),a+='<i class="icon-facebook pull-right select2-icon-result" />'):a+=""+(0<this.name.length?this.email+' <span class="select2-subname">('+this.name+")</span>":this.email);return a+""};t.prototype.select2Selection=
function(a){var b="";if(f.EmailType.Facebook===this.type()){if(b=0<this.name.length?this.name:this.email,""!==b)return j("<pan>").text(b).appendTo(a),a.append('<i class="icon-facebook select2-icon"></i>'),null}else b=0<this.name.length?this.name+" ("+this.email+")":this.email;return b};c.extendAsViewModel("PopupsDomainViewModel",C);C.prototype.onTestConnectionResponse=function(a,b){this.testing(!1);f.StorageResultType.Success===a&&b.Result?(this.testingDone(!0),this.testingImapError(!1===b.Result.Imap),
this.testingSmtpError(!1===b.Result.Smtp)):(this.testingImapError(!0),this.testingSmtpError(!0))};C.prototype.onDomainCreateOrSaveResponse=function(a,b){this.saving(!1);f.StorageResultType.Success===a&&b?b.Result?(e.reloadDomainList(),this.closeCommand()):f.Notification.DomainAlreadyExists===b.ErrorCode&&this.savingError("Domain already exists"):this.savingError("Unknown error")};C.prototype.onHide=function(){this.whiteListPage(!1)};C.prototype.onShow=function(a){this.saving(!1);this.whiteListPage(!1);
this.testing(!1);this.testingDone(!1);this.testingImapError(!1);this.testingSmtpError(!1);this.clearForm();a&&(this.edit(!0),this.name(c.trim(a.Name)),this.imapServer(c.trim(a.IncHost)),this.imapPort(c.pInt(a.IncPort)),this.imapSecure(c.trim(a.IncSecure)),this.smtpServer(c.trim(a.OutHost)),this.smtpPort(c.pInt(a.OutPort)),this.smtpSecure(c.trim(a.OutSecure)),this.smtpAuth(!!a.OutAuth),this.whiteList(c.trim(a.WhiteList)))};C.prototype.clearForm=function(){this.edit(!1);this.whiteListPage(!1);this.savingError("");
this.name("");this.imapServer("");this.imapPort(m.Values.ImapDefaulPort);this.imapSecure(f.ServerSecure.None);this.smtpServer("");this.smtpPort(m.Values.SmtpDefaulPort);this.smtpSecure(f.ServerSecure.None);this.smtpAuth(!0);this.whiteList("")};c.extendAsViewModel("PopupsPluginViewModel",R);R.prototype.onPluginSettingsUpdateResponse=function(a,b){f.StorageResultType.Success===a&&b&&b.Result?this.cancelCommand():(this.saveError(""),b&&b.ErrorCode?this.saveError(c.getNotification(b.ErrorCode)):this.saveError(c.getNotification(f.Notification.CantSavePluginSettings)))};
R.prototype.onShow=function(a){this.name();this.readme();this.configures([]);a&&(this.name(a.Name),this.readme(a.Readme),a=a.Config,c.isNonEmptyArray(a)&&this.configures(i.map(a,function(a){return{value:d.observable(a[0]),Name:a[1],Type:a[2],Label:a[3],Default:a[4],Desc:a[5]}})))};c.extendAsViewModel("PopupsActivateViewModel",S);S.prototype.onShow=function(){this.domain(e.settingsGet("AdminDomain"));this.activateProcess()||(this.key(""),this.activateText(""),this.activateText.isError(!1),this.activationSuccessed(!1),
this.key.focus(!0))};S.prototype.validateSubscriptionKey=function(){var a=this.key();return""===a||!!/^RL[\d]+-[A-Z0-9\-]+Z$/.test(c.trim(a))};c.extendAsViewModel("PopupsLanguagesViewModel",T);T.prototype.onShow=function(){this.exp(!0)};T.prototype.onHide=function(){this.exp(!1)};T.prototype.changeLanguage=function(a){e.data().mainLanguage(a);this.cancelCommand()};c.extendAsViewModel("AdminLoginViewModel",U);U.prototype.onShow=function(){r.routeOff();i.delay(i.bind(function(){this.loginFocus(!0)},
this),100)};U.prototype.onHide=function(){this.loginFocus(!1)};c.extendAsViewModel("AdminMenuViewModel",Y);Y.prototype.link=function(a){return"#/"+a};c.extendAsViewModel("AdminPaneViewModel",Z);Z.prototype.logoutClick=function(){e.remote().adminLogout(function(){e.loginAndLogoutReload()})};c.addSettingsViewModel(ia,"AdminGeneral","General","general",!0);ia.prototype.onBuild=function(){var a=this;i.delay(function(){var b=c.settingsSaveHelperSimpleFunction(a.titleTrigger,a),d=c.settingsSaveHelperSimpleFunction(a.languageTrigger,
a),f=c.settingsSaveHelperSimpleFunction(a.themeTrigger,a);a.title.subscribe(function(a){e.remote().saveAdminConfig(b,{Title:c.trim(a)})});a.language.subscribe(function(a){e.remote().saveAdminConfig(d,{Language:c.trim(a)})});a.theme.subscribe(function(a){e.remote().saveAdminConfig(f,{Theme:c.trim(a)})});a.allowCustomTheme.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowCustomTheme:a?"1":"0"})});a.allowAdditionalAccounts.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowAdditionalAccounts:a?
"1":"0"})});a.determineUserLanguage.subscribe(function(a){e.remote().saveAdminConfig(null,{DetermineUserLanguage:a?"1":"0"})});a.allowThemes.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowThemes:a?"1":"0"})});a.allowCustomLogin.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowCustomLogin:a?"1":"0"})});a.allowLanguagesOnLogin.subscribe(function(a){e.remote().saveAdminConfig(null,{AllowLanguagesOnLogin:a?"1":"0"})});a.allowLanguagesOnSettings.subscribe(function(a){e.remote().saveAdminConfig(null,
{AllowLanguagesOnSettings:a?"1":"0"})})},50)};c.addSettingsViewModel(D,"AdminDomains","Domains","domains");D.prototype.startDomainForDeletionTimeout=function(){var a=this;h.clearInterval(this.iDomainForDeletionTimeout);this.iDomainForDeletionTimeout=h.setTimeout(function(){a.domainForDeletion(null)},3E3)};D.prototype.createDomain=function(){r.showScreenPopup(C)};D.prototype.deleteDomain=function(a){this.domains.remove(a);e.remote().domainDelete(i.bind(this.onDomainListChangeRequest,this),a.name)};
D.prototype.disableDomain=function(a){a.disabled(!a.disabled());e.remote().domainDisable(i.bind(this.onDomainListChangeRequest,this),a.name,a.disabled())};D.prototype.onBuild=function(a){var b=this;a.on("click",".b-admin-domains-list-table .e-item .e-action",function(){var a=d.dataFor(this);a&&e.remote().domain(i.bind(b.onDomainLoadRequest,b),a.name)});e.reloadDomainList()};D.prototype.onDomainLoadRequest=function(a,b){f.StorageResultType.Success===a&&(b&&b.Result)&&r.showScreenPopup(C,[b.Result])};
D.prototype.onDomainListChangeRequest=function(){e.reloadDomainList()};c.addSettingsViewModel(L,"AdminLicensing","Licensing","licensing");L.prototype.onBuild=function(){this.subscriptionEnabled()&&e.reloadLicensing(!1)};L.prototype.onShow=function(){this.adminDomain(e.settingsGet("AdminDomain"))};L.prototype.showActivationForm=function(){r.showScreenPopup(S)};L.prototype.licenseExpiredMomentValue=function(){var a=moment.unix(this.licenseExpired());return a.format("LL")+" ("+a.from(moment())+")"};
c.addSettingsViewModel(M,"AdminSecurity","Security","security");M.prototype.onNewAdminPasswordResponse=function(a,b){f.StorageResultType.Success===a&&b&&b.Result?(this.adminPassword(""),this.adminPasswordNew(""),this.adminPasswordUpdateSuccess(!0)):this.adminPasswordUpdateError(!0)};M.prototype.onBuild=function(){this.csrfProtection.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{TokenProtection:a?"1":"0"})});this.usageStatistics.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,
{UsageStatistics:a?"1":"0"})})};M.prototype.onHide=function(){this.adminPassword("");this.adminPasswordNew("")};M.prototype.phpInfoLink=function(){return e.link().phpInfo()};c.addSettingsViewModel(ja,"AdminSocial","Social","social");ja.prototype.onBuild=function(){var a=this;i.delay(function(){var b=c.settingsSaveHelperSimpleFunction(a.facebookTrigger1,a),d=c.settingsSaveHelperSimpleFunction(a.facebookTrigger2,a),f=c.settingsSaveHelperSimpleFunction(a.twitterTrigger1,a),h=c.settingsSaveHelperSimpleFunction(a.twitterTrigger2,
a),i=c.settingsSaveHelperSimpleFunction(a.googleTrigger1,a),j=c.settingsSaveHelperSimpleFunction(a.googleTrigger2,a),k=c.settingsSaveHelperSimpleFunction(a.dropboxTrigger1,a);a.facebookEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{FacebookEnable:a?"1":"0"})});a.facebookAppID.subscribe(function(a){e.remote().saveAdminConfig(b,{FacebookAppID:c.trim(a)})});a.facebookAppSecret.subscribe(function(a){e.remote().saveAdminConfig(d,{FacebookAppSecret:c.trim(a)})});a.twitterEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,
{TwitterEnable:a?"1":"0"})});a.twitterConsumerKey.subscribe(function(a){e.remote().saveAdminConfig(f,{TwitterConsumerKey:c.trim(a)})});a.twitterConsumerSecret.subscribe(function(a){e.remote().saveAdminConfig(h,{TwitterConsumerSecret:c.trim(a)})});a.googleEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{GoogleEnable:a?"1":"0"})});a.googleClientID.subscribe(function(a){e.remote().saveAdminConfig(i,{GoogleClientID:c.trim(a)})});a.googleClientSecret.subscribe(function(a){e.remote().saveAdminConfig(j,
{GoogleClientSecret:c.trim(a)})});a.dropboxEnable.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{DropboxEnable:a?"1":"0"})});a.dropboxApiKey.subscribe(function(a){e.remote().saveAdminConfig(k,{DropboxApiKey:c.trim(a)})})},50)};c.addSettingsViewModel(F,"AdminPlugins","Plugins","plugins");F.prototype.disablePlugin=function(a){a.disabled(!a.disabled());e.remote().pluginDisable(this.onPluginDisableRequest,a.name,a.disabled())};F.prototype.configurePlugin=function(a){e.remote().plugin(this.onPluginLoadRequest,
a.name)};F.prototype.onBuild=function(){this.enabledPlugins.subscribe(function(a){e.remote().saveAdminConfig(c.emptyFunction,{EnabledPlugins:a?"1":"0"})})};F.prototype.onShow=function(){this.pluginsError("");e.reloadPluginList()};F.prototype.onPluginLoadRequest=function(a,b){f.StorageResultType.Success===a&&(b&&b.Result)&&r.showScreenPopup(R,[b.Result])};F.prototype.onPluginDisableRequest=function(a,b){f.StorageResultType.Success===a&&b&&!b.Result&&b.ErrorCode&&(f.Notification.UnsupportedPluginPackage===
b.ErrorCode&&b.ErrorMessage&&""!==b.ErrorMessage?this.pluginsError(b.ErrorMessage):this.pluginsError(c.getNotification(b.ErrorCode)));e.reloadPluginList()};c.addSettingsViewModel(J,"AdminPackages","Packages","packages");J.prototype.onShow=function(){this.packagesError("")};J.prototype.onBuild=function(){e.reloadPackagesList()};J.prototype.requestHelper=function(a,b){var d=this;return function(j,k){if(f.StorageResultType.Success!==j||!k||!k.Result)k&&k.ErrorCode?d.packagesError(c.getNotification(k.ErrorCode)):
d.packagesError(c.getNotification(b?f.Notification.CantInstallPackage:f.Notification.CantDeletePackage));i.each(e.data().packages(),function(b){b&&(a&&b.loading()&&a.file===b.file)&&(a.loading(!1),b.loading(!1))});f.StorageResultType.Success===j&&k&&k.Result&&k.Result.Reload?h.location.reload():e.reloadPackagesList()}};J.prototype.deletePackage=function(a){a&&(a.loading(!0),e.remote().packageDelete(this.requestHelper(a,!1),a))};J.prototype.installPackage=function(a){a&&(a.loading(!0),e.remote().packageInstall(this.requestHelper(a,
!0),a))};aa.prototype.populateDataOnStart=function(){var a=e.settingsGet("Languages"),b=e.settingsGet("Themes");c.isArray(a)&&this.languages(a);c.isArray(b)&&this.themes(b);this.mainLanguage(e.settingsGet("Language"));this.mainTheme(e.settingsGet("Theme"));this.allowCustomTheme(!!e.settingsGet("AllowCustomTheme"));this.allowAdditionalAccounts(!!e.settingsGet("AllowAdditionalAccounts"));this.determineUserLanguage(!!e.settingsGet("DetermineUserLanguage"));this.allowThemes(!!e.settingsGet("AllowThemes"));
this.allowCustomLogin(!!e.settingsGet("AllowCustomLogin"));this.allowLanguagesOnLogin(!!e.settingsGet("AllowLanguagesOnLogin"));this.allowLanguagesOnSettings(!!e.settingsGet("AllowLanguagesOnSettings"));this.editorDefaultType(e.settingsGet("EditorDefaultType"));this.showImages(!!e.settingsGet("ShowImages"));this.interfaceAnimation(e.settingsGet("InterfaceAnimation"));this.mainMessagesPerPage(e.settingsGet("MPP"));this.desktopNotifications(!!e.settingsGet("DesktopNotifications"));this.useThreads(!!e.settingsGet("UseThreads"));
this.replySameFolder(!!e.settingsGet("ReplySameFolder"));this.usePreviewPane(!!e.settingsGet("UsePreviewPane"));this.useCheckboxesInList(!!e.settingsGet("UseCheckboxesInList"));this.facebookEnable(!!e.settingsGet("AllowFacebookSocial"));this.facebookAppID(e.settingsGet("FacebookAppID"));this.facebookAppSecret(e.settingsGet("FacebookAppSecret"));this.twitterEnable(!!e.settingsGet("AllowTwitterSocial"));this.twitterConsumerKey(e.settingsGet("TwitterConsumerKey"));this.twitterConsumerSecret(e.settingsGet("TwitterConsumerSecret"));
this.googleEnable(!!e.settingsGet("AllowGoogleSocial"));this.googleClientID(e.settingsGet("GoogleClientID"));this.googleClientSecret(e.settingsGet("GoogleClientSecret"));this.dropboxEnable(!!e.settingsGet("AllowDropboxSocial"));this.dropboxApiKey(e.settingsGet("DropboxApiKey"));this.contactsIsSupported(!!e.settingsGet("ContactsIsSupported"));this.contactsIsAllowed(!!e.settingsGet("ContactsIsAllowed"))};i.extend(ba.prototype,aa.prototype);ba.prototype.populateDataOnStart=function(){aa.prototype.populateDataOnStart.call(this)};
G.prototype.oRequests={};G.prototype.defaultResponse=function(a,b,d,j,l,m){var p=function(){f.StorageResultType.Success!==d&&k.bUnload&&(d=f.StorageResultType.Unload);if(f.StorageResultType.Success===d&&j&&!j.Result){if(j&&-1<c.inArray(j.ErrorCode,[f.Notification.AuthError,f.Notification.AccessError,f.Notification.ConnectionError,f.Notification.DomainNotAllowed,f.Notification.AccountNotAllowed,f.Notification.MailServerError,f.Notification.UnknownNotification,f.Notification.UnknownError])&&k.iAjaxErrorCount++,
j&&f.Notification.InvalidToken===j.ErrorCode&&k.iTokenErrorCount++,10<k.iTokenErrorCount&&e.loginAndLogoutReload(!0),j.Logout||7<k.iAjaxErrorCount)h.__rlah_clear&&h.__rlah_clear(),e.loginAndLogoutReload(!0)}else f.StorageResultType.Success===d&&(j&&j.Result)&&(k.iAjaxErrorCount=0,k.iTokenErrorCount=0);a&&(o.runHook("ajax-default-response",[b,f.StorageResultType.Success===d?j:null,d,l,m]),a(d,f.StorageResultType.Success===d?j:null,l,b,m))};switch(d){case "success":d=f.StorageResultType.Success;break;
case "abort":d=f.StorageResultType.Abort;break;default:d=f.StorageResultType.Error}f.StorageResultType.Error===d?i.delay(p,300):p()};G.prototype.ajaxRequest=function(a,b,d,f,k){var l=this,m=""===f,p=(new h.Date).getTime(),o=null,n="",b=b||{},d=c.isNormal(d)?d:2E4,f=c.isUnd(f)?"":c.pString(f),k=c.isArray(k)?k:[];(n=b.Action||"")&&0<k.length&&i.each(k,function(a){l.oRequests[a]&&(l.oRequests[a].__aborted=!0,l.oRequests[a].abort&&l.oRequests[a].abort(),l.oRequests[a]=null)});m&&(b.XToken=e.settingsGet("Token"));
o=j.ajax({type:m?"POST":"GET",url:e.link().ajax(f),async:!0,dataType:"json",data:m?b:{},headers:{},timeout:d,global:!0});o.always(function(d,e){var g=!1;d&&d.Time&&(g=c.pInt(d.Time)>(new h.Date).getTime()-p);n&&l.oRequests[n]&&(l.oRequests[n].__aborted&&(e="abort"),l.oRequests[n]=null);l.defaultResponse(a,n,e,d,g,b)});n&&(0<k.length&&-1<c.inArray(n,k))&&(this.oRequests[n]&&(this.oRequests[n].__aborted=!0,this.oRequests[n].abort&&this.oRequests[n].abort(),this.oRequests[n]=null),this.oRequests[n]=
o);return o};G.prototype.defaultRequest=function(a,b,d,e,f,h){d=d||{};d.Action=b;f=c.pString(f);o.runHook("ajax-default-request",[b,d,f]);this.ajaxRequest(a,d,c.isUnd(e)?m.Defaults.DefaultAjaxTimeout:c.pInt(e),f,h)};G.prototype.noop=function(a){this.defaultRequest(a,"Noop")};G.prototype.jsError=function(a,b,c,d,e,f){this.defaultRequest(a,"JsError",{Message:b,FileName:c,LineNo:d,Location:e,HtmlCapa:f})};i.extend(n.prototype,G.prototype);n.prototype.adminLogin=function(a,b,c){this.defaultRequest(a,
"AdminLogin",{Login:b,Password:c})};n.prototype.adminLogout=function(a){this.defaultRequest(a,"AdminLogout")};n.prototype.saveAdminConfig=function(a,b){this.defaultRequest(a,"AdminSettingsUpdate",b)};n.prototype.domainList=function(a){this.defaultRequest(a,"AdminDomainList")};n.prototype.pluginList=function(a){this.defaultRequest(a,"AdminPluginList")};n.prototype.packagesList=function(a){this.defaultRequest(a,"AdminPackagesList")};n.prototype.packageInstall=function(a,b){this.defaultRequest(a,"AdminPackageInstall",
{Id:b.id,Type:b.type,File:b.file})};n.prototype.packageDelete=function(a,b){this.defaultRequest(a,"AdminPackageDelete",{Id:b.id})};n.prototype.domain=function(a,b){this.defaultRequest(a,"AdminDomainLoad",{Name:b})};n.prototype.plugin=function(a,b){this.defaultRequest(a,"AdminPluginLoad",{Name:b})};n.prototype.domainDelete=function(a,b){this.defaultRequest(a,"AdminDomainDelete",{Name:b})};n.prototype.domainDisable=function(a,b,c){return this.defaultRequest(a,"AdminDomainDisable",{Name:b,Disabled:c?
"1":"0"})};n.prototype.pluginSettingsUpdate=function(a,b){return this.defaultRequest(a,"AdminPluginSettingsUpdate",b)};n.prototype.licensing=function(a,b){return this.defaultRequest(a,"AdminLicensing",{Force:b?"1":"0"})};n.prototype.licensingActivate=function(a,b,c){return this.defaultRequest(a,"AdminLicensingActivate",{Domain:b,Key:c})};n.prototype.pluginDisable=function(a,b,c){return this.defaultRequest(a,"AdminPluginDisable",{Name:b,Disabled:c?"1":"0"})};n.prototype.createOrUpdateDomain=function(a,
b,c,d,e,f,h,i,j,k,l){this.defaultRequest(a,"AdminDomainSave",{Create:b?"1":"0",Name:c,IncHost:d,IncPort:e,IncSecure:f,OutHost:h,OutPort:i,OutSecure:j,OutAuth:k?"1":"0",WhiteList:l})};n.prototype.testConnectionForDomain=function(a,b,c,d,e,f,h,i){this.defaultRequest(a,"AdminDomainTest",{IncHost:b,IncPort:c,IncSecure:d,OutHost:e,OutPort:f,OutSecure:h,OutAuth:i?"1":"0"})};n.prototype.saveNewAdminPassword=function(a,b){this.defaultRequest(a,"AdminPasswordUpdate",b)};n.prototype.adminPing=function(a){this.defaultRequest(a,
"AdminPing")};E.prototype.oEmailsPicsHashes={};E.prototype.oServices={};E.prototype.clear=function(){this.oServices={};this.oEmailsPicsHashes={}};E.prototype.getUserPic=function(a){var b="",b="",b=a.toLowerCase(),d=c.isUnd(this.oEmailsPicsHashes[a])?"":this.oEmailsPicsHashes[a];""===d?(b=b.substr(a.indexOf("@")+1),b=""!==b&&this.oServices[b]?this.oServices[b]:""):b=e.link().getUserPicUrlFromHash(d);return b};E.prototype.setServicesData=function(a){this.oServices=a};E.prototype.setEmailsPicsHashesData=
function(a){this.oEmailsPicsHashes=a};i.extend(ka.prototype,E.prototype);i.extend(H.prototype,x.prototype);H.prototype.onRoute=function(a){var b=this,f=null,h=null,k=null,l=null;if(h=i.find(B.settings,function(b){return b&&b.__rlSettingsData&&a===b.__rlSettingsData.Route}))i.find(B["settings-removed"],function(a){return a&&a===h})&&(h=null),h&&i.find(B["settings-disabled"],function(a){return a&&a===h})&&(h=null);h&&(h.__builded&&h.__vm?f=h.__vm:(k=this.oViewModelPlace)&&1===k.length?(f=new h,l=j("<div></div>").addClass("rl-settings-view-model").hide().attr("data-bind",
'template: {name: "'+h.__rlSettingsData.Template+'"}, i18nInit: true'),l.appendTo(k),f.data=e.data(),f.viewModelDom=l,f.viewModelDom.addClass("rl-animation-margin"),f.__rlSettingsData=h.__rlSettingsData,h.__dom=l,h.__builded=!0,h.__vm=f,d.applyBindings(f,l[0]),r.delegateRun(f,"onBuild",[l])):c.log("Cannot find sub settings view model position: SettingsSubScreen"),f&&i.defer(function(){if(b.oCurrentSubScreen){r.delegateRun(b.oCurrentSubScreen,"onHide");b.oCurrentSubScreen.viewModelDom.hide();b.oCurrentSubScreen.viewModelDom.addClass("rl-animation-margin")}b.oCurrentSubScreen=
f;if(b.oCurrentSubScreen){b.oCurrentSubScreen.viewModelDom.show();r.delegateRun(b.oCurrentSubScreen,"onShow");i.each(b.menu(),function(a){a.selected(f&&f.__rlSettingsData&&a.route===f.__rlSettingsData.Route)});j("#rl-content .b-settings .b-content .content").scrollTop(0);b.oCurrentSubScreen.viewModelDom.removeClass("rl-animation-margin")}c.windowResize()}))};H.prototype.onHide=function(){this.oCurrentSubScreen&&this.oCurrentSubScreen.viewModelDom&&(r.delegateRun(this.oCurrentSubScreen,"onHide"),this.oCurrentSubScreen.viewModelDom.hide(),
this.oCurrentSubScreen.viewModelDom.addClass("rl-animation-margin"))};H.prototype.onBuild=function(){i.each(B.settings,function(a){a&&(a.__rlSettingsData&&!i.find(B["settings-removed"],function(b){return b&&b===a}))&&this.menu.push({route:a.__rlSettingsData.Route,label:a.__rlSettingsData.Label,selected:d.observable(!1),disabled:!!i.find(B["settings-disabled"],function(b){return b&&b===a})})},this);this.oViewModelPlace=j("#rl-content #rl-settings-subscreen")};H.prototype.routes=function(){var a=i.find(B.settings,
function(a){return a&&a.__rlSettingsData&&a.__rlSettingsData.IsDefault}),b=a?a.__rlSettingsData.Route:"general",a={subname:/^(.*)$/,normalize_:function(a,d){d.subname=c.isUnd(d.subname)?b:c.pString(d.subname);return[d.subname]}};return[["{subname}/",a],["{subname}",a],["",a]]};i.extend(ca.prototype,x.prototype);ca.prototype.onShow=function(){e.setTitle("")};i.extend(da.prototype,H.prototype);da.prototype.onShow=function(){e.setTitle("")};i.extend(v.prototype,ha.prototype);v.prototype.oSettings=null;
v.prototype.oLink=null;v.prototype.download=function(a){var b=null,c=null;if((b=navigator.userAgent.toLowerCase())&&(-1<b.indexOf("chrome")||-1<b.indexOf("chrome")))if(b=document.createElement("a"),b.href=a,document.createEvent&&(c=document.createEvent("MouseEvents"))&&c.initEvent&&b.dispatchEvent)return c.initEvent("click",!0,!0),b.dispatchEvent(c),!0;k.bMobileDevice?(h.open(a,"_self"),h.focus()):this.iframe.attr("src",a);return!0};v.prototype.link=function(){null===this.oLink&&(this.oLink=new p);
return this.oLink};v.prototype.local=function(){null===this.oLocal&&(this.oLocal=new Q);return this.oLocal};v.prototype.settingsGet=function(a){null===this.oSettings&&(this.oSettings=c.isNormal(V)?V:{});return c.isUnd(this.oSettings[a])?null:this.oSettings[a]};v.prototype.settingsSet=function(a,b){null===this.oSettings&&(this.oSettings=c.isNormal(V)?V:{});this.oSettings[a]=b};v.prototype.setTitle=function(a){a=(0<a.length?a+" - ":"")+this.settingsGet("Title")||"";a!==h.document.title&&(h.document.title=
a)};v.prototype.loginAndLogoutReload=function(a,b){var d=c.pString(this.settingsGet("CustomLogoutLink")),f=!!this.settingsGet("InIframe"),a=c.isUnd(a)?!1:!!a,b=c.isUnd(b)?!1:!!b;a&&(b&&h.close)&&h.close();a&&""!==d&&h.location.href!==d?i.defer(function(){f&&h.parent?h.parent.location.href=d:h.location.href=d}):(r.routeOff(),r.setHash(e.link().root(),!0),r.routeOff(),i.defer(function(){f&&h.parent?h.parent.location.reload():h.location.reload()}))};v.prototype.getAutocomplete=function(a,b,c){c([],a)};
v.prototype.bootstart=function(){c.initOnStartOrLangChange(function(){c.initNotificationLanguage()},null);i.delay(function(){c.windowResize()},1E3)};i.extend(w.prototype,v.prototype);w.prototype.oData=null;w.prototype.oRemote=null;w.prototype.oCache=null;w.prototype.data=function(){null===this.oData&&(this.oData=new ba);return this.oData};w.prototype.remote=function(){null===this.oRemote&&(this.oRemote=new n);return this.oRemote};w.prototype.cache=function(){null===this.oCache&&(this.oCache=new ka);
return this.oCache};w.prototype.reloadDomainList=function(){e.data().domainsLoading(!0);e.remote().domainList(function(a,b){e.data().domainsLoading(!1);if(f.StorageResultType.Success===a&&b&&b.Result){var c=i.map(b.Result,function(a,b){return{name:b,disabled:d.observable(!a),deleteAccess:d.observable(!1)}},this);e.data().domains(c)}})};w.prototype.reloadPluginList=function(){e.data().pluginsLoading(!0);e.remote().pluginList(function(a,b){e.data().pluginsLoading(!1);if(f.StorageResultType.Success===
a&&b&&b.Result){var c=i.map(b.Result,function(a){return{name:a.Name,disabled:d.observable(!a.Enabled),configured:d.observable(!!a.Configured)}},this);e.data().plugins(c)}})};w.prototype.reloadPackagesList=function(){e.data().packagesLoading(!0);e.data().packagesReal(!0);e.remote().packagesList(function(a,b){e.data().packagesLoading(!1);if(f.StorageResultType.Success===a&&b&&b.Result){e.data().packagesReal(!!b.Result.Real);e.data().packagesMainUpdatable(!!b.Result.MainUpdatable);var g=[],h={};i.each(e.data().packages(),
function(a){a&&a.loading()&&(h[a.file]=a)});c.isArray(b.Result.List)&&(g=i.map(b.Result.List,function(a){a.loading=d.observable(!c.isUnd(h[a.file]));return a},this));e.data().packages(g)}else e.data().packagesReal(!1)})};w.prototype.reloadLicensing=function(a){a=c.isUnd(a)?!1:!!a;e.data().licensingProcess(!0);e.data().licenseError("");e.remote().licensing(function(a,d){e.data().licensingProcess(!1);f.StorageResultType.Success===a&&d&&d.Result&&c.isNormal(d.Result.Expired)?(e.data().licenseValid(!0),
e.data().licenseExpired(c.pInt(d.Result.Expired)),e.data().licenseError(""),e.data().licensing(!0)):d&&d.ErrorCode&&-1<c.inArray(c.pInt(d.ErrorCode),[f.Notification.LicensingServerIsUnavailable,f.Notification.LicensingExpired])?(e.data().licenseError(c.getNotification(c.pInt(d.ErrorCode))),e.data().licensing(!0)):f.StorageResultType.Abort===a?(e.data().licenseError(c.getNotification(f.Notification.LicensingServerIsUnavailable)),e.data().licensing(!0)):e.data().licensing(!1)},a)};w.prototype.bootstart=
function(){v.prototype.bootstart.call(this);e.data().populateDataOnStart();r.hideLoading();this.settingsGet("AllowAdminPanel")?this.settingsGet("Auth")?(r.startScreens([da]),k.bMobileDevice||i.defer(function(){c.initLayoutResizer("#rl-top-resizer-left","#rl-top-resizer-right","#rl-center",120,300,200,600,f.ClientSideKeyName.FolderListSize)})):r.startScreens([ca]):(r.routeOff(),r.setHash(e.link().root(),!0),r.routeOff(),i.defer(function(){h.location.href="/"}));h.SimplePace&&h.SimplePace.set(100)};
e=new w;K.addClass(k.bMobileDevice?"mobile":"no-mobile");I.keydown(c.killCtrlAandS).keyup(c.killCtrlAandS);I.unload(function(){k.bUnload=!0});h.rl=h.rl||{};h.rl.addHook=o.addHook;h.rl.settingsGet=o.mainSettingsGet;h.rl.remoteRequest=o.remoteRequest;h.rl.pluginSettingsGet=o.settingsGet;h.rl.addSettingsViewModel=c.addSettingsViewModel;h.rl.createCommand=c.createCommand;h.rl.EmailModel=t;h.rl.Enums=f;h.__RLBOOT=function(a){j(function(){h.rainloopTEMPLATES&&h.rainloopTEMPLATES[0]?(j("#rl-templates").html(h.rainloopTEMPLATES[0]),
h.setInterval(function(){k.minuteTick(!k.minuteTick())},6E4),h.setInterval(function(){k.fiveMinuteTick(!k.fiveMinuteTick())},3E5),i.delay(function(){h.rainloopAppData={};h.rainloopI18N={};h.rainloopTEMPLATES={};r.setBoot(e).bootstart()},50)):a(!1);h.__RLBOOT=null})};h.SimplePace&&h.SimplePace.add(10)})(window,jQuery,ko,crossroads,hasher,_);

View file

@ -1,23 +0,0 @@
/*
* See http://www.JSON.org/js.html
*/
var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c<f;c+=1)h[c]=str(c,i)||"null";e=h.length===0?"[]":gap?"[\n"+gap+h.join(",\n"+gap)+"\n"+g+"]":"["+h.join(",")+"]",gap=g;return e}if(rep&&typeof rep=="object"){f=rep.length;for(c=0;c<f;c+=1)d=rep[c],typeof d=="string"&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e))}else for(d in i)Object.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&h.push(quote(d)+(gap?": ":":")+e));e=h.length===0?"{}":gap?"{\n"+gap+h.join(",\n"+gap)+"\n"+g+"}":"{"+h.join(",")+"}",gap=g;return e}}function quote(a){escapable.lastIndex=0;return escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return typeof b=="string"?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function f(a){return a<10?"0"+a:a}"use strict",typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(a,b,c){var d;gap="",indent="";if(typeof c=="number")for(d=0;d<c;d+=1)indent+=" ";else typeof c=="string"&&(indent=c);rep=b;if(b&&typeof b!="function"&&(typeof b!="object"||typeof b.length!="number"))throw new Error("JSON.stringify");return str("",{"":a})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&typeof e=="object")for(c in e)Object.hasOwnProperty.call(e,c)&&(d=walk(e,c),d!==undefined?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver=="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")})}();
(function(b){function c(){var a=this;a.el=null;a.done=!1;a.progress=0;a.addInterval=0;a.addSpeed=3;a.stopProgress=100;a.interval=b.setInterval(function(){a.build()&&b.clearInterval(a.interval)},100)}c.prototype.startAddInterval=function(){var a=this;a.stopAddInterval();a.addInterval=b.setInterval(function(){0<a.progress&&a.stopProgress>a.progress&&a.add(a.addSpeed)},500)};c.prototype.stopAddInterval=function(){b.clearInterval(this.addInterval);this.addInterval=0};c.prototype.build=function(){if(null===
this.el){var a=document.querySelector("body");a&&(this.el=document.createElement("div"),this.el.className="simple-pace simple-pace-active",this.el.innerHTML='<div class="simple-pace-progress"><div class="simple-pace-progress-inner"></div></div><div class="simple-pace-activity"></div>',a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el))}return this.el};c.prototype.reset=function(){this.progress=0;return this.render()};c.prototype.update=function(a){a=b.parseInt(a,10);a>this.progress&&
(this.progress=a,this.progress=100<this.progress?100:this.progress,this.progress=0>this.progress?0:this.progress);return this.render()};c.prototype.add=function(a){this.progress+=b.parseInt(a,10);this.progress=100<this.progress?100:this.progress;this.progress=0>this.progress?0:this.progress;return this.render()};c.prototype.setSpeed=function(a,b){this.addSpeed=a;this.stopProgress=b||100};c.prototype.render=function(){var a=this.build();a&&(a.children&&a.children[0])&&a.children[0].setAttribute("style",
"width:"+this.progress+"%");100===this.progress&&!this.done?(this.done=!0,this.stopAddInterval(),b.setTimeout(function(){a.className=a.className.replace("simple-pace-active","");a.className+=" simple-pace-inactive"},500)):100>this.progress&&this.done?(this.done=!1,this.startAddInterval(),a.className=a.className.replace("simple-pace-inactive",""),a.className+=" simple-pace-inactive"):100>this.progress&&(!this.done&&0===this.addInterval)&&this.startAddInterval()};if(!b.SimplePace){var d=new c;b.SimplePace=
{sleep:function(){d.setSpeed(2,95)},set:function(a){d.update(a)},add:function(a){d.add(a)}}}})(window);
var a=null,c=window,d=JSON;function e(){}e.prototype.b=c.sessionStorage;e.prototype.a=c.top||c;e.prototype.getHash=function(){var b=a;this.b?b=this.b.getItem("__rlA")||a:this.a&&(b=(b=this.a.name&&d&&"{"===this.a.name.toString().substr(0,1)?d.parse(this.a.name.toString()):a)?b.__rlA||a:a);return b};
e.prototype.setHash=function(){var b=c.rainloopAppData,f=a;this.b?this.b.setItem("__rlA",b&&b.AuthAccountHash?b.AuthAccountHash:""):this.a&&(f={},f.__rlA=b&&b.AuthAccountHash?b.AuthAccountHash:"",this.a.name=d.stringify(f))};e.prototype.clearHash=function(){this.b?this.b.setItem("__rlA",""):this.a&&(this.a.name="")};c._rlhh=new e;c.__rlah=function(){return c._rlhh?c._rlhh.getHash():a};c.__rlah_set=function(){c._rlhh&&c._rlhh.setHash()};c.__rlah_clear=function(){c._rlhh&&c._rlhh.clearHash()};
(function(f,w){function m(){}function g(a,b){if(a){"object"===typeof a&&(a=[].slice.call(a));for(var c=0,d=a.length;c<d;c++)b.call(a,a[c],c)}}function v(a,b){var c=Object.prototype.toString.call(b).slice(8,-1);return b!==w&&null!==b&&c===a}function k(a){return v("Function",a)}function h(a){a=a||m;a._done||(a(),a._done=1)}function n(a){var b={};if("object"===typeof a)for(var c in a)a[c]&&(b={name:c,url:a[c]});else b=a.split("/"),b=b[b.length-1],c=b.indexOf("?"),b={name:-1!==c?b.substring(0,c):b,url:a};
return(a=p[b.name])&&a.url===b.url?a:p[b.name]=b}function q(a){var a=a||p,b;for(b in a)if(a.hasOwnProperty(b)&&a[b].state!==r)return!1;return!0}function s(a,b){b=b||m;a.state===r?b():a.state===x?d.ready(a.name,b):a.state===y?a.onpreload.push(function(){s(a,b)}):(a.state=x,z(a,function(){a.state=r;b();g(l[a.name],function(a){h(a)});j&&q()&&g(l.ALL,function(a){h(a)})}))}function z(a,b){var b=b||m,c;/\.css[^\.]*$/.test(a.url)?(c=e.createElement("link"),c.type="text/"+(a.type||"css"),c.rel="stylesheet",
c.href=a.url):(c=e.createElement("script"),c.type="text/"+(a.type||"javascript"),c.src=a.url);c.onload=c.onreadystatechange=function(a){a=a||f.event;if("load"===a.type||/loaded|complete/.test(c.readyState)&&(!e.documentMode||9>e.documentMode))c.onload=c.onreadystatechange=c.onerror=null,b()};c.onerror=function(){c.onload=c.onreadystatechange=c.onerror=null;b()};c.async=!1;c.defer=!1;var d=e.head||e.getElementsByTagName("head")[0];d.insertBefore(c,d.lastChild)}function i(){e.body?j||(j=!0,g(A,function(a){h(a)})):
(f.clearTimeout(d.readyTimeout),d.readyTimeout=f.setTimeout(i,50))}function t(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",t,!1),i()):"complete"===e.readyState&&(e.detachEvent("onreadystatechange",t),i())}var e=f.document,A=[],B=[],l={},p={},E="async"in e.createElement("script")||"MozAppearance"in e.documentElement.style||f.opera,C,j,D=f.head_conf&&f.head_conf.head||"head",d=f[D]=f[D]||function(){d.ready.apply(null,arguments)},y=1,x=3,r=4;d.load=E?function(){var a=arguments,b=a[a.length-
1],c={};k(b)||(b=null);g(a,function(d,e){d!==b&&(d=n(d),c[d.name]=d,s(d,b&&e===a.length-2?function(){q(c)&&h(b)}:null))});return d}:function(){var a=arguments,b=[].slice.call(a,1),c=b[0];if(!C)return B.push(function(){d.load.apply(null,a)}),d;c?(g(b,function(a){if(!k(a)){var b=n(a);b.state===w&&(b.state=y,b.onpreload=[],z({url:b.url,type:"cache"},function(){b.state=2;g(b.onpreload,function(a){a.call()})}))}}),s(n(a[0]),k(c)?c:function(){d.load.apply(null,b)})):s(n(a[0]));return d};d.js=d.load;d.test=
function(a,b,c,e){a="object"===typeof a?a:{test:a,success:b?v("Array",b)?b:[b]:!1,failure:c?v("Array",c)?c:[c]:!1,callback:e||m};(b=!!a.test)&&a.success?(a.success.push(a.callback),d.load.apply(null,a.success)):!b&&a.failure?(a.failure.push(a.callback),d.load.apply(null,a.failure)):e();return d};d.ready=function(a,b){if(a===e)return j?h(b):A.push(b),d;k(a)&&(b=a,a="ALL");if("string"!==typeof a||!k(b))return d;var c=p[a];if(c&&c.state===r||"ALL"===a&&q()&&j)return h(b),d;(c=l[a])?c.push(b):l[a]=[b];
return d};d.ready(e,function(){q()&&g(l.ALL,function(a){h(a)});d.feature&&d.feature("domloaded",!0)});if("complete"===e.readyState)i();else if(e.addEventListener)e.addEventListener("DOMContentLoaded",t,!1),f.addEventListener("load",i,!1);else{e.attachEvent("onreadystatechange",t);f.attachEvent("onload",i);var u=!1;try{u=null==f.frameElement&&e.documentElement}catch(F){}u&&u.doScroll&&function b(){if(!j){try{u.doScroll("left")}catch(c){f.clearTimeout(d.readyTimeout);d.readyTimeout=f.setTimeout(b,50);
return}i()}}()}setTimeout(function(){C=!0;g(B,function(b){b()})},300)})(window);
if (window.SimplePace) {
window.SimplePace.add(10);
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
1.3.9.484

View file

@ -303,6 +303,7 @@ class HtmlUtils
@$oElement->removeAttribute('contenteditable');
@$oElement->removeAttribute('designmode');
@$oElement->removeAttribute('data-bind');
@$oElement->removeAttribute('xmlns');
if ($oElement->hasAttribute('src'))
{

View file

@ -39,6 +39,11 @@ class LinkFinder
*/
private $fMailWrapper;
/**
* @var int
*/
private $iOptimizationLimit;
/**
* @access private
*/
@ -52,6 +57,8 @@ class LinkFinder
$this->iHtmlSpecialCharsFlags |= ENT_IGNORE;
}
$this->iOptimizationLimit = 300000;
$this->Clear();
}
@ -150,7 +157,8 @@ class LinkFinder
*/
public function CompileText($bUseHtmlSpecialChars = true, $bFindShortLinks = true)
{
$sText = $this->sText;
$sText = \substr($this->sText, 0, $this->iOptimizationLimit);
$sSubText = \substr($this->sText, $this->iOptimizationLimit);
$this->aPrepearPlainStringUrls = array();
if (null !== $this->fLinkWrapper && \is_callable($this->fLinkWrapper))
@ -168,23 +176,32 @@ class LinkFinder
$sText = $this->findShortLinks($sText, $this->fLinkWrapper);
}
$sResult = '';
if ($bUseHtmlSpecialChars)
{
$sText = @\htmlentities($sText, $this->iHtmlSpecialCharsFlags, 'UTF-8');
$sResult = @\htmlentities($sText.$sSubText, $this->iHtmlSpecialCharsFlags, 'UTF-8');
}
else
{
$sResult = $sText.$sSubText;
}
unset($sText, $sSubText);
if (0 < \count($this->aPrepearPlainStringUrls))
{
for ($iIndex = 0, $iLen = \count($this->aPrepearPlainStringUrls); $iIndex < $iLen; $iIndex++)
{
$sText = \str_replace(\MailSo\Base\LinkFinder::OPEN_LINK.$iIndex.
\MailSo\Base\LinkFinder::CLOSE_LINK, $this->aPrepearPlainStringUrls[$iIndex], $sText);
}
$aPrepearPlainStringUrls = $this->aPrepearPlainStringUrls;
$sResult = \preg_replace_callback('/'.\preg_quote(\MailSo\Base\LinkFinder::OPEN_LINK, '/').
'([\d]+)'.\preg_quote(\MailSo\Base\LinkFinder::CLOSE_LINK, '/').'/',
function ($aMatches) use ($aPrepearPlainStringUrls) {
$iIndex = (int) $aMatches[1];
return isset($aPrepearPlainStringUrls[$iIndex]) ? $aPrepearPlainStringUrls[$iIndex] : '';
}, $sResult);
$this->aPrepearPlainStringUrls = array();
}
return $sText;
return $sResult;
}
/**

Some files were not shown because too many files have changed in this diff Show more