JezK
Edit File: button.min.js
(o=>{function n(t,e){this.$element=o(t),this.options=o.extend({},n.DEFAULTS,e),this.isLoading=!1}function s(s){return this.each(function(){var t=o(this),e=t.data("bs.button");e||t.data("bs.button",e=new n(this,"object"==typeof s&&s)),"toggle"==s?e.toggle():s&&e.setState(s)})}n.VERSION="3.3.5",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",s=this.$element,n=s.is("input")?"val":"html",a=s.data();t+="Text",null==a.resetText&&s.data("resetText",s[n]()),setTimeout(o.proxy(function(){s[n]((null==a[t]?this.options:a)[t]),"loadingText"==t?(this.isLoading=!0,s.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,s.removeClass(e).removeAttr(e))},this),0)},n.prototype.toggle=function(){var t,e=!0,s=this.$element.closest('[data-toggle="buttons"]');s.length?("radio"==(t=this.$element.find("input")).prop("type")?(t.prop("checked")&&(e=!1),s.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==t.prop("type")&&(t.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),t.prop("checked",this.$element.hasClass("active")),e&&t.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};var t=o.fn.button;o.fn.button=s,o.fn.button.Constructor=n,o.fn.button.noConflict=function(){return o.fn.button=t,this},o(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=o(t.target);e.hasClass("btn")||(e=e.closest(".btn")),s.call(e,"toggle"),o(t.target).is('input[type="radio"]')||o(t.target).is('input[type="checkbox"]')||t.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){o(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})})(jQuery);