var eventInputBinding=new Shiny.InputBinding;$.extend(eventInputBinding,{find:function(scope){return $(scope).find(".shinysky-eventinput")},getValue:function(el){var elem=$(el);return{event:elem.data("shinysky-last-event"),event_count:elem.data("shinysky-event-count")}},subscribe:function(el,callback){var elem=$(el);events=elem.data("shinysky-monitored-events").split(" ");events.map(function(x){$(el).on(x+".shinysky-eventinput",function(e){$(el).data("shinysky-last-event",x);$(el).data("shinysky-event-count",parseInt($(el).data("shinysky-event-count"))+1);callback()})})},unsubscribe:function(el){$(el).off(".shinysky-eventinput")}});Shiny.inputBindings.register(eventInputBinding);Shiny.addCustomMessageHandler("shinyalerthandler",function(data){var el=$("#"+data.id);var classes=el.attr("class").split(" ").filter(function(x){return x.substring(0,6)==="alert-"});classes.forEach(function(x){el.removeClass(x)});el.addClass(data["alert.css.style"]);el.addClass("in");el.html(data.HTMLtext);el.fadeIn()});$(document).on("click",".shinyalert",function(){var el=$(this);el.removeClass("in");el.removeClass("fade");el.addClass("out");el.fadeOut("slow")});var shinymessenger=new Shiny.InputBinding;$.extend(shinymessenger,{find:function(scope){return $(scope).find(".shinymessenger")},getValue:function(el){return $(el).data("message")},setValue:function(el,value){},subscribe:function(el,callback){$(el).on("send_message.shinymessenger",function(e){callback()})},unsubscribe:function(el){$(el).off(".shinymessenger")}});Shiny.inputBindings.register(shinymessenger);