text: ﻿/*!
   * jQuery UI Button 1.9.2
   * http://jqueryui.com
   *
   * Copyright 2012 jQuery Foundation and other contributors
   * Released under the MIT license.
   * http://jquery.org/license
   *
   * http://api.jqueryui.com/button/
   *
   * Depends:
   *	jquery.ui.core.js
   *	jquery.ui.widget.js
   */
  (function(n){var i,r,u,t,f="ui-button ui-widget ui-state-default ui-corner-all",s="ui-state-hover ui-state-active ",e="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var t=n(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},o=function(t){var i=t.name,r=t.form,u=n([]);return i&&(u=r?n(r).find("[name='"+i+"']"):n("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),u};n.widget("ui.button",{version:"1.9.2",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h);typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var s=this,e=this.options,c=this.type==="checkbox"||this.type==="radio",a=c?"":"ui-state-active",l="ui-state-focus";e.label===null&&(e.label=this.type==="input"?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);this.buttonElement.addClass(f).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){e.disabled||this===i&&n(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){e.disabled||n(this).removeClass(a)}).bind("click"+this.eventNamespace,function(n){e.disabled&&(n.preventDefault(),n.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){s.buttonElement.addClass(l)}).bind("blur"+this.eventNamespace,function(){s.buttonElement.removeClass(l)});c&&(this.element.bind("change"+this.eventNamespace,function(){t||s.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(n){e.disabled||(t=!1,r=n.pageX,u=n.pageY)}).bind("mouseup"+this.eventNamespace,function(n){e.disabled||(r!==n.pageX||u!==n.pageY)&&(t=!0)}));this.type==="checkbox"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(e.disabled||t)return!1;n(this).toggleClass("ui-state-active");s.buttonElement.attr("aria-pressed",s.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click"+this.eventNamespace,function(){if(e.disabled||t)return!1;n(this).addClass("ui-state-active");s.buttonElement.attr("aria-pressed","true");var i=s.element[0];o(i).not(i).map(function(){return n(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(e.disabled)return!1;n(this).addClass("ui-state-active");i=this;s.document.one("mouseup",function(){i=null})}).bind("mouseup"+this.eventNamespace,function(){if(e.disabled)return!1;n(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(t){if(e.disabled)return!1;(t.keyCode===n.ui.keyCode.SPACE||t.keyCode===n.ui.keyCode.ENTER)&&n(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace,function(){n(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===n.ui.keyCode.SPACE&&n(this).click()}));this._setOption("disabled",e.disabled);this._resetButton()},_determineButtonType:function(){var n,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button";this.type==="checkbox"||this.type==="radio"?(n=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=n.find(t),this.buttonElement.length||(n=n.length?n.siblings():this.element.siblings(),this.buttonElement=n.filter(t),this.buttonElement.length||(this.buttonElement=n.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(f+" "+s+" "+e).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(n,t){if(this._super(n,t),n==="disabled"){t?this.element.prop("disabled",!0):this.element.prop("disabled",!1);return}this._resetButton()},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t);this.type==="radio"?o(this.element[0]).each(function(){n(this).is(":checked")?n(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):n(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&&this.element.val(this.options.label);return}var i=this.buttonElement.removeClass(e),f=n("<span><\/span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,u=t.primary&&t.secondary,r=[];t.primary||t.secondary?(this.options.text&&r.push("ui-button-text-icon"+(u?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<span class='ui-button-icon-primary ui-icon "+t.primary+"'><\/span>"),t.secondary&&i.append("<span class='ui-button-icon-secondary ui-icon "+t.secondary+"'><\/span>"),this.options.text||(r.push(u?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||i.attr("title",n.trim(f)))):r.push("ui-button-text-only");i.addClass(r.join(" "))}});n.widget("ui.buttonset",{version:"1.9.2",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(n,t){n==="disabled"&&this.buttons.button("option",n,t);this._super(n,t)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
  //# sourceMappingURL=jquery.ui.button.min.js.map
  