From b65a9e25538276343a70897fe47f93b99d69624a Mon Sep 17 00:00:00 2001 From: Manuel Hiebel Date: Fri, 12 Feb 2021 18:27:04 +0100 Subject: Add utils.js (needed by collapse) to bootstrap.min.js --- js/bootstrap.min.js | 8 +++++++- lib/buildcss/package.json | 4 ++-- lib/buildcss/readme.txt | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js index 04c1558..bf7fac1 100644 --- a/js/bootstrap.min.js +++ b/js/bootstrap.min.js @@ -1,6 +1,12 @@ +/*! + * Bootstrap util.js v4.6.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Util=t(e.jQuery)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function i(e){var t=this,i=!1;return n.default(this).one(a.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||a.triggerTransitionEnd(t)}),e),this}var a={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(e){if(!e)return 0;var t=n.default(e).css("transition-duration"),i=n.default(e).css("transition-delay"),a=parseFloat(t),r=parseFloat(i);return a||r?(t=t.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(t)+parseFloat(i))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(e){n.default(e).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],l=t[i],o=l&&a.isElement(l)?"element":null===(s=l)||"undefined"==typeof s?""+s:{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(r).test(o))throw new Error(e.toUpperCase()+': Option "'+i+'" provided type "'+o+'" but expected type "'+r+'".')}var s},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?a.findShadowRoot(e.parentNode):null},jQueryDetection:function(){if("undefined"==typeof n.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=n.default.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};return a.jQueryDetection(),n.default.fn.emulateTransitionEnd=i,n.default.event.special[a.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(e){if(n.default(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}},a})), /*! * Bootstrap collapse.js v4.6.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Collapse=t(e.jQuery,e.Util)}(this,(function(e,t){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=l(e),a=l(t);function i(e,t){for(var l=0;l0&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t,l,u,d=e.prototype;return d.toggle=function(){n.default(this._element).hasClass("show")?this.hide():this.show()},d.show=function(){var t,l,i=this;if(!this._isTransitioning&&!n.default(this._element).hasClass("show")&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(e){return"string"==typeof i._config.parent?e.getAttribute("data-parent")===i._config.parent:e.classList.contains("collapse")}))).length&&(t=null),!(t&&(l=n.default(t).not(this._selector).data(o))&&l._isTransitioning))){var r=n.default.Event("show.bs.collapse");if(n.default(this._element).trigger(r),!r.isDefaultPrevented()){t&&(e._jQueryInterface.call(n.default(t).not(this._selector),"hide"),l||n.default(t).data(o,null));var s=this._getDimension();n.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&n.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var u="scroll"+(s[0].toUpperCase()+s.slice(1)),f=a.default.getTransitionDurationFromElement(this._element);n.default(this._element).one(a.default.TRANSITION_END,(function(){n.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),n.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(f),this._element.style[s]=this._element[u]+"px"}}},d.hide=function(){var e=this;if(!this._isTransitioning&&n.default(this._element).hasClass("show")){var t=n.default.Event("hide.bs.collapse");if(n.default(this._element).trigger(t),!t.isDefaultPrevented()){var l=this._getDimension();this._element.style[l]=this._element.getBoundingClientRect()[l]+"px",a.default.reflow(this._element),n.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var r=0;r0&&(this._selector=o,this._triggerArray.push(l))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t,n,u,c=e.prototype;return c.toggle=function(){i.default(this._element).hasClass("show")?this.hide():this.show()},c.show=function(){var t,n,r=this;if(!this._isTransitioning&&!i.default(this._element).hasClass("show")&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(e){return"string"==typeof r._config.parent?e.getAttribute("data-parent")===r._config.parent:e.classList.contains("collapse")}))).length&&(t=null),!(t&&(n=i.default(t).not(this._selector).data(s))&&n._isTransitioning))){var l=i.default.Event("show.bs.collapse");if(i.default(this._element).trigger(l),!l.isDefaultPrevented()){t&&(e._jQueryInterface.call(i.default(t).not(this._selector),"hide"),n||i.default(t).data(s,null));var o=this._getDimension();i.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[o]=0,this._triggerArray.length&&i.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var u="scroll"+(o[0].toUpperCase()+o.slice(1)),f=a.default.getTransitionDurationFromElement(this._element);i.default(this._element).one(a.default.TRANSITION_END,(function(){i.default(r._element).removeClass("collapsing").addClass("collapse show"),r._element.style[o]="",r.setTransitioning(!1),i.default(r._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(f),this._element.style[o]=this._element[u]+"px"}}},c.hide=function(){var e=this;if(!this._isTransitioning&&i.default(this._element).hasClass("show")){var t=i.default.Event("hide.bs.collapse");if(i.default(this._element).trigger(t),!t.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",a.default.reflow(this._element),i.default(this._element).addClass("collapsing").removeClass("collapse show");var r=this._triggerArray.length;if(r>0)for(var l=0;l