2016-10-04 06:22:40 +02:00
|
|
|
function l(){var a,b,c=arguments[0],d=c,e=arguments;for(labels[c]?d=labels[c]:clabels[c]&&(d=clabels[c]),a=1,b=0;a<e.length;a++,b++)d=d.replace("%{"+b+"}",e[a]);return a=1,e.length>1&&(d=d.replace(/%((%)|s|d)/g,function(b){var c=null;if(b[2])c=b[2];else{switch(c=e[a],b){case"%d":c=parseFloat(c),isNaN(c)&&(c=0)}a++}return c})),d}function hexToRgb(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null}function contrast(a){var b,c,d=1;if(b=hexToRgb(a)){c=[b.r/255,b.g/255,b.b/255];for(var e=0;e<c.length;++e)c[e]<=.03928?c[e]=c[e]/12.92:c[e]=Math.pow((c[e]+.055)/1.055,2.4);d=.2126*c[0]+.7152*c[1]+.0722*c[2]}return d>.179?"black":"white"}function guid(){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(a()+a()+"-"+a()+"-4"+a().substr(0,3)+"-"+a()+"-"+a()+a()+a()).toLowerCase()}!function(){"use strict";function a(a,b,c,d,e){d.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"fafafa",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),d.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),d.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1000:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]}),d.theme("default").primaryPalette("sogo-blue",{default:"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{default:"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("grey",{default:"50","hue-1":"200","hue-2":"300","hue-3":"500"}),DebugEnabled||(a.debugEnabled(!1),b.debugInfoEnabled(!1),e.disableWarnings(),d.generateThemesOnDemand(!0)),c.interceptors.push("AuthInterceptor"),c.interceptors.push("ErrorInterceptor")}function b(a,b){return{response:function(c){return c&&/^application\/json/.test(c.config.headers.Accept)&&/^<!DOCTYPE html>/.test(c.data)?(a.location.reload(!0),b.reject()):c}}}function c(a,b){return{responseError:function(c){return/^application\/json/.test(c.config.headers.Accept)&&a.$broadcast("http:Error",c),b.reject(c)}}}angular.module("SOGo.Common",["ngAnimate","ngMessages","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicationBaseURL||null},resourcesURL:function(){return ResourcesURL||null},activeUser:function(a){var b={login:UserLogin||null,identification:UserIdentification||null,email:UserEmail||null,language:UserLanguage||null,folderURL:UserFolderURL||null,isSuperUser:IsSuperUser||null,path:{calendar:UserCalendarPath||null,contacts:UserContactsPath||null,mail:UserMailPath||null,preferences:UserPreferencesPath||null,administration:IsSuperUser?UserAdministrationPath:null,help:HelpURL||null,logoff:UserLogoffPath||null}};return a?b[a]:b}}).constant("sgColors",{selection:["#FFFFFF","#330033","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#CCCCCC","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#99FF99"]}).constant("sgConstant
|
|
|
|
d.img=e,d.genericImg=f}function c(a,b,c,d,e,f){function g(a){var b=f(a,j.size,e.defaults.SOGoAlternateAvatar);c({method:"GET",url:b,cache:!0,headers:{Accept:"image/*"}}).then(function(){j.url||(j.url=b,j.urlEmail=a,i())},function(){h()})}function h(){j.url=null,j.urlEmail=null,j.img.addClass("ng-hide"),j.genericImg.removeClass("ng-hide")}function i(){j.genericImg.addClass("ng-hide"),j.img.removeClass("ng-hide")}var j;j=this,e.ready().then(function(){a.$watch(function(){return j.email},function(a,b){a&&j.urlEmail!=a?(h(),e.defaults.SOGoGravatarEnabled&&g(a)):a||h()})}),"sg-src"in b[0].attributes&&a.$watch(function(){return j.src},function(a){a&&(j.url=a,j.urlEmail=""+j.email,i())})}c.$inject=["$scope","$element","$http","$q","Preferences","Gravatar"],angular.module("SOGo.Common").directive("sgAvatarImage",a).controller("sgAvatarImageController",c)}(),function(){"use strict";function a(a,b,c,d){function e(e,g){return e.on("click",function(a){this.hasAttribute("disabled")&&a.stopImmediatePropagation()}),function(e,g,h,i){function j(a,b,c,d,e){var f;if(angular.isDefined(d)){if(f=a(d),!f.constant)throw Error("Expected constant expression for `"+c+"`, but saw `"+d+"`.");return f(b)}return e}function k(a){g[0].hasAttribute("disabled")||e.$apply(function(){var b=i.$viewValue==m?n:m;i.$setViewValue(b,a&&a.type),i.$render()})}function l(){i.$viewValue==m?g.addClass(f):g.removeClass(f)}var m=j(a,e,"sgTrueValue",h.sgTrueValue,!0),n=j(a,e,"sgFalseValue",h.sgFalseValue,!1);i=i||d.fakeNgModel(),c(g),b.expectWithText(g,"aria-label"),g.on("click",k),i.$render=l}}var f="sg-checked";return{restrict:"E",replace:!0,transclude:!0,require:"?ngModel",template:['<button class="md-button sg-checkmark" type="button">'," <md-icon>check</md-icon>"," <span ng-transclude></span","</button>"].join(""),compile:e}}angular.module("SOGo.Common").directive("sgCheckmark",a),a.$inject=["$parse","$mdAria","$mdTheming","$mdUtil"]}(),function(){"use strict";function a(){function a(a,b,c,d){d.$render=function(){a.sgColor=d.$viewValue,a.sgIconColor=contrast(d.$viewValue)}}return{restrict:"E",require:"ngModel",template:["<md-menu>",' <md-button class="md-icon-button"',' label:aria-label="Options"'," ng-style=\"{ 'background-color': sgColor }\"",' ng-click="$mdOpenMenu()"',' md-menu-origin="md-menu-origin">',' <md-icon ng-style="{ color: sgIconColor }">color_lens</md-icon>'," </md-button>",' <md-menu-content width="3">',' <md-content class="md-padding">',' <md-grid-list class="sg-color-picker" md-cols="7" md-row-height="1:1" md-gutter="0.5em">',' <md-grid-tile ng-repeat="color in ::sgColors track by $index"'," ng-style=\"::{ 'background-color': color }\"",' ng-class="::{ selected: color == sgColor }"',' ng-click="setColor($event, color)"><md-icon ng-style="::{ color: color }">check_box</md-icon></md-grid-tile>'," </md-grid-list>"," </md-content>"," </md-menu-content>","</md-menu>"].join(""),replace:!0,controller:b,link:a}}function b(a,b,c){var d=b.controller("ngModel");a.sgColors=c.selection,a.setColor=function(b,c){b&&(_.forEach(b.currentTarget.parentElement.children,function(a){a.classList.remove("selected")}),b.currentTarget.classList.add("selected")),a.sgColor=c,a.sgIconColor=contrast(c),d.$setViewValue(c)}}b.$inject=["$scope","$element","sgColors"],angular.module("SOGo.Common").directive("sgColorPicker",a)}(),function(){"use strict";function a(a){function b(b,c,d){var e=b.$watch(function(a){return a.$eval(d.sgCompile)},function(d){c.html(d),a(c.contents())(b),e()})}return{restrict:"A",link:b}}a.$inject=["$compile"],angular.module("SOGo.Common").directive("sgCompile",a)}(),function(){"use strict";function a(){function a(a,b,c,d){function e(){return b.find("input").eq(0)}var f=a.$watch(e,function(a){a.length&&(f(),a.prop("disabled",!0),a.parent().addClass("sg-datepicker-readonly-input-container"))})}return{link:a,require:"mdDatepicker",restrict:"A"}}angular.module("SOGo.Common").directive("sgDatepickerReadonlyInput",a)}()
|
|
|
|
return h},String.prototype.base64decode=function(){for(var a,b,c,d,e,f,g,h="",i=0,j=""+this;i<j.length;)d=this._base64_keyStr.indexOf(j.charAt(i++)),e=this._base64_keyStr.indexOf(j.charAt(i++)),f=this._base64_keyStr.indexOf(j.charAt(i++)),g=this._base64_keyStr.indexOf(j.charAt(i++)),a=d<<2|e>>4,b=(15&e)<<4|f>>2,c=(3&f)<<6|g,h+=String.fromCharCode(a),64!=f&&(h+=String.fromCharCode(b)),64!=g&&(h+=String.fromCharCode(c));return h},String.prototype.md5=function(){if(this.length){var a=function(a){function b(a,b){return a<<b|a>>>32-b}function c(a,b){var c,d,e,f,g;return e=2147483648&a,f=2147483648&b,c=1073741824&a,d=1073741824&b,g=(1073741823&a)+(1073741823&b),c&d?2147483648^g^e^f:c|d?1073741824&g?3221225472^g^e^f:1073741824^g^e^f:g^e^f}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return a&c|b&~c}function f(a,b,c){return a^b^c}function g(a,b,c){return b^(a|~c)}function h(a,e,f,g,h,i,j){return a=c(a,c(c(d(e,f,g),h),j)),c(b(a,i),e)}function i(a,d,f,g,h,i,j){return a=c(a,c(c(e(d,f,g),h),j)),c(b(a,i),d)}function j(a,d,e,g,h,i,j){return a=c(a,c(c(f(d,e,g),h),j)),c(b(a,i),d)}function k(a,d,e,f,h,i,j){return a=c(a,c(c(g(d,e,f),h),j)),c(b(a,i),d)}function l(a){for(var b,c=a.length,d=c+8,e=(d-d%64)/64,f=16*(e+1),g=Array(f-1),h=0,i=0;i<c;)b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|a.charCodeAt(i)<<h,i++;return b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|128<<h,g[f-2]=c<<3,g[f-1]=c>>>29,g}function m(a){var b,c,d="",e="";for(c=0;c<=3;c++)b=a>>>8*c&255,e="0"+b.toString(16),d+=e.substr(e.length-2,2);return d}function n(a){a=a.replace(/rn/g,"n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):d>127&&d<2048?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b}var o,p,q,r,s,t,u,v,w,x=Array(),y=7,z=12,A=17,B=22,C=5,D=9,E=14,F=20,G=4,H=11,I=16,J=23,K=6,L=10,M=15,N=21;for(a=n(a),x=l(a),t=1732584193,u=4023233417,v=2562383102,w=271733878,o=0;o<x.length;o+=16)p=t,q=u,r=v,s=w,t=h(t,u,v,w,x[o+0],y,3614090360),w=h(w,t,u,v,x[o+1],z,3905402710),v=h(v,w,t,u,x[o+2],A,606105819),u=h(u,v,w,t,x[o+3],B,3250441966),t=h(t,u,v,w,x[o+4],y,4118548399),w=h(w,t,u,v,x[o+5],z,1200080426),v=h(v,w,t,u,x[o+6],A,2821735955),u=h(u,v,w,t,x[o+7],B,4249261313),t=h(t,u,v,w,x[o+8],y,1770035416),w=h(w,t,u,v,x[o+9],z,2336552879),v=h(v,w,t,u,x[o+10],A,4294925233),u=h(u,v,w,t,x[o+11],B,2304563134),t=h(t,u,v,w,x[o+12],y,1804603682),w=h(w,t,u,v,x[o+13],z,4254626195),v=h(v,w,t,u,x[o+14],A,2792965006),u=h(u,v,w,t,x[o+15],B,1236535329),t=i(t,u,v,w,x[o+1],C,4129170786),w=i(w,t,u,v,x[o+6],D,3225465664),v=i(v,w,t,u,x[o+11],E,643717713),u=i(u,v,w,t,x[o+0],F,3921069994),t=i(t,u,v,w,x[o+5],C,3593408605),w=i(w,t,u,v,x[o+10],D,38016083),v=i(v,w,t,u,x[o+15],E,3634488961),u=i(u,v,w,t,x[o+4],F,3889429448),t=i(t,u,v,w,x[o+9],C,568446438),w=i(w,t,u,v,x[o+14],D,3275163606),v=i(v,w,t,u,x[o+3],E,4107603335),u=i(u,v,w,t,x[o+8],F,1163531501),t=i(t,u,v,w,x[o+13],C,2850285829),w=i(w,t,u,v,x[o+2],D,4243563512),v=i(v,w,t,u,x[o+7],E,1735328473),u=i(u,v,w,t,x[o+12],F,2368359562),t=j(t,u,v,w,x[o+5],G,4294588738),w=j(w,t,u,v,x[o+8],H,2272392833),v=j(v,w,t,u,x[o+11],I,1839030562),u=j(u,v,w,t,x[o+14],J,4259657740),t=j(t,u,v,w,x[o+1],G,2763975236),w=j(w,t,u,v,x[o+4],H,1272893353),v=j(v,w,t,u,x[o+7],I,4139469664),u=j(u,v,w,t,x[o+10],J,3200236656),t=j(t,u,v,w,x[o+13],G,681279174),w=j(w,t,u,v,x[o+0],H,3936430074),v=j(v,w,t,u,x[o+3],I,3572445317),u=j(u,v,w,t,x[o+6],J,76029189),t=j(t,u,v,w,x[o+9],G,3654602809),w=j(w,t,u,v,x[o+12],H,3873151461),v=j(v,w,t,u,x[o+15],I,530742520),u=j(u,v,w,t,x[o+2],J,3299628645),t=k(t,u,v,w,x[o+0],K,4096336452),w=k(w,t,u,v,x[o+7],L,1126891415),v=k(v,w,t,u,x[o+14],M,2878612391),u=k(u,v,w,t,x[o+5],N,4237533241),t=k(t,u,v,w,x[o+12],K,1700485571),w=k(w,t,u,v,x[o+3],L,2399980690),v=k(v,w,t,u,x[o+10],M,4293915773),u=k(u,v,w,t,x[o+1],N,2240044497),t=k(t,u,v,w,x[o+8],K,1873313359),w=k(w,t,u,v,x[o+15],L,4264355552),v=k(v,w,t,u,x[o+6],M,2734768916),u=k(u,v,w,t,x[o+13],N,1309151649),t=k(t,u,v,w,x[o+4],K,4149444226),w=k(w,t,u,v,x[o+11],L,3174756917),v=k(v,
|