!function(){"use strict";function d(e){this.component=e,this.component.attendees&&_.forEach(this.component.attendees,function(e){e.image=d.$gravatar(e.email,32)}),this.workDaysOnly=!0,this.slotStartTimeLimit=new Date,this.slotStartTimeLimit.setMinutes(0),this.slotStartTimeLimit.setHours(d.dayStartHour),this.slotEndTimeLimit=new Date,this.slotEndTimeLimit.setMinutes(0),this.slotEndTimeLimit.setHours(d.dayEndHour),this.$days=[],this.$futureFreebusyData={},this.updateFreeBusyCoverage(),this.updateFreeBusy(),0==this.$days.length&&this.getDays()}d.$factory=["$q","$timeout","$log","sgSettings","Attendees_ROLES","Preferences","User","Card","Gravatar","Resource",function(e,t,n,i,a,o,r,s,c,l){return angular.extend(d,{$q:e,$timeout:t,$log:n,$settings:i,$User:r,$Preferences:o,$Card:s,$gravatar:c,$$resource:new l(i.activeUser("folderURL")+"Calendar",i.activeUser()),ROLES:a}),d.dayStartHour=parseInt(o.defaults.SOGoDayStartTime.split(":")[0]),d.dayEndHour=parseInt(o.defaults.SOGoDayEndTime.split(":")[0]),d}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").constant("Attendees_ROLES",{REQ_PARTICIPANT:"req-participant",OPT_PARTICIPANT:"opt-participant",NON_PARTICIPANT:"non-participant",CHAIR:"chair"}).factory("Attendees",d.$factory),d.timeToQuarters=function(e){return 4*e.getHours()+Math.ceil(e.getMinutes()/15)},d.prototype.getLength=function(){return this.component.attendees?this.component.attendees.length:0},d.prototype.initOrganizer=function(e){var n=this;(e&&e.isSubscription?d.$User.$filter(e.owner).then(function(e){var t=e[0];n.component.organizer={uid:t.uid,name:t.cn,email:t.c_email}}):(this.component.organizer||(this.component.organizer={uid:d.$settings.activeUser("login"),name:d.$settings.activeUser("identification"),email:d.$settings.activeUser("email")}),d.$q.when())).then(function(){n.updateFreeBusyAttendee(n.component.organizer)})},d.prototype.add=function(e,t){var n,i,a=this,o=d.$q.when();return e&&((!this.component.attendees||t&&t.organizerCalendar)&&this.initOrganizer(t?t.organizerCalendar:null),e.$isList({expandable:!0})?o=(i=d.$Card.$find(e.container,e.c_name)).$id().then(function(e){_.forEach(i.refs,function(e){n={name:e.c_cn,email:e.$preferredEmail(t?t.partial:null),role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",uid:e.c_uid,$avatarIcon:"person"},_.find(a.component.attendees,function(e){return e.email==n.email})||(n.image=d.$gravatar(n.email,32),a.component.attendees?a.component.attendees.push(n):a.component.attendees=[n],a.updateFreeBusyAttendee(n))})}):(n={uid:e.c_uid,domain:e.c_domain,isMSExchange:e.ismsexchange,isGroup:e.$isList(),isExpandableGroup:!1,isResource:e.isresource,name:e.c_cn,email:e.$$email,role:d.ROLES.REQ_PARTICIPANT,partstat:"needs-action",$avatarIcon:e.$avatarIcon},_.find(this.attendees,function(e){return e.email==n.email})||(e.$isList()&&d.$Preferences.defaults.SOGoLDAPGroupExpansionEnabled&&(o=e.$members().then(function(e){n.members=e,n.isExpandableGroup=!0})),n.image=d.$gravatar(n.email,32),this.component.attendees?_.findIndex(this.component.attendees,{email:n.email})<0&&this.component.attendees.push(n):this.component.attendees=[n],this.updateFreeBusyAttendee(n)))),o},d.prototype.nextRole=function(t){var e=_.values(d.ROLES),n=_.findIndex(e,function(e){return t.role===e});t.role=e[++n%4]},d.prototype.hasAttendee=function(e){var t=_.find(this.component.attendees,function(t){return _.find(e.emails,function(e){return e.value==t.email})});return angular.isDefined(t)},d.prototype.remove=function(t){var e=_.findIndex(this.component.attendees,function(e){return e.email==t.email});-1=this.startLimit;){for(var a=0,o=t;0===this.currentEntries[o]&&ae&&this.attachUrls.splice(e,1)},h.prototype.$addDueDate=function(){this.due=new Date,this.due.setMinutes(15*Math.round(this.due.getMinutes()/15)),this.dueDate=this.due.toISOString()},h.prototype.$deleteDueDate=function(){delete this.due,delete this.dueDate},h.prototype.$addStartDate=function(){this.start=new Date,this.start.setMinutes(15*Math.round(this.start.getMinutes()/15))},h.prototype.$deleteStartDate=function(){delete this.start,delete this.startDate},h.prototype.$addRecurrenceDate=function(){var e=new Date;e.setMinutes(15*Math.round(e.getMinutes()/15)),angular.isUndefined(this.repeat.dates)&&(this.repeat={frequency:"custom",dates:[]}),this.repeat.dates.push(e)},h.prototype.$deleteRecurrenceDate=function(e){-1e&&this.repeat.dates.splice(e,1)},h.prototype.$reset=function(){var n=this;angular.forEach(this,function(e,t){"constructor"!=t&&"$"!=t[0]&&delete n[t]}),this.init(this.$shadowData),this.$shadowData=this.$omit()},h.prototype.$reply=function(){var e,t=this,n=[this.pid,this.id];return this.occurrenceId&&n.push(this.occurrenceId),e={reply:this.reply,delegatedTo:this.delegatedTo,alarm:this.$hasAlarm?this.alarm:{},classification:this.classification},h.$$resource.save(n,e,{action:"rsvpAppointment"}).then(function(e){return t.$shadowData=t.$omit(),e})},h.prototype.$adjust=function(e){var t=[this.pid,this.id];return _.every(_.values(e),function(e){return 0===e})?h.$q.when():(this.occurrenceId&&t.push(this.occurrenceId),h.$log.debug("adjust "+t.join("/")+" "+JSON.stringify(e)),h.$$resource.save(t,e,{action:"adjust"}))},h.prototype.$save=function(e){var t,n,i,a,o=this;return i=this.$omit(),a=h.$Preferences.$mdDateLocaleProvider,i.startDate=i.start?i.start.format(a,"%Y-%m-%d"):"",i.startTime=i.start?i.start.format(a,"%H:%M"):"",i.endDate=i.end?i.end.format(a,"%Y-%m-%d"):"",i.endTime=i.end?i.end.format(a,"%H:%M"):"",i.dueDate=i.due?i.due.format(a,"%Y-%m-%d"):"",i.dueTime=i.due?i.due.format(a,"%H:%M"):"",i.completedDate=i.completed?i.completed.format(a,"%Y-%m-%d"):"",this.hasCustomRepeat()?"monthly"==this.repeat.frequency&&this.repeat.month.type&&"byday"==this.repeat.month.type&&"relative"!=this.repeat.month.day||"yearly"==this.repeat.frequency&&this.repeat.year.byday?(delete i.repeat.monthdays,i.repeat.days=[{day:this.repeat.month.day,occurrence:this.repeat.month.occurrence.toString()}]):"monthly"!=this.repeat.frequency&&"yearly"!=this.repeat.frequency||!this.repeat.month.type?"custom"==this.repeat.frequency&&this.repeat.dates&&_.forEach(i.repeat.dates,function(e,t,n){n[t]={date:e.format(a,"%Y-%m-%d"),time:e.format(a,"%H:%M")}}):(delete i.repeat.days,"relative"==this.repeat.month.day&&(i.repeat.monthdays=[this.repeat.month.occurrence])):this.repeat.frequency&&"never"!=this.repeat.frequency&&(i.repeat={frequency:this.repeat.frequency}),i.startDate&&this.repeat.frequency&&"never"!=this.repeat.frequency?"until"==this.repeat.end&&this.repeat.until?i.repeat.until=this.repeat.until.stringWithSeparator("-"):"count"==this.repeat.end&&this.repeat.count?i.repeat.count=this.repeat.count:(delete i.repeat.until,delete i.repeat.count):delete i.repeat,"not-specified"==this.status?delete i.status:"completed"!=this.status&&delete i.completedDate,(i.startDate||i.dueDate)&&this.$hasAlarm?!this.alarm.action||"email"!=this.alarm.action||this.attendees&&0',' ',"

"+l("editRepeatingItem")+"

","
"," ",' '+l("button_thisOccurrenceOnly")+"",' '+l("button_allOccurrences")+""," ",""].join(""),controller:d}).then(function(){p.$emit("calendars:list")},function(){}).finally(function(){m(function(){v.$resetGhost()})})),d.$inject=["$scope","$mdDialog","component","params"],h.$inject=["$scope","$mdDialog","component","params","conflictError"]}s={title:"Title",location:"Location",calendarName:"Calendar",start:"Start",priority:"Priority",category:"Category",status:"Status",events:{end:"End"},tasks:{end:"Due Date"}},c.component=v,c.componentType="events",c.selectedList=0,c.selectComponentType=u,c.unselectComponents=function(){_.forEach(v["$"+c.componentType],function(e){e.selected=!1}),c.mode.multiple=0},c.selectAll=function(){_.forEach(v["$"+c.componentType],function(e){e.selected=!0}),c.mode.multiple=v["$"+c.componentType].length},c.searchMode=h,c.toggleComponentSelection=function(e,t){t.selected=!t.selected,c.mode.multiple+=t.selected?1:-1,e.preventDefault(),e.stopPropagation()},c.confirmDeleteSelectedComponents=function(){o.confirm(l("Warning"),l("Are you sure you want to delete the selected components?"),{ok:l("Delete")}).then(function(){var e=_.filter(v["$"+c.componentType],function(e){return e.selected});$.$deleteComponents(e).then(function(){c.mode.multiple=0,p.$emit("calendars:list")})})},c.openEvent=function(e,t){C(e,t,"appointment")},c.openTask=function(e,t){C(e,t,"task")},c.newComponent=b,c.filter=function(e){{if(!e)return v["$query"+c.componentType.capitalize()].filterpopup;v.$filter(c.componentType,{filterpopup:e})}},c.filteredBy=function(e){return v["$query"+c.componentType.capitalize()].filterpopup==e},c.sort=function(e){{if(!e){var t=v["$query"+c.componentType.capitalize()].sort;return s[t]||s[c.componentType][t]}v.$filter(c.componentType,{sort:e})}},c.sortedBy=function(e){return v["$query"+c.componentType.capitalize()].sort==e},c.reload=function(){v.$loaded=v.STATUS.LOADING,$.reloadWebCalendars().finally(function(){p.$emit("calendars:list")})},c.cancelSearch=function(){c.mode.search=!1,v.$filter(c.componentType,{value:""})},c.mode={search:!1,multiple:0},this.$onInit=function(){!function(e){e.push(n.createHotkey({key:l("hotkey_search"),description:l("Search"),callback:h})),e.push(n.createHotkey({key:l("hotkey_create_event"),description:l("Create a new event"),callback:b,args:"appointment"})),e.push(n.createHotkey({key:l("hotkey_create_task"),description:l("Create a new task"),callback:b,args:"task"})),_.forEach(e,function(e){n.registerHotkey(e)})}(d),r="events","tasksListView"==g.settings.Calendar.SelectedList&&(c.selectedList=1,r="tasks"),u(r,{reload:!0}),p.$on("calendars:list",function(){v.$filter(c.componentType,{reload:!0})}),p.$on("calendar:dragend",D),e.$on("$destroy",function(){_.forEach(d,function(e){n.deregisterHotkey(e)})})},this.ascending=function(){return v["$query"+c.componentType.capitalize()].asc}}e.$inject=["$rootScope","$scope","$q","$timeout","$state","$mdDialog","sgHotkeys","sgFocus","Dialog","Preferences","CalendarSettings","Calendar","Component"],angular.module("SOGo.SchedulerUI").controller("CalendarListController",e)}(),function(){"use strict";function e(o,e,t,i,n,r,a,s,c,d,u,h){var p=this;this.activeUser=d.activeUser,this.service=h,this.filter={name:""},this.sortableMode=!1,this.sortableCalendars={scrollableContainer:"#sidenav-content",containment:"md-list",orderChanged:function(){h.saveFoldersOrder(_.flatMap(h.$findAll(),"id"))},accept:function(e,t,n){return e.sortableScope.element[0]==t.element[0]}},this.$onInit=function(){p.categories=_.map(u.defaults.SOGoCalendarCategories,function(e){return{id:e.asCSSIdentifier(),name:e,color:u.defaults.SOGoCalendarCategoriesColors[e]}}),e.$watch(function(){return _.union(_.map(h.$calendars,function(e){return _.pick(e,["id","active","color"])}),_.map(h.$subscriptions,function(e){return _.pick(e,["id","active","color"])}),_.map(h.$webcalendars,function(e){return _.pick(e,["id","active","color"])}))},function(e,n){var t,i,a;t=_.intersectionBy(e,n,"id"),i=_.map(_.filter(t,function(e){var t=_.find(n,{id:e.id});return!_.isEqual(e,t)}),"id"),a=h.$q.when(),0"}))},this.newMessageWithRecipient=function(e,t,n){p(e,[t+" <"+n+">"])},this.edit=function(){var t="vevent"==this.component.component?"Appointment":"Task";s.hide().then(function(){var e="UIx"+t+"EditorTemplate";s.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:e,controller:"ComponentEditorController",controllerAs:"editor",locals:{stateComponent:h.component}})})},this.editAllOccurrences=function(){(u=e.$get(this.component.pid).$getComponent(this.component.id)).$futureComponentData.then(function(){h.component=u,h.edit()})},this.reply=function(e){(e||this.component).$reply().then(function(){t.$emit("calendars:list"),n.getAlarms(),s.hide()})},this.replyAllOccurrences=function(){(u=e.$get(this.component.pid).$getComponent(this.component.id)).$futureComponentData.then(function(){u.reply=h.component.reply,u.delegatedTo=h.component.delegatedTo,u.$hasAlarm=h.component.$hasAlarm,u.classification=h.component.classification,u.alarm=h.component.alarm,h.reply(u)})},this.deleteOccurrence=function(){this.component.remove(!0).then(function(){t.$emit("calendars:list"),s.hide()})},this.deleteAllOccurrences=function(){this.component.remove().then(function(){t.$emit("calendars:list"),s.hide()})},this.toggleRawSource=function(n){e.$$resource.post(this.component.pid+"/"+this.component.id,"raw").then(function(e){function t(e,t,n){e.data=n,e.close=function(){t.hide()}}s.hide(),s.show({parent:angular.element(document.body),targetEvent:n,clickOutsideToClose:!0,escapeToClose:!0,template:['',' ','
',"  
"," ",' '+l("Close")+""," ","
"].join(""),controller:t,locals:{data:e}}),t.$inject=["scope","$mdDialog","data"]})},this.copySelectedComponent=function(e){this.component.copyTo(e).then(function(){s.hide(),t.$emit("calendars:list")})},this.moveSelectedComponent=function(e){this.component.moveTo(e).then(function(){s.hide(),t.$emit("calendars:list")})}}function t(n,e,u,t,h,i,a,o,r,s,c,d,p,m,f,g,y,$,v){var C,b,D,w,S=this;function k(){var e,t;S.attendeesEditor.containerElement||(S.attendeesEditor.containerElement=a[0].querySelector("#freebusy")),e=a[0].querySelector("#freebusy_day_"+S.component.start.getDayString()),S.attendeesEditor.containerElement&&e&&(t=e.offsetLeft-S.attendeesEditor.containerElement.offsetLeft,S.attendeesEditor.containerElement.scrollLeft=t)}function E(e){S.adjustStartTime(),S.adjustEndTime(),S.component.$attendees.findSlot(e).then(function(){S.startTime=new Date(S.component.start.getTime()),S.endTime=new Date(S.component.end.getTime())}).catch(function(e){S.component.start=new Date(S.component.start.getTime()+1),h(k),r.show({template:["",'
',' error_outline'," "+e+"","
","
"].join(""),hideDelay:5e3,position:"top right"})}).finally(function(){h(k)})}function T(){_.has(S.component,"$attendees")&&(S.component.$attendees.updateFreeBusyCoverage(),S.component.$attendees.updateFreeBusy(),h(k))}this.$onInit=function(){this.service=p,this.component=v,this.categories={},this.showRecurrenceEditor=this.component.$hasCustomRepeat,this.showAttendeesEditor=this.component.attendees&&this.component.attendees.length,"appointment"==this.component.type&&(this.component.initAttendees(),this.attendeeConflictError=!1,this.attendeesEditor={days:this.component.$attendees.$days,hours:function(){for(var e=[],t=0;t<=23;t++)e.push(t.toString());return e}(),containerElement:a[0].querySelector("#freebusy")}),this.component.start&&(C=new Date(this.component.start.getTime()),this.startTime=new Date(this.component.start.getTime())),this.component.end&&(b=new Date(this.component.end.getTime()),this.endTime=new Date(this.component.end.getTime())),this.component.due&&(new Date(this.component.due.getTime()),this.dueTime=new Date(this.component.due.getTime())),this.component.attendees&&h(k),D=parseInt($.defaults.SOGoDayStartTime),w=parseInt($.defaults.SOGoDayEndTime)},this.addAttachUrl=function(){var e=this.component.addAttachUrl("");s("attachUrl_"+e)},this.toggleRecurrenceEditor=function(){this.showRecurrenceEditor=!this.showRecurrenceEditor,this.component.$hasCustomRepeat=this.showRecurrenceEditor},this.toggleAttendeesEditor=function(){this.showAttendeesEditor=!this.showAttendeesEditor},this.recurrenceMonthDaysAreRequired=function(){return this.component&&"monthly"==this.component.repeat.frequency&&"bymonthday"==this.component.repeat.month.type},this.frequencies=function(){return _.filter(i.repeatFrequencies,function(e){return"custom"!=e[0]||"custom"==S.component.repeat.frequency})},this.changeFrequency=function(){"custom"==this.component.repeat.frequency&&(this.showRecurrenceEditor=!0)},this.changeCalendar=function(){this.component.attendees&&0? *"),"");return S.showAttendeesEditor|=a,S.searchText="",S.cardFilter(t).then(function(e){return e.length?e[0]:new y({c_cn:_.trim(n,' "'),emails:[{value:t}]})}).catch(function(e){return new y({c_cn:_.trim(n,' "'),emails:[{value:t}]})})}function d(e){if(!S.component.$attendees.hasAttendee(e))return S.component.$attendees.add(e,r)}if(t&&(r.partial=t),angular.isString(e)){for(i="",n=0;n",'
','
",'
',' {{'+n+"block.component.c_priority}}"," {{ "+n+"block.component.summary }}",' ',' repeat',' alarm',' visibility_off',' vpn_key'," ",'
',' place ',"
",'
',"
","
",'
{{ block.startHour }}
','
{{ block.endHour }}
',""].join("")},link:function(e,t,n){var i,a,o;_.has(n,"sgCalendarGhost")||(i=90/e.block.siblings,a=e.block.position*i,o=100-(e.block.position+1)*i,t.css("left",a+"%"),t.css("right",o+"%"),e.block.component&&e.block.component.c_isallday||(t.addClass("starts"+e.block.start),t.addClass("lasts"+e.block.length)),e.block.userState&&t.addClass("sg-event--"+e.block.userState),e.block.component&&(e.showCalendarName=r.activeUser.login!==e.block.component.c_owner,t.addClass("bg-folder"+e.block.component.pid),t.addClass("contrast-bdr-folder"+e.block.component.pid),0===e.block.component.c_isopaque&&t.addClass("sg-event--transparent"),0===e.block.component.c_status&&t.addClass("sg-event--cancelled")))}}}e.$inject=["Calendar"],angular.module("SOGo.SchedulerUI").directive("sgCalendarDayBlock",e)}(),function(){"use strict";angular.module("SOGo.SchedulerUI").directive("sgCalendarDayTable",function(){return{restrict:"E",scope:{blocks:"=sgBlocks",day:"@sgDay",clickBlock:"&sgClick"},template:["'].join("")}})}(),function(){"use strict";function e(r,e,f,g,s){return{restrict:"A",require:["^sgCalendarDay","^sgCalendarScrollView"],link:function(c,l,e,t){var n,d,u,h,p;n=l[0],d=t[0],u=t[1],h=-1,l.addClass("sg-event--ghost md-whiteframe-3dp ng-hide");var i=r.$on("calendar:dragstart",function(){var e,t,n;c.block=s.$ghost,(t=d.calendarData())&&(h=t.index,e=t.pid,p=c.block.pointerHandler.originalCalendar.index);e=e||c.block.component.pid;(n=c.block.component.blocks[0].userState)&&l.addClass("sg-event--"+n);l.addClass("bg-folder"+e)}),a=r.$on("calendar:drag",function(){var e,t,n,i,a,o,r,s;if(e=!1,g.$view&&g.$view.type==u.type){if(t="multiday-allday"===u.type,n=c.block.component.c_isallday,i=c.block.pointerHandler.currentEventCoordinates.dayNumber,a=c.block.pointerHandler.currentEventCoordinates.start,r=c.block.pointerHandler.currentEventCoordinates.duration,s=f.EventDragDayLength-a,angular.isUndefined(r))return;for(s<(o=r)&&(o=s),-1f.EventDragDayLength&&(o=f.EventDragDayLength),-1','
",' '," {{ ::component.c_title }}",' ',' repeat',' alarm',' visibility_off',' vpn_key'," ",'
',' access_time ',"
",'
',' place ',"
",""].join("")},link:function(e,t,n){e.component.viewable&&t.addClass("md-clickable");e.component.userstate&&t.addClass("sg-event--"+e.component.userstate);t.addClass("bg-folder"+e.component.pid),t.addClass("contrast-bdr-folder"+e.component.pid),0===e.component.c_isopaque&&t.addClass("sg-event--transparent");0===e.component.c_status&&t.addClass("sg-event--cancelled")}}}e.$inject=["CalendarSettings"],angular.module("SOGo.SchedulerUI").directive("sgCalendarListEvent",e)}(),function(){function e(r,e,t,n,s,a,i,o,c,d,u){var h=this;this.$onInit=function(){this.editMode=!1},this.$postLink=function(){this.clickableElement=t.find("p")[0],this.nameElements=this.clickableElement.getElementsByClassName("sg-calendar-name"),this.inputContainer=t.find("md-input-container")[0],this.inputElement=t.find("input")[0],this.moreOptionsButton=_.last(t.find("md-icon")),this.updateCalendarName()},this.updateCalendarName=function(){_.forEach(this.nameElements,function(e){e.innerHTML=h.calendar.name})},this.editFolder=function(e){e.stopPropagation(),e.preventDefault(),this.editMode=!0,this.inputElement.value=this.calendar.name,this.clickableElement.classList.add("ng-hide"),this.inputContainer.classList.remove("ng-hide"),e.srcEvent&&"touchend"==e.srcEvent.type?n(function(){h.inputElement.focus(),h.inputElement.select()},200):(this.inputElement.select(),this.inputElement.focus()),this.panel&&this.panel.close()},this.saveFolder=function(e){this.inputElement.disabled||(0===this.inputElement.value.length&&this.revertEditing(),this.calendar.name=this.inputElement.value,this.inputElement.disabled=!0,this.calendar.$rename().then(function(e){h.editMode=!1,h.inputContainer.classList.add("ng-hide"),h.clickableElement.classList.remove("ng-hide"),h.updateCalendarName()},function(){h.editMode=!0,h.inputElement.value=h.calendar.name,n(function(){h.inputElement.focus(),h.inputElement.select()},200)}).finally(function(){h.inputElement.disabled=!1}))},this.revertEditing=function(){this.editMode=!1,this.clickableElement.classList.remove("ng-hide"),this.inputContainer.classList.add("ng-hide"),this.inputElement.value=this.calendar.name},this.confirmDelete=function(){this.calendar.isSubscription?this.calendar.$delete().catch(function(e,t){d.alert(l('An error occured while deleting the calendar "%{0}".',h.calendar.name),l(e.error))}):d.confirm(l("Warning"),l('Are you sure you want to delete the calendar "%{0}"?',this.calendar.name),{ok:l("Delete")}).then(function(){h.calendar.$delete().catch(function(e,t){d.alert(l('An error occured while deleting the calendar "%{0}".',h.calendar.name),l(e.error))})})},this.showMenu=function(o){var e=a.newPanelPosition().relativeTo(this.moreOptionsButton).addPanelPosition(a.xPosition.ALIGN_START,a.yPosition.ALIGN_TOPS),t=a.newPanelAnimation().openFrom(this.moreOptionsButton).duration(100).withAnimation(a.animation.FADE),n={attachTo:angular.element(document.body),locals:{itemCtrl:this,calendar:this.calendar,editFolder:angular.bind(this,this.editFolder),confirmDelete:angular.bind(this,this.confirmDelete)},bindToController:!0,controller:i,controllerAs:"$menuCtrl",position:e,animation:t,targetEvent:o,templateUrl:"UIxCalendarMenu",trapFocus:!0,clickOutsideToClose:!0,escapeToClose:!0,focusOnOpen:!0};function i(e,n,i,t){var a=this;this.showOnly=function(){_.forEach(u.$findAll(),function(e){a.calendar.id==e.id?e.active=1:e.active=0})},this.showAll=function(){_.forEach(u.$findAll(),function(e){e.active=1})},this.showProperties=function(){var e=this.calendar.color;function t(e,t,n){var i=this;i.calendar=new u(n.$omit()),i.saveProperties=function(e){e.$valid&&i.calendar.$save().then(function(){n.init(i.calendar.$omit()),t.hide()},function(){e.$setPristine()})},i.close=function(){t.cancel()},e.$watch(function(){return i.calendar.color},function(){n.color=i.calendar.color})}n.show({templateUrl:this.calendar.id+"/properties",controller:t,controllerAs:"properties",clickOutsideToClose:!0,escapeToClose:!0,locals:{srcCalendar:this.calendar}}).catch(function(){a.calendar.color=e}),t.$inject=["$scope","$mdDialog","srcCalendar"]},this.showLinks=function(){function e(e,t){this.calendar=t,this.close=function(){e.hide()}}n.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:this.calendar.id+"/links",controller:e,controllerAs:"links",locals:{calendar:this.calendar}}),e.$inject=["$mdDialog","calendar"]},this.importCalendar=function(){function e(e,o,t){function n(e){var t=0===e.type.indexOf("text")||/\.(ics)$/.test(e.name);return t||s.show({template:["",'
',' error_outline'," "+l("Select an iCalendar file (.ics).")+"","
","
"].join(""),position:"top right",hideDelay:3e3}),t}this.uploader=new i({url:ApplicationBaseURL+[t.id,"import"].join("/"),autoUpload:!0,queueLimit:1,filters:[{name:n,fn:n}],onSuccessItem:function(e,t,n,i){var a;o.hide(),0===t.imported?a=l("No event was imported."):(a=l("A total of %{0} events were imported in the calendar.",t.imported),r.$emit("calendars:list")),s.show(s.simple().textContent(a).position("top right").hideDelay(3e3))},onErrorItem:function(e,t,n,i){s.show({template:["",'
',' error_outline'," "+l("An error occurred while importing calendar.")+"","
","
"].join(""),position:"top right",hideDelay:3e3})}}),this.close=function(){o.hide()}}n.show({parent:angular.element(document.body),targetEvent:o,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:"UIxCalendarImportDialog",controller:e,controllerAs:"$CalendarImportDialogController",locals:{folder:this.calendar}}),e.$inject=["scope","$mdDialog","folder"]},this.share=function(){this.calendar.$acl.$users().then(function(){n.show({templateUrl:a.calendar.id+"/UIxAclEditor",controller:"AclController",controllerAs:"acl",clickOutsideToClose:!0,escapeToClose:!0,locals:{usersWithACL:a.calendar.$acl.users,User:t,folder:a.calendar}})})}}a.open(n).then(function(e){(h.panel=e).panelEl.one("click",function(){e.close()})}),i.$inject=["mdPanelRef","$mdDialog","FileUploader","User"]}}e.$inject=["$rootScope","$scope","$element","$timeout","$mdToast","$mdPanel","$mdMedia","$mdSidenav","sgConstant","Dialog","Calendar"],angular.module("SOGo.SchedulerUI").controller("sgCalendarListItemController",e).directive("sgCalendarListItem",function(){return{restrict:"C",scope:{},bindToController:{calendar:"=sgCalendar"},template:['','

',' ',' error',' ',' ',"

",'',' ',"",'drag_handle",'more_vert'].join(""),controller:"sgCalendarListItemController",controllerAs:"$ctrl"}})}(),function(){"use strict";angular.module("SOGo.SchedulerUI").directive("sgCalendarMonthDay",function(){return{restrict:"E",scope:{blocks:"=sgBlocks",day:"@sgDay",clickBlock:"&sgClick"},template:["'].join("")}})}(),function(){"use strict";angular.module("SOGo.SchedulerUI").directive("sgCalendarMonthEvent",function(){return{restrict:"E",scope:{block:"=sgBlock",clickBlock:"&sgClick"},replace:!0,template:function(e,t){var n=_.has(t,"sgCalendarGhost")?"":"::";return['
','
",' {{ '+n+"block.component.startHour }}",' {{'+n+"block.component.c_priority}}"," {{ "+n+"block.component.summary }}",' ',' repeat',' alarm',' visibility_off',' vpn_key'," ","
"].join("")},link:function(e,t,n){_.has(n,"sgCalendarGhost")||(e.block.userState&&t.addClass("sg-event--"+e.block.userState),e.block.component&&(t.addClass("bg-folder"+e.block.component.pid),0===e.block.component.c_isopaque&&t.addClass("sg-event--transparent"),0===e.block.component.c_status&&t.addClass("sg-event--cancelled")))}}})}(),function(){"use strict";function e(e,n){var t=this,i={portrait:{letter:[8.5,11,"in"],legal:[8.5,14,"in"],a4:[210,297,"mm"]},landscape:{letter:[11,8.5,"in"],legal:[14,8.5,"in"],a4:[297,210,"mm"]}},a={letter:[.4,2.1],legal:[.4,2.1],a4:[10,30]};this.$onInit=function(){e.$watchGroup([function(){return t.pageSize},function(){return t.workingHoursOnly}],angular.bind(this,function(){var e,t=i[this.orientation][this.pageSize];this.units=t[2],this.pageMargin=a[this.pageSize][0]+this.units,this.viewportHeight=(t[1]-2*a[this.pageSize][0]).toString()+this.units,this.hideHoursStart=0,this.hideHoursEnd=24,this.totalHours=24,this.clipTop=0,"month"===this.calendarView?this.viewHeight=(t[1]-3*a[this.pageSize][0]).toString()+this.units:(this.workingHoursOnly&&(n.defaults.SOGoDayEndTime&&(e=n.defaults.SOGoDayEndTime.split(":"),this.hideHoursEnd=parseInt(e[0]),this.totalHours=this.hideHoursEnd),n.defaults.SOGoDayStartTime&&(e=n.defaults.SOGoDayStartTime.split(":"),this.hideHoursStart=parseInt(e[0]),this.totalHours-=this.hideHoursStart)),this.hourHeight=(t[1]-2*a[this.pageSize][0]-a[this.pageSize][1])/this.totalHours,this.clipTop=(this.hourHeight*this.hideHoursStart).toString()+this.units,this.viewHeight=(this.hideHoursEnd*this.hourHeight).toString()+this.units)}))},this.eventsPositions=function(){var e,t=0,n=[];if("month"===this.calendarView)n.push("[ui-view=calendars] .monthView md-grid-list { min-height: "+this.viewHeight+"; }");else for(;t<=96;)t<=4*this.hideHoursStart&&(e=4*this.hideHoursStart-t,n.push("[ui-view=calendars] .sg-event.starts"+t+" .text { margin-top: "+this.hourHeight/4*e+this.units+"; }")),n.push("[ui-view=calendars] .sg-event.starts"+t+" { top: "+this.hourHeight/4*t+this.units+"; }"),n.push("[ui-view=calendars] .sg-event.lasts"+t+" { height: "+this.hourHeight/4*t+this.units+"; }"),t++;return n.join("\n")}}e.$inject=["$scope","Preferences"],angular.module("SOGo.SchedulerUI").directive("sgCalendarPrintStylesheet",function(){return{restrict:"E",scope:{calendarView:"'," @page {"," size: {{ $ctrl.pageSize }} {{ $ctrl.orientation }};"," margin: 0;"," }"," @media print {"," body {"," padding: {{ $ctrl.pageMargin }};"," }"," [ui-view=calendars] .view-list {"," height: {{ $ctrl.viewportHeight }};"," overflow: hidden;"," }"," [ui-view=calendars] .calendarView {"," transform: translateY(-{{ $ctrl.clipTop }});"," height: {{ $ctrl.viewHeight }};"," position: relative;"," overflow: hidden;"," }"," [ui-view=calendars] .allDaysView {"," max-height: {{ $ctrl.hourHeight }}{{ $ctrl.units }} !important;"," }"," [ui-view=calendars] .hours .hour,"," [ui-view=calendars] .days .day .clickableHourCell {"," min-height: {{ $ctrl.hourHeight }}{{ $ctrl.units }};"," max-height: {{ $ctrl.hourHeight }}{{ $ctrl.units }};"," }"," {{ $ctrl.eventsPositions() }}"," }",""].join("\n")}})}(),function(){"use strict";function e(c,l,e,t,d,n,u,h,p){return{restrict:"A",scope:{type:"@sgCalendarScrollView"},controller:i,link:function(e,i,t,a){var o,r,n;function s(e,t){this.$element=e,this.element=e[0],this.type=t,this.quarterHeight=this.getQuarterHeight(),this.scrollStep=6*this.quarterHeight,this.dayNumbers=this.getDayNumbers(),this.maxX=this.getMaxColumns(),this.deregisterDragStart=c.$on("calendar:dragstart",angular.bind(this,this.onDragStart)),this.deregisterDragStop=c.$on("calendar:dragend",angular.bind(this,this.onDragEnd)),this.bindedUpdateCoordinates=angular.bind(this,this.updateCoordinates),this.bindedUpdateFromPointerHandler=angular.bind(this,this.updateFromPointerHandler),this.updateCoordinates(),angular.element(l).on("resize",this.bindedUpdateCoordinates)}o=null,r=e.type,n="multicolumndayview"==i.attr("sg-view"),a.isMultiColumn=n,d(function(){var e,t,n;o=new s(i,r),"monthly"==r||p.defaults.SOGoDayStartTime&&(e=p.defaults.SOGoDayStartTime.split(":"),t=document.getElementById("hour"+parseInt(e[0])),n=parseInt(e[1])*o.quarterHeight,o.element.scrollTop=t.offsetTop+n);a.quarterHeight=o.quarterHeight}),e.$on("$destroy",function(){o&&o.$destroy()}),s.prototype={$destroy:function(){this.deregisterDragStart(),this.deregisterDragStop(),this.$element.off("mousemove",this.bindedUpdateFromPointerHandler),angular.element(l).off("resize",this.bindedUpdateCoordinates)},onDragStart:function(){this.$element.on("mousemove",this.bindedUpdateFromPointerHandler),this.updateCoordinates(),this.updateFromPointerHandler()},onDragEnd:function(){this.$element.off("mousemove",this.bindedUpdateFromPointerHandler),u.$view=null},getQuarterHeight:function(){var e,t,n=null;return e=document.getElementById("hour0"),t=document.getElementById("hour23"),e&&t&&(n=(t.offsetTop-e.offsetTop)/92),n},getDayDimensions:function(e){var t,n,i,a,o,r,s;return n=t=i=a=0,0<(o=this.element.getElementsByClassName("day")).length&&(n=(r=o[0].getBoundingClientRect()).height,t=r.width,i=r.left-e,0<(s=o[0].getElementsByClassName("sg-calendar-tile-header")).length&&(a=s[0].clientHeight)),{height:n,width:t,offset:{left:i,top:a}}},getDayNumbers:function(){var e;return e=this.element.getElementsByTagName("sg-calendar-day"),_.map(e,function(e,t){return n?t:parseInt(e.attributes["sg-day-number"].value)})},getMaxColumns:function(){var e;return"monthly"==this.type?(e=this.element.getElementsByTagName("md-grid-list")[0],parseInt(e.attributes["md-cols"].value)-1):this.element.getElementsByClassName("day").length-1},updateCoordinates:function(){var e,t;e=this.element.getBoundingClientRect(),t=this.getDayDimensions(e.left),angular.extend(this,{coordinates:{x:e.left,y:e.top},dayHeight:t.height,dayWidth:t.width,daysOffset:t.offset.left,topOffset:t.offset.top})},updateFromPointerHandler:function(){var e,t,n,i,a,o;e=h.$ghost.pointerHandler,this.coordinates&&e&&(t=e.getContainerBasedCoordinates(this))&&(u.$view=this,n=(new Date).getTime(),(!this.lastScroll||n>this.lastScroll+100)&&(this.lastScroll=n,(i=t.y-this.scrollStep)<0?(i<(a=-this.element.scrollTop)&&(i=a),this.element.scrollTop+=i):0<(o=(i=t.y+this.scrollStep)-this.element.clientHeight)&&(this.element.scrollTop+=o)))}}}}}function i(e){this.type=e.type}e.$inject=["$rootScope","$window","$document","$q","$timeout","$mdGesture","Calendar","Component","Preferences"],i.$inject=["$scope"],angular.module("SOGo.SchedulerUI").directive("sgCalendarScrollView",e)}(),function(){"use strict";angular.module("SOGo.SchedulerUI").directive("sgCategoryStylesheet",function(){return{restrict:"E",require:"ngModel",scope:{ngModel:"="},replace:!0,template:['"].join("")}})}(),function(){"use strict";function e(c,i,m,f,g,y,$){return{restrict:"CA",require:"^sgCalendarDay",link:function(d,u,e,h){if(d.block){if(!d.block.component.editable||d.block.userState)return void u.removeClass("sg-draggable-calendar-block");!function(){var e,t,n,i,a,o,r,s,c,l;if(d.block.length<3)return;e=d.block.component,t=d.block.dayIndex,n=_.findIndex(e.blocks,["dayIndex",t]),i=0===n,a=n===e.blocks.length-1,(o=angular.element('
')).addClass("bdr-folder"+e.pid),e.c_isallday||"SG-CALENDAR-MONTH-DAY"===u[0].parentNode.tagName?(i&&(r=angular.element('
').append(o),u.append(r)),a&&(s=angular.element('
').append(o.clone()),u.append(s))):(i&&(c=angular.element('
').append(o),u.append(c)),a&&(l=angular.element('
').append(o.clone()),u.append(l)))}()}function t(e){var t,n,i,a;e.stopPropagation(),e.target.scrollHeight>e.target.clientHeight+1&&(a=(i=e.target.getBoundingClientRect()).left+i.width-18,e.pageX>a)||(t="move-event",d.block&&d.block.component?"dragGrip-top"==e.target.className||"dragGrip-left"==e.target.className?t="change-start":"dragGrip-bottom"!=e.target.className&&"dragGrip-right"!=e.target.className||(t="change-end"):t="change-end",(n=new s(t)).initFromEvent(e),$.$ghost.pointerHandler=n,angular.element(document).one("mouseup",r),angular.element(document).on("mousemove",o))}function o(e){var t=$.$ghost.pointerHandler;i(function(){t.updateFromEvent(e)})}function r(e){var t,n;t=d.block,n=$.$ghost.pointerHandler,angular.element(document).off("mousemove",o),n.dragHasStarted&&(c.$emit("calendar:dragend"),n.dragHasStarted=!1),t&&t.component&&_.forEach(t.component.blocks,function(e){e.dragging=!1})}function p(){}function n(e){this.setEventType(e)}function s(e){this.dragMode=e}u.on("mousedown",t),d.$on("$destroy",function(){u.off("mousedown",t),u.off("mousemove",o)}),p.prototype={x:-1,y:-1,getDelta:function(e){var t=new p;return t.x=this.x-e.x,t.y=this.y-e.y,g.$view&&(t.days=g.$view.dayNumbers[this.x]-g.$view.dayNumbers[e.x]),t},getDistance:function(e){var t=this.getDelta(e);return Math.sqrt(t.x*t.x+t.y*t.y)},clone:function(){var e=new p;return e.x=this.x,e.y=this.y,e}},n.prototype={dayNumber:-1,weekDay:-1,start:-1,duration:-1,eventType:null,setEventType:function(e){this.eventType=e},initFromBlock:function(e){var i=-1;"monthly"===this.eventType?(this.start=0,this.duration=e.component.blocks.length*y.EventDragDayLength):(this.start=e.component.blocks[0].start,this.duration=_.sumBy(e.component.blocks,function(e){var t,n;return n=e.dayNumber,t=i<0?0:n-i-1,i=n,e.length+t*y.EventDragDayLength}))},initFromCalendar:function(e){this.dayNumber=e},getDelta:function(e){var t=new n;return t.dayNumber=this.dayNumber-e.dayNumber,t.start=this.start-e.start,t.duration=this.duration-e.duration,t},_quartersToHM:function(e){var t=15*e,n=Math.floor(t/60);n<10&&(n="0"+n);var i=t%60;return i<10&&(i="0"+i),n+":"+i},getStartTime:function(){return this._quartersToHM(this.start)},getEndTime:function(){var e=(this.start+this.duration)%y.EventDragDayLength;return this._quartersToHM(e)},clone:function(){var e=new n;return e.dayNumber=this.dayNumber,e.start=this.start,e.duration=this.duration,e}},s.prototype={originalCoordinates:null,currentCoordinates:null,originalViewCoordinates:null,currentViewCoordinates:null,originalEventCoordinates:null,currentEventCoordinates:null,originalCalendar:null,dragHasStarted:!1,getEventViewCoordinates:null,initFromBlock:function(e){this.currentEventCoordinates=new n(this.eventType),this.originalEventCoordinates=new n(this.eventType),this.originalEventCoordinates.initFromBlock(e)},initFromEvent:function(e){this.currentCoordinates=new p,this.updateFromEvent(e),this.originalCoordinates=this.currentCoordinates.clone()},initFromCalendar:function(e){this.originalCalendar=e,this.currentEventCoordinates.initFromCalendar(e.index),this.originalEventCoordinates.initFromCalendar(e.index)},updateFromEvent:function(e){if(this.currentCoordinates.x=e.pageX,this.currentCoordinates.y=e.pageY,this.dragHasStarted&&g.$view){var t=this.getEventViewCoordinates(g.$view);this.originalViewCoordinates||(this.originalViewCoordinates=this.getEventViewCoordinates(g.$view,this.originalCoordinates),$.$ghost.component.isNew&&(this.setTimeFromQuarters($.$ghost.component.start,this.originalViewCoordinates.y),m.debug("new event start date "+$.$ghost.component.start))),this.currentViewCoordinates&&t&&t.x==this.currentViewCoordinates.x&&t.y==this.currentViewCoordinates.y||(this.currentViewCoordinates=t,this.originalViewCoordinates&&(t||(this.currentViewCoordinates=this.originalViewCoordinates.clone()),this.updateEventCoordinates()))}else if(this.originalCoordinates&&this.currentCoordinates&&!this.dragHasStarted){3=y.EventDragDayLength&&(t=Math.floor(this.currentEventCoordinates.start/y.EventDragDayLength),this.currentEventCoordinates.start-=t*y.EventDragDayLength,this.currentEventCoordinates.dayNumber+=t),m.debug("event coordinates "+JSON.stringify(this.currentEventCoordinates)),c.$emit("calendar:drag")},getContainerBasedCoordinates:function(e,t){var n=(t||this.currentCoordinates).getDelta(e.coordinates),i=e.element;return(n.xi.clientWidth||n.y<0||n.y>i.clientHeight)&&(n=null),n},prepareWithEventType:function(e){var t={multiday:this.getEventMultiDayViewCoordinates,"multiday-allday":this.getEventMultiDayAllDayViewCoordinates,monthly:this.getEventMonthlyViewCoordinates,unknown:null}[e];this.eventType=e,this.getEventViewCoordinates=t},getEventMultiDayViewCoordinates:function(e,t){var n=this.getEventMultiDayAllDayViewCoordinates(e,t);if(n){var i=e.quarterHeight,a=this.getContainerBasedCoordinates(e,t);a.y+=e.element.scrollTop,n.y=Math.floor((a.y-y.EventDragHorizontalOffset)/i);var o=y.EventDragDayLength-1;n.y<0?n.y=0:n.y>o&&(n.y=o)}return n},getEventMultiDayAllDayViewCoordinates:function(e,t){var n,i=this.getContainerBasedCoordinates(e,t);if(i){n=new p;var a=e.dayWidth,o=e.daysOffset;n.x=Math.floor((i.x-o)/a);var r=0,s=g.$view.maxX;if("move-event"!=this.dragMode){var c=h.calendarData();c&&(r=s=c.index)}n.xs&&(n.x=s),n.y=0}else n=null;return n},getEventMonthlyViewCoordinates:function(e,t){var n,i=this.getContainerBasedCoordinates(e,t);if(i){n=new p;var a=e.maxX,o=e.dayWidth,r=e.daysOffset,s=e.dayHeight,c=Math.floor((i.y-0)/s);c<0&&(c=0),n.x=Math.floor((i.x-r)/o),n.x<0?n.x=0:n.x>a&&(n.x=a),n.x+=(a+1)*c,n.y=0}else n=null;return n},getDistance:function(){return this.currentCoordinates.getDistance(this.originalCoordinates)},setTimeFromQuarters:function(e,t){var n,i;n=Math.floor(t/4),i=t%4*15,e.setHours(n,i)}}}}}e.$inject=["$rootScope","$timeout","$log","Preferences","Calendar","CalendarSettings","Component"],angular.module("SOGo.SchedulerUI").directive("sgDraggableCalendarBlock",e)}(),function(){function e(e,t,n){var i=this;this.$onInit=function(){e.$watch(function(){return i.component?{start:i.component.start,end:i.component.end,attendees:_.keys(i.component.$attendees.$futureFreebusyData)}:null},function(e,t){e&&e.attendees&&e.attendees.length&&n.all(_.values(i.component.$attendees.$futureFreebusyData)).then(function(){i.onUpdate()})},!0)},this.onUpdate=function(){}}e.$inject=["$scope","$element","$q"],angular.module("SOGo.SchedulerUI").directive("sgFreebusy",function(){return{restrict:"C",scope:{},bindToController:{component:"=sgComponent"},controller:e}})}(),function(){function e(e,t){var c=this;this.$postLink=function(){var a,o=[],r=[],s=[];this.parentController=e.parentController,a=this.parentController.onUpdate,_.forEach(t.find("div"),function(e){e.className.startsWith("hour")?o.push(e):e.className.startsWith("quarter")?r.push(e):e.className.startsWith("busy")&&s.push(e)}),this.parentController.onUpdate=function(){var e=c.attendee.uid?c.attendee.freebusy[c.day]:null;c.attendee.uid||_.forEach(o,function(e){e.classList.add("sg-no-freebusy")});for(var t=0;t<24;t++)for(var n=0;n<4;n++){var i=4*t+n;c.coversFreebusy(t,n)?r[i].classList.add("event"):r[i].classList.remove("event"),e&&e[t][n]?s[i].classList.remove("ng-hide"):s[i].classList.add("ng-hide")}angular.bind(c.parentController,a)()}},this.coversFreebusy=function(e,t){return c.attendees.coversFreeBusy(c.day,e,t)}}e.$inject=["$scope","$element"],angular.module("SOGo.SchedulerUI").directive("sgFreebusyDay",function(){return{restrict:"E",require:"^^sgFreebusy",bindToController:{day:"=sgDay",attendees:"=sgAttendees",attendee:"=sgAttendee"},replace:!0,template:function(e,t){for(var n=[""],i=0;i<24;i++){n.push('
');for(var a=0;a<4;a++)n.push('
'),n.push('
'),n.push("
");n.push("
")}return n.push(" \x3c!-- divider --\x3e"),n.push("
"),n.join("")},link:function(e,t,n,i){e.parentController=i},controller:e,controllerAs:"$ctrl"}})}(),function(){"use strict";function e(c,l,d){var u,h=this,p=l.controller("sgCalendarScrollView");c.nowDay=null,c.lineElement=null,c.updateLine=function(e){var t=new Date,n=t.getDayString(),i=t.getHours(),a=4*c.quarterHeight,o=t.getMinutes(),r=c.quarterHeight/15,s=parseInt(i*a+o*r-1);!e&&n==c.nowDay||(c.lineElement&&c.lineElement.remove(),c.lineElement=function(t,e){var n=angular.element("");p.isMultiColumn?e&&e[0].attributes["sg-day"].value==t&&l.append(n):_.forEach(e,function(e){e.attributes["sg-day"].value==t&&angular.element(e).find("div").eq(0).append(n)});return n}(n,c.days),c.nowDay=n);c.lineElement&&(c.lineElement.css("top",s+"px"),u=d(angular.bind(h,c.updateLine),6e4))},c.$on("$destroy",function(){u&&d.cancel(u)})}e.$inject=["$scope","$element","$timeout"],angular.module("SOGo.SchedulerUI").directive("sgNowLine",function(){return{restrict:"C",require:"^^sgCalendarScrollView",link:function(n,e,t,i){function a(){return e.find("sg-calendar-day")}var o=n.$watch(function(){return i.quarterHeight},function(e){if(e){o(),n.quarterHeight=e;var t=n.$watch(a,function(e){e.length&&(t(),n.days=e,n.updateLine())})}})},controller:e}})}(); //# sourceMappingURL=Scheduler.services.js.map