text: webpackJsonp([142],{2110:function(n,l,e){"use strict";function View_AddonCalendarEventPage_1(n){return t._57(0,[(n()(),t._31(0,0,null,null,0,"img",[["alt",""],["class","core-module-icon"],["role","presentation"]],[[8,"src",4]],null,null,null,null))],null,function(n,l){n(l,0,0,t._34(1,"",l.component.event.moduleIcon,""))})}function View_AddonCalendarEventPage_2(n){return t._57(0,[(n()(),t._31(0,0,null,null,1,"core-icon",[["item-start",""]],null,null,null,G.b,G.a)),t._30(1,704512,null,0,q.a,[t.t,B.a],{name:[0,"name"]},null)],function(n,l){n(l,1,0,l.component.event.eventIcon)},null)}function View_AddonCalendarEventPage_3(n){return t._57(0,[(n()(),t._31(0,16777216,null,null,1,"core-format-text",[],null,null,null,null,null)),t._30(1,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._26(0,null,null,0))],function(n,l){var e=l.component;n(l,1,0,e.event.name,e.event.contextLevel,e.event.contextInstanceId)},null)}function View_AddonCalendarEventPage_4(n){return t._57(0,[(n()(),t._31(0,0,null,null,8,"ion-card",[["class","core-warning-card"],["icon-start",""]],null,null,null,null,null)),t._30(1,16384,null,0,cn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n            "])),(n()(),t._31(3,0,null,null,1,"ion-icon",[["name","warning"],["role","img"]],[[2,"hide",null]],null,null,null,null)),t._30(4,147456,null,0,dn.a,[B.a,t.t,t.V],{name:[0,"name"]},null),(n()(),t._55(5,null,[" ","\n        "])),t._47(131072,_n.a,[J.a,t.j]),t._48(7,{$a:0}),t._47(131072,_n.a,[J.a,t.j])],function(n,l){n(l,4,0,"warning")},function(n,l){n(l,3,0,t._44(l,4)._hidden);n(l,5,0,t._56(l,5,0,t._44(l,8).transform("core.hasdatatosync",n(l,7,0,t._56(l,5,0,t._44(l,6).transform("addon.calendar.calendarevent"))))))})}function View_AddonCalendarEventPage_7(n){return t._57(0,[(n()(),t._31(0,0,null,null,0,"img",[["alt",""],["class","core-module-icon"],["item-start",""],["role","presentation"]],[[8,"src",4]],null,null,null,null))],null,function(n,l){n(l,0,0,t._34(1,"",l.component.event.moduleIcon,""))})}function View_AddonCalendarEventPage_8(n){return t._57(0,[(n()(),t._31(0,0,null,null,1,"core-icon",[["item-start",""]],null,null,null,G.b,G.a)),t._30(1,704512,null,0,q.a,[t.t,B.a],{name:[0,"name"]},null)],function(n,l){n(l,1,0,l.component.event.eventIcon)},null)}function View_AddonCalendarEventPage_9(n){return t._57(0,[(n()(),t._31(0,0,null,null,6,"ion-note",[["item-end",""]],null,null,null,null,null)),t._30(1,16384,null,0,sn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n                        "])),(n()(),t._31(3,0,null,null,1,"ion-icon",[["name","trash"],["role","img"]],[[2,"hide",null]],null,null,null,null)),t._30(4,147456,null,0,dn.a,[B.a,t.t,t.V],{name:[0,"name"]},null),(n()(),t._55(5,null,[" ","\n                    "])),t._47(131072,_n.a,[J.a,t.j])],function(n,l){n(l,4,0,"trash")},function(n,l){n(l,3,0,t._44(l,4)._hidden);n(l,5,0,t._56(l,5,0,t._44(l,6).transform("core.deletedoffline")))})}function View_AddonCalendarEventPage_6(n){return t._57(0,[(n()(),t._31(0,0,null,null,23,"ion-item",[["class","item item-block"],["text-wrap",""]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,4,{contentLabel:0}),t._52(603979776,5,{_buttons:1}),t._52(603979776,6,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_7)),t._30(8,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_8)),t._30(11,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(13,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(14,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(17,0,null,2,2,"p",[],null,null,null,null,null)),(n()(),t._31(18,16777216,null,null,1,"core-format-text",[],null,null,null,null,null)),t._30(19,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,4,1,null,View_AddonCalendarEventPage_9)),t._30(22,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,8,0,e.event.moduleIcon);n(l,11,0,e.event.eventIcon&&!e.event.moduleIcon);n(l,19,0,e.event.name,e.event.contextLevel,e.event.contextInstanceId);n(l,22,0,e.event.deleted)},function(n,l){n(l,14,0,t._56(l,14,0,t._44(l,15).transform("addon.calendar.eventname")))})}function View_AddonCalendarEventPage_10(n){return t._57(0,[(n()(),t._31(0,0,null,null,6,"ion-note",[["item-end",""]],null,null,null,null,null)),t._30(1,16384,null,0,sn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n                        "])),(n()(),t._31(3,0,null,null,1,"ion-icon",[["name","trash"],["role","img"]],[[2,"hide",null]],null,null,null,null)),t._30(4,147456,null,0,dn.a,[B.a,t.t,t.V],{name:[0,"name"]},null),(n()(),t._55(5,null,[" ","\n                    "])),t._47(131072,_n.a,[J.a,t.j])],function(n,l){n(l,4,0,"trash")},function(n,l){n(l,3,0,t._44(l,4)._hidden);n(l,5,0,t._56(l,5,0,t._44(l,6).transform("core.deletedoffline")))})}function View_AddonCalendarEventPage_11(n){return t._57(0,[(n()(),t._31(0,0,null,null,15,"a",[["capture","true"],["class","item item-block"],["core-link",""],["ion-item",""],["text-wrap",""]],[[8,"href",4]],null,null,vn.b,vn.a)),t._30(1,81920,null,0,bn.a,[t.t,h.a,Q.b,p.a,W.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],g.b,rn.a],{capture:[0,"capture"]},null),t._30(2,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,13,{contentLabel:0}),t._52(603979776,14,{_buttons:1}),t._52(603979776,15,{_icons:1}),t._30(6,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(8,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(9,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(12,0,null,2,2,"p",[],null,null,null,null,null)),(n()(),t._31(13,16777216,null,null,1,"core-format-text",[["contextLevel","course"]],null,null,null,null,null)),t._30(14,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,1,0,"true");n(l,14,0,e.courseName,"course",e.courseId)},function(n,l){n(l,0,0,l.component.courseUrl);n(l,9,0,t._56(l,9,0,t._44(l,10).transform("core.course")))})}function View_AddonCalendarEventPage_12(n){return t._57(0,[(n()(),t._31(0,0,null,null,13,"ion-item",[["class","item item-block"],["text-wrap",""]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,16,{contentLabel:0}),t._52(603979776,17,{_buttons:1}),t._52(603979776,18,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(7,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(8,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(11,0,null,2,1,"p",[],null,null,null,null,null)),(n()(),t._55(12,null,["",""])),(n()(),t._55(-1,2,["\n                "]))],null,function(n,l){var e=l.component;n(l,8,0,t._56(l,8,0,t._44(l,9).transform("core.group")));n(l,12,0,e.groupName)})}function View_AddonCalendarEventPage_13(n){return t._57(0,[(n()(),t._31(0,0,null,null,14,"a",[["class","item item-block"],["ion-item",""],["text-wrap",""]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,19,{contentLabel:0}),t._52(603979776,20,{_buttons:1}),t._52(603979776,21,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(7,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(8,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(11,0,null,2,2,"p",[],null,null,null,null,null)),(n()(),t._31(12,16777216,null,null,1,"core-format-text",[["contextLevel","coursecat"]],null,null,null,null,null)),t._30(13,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,13,0,e.categoryPath,"coursecat",e.event.category.id)},function(n,l){n(l,8,0,t._56(l,8,0,t._44(l,9).transform("core.category")))})}function View_AddonCalendarEventPage_14(n){return t._57(0,[(n()(),t._31(0,0,null,null,16,"ion-item",[["class","item item-block"],["text-wrap",""]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,22,{contentLabel:0}),t._52(603979776,23,{_buttons:1}),t._52(603979776,24,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(7,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(8,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(11,0,null,2,4,"p",[],null,null,null,null,null)),(n()(),t._55(-1,null,["\n                        "])),(n()(),t._31(13,16777216,null,null,1,"core-format-text",[],null,null,null,null,null)),t._30(14,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._55(-1,null,["\n                    "])),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,14,0,e.event.description,e.event.contextLevel,e.event.contextInstanceId)},function(n,l){n(l,8,0,t._56(l,8,0,t._44(l,9).transform("core.description")))})}function View_AddonCalendarEventPage_15(n){return t._57(0,[(n()(),t._31(0,0,null,null,20,"ion-item",[["class","item item-block"],["text-wrap",""]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,25,{contentLabel:0}),t._52(603979776,26,{_buttons:1}),t._52(603979776,27,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(7,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(8,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(11,0,null,2,8,"p",[],null,null,null,null,null)),(n()(),t._55(-1,null,["\n                        "])),(n()(),t._31(13,0,null,null,5,"a",[["auto-login","no"],["core-link",""]],[[8,"href",4]],null,null,null,null)),t._30(14,81920,null,0,bn.a,[t.t,h.a,Q.b,p.a,W.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],g.b,rn.a],null,null),(n()(),t._55(-1,null,["\n                            "])),(n()(),t._31(16,16777216,null,null,1,"core-format-text",[],null,null,null,null,null)),t._30(17,540672,null,0,z.a,[t.t,p.a,h.a,g.b,J.a,K.a,Q.b,W.b,X.b,Z.a,f.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],tn.a,m.b,an.a,un.a,on.a,t._11,rn.a],{text:[0,"text"],contextLevel:[1,"contextLevel"],contextInstanceId:[2,"contextInstanceId"]},null),(n()(),t._55(-1,null,["\n                        "])),(n()(),t._55(-1,null,["\n                    "])),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,14,0);n(l,17,0,e.event.location,e.event.contextLevel,e.event.contextInstanceId)},function(n,l){var e=l.component;n(l,8,0,t._56(l,8,0,t._44(l,9).transform("core.location")));n(l,13,0,e.event.encodedLocation)})}function View_AddonCalendarEventPage_16(n){return t._57(0,[(n()(),t._31(0,0,null,null,12,"ion-item",[["class","item item-block"]],null,null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,28,{contentLabel:0}),t._52(603979776,29,{_buttons:1}),t._52(603979776,30,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(7,0,null,2,4,"a",[["block",""],["capture","true"],["color","primary"],["core-link",""],["ion-button",""]],[[8,"href",4]],null,null,En.b,En.a)),t._30(8,81920,null,0,bn.a,[t.t,h.a,Q.b,p.a,W.b,nn.a,[2,ln.a],[2,en.a],[2,C.a],g.b,rn.a],{capture:[0,"capture"]},null),t._30(9,1097728,[[29,4]],0,In.a,[[8,""],B.a,t.t,t.V],{color:[0,"color"],block:[1,"block"]},null),(n()(),t._55(10,0,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                "]))],function(n,l){n(l,8,0,"true");n(l,9,0,"primary","")},function(n,l){n(l,7,0,l.component.moduleUrl);n(l,10,0,t._56(l,10,0,t._44(l,11).transform("addon.calendar.gotoactivity")))})}function View_AddonCalendarEventPage_5(n){return t._57(0,[(n()(),t._31(0,0,null,null,56,"ion-card-content",[],null,null,null,null,null)),t._30(1,16384,null,0,Pn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_6)),t._30(4,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._31(6,0,null,null,15,"ion-item",[["class","item item-block"]],null,null,null,vn.b,vn.a)),t._30(7,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,7,{contentLabel:0}),t._52(603979776,8,{_buttons:1}),t._52(603979776,9,{_icons:1}),t._30(11,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(13,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(14,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(17,0,null,2,0,"p",[],[[8,"innerHTML",1]],null,null,null,null)),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,4,1,null,View_AddonCalendarEventPage_10)),t._30(20,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                "])),(n()(),t._55(-1,null,["\n                "])),(n()(),t._31(23,0,null,null,14,"ion-item",[["class","item item-block"]],null,null,null,vn.b,vn.a)),t._30(24,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,10,{contentLabel:0}),t._52(603979776,11,{_buttons:1}),t._52(603979776,12,{_icons:1}),t._30(28,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(30,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(31,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(34,0,null,2,2,"p",[],null,null,null,null,null)),(n()(),t._55(35,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                "])),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_11)),t._30(40,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_12)),t._30(43,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_13)),t._30(46,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_14)),t._30(49,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_15)),t._30(52,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_16)),t._30(55,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n            "]))],function(n,l){var e=l.component;n(l,4,0,e.isSplitViewOn);n(l,20,0,!e.isSplitViewOn&&e.event.deleted);n(l,40,0,e.courseName);n(l,43,0,e.groupName);n(l,46,0,e.categoryPath);n(l,49,0,e.event.description);n(l,52,0,e.event.location);n(l,55,0,e.moduleUrl)},function(n,l){var e=l.component;n(l,14,0,t._56(l,14,0,t._44(l,15).transform("addon.calendar.when")));n(l,17,0,e.event.formattedtime);n(l,31,0,t._56(l,31,0,t._44(l,32).transform("addon.calendar.eventtype")));n(l,35,0,t._56(l,35,0,t._44(l,36).transform("addon.calendar.type"+e.event.formattedType)))})}function View_AddonCalendarEventPage_20(n){return t._57(0,[(n()(),t._31(0,0,null,null,4,"p",[],null,null,null,null,null)),(n()(),t._55(1,null,["",""])),t._49(2,1),t._48(3,{$a:0}),t._47(131072,_n.a,[J.a,t.j])],null,function(n,l){var e=l.component;n(l,1,0,t._56(l,1,0,t._44(l,4).transform("core.defaultvalue",n(l,3,0,t._56(l,1,0,n(l,2,0,t._44(l.parent.parent.parent.parent,0),1e3*(e.event.timestart-e.defaultTime)))))))})}function View_AddonCalendarEventPage_21(n){return t._57(0,[(n()(),t._31(0,0,null,null,2,"p",[],null,null,null,null,null)),(n()(),t._55(1,null,["",""])),t._49(2,1)],null,function(n,l){n(l,1,0,t._56(l,1,0,n(l,2,0,t._44(l.parent.parent.parent.parent,0),1e3*l.parent.parent.context.$implicit.time)))})}function View_AddonCalendarEventPage_22(n){return t._57(0,[(n()(),t._31(0,0,null,null,6,"button",[["clear","true"],["icon-only",""],["ion-button",""],["item-end",""]],[[1,"aria-label",0]],[[null,"click"]],function(n,l,e){var t=!0;if("click"===l){t=!1!==n.component.cancelNotification(n.parent.parent.context.$implicit.id,e)&&t}return t},En.b,En.a)),t._30(1,1097728,[[35,4]],0,In.a,[[8,""],B.a,t.t,t.V],{clear:[0,"clear"]},null),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,0,["\n                        "])),(n()(),t._31(4,0,null,0,1,"ion-icon",[["color","danger"],["name","trash"],["role","img"]],[[2,"hide",null]],null,null,null,null)),t._30(5,147456,null,0,dn.a,[B.a,t.t,t.V],{color:[0,"color"],name:[1,"name"]},null),(n()(),t._55(-1,0,["\n                    "]))],function(n,l){n(l,1,0,"true");n(l,5,0,"danger","trash")},function(n,l){n(l,0,0,t._56(l,0,0,t._44(l,2).transform("core.delete")));n(l,4,0,t._44(l,5)._hidden)})}function View_AddonCalendarEventPage_19(n){return t._57(0,[(n()(),t._31(0,0,null,null,15,"ion-item",[["class","item item-block"],["text-wrap",""]],[[2,"item-dimmed",null]],null,null,vn.b,vn.a)),t._30(1,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,34,{contentLabel:0}),t._52(603979776,35,{_buttons:1}),t._52(603979776,36,{_icons:1}),t._30(5,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,2,1,null,View_AddonCalendarEventPage_20)),t._30(8,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,2,1,null,View_AddonCalendarEventPage_21)),t._30(11,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._26(16777216,null,4,1,null,View_AddonCalendarEventPage_22)),t._30(14,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,2,["\n                "]))],function(n,l){var e=l.component;n(l,8,0,-1==l.parent.context.$implicit.time);n(l,11,0,l.parent.context.$implicit.time>0);n(l,14,0,(-1==l.parent.context.$implicit.time?e.event.timestart-e.defaultTime:l.parent.context.$implicit.time)>e.currentTime)},function(n,l){var e=l.component;n(l,0,0,(-1==l.parent.context.$implicit.time?e.event.timestart-e.defaultTime:l.parent.context.$implicit.time)<=e.currentTime)})}function View_AddonCalendarEventPage_18(n){return t._57(0,[(n()(),t._31(0,0,null,null,4,null,null,null,null,null,null,null)),(n()(),t._55(-1,null,["\n                "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_19)),t._30(3,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n            "]))],function(n,l){n(l,3,0,l.context.$implicit.time>0||l.component.defaultTime>0)},null)}function View_AddonCalendarEventPage_23(n){return t._57(0,[(n()(),t._31(0,0,null,null,22,null,null,null,null,null,null,null)),(n()(),t._55(-1,null,["\n                "])),(n()(),t._31(2,0,null,null,11,"ion-item",[["class","item item-block"]],null,null,null,vn.b,vn.a)),t._30(3,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,37,{contentLabel:0}),t._52(603979776,38,{_buttons:1}),t._52(603979776,39,{_icons:1}),t._30(7,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                    "])),(n()(),t._31(9,0,null,2,3,"button",[["block",""],["color","primary"],["ion-button",""]],null,[[null,"click"]],function(n,l,e){var a=!0;if("click"===l){a=!1!==t._44(n,16).open()&&a}return a},En.b,En.a)),t._30(10,1097728,[[38,4]],0,In.a,[[8,""],B.a,t.t,t.V],{color:[0,"color"],block:[1,"block"]},null),(n()(),t._55(11,0,["\n                        ","\n                    "])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n                "])),(n()(),t._55(-1,null,["\n                "])),(n()(),t._31(15,0,null,null,6,"ion-datetime",[["hidden",""]],[[2,"datetime-disabled",null],[2,"ng-untouched",null],[2,"ng-touched",null],[2,"ng-pristine",null],[2,"ng-dirty",null],[2,"ng-valid",null],[2,"ng-invalid",null],[2,"ng-pending",null]],[[null,"ngModelChange"],[null,"ionChange"],[null,"click"],[null,"keyup.space"]],function(n,l,e){var a=!0,u=n.component;if("click"===l){a=!1!==t._44(n,16)._click(e)&&a}if("keyup.space"===l){a=!1!==t._44(n,16)._keyup()&&a}if("ngModelChange"===l){a=!1!==(u.notificationTimeText=e)&&a}if("ionChange"===l){a=!1!==u.addNotificationTime()&&a}return a},Cn.b,Cn.a)),t._30(16,1228800,[["notificationPicker",4]],0,xn.a,[mn.a,B.a,t.t,t.V,[2,fn.a],[2,Vn.a]],{min:[0,"min"],max:[1,"max"],displayFormat:[2,"displayFormat"],doneText:[3,"doneText"]},{ionChange:"ionChange"}),t._47(131072,_n.a,[J.a,t.j]),t._50(1024,null,yn.l,function(n){return[n]},[xn.a]),t._30(19,671744,null,0,yn.q,[[8,null],[8,null],[8,null],[2,yn.l]],{model:[0,"model"]},{update:"ngModelChange"}),t._50(2048,null,yn.m,null,[yn.q]),t._30(21,16384,null,0,yn.n,[yn.m],null,null),(n()(),t._55(-1,null,["\n            "]))],function(n,l){var e=l.component;n(l,10,0,"primary","");n(l,16,0,e.notificationMin,e.notificationMax,e.notificationFormat,t._56(l,16,3,t._44(l,17).transform("core.add")));n(l,19,0,e.notificationTimeText)},function(n,l){n(l,11,0,t._56(l,11,0,t._44(l,12).transform("addon.calendar.setnewreminder")));n(l,15,0,t._44(l,16)._disabled,t._44(l,21).ngClassUntouched,t._44(l,21).ngClassTouched,t._44(l,21).ngClassPristine,t._44(l,21).ngClassDirty,t._44(l,21).ngClassValid,t._44(l,21).ngClassInvalid,t._44(l,21).ngClassPending)})}function View_AddonCalendarEventPage_17(n){return t._57(0,[(n()(),t._31(0,0,null,null,20,"ion-card",[["list",""]],null,null,null,null,null)),t._30(1,16384,null,0,cn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n            "])),(n()(),t._31(3,0,null,null,10,"ion-item",[["class","item item-block"]],null,null,null,vn.b,vn.a)),t._30(4,1097728,null,3,fn.a,[mn.a,B.a,t.t,t.V,[2,hn.a]],null,null),t._52(335544320,31,{contentLabel:0}),t._52(603979776,32,{_buttons:1}),t._52(603979776,33,{_icons:1}),t._30(8,16384,null,0,gn.a,[],null,null),(n()(),t._55(-1,2,["\n                "])),(n()(),t._31(10,0,null,2,2,"h2",[],null,null,null,null,null)),(n()(),t._55(11,null,["",""])),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,2,["\n            "])),(n()(),t._55(-1,null,["\n            "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_18)),t._30(16,802816,null,0,pn.j,[t._11,t._6,t.E],{ngForOf:[0,"ngForOf"]},null),(n()(),t._55(-1,null,["\n\n            "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_23)),t._30(19,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n        "]))],function(n,l){var e=l.component;n(l,16,0,e.reminders);n(l,19,0,e.event.timestart+e.event.timeduration>e.currentTime)},function(n,l){n(l,11,0,t._56(l,11,0,t._44(l,12).transform("addon.calendar.reminders")))})}function View_AddonCalendarEventPage_0(n){return t._57(0,[t._47(0,wn.a,[X.b,I.a]),t._52(402653184,1,{content:0}),(n()(),t._31(2,0,null,null,26,"ion-header",[],null,null,null,null,null)),t._30(3,16384,null,0,An.a,[B.a,t.t,t.V,[2,kn.a]],null,null),(n()(),t._55(-1,null,["\n    "])),(n()(),t._31(5,0,null,null,22,"ion-navbar",[["class","toolbar"],["core-back-button",""]],[[8,"hidden",0],[2,"statusbar-padding",null]],null,null,On.b,On.a)),t._30(6,49152,null,0,Tn.a,[Ln.a,[2,kn.a],[2,ln.a],B.a,t.t,t.V],null,null),t._30(7,212992,null,0,Un.a,[Tn.a,K.a,J.a,m.b],null,null),(n()(),t._55(-1,3,["\n        "])),(n()(),t._31(9,0,null,3,11,"ion-title",[],null,null,null,jn.b,jn.a)),t._30(10,49152,null,0,Dn.a,[B.a,t.t,t.V,[2,Mn.a],[2,Tn.a]],null,null),(n()(),t._55(-1,0,["\n            "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_1)),t._30(13,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,0,["\n            "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_2)),t._30(16,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,0,["\n            "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_3)),t._30(19,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,0,["\n        "])),(n()(),t._55(-1,3,["\n        "])),(n()(),t._31(22,0,null,2,4,"ion-buttons",[["end",""]],null,null,null,null,null)),t._30(23,16384,null,1,Nn.a,[B.a,t.t,t.V,[2,Mn.a],[2,Tn.a]],null,null),t._52(603979776,2,{_buttons:1}),(n()(),t._55(-1,null,["\n            "])),(n()(),t._55(-1,null,["\n        "])),(n()(),t._55(-1,3,["\n    "])),(n()(),t._55(-1,null,["\n"])),(n()(),t._55(-1,null,["\n"])),(n()(),t._31(30,0,null,null,23,"core-navbar-buttons",[["end",""]],null,null,null,Sn.b,Sn.a)),t._30(31,245760,null,1,Rn.a,[t.t,X.b,h.a],null,null),t._52(603979776,3,{buttons:1}),(n()(),t._55(-1,0,["\n    "])),(n()(),t._31(34,0,null,0,18,"core-context-menu",[],null,null,null,Hn.b,Hn.a)),t._30(35,245760,null,0,$n.a,[J.a,Fn.a,t.t,h.a,[2,Yn.a],Q.b],null,null),(n()(),t._55(-1,0,["\n        "])),(n()(),t._31(37,0,null,0,2,"core-context-menu-item",[],null,[[null,"action"]],function(n,l,e){var t=!0;if("action"===l){t=!1!==n.component.doRefresh(null,e,!0)&&t}return t},Gn.b,Gn.a)),t._30(38,770048,null,0,qn.a,[$n.a],{content:[0,"content"],iconAction:[1,"iconAction"],closeOnClick:[2,"closeOnClick"],priority:[3,"priority"],hidden:[4,"hidden"]},{action:"action"}),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,0,["\n        "])),(n()(),t._31(41,0,null,0,2,"core-context-menu-item",[],null,[[null,"action"]],function(n,l,e){var t=!0;if("action"===l){t=!1!==n.component.openEdit()&&t}return t},Gn.b,Gn.a)),t._30(42,770048,null,0,qn.a,[$n.a],{content:[0,"content"],iconAction:[1,"iconAction"],priority:[2,"priority"],hidden:[3,"hidden"]},{action:"action"}),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,0,["\n        "])),(n()(),t._31(45,0,null,0,2,"core-context-menu-item",[],null,[[null,"action"]],function(n,l,e){var t=!0;if("action"===l){t=!1!==n.component.deleteEvent()&&t}return t},Gn.b,Gn.a)),t._30(46,770048,null,0,qn.a,[$n.a],{content:[0,"content"],iconAction:[1,"iconAction"],priority:[2,"priority"],hidden:[3,"hidden"]},{action:"action"}),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,0,["\n        "])),(n()(),t._31(49,0,null,0,2,"core-context-menu-item",[],null,[[null,"action"]],function(n,l,e){var t=!0;if("action"===l){t=!1!==n.component.undoDelete()&&t}return t},Gn.b,Gn.a)),t._30(50,770048,null,0,qn.a,[$n.a],{content:[0,"content"],iconAction:[1,"iconAction"],priority:[2,"priority"],hidden:[3,"hidden"]},{action:"action"}),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,0,["\n    "])),(n()(),t._55(-1,0,["\n"])),(n()(),t._55(-1,null,["\n"])),(n()(),t._31(55,0,null,null,28,"ion-content",[],[[2,"statusbar-padding",null],[2,"has-refresher",null]],null,null,Bn.b,Bn.a)),t._30(56,4374528,[[1,4]],0,en.a,[B.a,K.a,zn.a,t.t,t.V,Ln.a,Jn.a,t.M,[2,kn.a],[2,ln.a]],null,null),(n()(),t._55(-1,1,["\n    "])),(n()(),t._31(58,0,null,2,6,"ion-refresher",[],[[2,"refresher-active",null],[4,"top",null]],[[null,"ionRefresh"]],function(n,l,e){var t=!0;if("ionRefresh"===l){t=!1!==n.component.doRefresh(e)&&t}return t},null,null)),t._30(59,212992,null,0,Kn.a,[K.a,en.a,t.M,Qn.l],{enabled:[0,"enabled"]},{ionRefresh:"ionRefresh"}),(n()(),t._55(-1,null,["\n        "])),(n()(),t._31(61,0,null,null,2,"ion-refresher-content",[],[[1,"state",0]],null,null,Wn.b,Wn.a)),t._30(62,114688,null,0,Xn.a,[Kn.a,B.a],{pullingText:[0,"pullingText"]},null),t._47(131072,_n.a,[J.a,t.j]),(n()(),t._55(-1,null,["\n    "])),(n()(),t._55(-1,1,["\n    "])),(n()(),t._31(66,0,null,1,16,"core-loading",[],null,null,null,Zn.b,Zn.a)),t._30(67,638976,null,0,nl.a,[J.a,t.t,m.b,Q.b],{hideUntil:[0,"hideUntil"]},null),(n()(),t._55(-1,0,["\n        "])),(n()(),t._55(-1,0,["\n        "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_4)),t._30(71,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,0,["\n\n        "])),(n()(),t._31(73,0,null,0,5,"ion-card",[],null,null,null,null,null)),t._30(74,16384,null,0,cn.a,[B.a,t.t,t.V],null,null),(n()(),t._55(-1,null,["\n            "])),(n()(),t._26(16777216,null,null,1,null,View_AddonCalendarEventPage_5)),t._30(77,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,null,["\n        "])),(n()(),t._55(-1,0,["\n\n        "])),(n()(),t._26(16777216,null,0,1,null,View_AddonCalendarEventPage_17)),t._30(81,16384,null,0,pn.k,[t._11,t._6],{ngIf:[0,"ngIf"]},null),(n()(),t._55(-1,0,["\n    "])),(n()(),t._55(-1,1,["\n"])),(n()(),t._55(-1,null,["\n"]))],function(n,l){var e=l.component;n(l,7,0);n(l,13,0,e.event&&e.event.moduleIcon);n(l,16,0,e.event&&e.event.eventIcon&&!e.event.moduleIcon);n(l,19,0,e.event),n(l,31,0),n(l,35,0);n(l,38,0,t._56(l,38,0,t._44(l,39).transform("core.settings.synchronizenow")),e.syncIcon,!1,400,e.isSplitViewOn||!e.eventLoaded||!e.hasOffline&&!e.event.deleted||!e.isOnline);n(l,42,0,t._56(l,42,0,t._44(l,43).transform("core.edit")),"create",300,!e.canEdit||!e.event||!e.event.canedit||e.event.deleted);n(l,46,0,t._56(l,46,0,t._44(l,47).transform("core.delete")),"trash",200,!e.canDelete||!e.event||!e.event.candelete||e.event.deleted);n(l,50,0,t._56(l,50,0,t._44(l,51).transform("core.restore")),"undo",200,!e.event||!e.event.deleted);n(l,59,0,e.eventLoaded);n(l,62,0,t._34(1,"",t._56(l,62,0,t._44(l,63).transform("core.pulltorefresh")),""));n(l,67,0,e.eventLoaded);n(l,71,0,e.hasOffline||e.event.deleted);n(l,77,0,e.event);n(l,81,0,e.notificationsEnabled)},function(n,l){n(l,5,0,t._44(l,6)._hidden,t._44(l,6)._sbPadding);n(l,55,0,t._44(l,56).statusbarPadding,t._44(l,56)._hasRefresher);n(l,58,0,"inactive"!==t._44(l,59).state,t._44(l,59)._top);n(l,61,0,t._44(l,62).r.state)})}Object.defineProperty(l,"__esModule",{value:!0});var t=e(0),a=e(5),u=e(3),o=e(26),i=e(32),r=e(108),c=e(188),d=e(278),_=e(277),s=e(477),v=e(51),f=e(10),m=e(9),h=e(4),g=e(11),p=e(1),b=e(154),E=e(16),I=e(24),P=e(73),C=e(28),x=e(187),V=this&&this.__decorate||function(n,l,e,t){var a,u=arguments.length,o=u<3?l:null===t?t=Object.getOwnPropertyDescriptor(l,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,l,e,t);else for(var i=n.length-1;i>=0;i--)(a=n[i])&&(o=(u<3?a(o):u>3?a(l,e,o):a(l,e))||o);return u>3&&o&&Object.defineProperty(l,e,o),o},y=this&&this.__metadata||function(n,l){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,l)},w=this&&this.__param||function(n,l){return function(e,t){l(e,t,n)}},A=function(){function AddonCalendarEventPage(n,l,e,t,a,u,o,i,r,d,_,v,f,m,h,g,p,b,E,I){var P=this;this.translate=n,this.calendarProvider=l,this.domUtils=t,this.coursesProvider=a,this.calendarHelper=u,this.sitesProvider=o,this.courseProvider=r,this.textUtils=d,this.timeUtils=_,this.groupsProvider=v,this.svComponent=f,this.navCtrl=m,this.eventsProvider=h,this.calendarSync=b,this.appProvider=E,this.calendarOffline=I,this.event={},this.courseUrl="",this.notificationsEnabled=!1,this.moduleUrl="",this.categoryPath="",this.canEdit=!1,this.canDelete=!1,this.hasOffline=!1,this.isOnline=!1,this.isSplitViewOn=!1,this.eventId=e.get("id"),this.notificationsEnabled=i.isAvailable(),this.siteHomeId=o.getCurrentSite().getSiteHomeId(),this.currentSiteId=o.getCurrentSiteId(),this.isSplitViewOn=this.svComponent&&this.svComponent.isOn(),this.canEdit=this.calendarProvider.canEditEventsInSite(),this.canDelete=this.calendarProvider.canDeleteEventsInSite(),this.notificationsEnabled&&(this.calendarProvider.getEventReminders(this.eventId).then(function(n){P.reminders=n}),this.calendarProvider.getDefaultNotificationTime().then(function(n){P.defaultTime=60*n}),this.notificationFormat=this.timeUtils.fixFormatForDatetime(this.timeUtils.convertPHPToMoment(this.translate.instant("core.strftimedatetime")))),this.editEventObserver=h.on(c.a.EDIT_EVENT_EVENT,function(n){n&&n.event&&n.event.id==P.eventId&&(P.eventLoaded=!1,P.refreshEvent(!0,!1))},this.currentSiteId),this.syncObserver=h.on(s.a.AUTO_SYNCED,this.checkSyncResult.bind(this,!1),this.currentSiteId),this.manualSyncObserver=h.on(s.a.MANUAL_SYNCED,this.checkSyncResult.bind(this,!0),this.currentSiteId),this.onlineObserver=g.onchange().subscribe(function(){p.run(function(){P.isOnline=P.appProvider.isOnline()})})}return AddonCalendarEventPage.prototype.ionViewDidLoad=function(){this.syncIcon="spinner",this.fetchEvent()},AddonCalendarEventPage.prototype.fetchEvent=function(n,l){var e=this,t=this.sitesProvider.getCurrentSite(),a=this.calendarProvider.isGetEventByIdAvailableInSite(),u=!1;return this.isOnline=this.appProvider.isOnline(),(n?this.calendarSync.syncEvents().then(function(n){n.warnings&&n.warnings.length&&e.domUtils.showErrorModal(n.warnings[0]),n.deleted&&-1!=n.deleted.indexOf(e.eventId)&&(u=!0),n.updated&&(n.source="event",e.eventsProvider.trigger(s.a.MANUAL_SYNCED,n,e.currentSiteId))}).catch(function(n){l&&e.domUtils.showErrorModalDefault(n,"core.errorsync",!0)}):Promise.resolve()).then(function(){if(!u){var n=[];return n.push(a?e.calendarProvider.getEventById(e.eventId):e.calendarProvider.getEvent(e.eventId)),n.push(e.calendarOffline.getEvent(e.eventId).catch(function(){})),Promise.all(n).then(function(n){return n[1]?(e.hasOffline=!0,Object.assign(n[0],n[1])):e.hasOffline=!1,n[0]})}}).then(function(n){if(!u){var l=[];if(e.calendarHelper.formatEventData(n),e.event=n,e.currentTime=e.timeUtils.timestamp(),e.notificationMin=e.timeUtils.userDate(1e3*e.currentTime,"YYYY-MM-DDTHH:mm",!1),e.notificationMax=e.timeUtils.userDate(1e3*(n.timestart+n.timeduration),"YYYY-MM-DDTHH:mm",!1),e.categoryPath="",e.courseName="",e.courseUrl="",e.moduleUrl="",n.moduleIcon){var o=e.courseProvider.translateModuleName(n.modulename);-1===o.indexOf("core.mod_")&&(n.moduleName=o),a&&(e.moduleUrl=n.url)}a&&n.course&&n.course.id!=e.siteHomeId?(e.courseId=n.course.id,e.courseName=n.course.fullname,e.courseUrl=n.course.viewurl):n.courseid&&n.courseid!=e.siteHomeId&&l.push(e.coursesProvider.getUserCourse(n.courseid,!0).then(function(l){e.courseId=l.id,e.courseName=l.fullname,e.courseUrl=t?e.textUtils.concatenatePaths(t.siteUrl,"/course/view.php?id="+n.courseid):""}).catch(function(){}));return(a&&n.course?n.course.id:n.courseid)&&n.groupid&&l.push(e.groupsProvider.getUserGroupsInCourse(n.courseid).then(function(l){var t=l.find(function(l){return l.id==n.groupid});e.groupName=t?t.name:""}).catch(function(){e.groupName=""})),a&&n.iscategoryevent&&n.category&&(e.categoryPath=n.category.nestedname),n.location&&(n.location=e.textUtils.decodeHTML(n.location),n.encodedLocation=e.textUtils.buildAddressURL(n.location)),l.push(e.calendarOffline.isEventDeleted(e.eventId).then(function(l){n.deleted=l})),l.push(e.calendarProvider.getCalendarTimeFormat().then(function(l){e.calendarProvider.formatEventTime(n,l).then(function(l){n.formattedtime=l})})),Promise.all(l)}}).catch(function(n){e.domUtils.showErrorModalDefault(n,"addon.calendar.errorloadevent",!0)}).finally(function(){e.eventLoaded=!0,e.syncIcon="sync"})},AddonCalendarEventPage.prototype.addNotificationTime=function(){var n=this;if(this.notificationTimeText&&this.event&&this.event.id){var l=this.timeUtils.convertToTimestamp(this.notificationTimeText),e=this.timeUtils.timestamp(),t=60*Math.floor(e/60);l>=t&&l<t+60&&(l=e+1),this.calendarProvider.addEventReminder(this.event,l).then(function(){n.calendarProvider.getEventReminders(n.eventId).then(function(l){n.reminders=l}),n.notificationTimeText=null})}},AddonCalendarEventPage.prototype.cancelNotification=function(n,l){var e=this;l.preventDefault(),l.stopPropagation(),this.domUtils.showDeleteConfirm().then(function(){var l=e.domUtils.showModalLoading("core.deleting",!0);e.calendarProvider.deleteEventReminder(n).then(function(){e.calendarProvider.getEventReminders(e.eventId).then(function(n){e.reminders=n})}).catch(function(n){e.domUtils.showErrorModalDefault(n,"Error deleting reminder")}).finally(function(){l.dismiss()})}).catch(function(){})},AddonCalendarEventPage.prototype.doRefresh=function(n,l,e){return this.eventLoaded?this.refreshEvent(!0,e).finally(function(){n&&n.complete(),l&&l()}):Promise.resolve()},AddonCalendarEventPage.prototype.refreshEvent=function(n,l){var e=this;this.syncIcon="spinner";var t=[];return t.push(this.calendarProvider.invalidateEvent(this.eventId)),t.push(this.calendarProvider.invalidateTimeFormat()),Promise.all(t).catch(function(){}).then(function(){return e.fetchEvent(n,l)})},AddonCalendarEventPage.prototype.openEdit=function(){(this.svComponent?this.svComponent.getMasterNav():this.navCtrl).push("AddonCalendarEditEventPage",{eventId:this.eventId})},AddonCalendarEventPage.prototype.deleteEvent=function(){var n,l=this,e=this.translate.instant("addon.calendar.deleteevent"),t={};this.event.eventcount>1?(n=this.translate.instant("addon.calendar.confirmeventseriesdelete",{$a:{name:this.event.name,count:this.event.eventcount}}),t.inputs=[{type:"radio",name:"deleteall",checked:!0,value:!1,label:this.translate.instant("addon.calendar.deleteoneevent")},{type:"radio",name:"deleteall",checked:!1,value:!0,label:this.translate.instant("addon.calendar.deleteallevents")}]):n=this.translate.instant("addon.calendar.confirmeventdelete",{$a:this.event.name}),this.domUtils.showConfirm(n,e,void 0,void 0,t).then(function(n){var e=l.domUtils.showModalLoading("core.sending",!0);l.calendarProvider.deleteEvent(l.event.id,l.event.name,n).then(function(e){return(e?l.calendarHelper.refreshAfterChangeEvent(l.event,n?l.event.eventcount:1).catch(function(){}):Promise.resolve()).then(function(){l.eventsProvider.trigger(c.a.DELETED_EVENT_EVENT,{eventId:l.eventId,sent:e},l.sitesProvider.getCurrentSiteId()),e?(l.domUtils.showToast("addon.calendar.eventcalendareventdeleted",!0,3e3,void 0,!1),l.svComponent&&l.svComponent.isOn()||l.navCtrl.pop()):l.event.deleted=!0})}).catch(function(n){l.domUtils.showErrorModalDefault(n,"Error deleting event.")}).finally(function(){e.dismiss()})},function(){})},AddonCalendarEventPage.prototype.undoDelete=function(){var n=this,l=this.domUtils.showModalLoading("core.sending",!0);this.calendarOffline.unmarkDeleted(this.event.id).then(function(){n.eventsProvider.trigger(c.a.UNDELETED_EVENT_EVENT,{eventId:n.eventId},n.sitesProvider.getCurrentSiteId()),n.event.deleted=!1}).catch(function(l){n.domUtils.showErrorModalDefault(l,"Error undeleting event.")}).finally(function(){l.dismiss()})},AddonCalendarEventPage.prototype.checkSyncResult=function(n,l){var e=this;if(l)if(l.deleted&&-1!=l.deleted.indexOf(this.eventId))this.domUtils.showToast("addon.calendar.eventcalendareventdeleted",!0,3e3,void 0,!1),this.svComponent&&this.svComponent.isOn()||this.navCtrl.pop();else if(l.events&&(!n||"event"!=l.source)){l.events.find(function(n){return n.id==e.eventId})&&(this.eventLoaded=!1,this.refreshEvent())}},AddonCalendarEventPage.prototype.ngOnDestroy=function(){this.editEventObserver&&this.editEventObserver.off(),this.syncObserver&&this.syncObserver.off(),this.manualSyncObserver&&this.manualSyncObserver.off(),this.onlineObserver&&this.onlineObserver.unsubscribe()},V([Object(t._9)(a.f),y("design:type",a.f)],AddonCalendarEventPage.prototype,"content",void 0),AddonCalendarEventPage=V([Object(t.m)({selector:"page-addon-calendar-event",templateUrl:"event.html"}),w(12,Object(t.N)()),y("design:paramtypes",[u.c,c.a,a.t,h.a,v.a,d.a,p.a,b.a,E.a,g.b,I.a,P.a,C.a,a.s,m.b,x.a,t.M,s.a,f.b,_.a])],AddonCalendarEventPage)}(),k=this&&this.__decorate||function(n,l,e,t){var a,u=arguments.length,o=u<3?l:null===t?t=Object.getOwnPropertyDescriptor(l,e):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,l,e,t);else for(var i=n.length-1;i>=0;i--)(a=n[i])&&(o=(u<3?a(o):u>3?a(l,e,o):a(l,e))||o);return u>3&&o&&Object.defineProperty(l,e,o),o},O=function(){function AddonCalendarEventPageModule(){}return AddonCalendarEventPageModule=k([Object(t.I)({declarations:[A],imports:[o.a,i.a,r.a,a.l.forChild(A),u.b.forChild()]})],AddonCalendarEventPageModule)}(),T=e(1527),L=e(1528),U=e(1529),j=e(1530),D=e(1531),M=e(1532),N=e(1533),S=e(1534),R=e(1535),H=e(1536),$=e(1537),F=e(1538),Y=e(1539),G=e(84),q=e(77),B=e(8),z=e(49),J=e(18),K=e(15),Q=e(2),W=e(22),X=e(6),Z=e(17),nn=e(14),ln=e(20),en=e(29),tn=e(43),an=e(41),un=e(30),on=e(36),rn=e(39),cn=e(78),dn=e(48),_n=e(25),sn=e(251),vn=e(31),fn=e(21),mn=e(19),hn=e(27),gn=e(33),pn=e(7),bn=e(176),En=e(47),In=e(44),Pn=e(485),Cn=e(770),xn=e(326),Vn=e(264),yn=e(23),wn=e(230),An=e(373),kn=e(40),On=e(722),Tn=e(214),Ln=e(35),Un=e(472),jn=e(723),Dn=e(317),Mn=e(250),Nn=e(374),Sn=e(98),Rn=e(90),Hn=e(93),$n=e(81),Fn=e(71),Yn=e(79),Gn=e(94),qn=e(86),Bn=e(183),zn=e(34),Jn=e(109),Kn=e(161),Qn=e(45),Wn=e(215),Xn=e(175),Zn=e(56),nl=e(53),ll=e(70),el=t._29({encapsulation:2,styles:[],data:{}}),tl=t._27("page-addon-calendar-event",A,function View_AddonCalendarEventPage_Host_0(n){return t._57(0,[(n()(),t._31(0,0,null,null,1,"page-addon-calendar-event",[],null,null,null,View_AddonCalendarEventPage_0,el)),t._30(1,180224,null,0,A,[J.a,c.a,ll.a,h.a,v.a,d.a,p.a,b.a,E.a,g.b,I.a,P.a,[2,C.a],ln.a,m.b,x.a,t.M,s.a,f.b,_.a],null,null)],null,null)},{},{},[]),al=e(369),ul=e(370),ol=e(372),il=e(371),rl=e(471),cl=e(721),dl=e(272);e.d(l,"AddonCalendarEventPageModuleNgFactory",function(){return _l});var _l=t._28(O,[],function(n){return t._40([t._41(512,t.o,t._21,[[8,[T.a,L.a,U.a,j.a,D.a,M.a,N.a,S.a,R.a,H.a,$.a,F.a,Y.a,tl]],[3,t.o],t.K]),t._41(4608,pn.m,pn.l,[t.G,[2,pn.w]]),t._41(4608,yn.x,yn.x,[]),t._41(4608,yn.d,yn.d,[]),t._41(4608,al.b,al.a,[]),t._41(4608,ul.a,ul.b,[]),t._41(4608,ol.b,ol.a,[]),t._41(4608,il.b,il.a,[]),t._41(4608,J.a,J.a,[rl.a,al.b,ul.a,ol.b,il.b,J.b,J.c]),t._41(512,pn.b,pn.b,[]),t._41(512,yn.v,yn.v,[]),t._41(512,yn.i,yn.i,[]),t._41(512,yn.s,yn.s,[]),t._41(512,cl.a,cl.a,[]),t._41(512,u.b,u.b,[]),t._41(512,i.a,i.a,[]),t._41(512,r.a,r.a,[]),t._41(512,o.a,o.a,[]),t._41(512,cl.b,cl.b,[]),t._41(512,O,O,[]),t._41(256,J.c,void 0,[]),t._41(256,J.b,void 0,[]),t._41(256,dl.a,A,[])])})}});