0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-05 03:52:21 +01:00
Bootstrap/dist/js/bootstrap.min.js

7 lines
50 KiB
JavaScript
Raw Normal View History

/*!
2017-10-19 09:40:37 -07:00
* Bootstrap v4.0.0-beta.2 (https://getbootstrap.com)
2017-09-05 21:05:12 -07:00
* Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
2017-10-30 12:48:13 -07:00
var bootstrap=function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var s=function(t){function e(t){return{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function n(){return{bindType:r.end,delegateType:r.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}}function i(){if(window.QUnit)return!1;var t=document.createElement("bootstrap");for(var e in o)if("undefined"!=typeof t.style[e])return{end:o[e]};return!1}function s(e){var n=this,i=!1;return t(this).one(a.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||a.triggerTransitionEnd(n)},e),this}var r=!1,o={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"},a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n=e.getAttribute("data-target");n&&"#"!==n||(n=e.getAttribute("href")||"");try{return t(document).find(n).length>0?n:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(e){t(e).trigger(r.end)},supportsTransitionEnd:function(){return Boolean(r)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,n,i){for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var r=i[s],o=n[s],l=o&&a.isElement(o)?"element":e(o);if(!new RegExp(r).test(l))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+l+'" but expected type "'+r+'".')}}};return r=i(),t.fn.emulateTransitionEnd=s,a.supportsTransitionEnd()&&(t.event.special[a.TRANSITION_END]=n()),a}(e),r=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},a=function(t){var e="alert",n=t.fn[e],i={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},o={ALERT:"alert",FADE:"fade",SHOW:"show"},a=function(){function e(t){this._element=t}var n=e.prototype;return n.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){t.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(e){var n=s.getSelectorFromElement(e),i=!1;return n&&(i=t(n)[0]),i||(i=t(e).closest("."+o.ALERT)[0]),i},n._triggerCloseEvent=function(e){var n=t.Event(i.CLOSE);return t(e).trigger(n),n},n._removeElement=function(e){var n=this;t(e).removeClass(o.SHOW),s.supportsTransitionEnd()&&t(e).hasClass(o.FADE)?t(e).one(s.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(150):this._destroyElement(e)},n._destroyElement=function(e){t(e).detach().trigger(i.CLOSED).remove()},e._jQueryInterface=function(n){return this.each(function(){var i=t(this),s=i.data("bs.alert");s||(s=new e(this),i.data("bs.alert",s)),"close"===n&&s[n](this)})},e._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},r(e,null,[{key:"VERSION",get:function(){return"4.0.0-beta.2"}}]),e}();return t(document).on(i.CLICK_DATA_API,{DISMISS:'[data-dismiss="alert"]'}.DISMISS,a._handleDismiss(new a)),t.fn[e]=a._jQueryInterface,t.fn[e].Constructor=a,t.fn[e].noConflict=function(){return t.fn[e]=n,a._jQueryInterface},a}(e),l=function(t){var e="button",n=t.fn[e],i={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},s={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},o={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},a=function(){function e(t){this._element=t}var n=e.prototype;return n.toggle=function(){var e=!0,n=!0,r=t(this._element).closest(s.DATA_TOGGLE)[0];if(r){var o=t(this._element).find(s.INPUT)[0];if(o){if("radio"===o.type)if(o.checked&&t(this._element).hasClass
2017-10-19 00:17:08 -07:00
//# sourceMappingURL=bootstrap.min.js.map