').append(n.Node.create('').append(n.Node.create('')).append(n.Node.create('')).append(n.Node.create(''))),n.one(document.body).append(e.notificationBase),e.srcNode="#"+t,delete e.buttons,a.superclass.constructor.apply(this,[e])},n.extend(a,n.Panel,{_resizeevent:null,_orientationevent:null,_calculatedzindex:!1,_currentMaskNodeId:null,_originalPosition:null,_hiddenSiblings:null,hideIfNotForm:function(){null===this.get("boundingBox").one(o)&&this.hide()},initializer:function(){var e,t,i,o;!1!==this.get("closeButton")&&(t=this.get("closeButtonTitle"),this.get("buttons").header[0].setAttribute("title",t),this.get("buttons").header[0].setAttribute("aria-label",t)),this._hiddenSiblings=[],this.get("render")&&this.render(),this.after("visibleChange",this.visibilityChanged,this),this.get("center")&&this.centerDialogue(),this.get("modal")&&(this.get(f).set("aria-hidden","true"),this.plug(n.M.core.LockScroll)),this.set("focusOn",n.Array(this.get("focusOn")).filter(function(e){return"focusoutside"!==e.eventName})),(e=this.get("boundingBox")).addClass(u),n.Array.each(this.get("extraClasses"),e.addClass,e),this.get("visible")&&this.applyZIndex(),this.on("maskShow",this.applyZIndex),this.on("maskShow",function(){var e,t=n.one(n.config.win),i=this.get("boundingBox");this.get("center")||(this._originalPosition=i.getXY()),e=this.get("maskNode"),this._currentMaskNodeId!==e.get("_yuid")&&(this._currentMaskNodeId=e.get("_yuid"),e.on("click",this.hideIfNotForm,this)),"fixed"!==i.getStyle("position")&&i.setStyles({top:t.get("scrollTop"),left:t.get("scrollLeft")})},this),i=this.get("notificationBase"),""!==(o=this.get("additionalBaseClass"))&&i.addClass(o),this.after("destroyedChange",function(){this.get(f).remove(!0)},this)},applyZIndex:function(){var i=1040,e=1,t=this.get("boundingBox"),o=this.get("maskNode"),s=this.get("zIndex");0===s||this._calculatedzindex?(n.all(l+", "+d+", "+r+u).each(function(e){var t=this.findZIndex(e);i'),e=o.Node.create('').append(o.Node.create(''+this.get("message")+"
")).append(o.Node.create('').append(t)),this.get("notificationBase").addClass("moodle-dialogue-confirm"),this.setStdModContent(o.WidgetStdMod.BODY,e,o.WidgetStdMod.REPLACE),this.setStdModContent(o.WidgetStdMod.HEADER,''+this.get("title")+"
",o.WidgetStdMod.REPLACE),this._closeEvents.push(o.on("key",this.submit,window,"down:13",this),t.on("click",this.submit,this)),(i=this.get("boundingBox").one(".closebutton"))&&this._closeEvents.push(i.on("click",this.submit,this))},submit:function(){new o.EventHandle(this._closeEvents).detach(),this.fire("complete"),this.hide(),this.destroy()}},{NAME:e,CSS_PREFIX:"moodle-dialogue",ATTRS:{title:{validator:o.Lang.isString,value:"Alert"},message:{validator:o.Lang.isString,value:"Confirm"},yesLabel:{validator:o.Lang.isString,setter:function(t){return t=t||"OK"},value:"OK"}}}),M.core.alert=i},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});YUI.add("moodle-core-notification-confirm",function(i,t){var e,o;M.core=M.core||{},e="Moodle confirmation dialogue",o=function(t){o.superclass.constructor.apply(this,[t])},i.extend(o,M.core.notification.info,{_closeEvents:null,_yesButton:null,_noButton:null,_question:null,initializer:function(){var t,e;this._closeEvents=[],this.publish("complete"),this.publish("complete-yes"),this.publish("complete-no"),this._yesButton=i.Node.create(''),this._noButton=i.Node.create(''),this._question=i.Node.create(''+this.get("question")+"
"),t=i.Node.create('').append(this._question).append(i.Node.create('').append(this._yesButton).append(this._noButton)),this.get("notificationBase").addClass("moodle-dialogue-confirm"),this.setStdModContent(i.WidgetStdMod.BODY,t,i.WidgetStdMod.REPLACE),this.setStdModContent(i.WidgetStdMod.HEADER,''+this.get("title")+"
",i.WidgetStdMod.REPLACE),this._closeEvents.push(i.on("key",this.submit,window,"down:27",this,!1),this._yesButton.on("click",this.submit,this,!0),this._noButton.on("click",this.submit,this,!1)),(e=this.get("boundingBox").one(".closebutton"))&&this._closeEvents.push(e.on("click",this.submit,this))},submit:function(t,e){new i.EventHandle(this._closeEvents).detach(),this.fire("complete",e),e?this.fire("complete-yes"):this.fire("complete-no"),this.hide(),this.destroy()}},{NAME:e,CSS_PREFIX:"moodle-dialogue",ATTRS:{yesLabel:{validator:i.Lang.isString,valueFn:function(){return M.util.get_string("yes","moodle")},setter:function(t){return this._yesButton&&this._yesButton.set("value",t),t}},noLabel:{validator:i.Lang.isString,valueFn:function(){return M.util.get_string("no","moodle")},setter:function(t){return this._noButton&&this._noButton.set("value",t),t}},title:{validator:i.Lang.isString,value:M.util.get_string("confirm","moodle")},question:{validator:i.Lang.isString,valueFn:function(){return M.util.get_string("areyousure","moodle")},setter:function(t){return this._question&&this._question.set("value",t),t}}}}),i.augment(o,i.EventTarget),M.core.confirm=o},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});YUI.add("moodle-core-notification-exception",function(l,e){var i,a;M.core=M.core||{},i="Moodle exception",a=function(i){var e,t=l.mix({},i);t.width=t.width||M.cfg.developerdebug?Math.floor(l.one(document.body).get("winWidth")/3)+"px":null,t.closeButton=!0,e=["message","name","fileName","lineNumber","stack"],l.Array.each(e,function(e){t[e]=i[e]}),a.superclass.constructor.apply(this,[t])},l.extend(a,M.core.notification.info,{_hideTimeout:null,_keypress:null,initializer:function(e){var i,t=this,a=this.get("hideTimeoutDelay"),o=M.util.get_string("labelsep","langconfig");this.get("notificationBase").addClass("moodle-dialogue-exception"),this.setStdModContent(l.WidgetStdMod.HEADER,'",l.WidgetStdMod.REPLACE),i=l.Node.create('').append(l.Node.create(''+l.Escape.html(this.get("message"))+"
")).append(l.Node.create(' "+l.Escape.html(this.get("fileName"))+"
")).append(l.Node.create(' "+l.Escape.html(this.get("lineNumber"))+"
")).append(l.Node.create(' "+this.get("stack")+" ")),M.cfg.developerdebug&&i.all(".moodle-exception-param").removeClass("hidden"),this.setStdModContent(l.WidgetStdMod.BODY,i,l.WidgetStdMod.REPLACE),a&&(this._hideTimeout=setTimeout(function(){t.hide()},a)),this.after("visibleChange",this.visibilityChanged,this),this._keypress=l.on("key",this.hide,window,"down:13,27",this),this.centerDialogue()},visibilityChanged:function(e){if("visible"===e.attrName&&e.prevVal&&!e.newVal){this._keypress&&this._keypress.detach();var i=this;setTimeout(function(){i.destroy()},1e3)}}},{NAME:i,CSS_PREFIX:"moodle-dialogue",ATTRS:{message:{value:""},name:{value:""},fileName:{value:""},lineNumber:{value:""},stack:{setter:function(e){var i,t=l.Escape.html(e).split("\n"),a=new RegExp("^(.+)@("+M.cfg.wwwroot+")?(.{0,75}).*:(\\d+)$");for(i in t)t[i]=t[i].replace(a,"ln: $4
$3
$1
");return t.join("\n")},value:""},hideTimeoutDelay:{validator:l.Lang.isNumber,value:null}}}),M.core.exception=a},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});YUI.add("moodle-core-notification-ajaxexception",function(d,e){var t,i;M.core=M.core||{},t="Moodle AJAX exception",i=function(e){e.name=e.name||M.util.get_string("error","moodle"),e.closeButton=!0,i.superclass.constructor.apply(this,[e])},d.extend(i,M.core.notification.info,{_keypress:null,initializer:function(e){var t,i=this,o=this.get("hideTimeoutDelay"),a=M.util.get_string("labelsep","langconfig");this.get("notificationBase").addClass("moodle-dialogue-exception"),this.setStdModContent(d.WidgetStdMod.HEADER,''+d.Escape.html(e.name)+"
",d.WidgetStdMod.REPLACE),t=d.Node.create('').append(d.Node.create(''+d.Escape.html(this.get("error"))+"
")).append(d.Node.create(' "+this.get("reproductionlink")+"
")).append(d.Node.create(' "+d.Escape.html(this.get("debuginfo"))+"
")).append(d.Node.create(' "+d.Escape.html(this.get("stacktrace"))+" ")),M.cfg.developerdebug&&t.all(".moodle-exception-param").removeClass("hidden"),this.setStdModContent(d.WidgetStdMod.BODY,t,d.WidgetStdMod.REPLACE),o&&(this._hideTimeout=setTimeout(function(){i.hide()},o)),this.after("visibleChange",this.visibilityChanged,this),this._keypress=d.on("key",this.hide,window,"down:13, 27",this),this.centerDialogue()},visibilityChanged:function(e){if("visible"===e.attrName&&e.prevVal&&!e.newVal){var t=this;this._keypress.detach(),setTimeout(function(){t.destroy()},1e3)}}},{NAME:t,CSS_PREFIX:"moodle-dialogue",ATTRS:{error:{validator:d.Lang.isString,value:M.util.get_string("unknownerror","moodle")},debuginfo:{value:null},stacktrace:{value:null},reproductionlink:{setter:function(e){return null!==e&&(e=''+e.replace(M.cfg.wwwroot,"")+""),e},value:null},hideTimeoutDelay:{validator:d.Lang.isNumber,value:null}}}),M.core.ajaxException=i},"@VERSION@",{requires:["moodle-core-notification-dialogue"]});YUI.add("moodle-core-notification",function(o,i){},"@VERSION@",{requires:["moodle-core-notification-dialogue","moodle-core-notification-alert","moodle-core-notification-confirm","moodle-core-notification-exception","moodle-core-notification-ajaxexception"]});