",' ',' error_outline'," "+l("An error occured while importing contacts.")+"","
",""].join(""),position:"top right",hideDelay:3e3})}}),e.close=function(){b.hide()}}h.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:"UIxContactsImportDialog",controller:c,controllerAs:"$CardsImportDialogController",locals:{folder:b}}),c.$inject=["scope","$mdDialog","folder"]}function E(b){function c(a,b){function c(){a.hide()}this.addressbook=b,this.close=c}var d;d=b.urls?a.when():r.$reloadAll(),d.then(function(){h.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:b.id+"/links",controller:c,controllerAs:"links",locals:{addressbook:b}})}),c.$inject=["$mdDialog","addressbook"]}function F(a){function b(a,b,c){function d(){f.addressbook.$save().then(function(){c.init(f.addressbook.$omit()),b.hide()})}function e(){b.cancel()}var f=this;f.addressbook=new r(c.$omit()),f.saveProperties=d,f.close=e}h.show({templateUrl:a.id+"/properties",controller:b,controllerAs:"properties",clickOutsideToClose:!0,escapeToClose:!0,locals:{srcAddressBook:a}}).catch(function(){}),b.$inject=["$scope","$mdDialog","srcAddressBook"]}function G(a){a.$acl.$users().then(function(){h.show({templateUrl:a.id+"/UIxAclEditor",controller:"AclController",controllerAs:"acl",clickOutsideToClose:!0,escapeToClose:!0,locals:{usersWithACL:a.$acl.users,User:u,folder:a}})})}function H(a){console.debug("subscribeToFolder "+a.owner+a.name),r.$subscribe(a.owner,a.name).then(function(a){i.show(i.simple().content(l("Successfully subscribed to address book")).position("top right").hideDelay(3e3))})}function I(a,b){return b.id!=a.id&&(b.isOwned||b.acls.objectCreator)}function J(a,c,d){var e,f,g,h,j,k,m;e=c.id,j=!1,f=a.$selectedCards(),0===f.length&&(f=[a.$selectedCard()]),g=_.filter(f,function(a){return a.$isCard()}),g.length!=f.length&&i.show(i.simple().content(l("Lists can't be moved or copied.")).position("top right").hideDelay(2e3)),g.length&&("copy"==d?(k=a.$copyCards(g,e),m=l("%{0} card(s) copied",g.length)):(k=a.$moveCards(g,e),m=l("%{0} card(s) moved",g.length),h=_.map(g,"id"),j=a.selectedCard&&h.indexOf(a.selectedCard)>=0),k.then(function(){j&&b.go("app.addressbook"),i.show(i.simple().content(m).position("top right").hideDelay(2e3))}))}var K=this,L=[];K.activeUser=t.activeUser,K.service=r,K.select=x,K.newAddressbook=y,K.edit=z,K.revertEditing=A,K.save=B,K.confirmDelete=C,K.importCards=D,K.showLinks=E,K.showProperties=F,K.share=G,K.subscribeToFolder=H,K.isDroppableFolder=I,K.dragSelectedCards=J,w(L),c.$on("$destroy",function(){_.forEach(L,function(a){o.deregisterHotkey(a)})})}a.$inject=["$q","$state","$scope","$rootScope","$stateParams","$timeout","$window","$mdDialog","$mdToast","$mdMedia","$mdSidenav","FileUploader","sgConstant","sgHotkeys","sgFocus","Card","AddressBook","Dialog","sgSettings","User","stateAddressbooks"],angular.module("SOGo.ContactsUI").controller("AddressBooksController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n){function o(a){a.push(i.createHotkey({key:"backspace",description:l("Delete"),callback:function(a){0===E.currentFolder.$selectedCount()&&C(),a.preventDefault()}})),_.forEach(a,function(a){i.registerHotkey(a)})}function p(a){return angular.isString(a)?{value:a}:a}function q(){j("orgUnit_"+E.card.$addOrgUnit(""))}function r(){E.card.birthday=new Date}function s(){E.card.$addScreenName("")}function t(){j("email_"+E.card.$addEmail(""))}function u(){j("phone_"+E.card.$addPhone(""))}function v(){j("url_"+E.card.$addUrl("",""))}function w(){j("address_"+E.card.$addAddress("","","","","","","",""))}function x(a,b){return a.length