YUI.add("moodle-core-maintenancemodetimer",function(t,e){var n=function(){n.superclass.constructor.apply(this,arguments)};t.extend(n,t.Base,{timeleftinsec:0,maintenancenode:t.one(".box.maintenancewarning"),initializer:function(e){this.maintenancenode&&(this.timeleftinsec=e.timeleftinsec,this.maintenancenode.setAttribute("aria-live","polite"),t.later(1e3,this,"updatetimer",null,!0))},updatetimer:function(){if(--this.timeleftinsec,this.timeleftinsec<=0)this.maintenancenode.set("text",M.util.get_string("sitemaintenance","admin"));else{var e={};e.sec=this.timeleftinsec%60,e.min=Math.floor(this.timeleftinsec/60)%60,e.hour=Math.floor(this.timeleftinsec/3600),0<e.hour?this.maintenancenode.set("text",M.util.get_string("maintenancemodeisscheduledlong","admin",e)):this.maintenancenode.set("text",M.util.get_string("maintenancemodeisscheduled","admin",e))}this.timeleftinsec<30?this.maintenancenode.addClass("alert-error").addClass("alert-danger").removeClass("alert-warning"):this.maintenancenode.addClass("alert-warning").removeClass("alert-error").removeClass("alert-danger")}}),M.core=M.core||{},M.core.maintenancemodetimer=M.core.maintenancemodetimer||function(e){return new n(e)}},"@VERSION@",{requires:["base","node"]});