Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js/bootstrap.bundle.js')
-rw-r--r--dist/js/bootstrap.bundle.js252
1 files changed, 126 insertions, 126 deletions
diff --git a/dist/js/bootstrap.bundle.js b/dist/js/bootstrap.bundle.js
index a8be9ae7c9..24f04e9ebd 100644
--- a/dist/js/bootstrap.bundle.js
+++ b/dist/js/bootstrap.bundle.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap v5.1.1 (https://getbootstrap.com/)
+ * Bootstrap v5.1.2 (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)
*/
@@ -7,11 +7,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());
-}(this, (function () { 'use strict';
+})(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/index.js
+ * Bootstrap (v5.1.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -322,7 +322,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dom/event-handler.js
+ * Bootstrap (v5.1.2): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -610,7 +610,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dom/data.js
+ * Bootstrap (v5.1.2): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -621,7 +621,7 @@
* ------------------------------------------------------------------------
*/
const elementMap = new Map();
- var Data = {
+ const Data = {
set(element, key, instance) {
if (!elementMap.has(element)) {
elementMap.set(element, new Map());
@@ -664,7 +664,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): base-component.js
+ * Bootstrap (v5.1.2): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -674,7 +674,7 @@
* ------------------------------------------------------------------------
*/
- const VERSION = '5.1.1';
+ const VERSION = '5.1.2';
class BaseComponent {
constructor(element) {
@@ -730,7 +730,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/component-functions.js
+ * Bootstrap (v5.1.2): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -756,7 +756,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): alert.js
+ * Bootstrap (v5.1.2): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -845,7 +845,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): button.js
+ * Bootstrap (v5.1.2): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -916,7 +916,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dom/manipulator.js
+ * Bootstrap (v5.1.2): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -990,7 +990,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dom/selector-engine.js
+ * Bootstrap (v5.1.2): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1060,7 +1060,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): carousel.js
+ * Bootstrap (v5.1.2): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1328,7 +1328,7 @@
};
SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
- EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
+ EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());
});
if (this._pointerEvent) {
@@ -1609,7 +1609,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): collapse.js
+ * Bootstrap (v5.1.2): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1640,6 +1640,7 @@
const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed';
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width';
const HEIGHT = 'height';
@@ -1709,7 +1710,7 @@
let activesData;
if (this._config.parent) {
- const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
}
@@ -1847,7 +1848,7 @@
return;
}
- const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element);
@@ -2068,7 +2069,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var applyStyles$1 = {
+ const applyStyles$1 = {
name: 'applyStyles',
enabled: true,
phase: 'write',
@@ -2081,39 +2082,39 @@
return placement.split('-')[0];
}
- var round$1 = Math.round;
- function getBoundingClientRect(element, includeScale) {
- if (includeScale === void 0) {
- includeScale = false;
- }
+ // import { isHTMLElement } from './instanceOf';
+ function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
+ includeScale) {
var rect = element.getBoundingClientRect();
var scaleX = 1;
- var scaleY = 1;
-
- if (isHTMLElement(element) && includeScale) {
- var offsetHeight = element.offsetHeight;
- var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
- // Fallback to 1 in case both values are `0`
-
- if (offsetWidth > 0) {
- scaleX = rect.width / offsetWidth || 1;
- }
-
- if (offsetHeight > 0) {
- scaleY = rect.height / offsetHeight || 1;
- }
- }
+ var scaleY = 1; // FIXME:
+ // `offsetWidth` returns an integer while `getBoundingClientRect`
+ // returns a float. This results in `scaleX` or `scaleY` being
+ // non-1 when it should be for elements that aren't a full pixel in
+ // width or height.
+ // if (isHTMLElement(element) && includeScale) {
+ // const offsetHeight = element.offsetHeight;
+ // const offsetWidth = element.offsetWidth;
+ // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
+ // // Fallback to 1 in case both values are `0`
+ // if (offsetWidth > 0) {
+ // scaleX = rect.width / offsetWidth || 1;
+ // }
+ // if (offsetHeight > 0) {
+ // scaleY = rect.height / offsetHeight || 1;
+ // }
+ // }
return {
- width: round$1(rect.width / scaleX),
- height: round$1(rect.height / scaleY),
- top: round$1(rect.top / scaleY),
- right: round$1(rect.right / scaleX),
- bottom: round$1(rect.bottom / scaleY),
- left: round$1(rect.left / scaleX),
- x: round$1(rect.left / scaleX),
- y: round$1(rect.top / scaleY)
+ width: rect.width / scaleX,
+ height: rect.height / scaleY,
+ top: rect.top / scaleY,
+ right: rect.right / scaleX,
+ bottom: rect.bottom / scaleY,
+ left: rect.left / scaleX,
+ x: rect.left / scaleX,
+ y: rect.top / scaleY
};
}
@@ -2358,7 +2359,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var arrow$1 = {
+ const arrow$1 = {
name: 'arrow',
enabled: true,
phase: 'main',
@@ -2504,7 +2505,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var computeStyles$1 = {
+ const computeStyles$1 = {
name: 'computeStyles',
enabled: true,
phase: 'beforeWrite',
@@ -2551,7 +2552,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var eventListeners = {
+ const eventListeners = {
name: 'eventListeners',
enabled: true,
phase: 'write',
@@ -3065,7 +3066,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var flip$1 = {
+ const flip$1 = {
name: 'flip',
enabled: true,
phase: 'main',
@@ -3127,7 +3128,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var hide$1 = {
+ const hide$1 = {
name: 'hide',
enabled: true,
phase: 'main',
@@ -3179,7 +3180,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var offset$1 = {
+ const offset$1 = {
name: 'offset',
enabled: true,
phase: 'main',
@@ -3203,7 +3204,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var popperOffsets$1 = {
+ const popperOffsets$1 = {
name: 'popperOffsets',
enabled: true,
phase: 'read',
@@ -3319,7 +3320,7 @@
} // eslint-disable-next-line import/no-unused-modules
- var preventOverflow$1 = {
+ const preventOverflow$1 = {
name: 'preventOverflow',
enabled: true,
phase: 'main',
@@ -3357,9 +3358,9 @@
}
var isOffsetParentAnElement = isHTMLElement(offsetParent);
- var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
+ isHTMLElement(offsetParent) && isElementScaled(offsetParent);
var documentElement = getDocumentElement(offsetParent);
- var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
+ var rect = getBoundingClientRect(elementOrVirtualElement);
var scroll = {
scrollLeft: 0,
scrollTop: 0
@@ -3376,7 +3377,7 @@
}
if (isHTMLElement(offsetParent)) {
- offsets = getBoundingClientRect(offsetParent, true);
+ offsets = getBoundingClientRect(offsetParent);
offsets.x += offsetParent.clientLeft;
offsets.y += offsetParent.clientTop;
} else if (documentElement) {
@@ -3669,41 +3670,41 @@
defaultModifiers: defaultModifiers
}); // eslint-disable-next-line import/no-unused-modules
- var Popper = /*#__PURE__*/Object.freeze({
+ const Popper = /*#__PURE__*/Object.freeze({
__proto__: null,
- popperGenerator: popperGenerator,
- detectOverflow: detectOverflow,
+ popperGenerator,
+ detectOverflow,
createPopperBase: createPopper$2,
- createPopper: createPopper,
+ createPopper,
createPopperLite: createPopper$1,
- top: top,
- bottom: bottom,
- right: right,
- left: left,
- auto: auto,
- basePlacements: basePlacements,
- start: start,
- end: end,
- clippingParents: clippingParents,
- viewport: viewport,
- popper: popper,
- reference: reference,
- variationPlacements: variationPlacements,
- placements: placements,
- beforeRead: beforeRead,
- read: read,
- afterRead: afterRead,
- beforeMain: beforeMain,
- main: main,
- afterMain: afterMain,
- beforeWrite: beforeWrite,
- write: write,
- afterWrite: afterWrite,
- modifierPhases: modifierPhases,
+ top,
+ bottom,
+ right,
+ left,
+ auto,
+ basePlacements,
+ start,
+ end,
+ clippingParents,
+ viewport,
+ popper,
+ reference,
+ variationPlacements,
+ placements,
+ beforeRead,
+ read,
+ afterRead,
+ beforeMain,
+ main,
+ afterMain,
+ beforeWrite,
+ write,
+ afterWrite,
+ modifierPhases,
applyStyles: applyStyles$1,
arrow: arrow$1,
computeStyles: computeStyles$1,
- eventListeners: eventListeners,
+ eventListeners,
flip: flip$1,
hide: hide$1,
offset: offset$1,
@@ -3713,7 +3714,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dropdown.js
+ * Bootstrap (v5.1.2): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4175,7 +4176,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/scrollBar.js
+ * Bootstrap (v5.1.2): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4279,8 +4280,8 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/backdrop.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v5.1.2): util/backdrop.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$7 = {
@@ -4403,8 +4404,8 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/focustrap.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v5.1.2): util/focustrap.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$6 = {
@@ -4506,7 +4507,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): modal.js
+ * Bootstrap (v5.1.2): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4935,8 +4936,8 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): offcanvas.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * Bootstrap (v5.1.2): offcanvas.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
@@ -5191,42 +5192,42 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/sanitizer.js
+ * Bootstrap (v5.1.2): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
- const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
- const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
+ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
- const allowedAttribute = (attr, allowedAttributeList) => {
- const attrName = attr.nodeName.toLowerCase();
+ const allowedAttribute = (attribute, allowedAttributeList) => {
+ const attributeName = attribute.nodeName.toLowerCase();
- if (allowedAttributeList.includes(attrName)) {
- if (uriAttrs.has(attrName)) {
- return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
+ if (allowedAttributeList.includes(attributeName)) {
+ if (uriAttributes.has(attributeName)) {
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
}
return true;
}
- const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
+ const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
- if (regExp[i].test(attrName)) {
+ if (regExp[i].test(attributeName)) {
return true;
}
}
@@ -5278,23 +5279,22 @@
const domParser = new window.DOMParser();
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
- const allowlistKeys = Object.keys(allowList);
const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
for (let i = 0, len = elements.length; i < len; i++) {
- const el = elements[i];
- const elName = el.nodeName.toLowerCase();
+ const element = elements[i];
+ const elementName = element.nodeName.toLowerCase();
- if (!allowlistKeys.includes(elName)) {
- el.remove();
+ if (!Object.keys(allowList).includes(elementName)) {
+ element.remove();
continue;
}
- const attributeList = [].concat(...el.attributes);
- const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
- attributeList.forEach(attr => {
- if (!allowedAttribute(attr, allowedAttributes)) {
- el.removeAttribute(attr.nodeName);
+ const attributeList = [].concat(...element.attributes);
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
+ attributeList.forEach(attribute => {
+ if (!allowedAttribute(attribute, allowedAttributes)) {
+ element.removeAttribute(attribute.nodeName);
}
});
}
@@ -5304,7 +5304,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): tooltip.js
+ * Bootstrap (v5.1.2): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -6014,7 +6014,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): popover.js
+ * Bootstrap (v5.1.2): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -6124,7 +6124,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): scrollspy.js
+ * Bootstrap (v5.1.2): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -6359,7 +6359,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): tab.js
+ * Bootstrap (v5.1.2): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -6557,7 +6557,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): toast.js
+ * Bootstrap (v5.1.2): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -6787,11 +6787,11 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): index.umd.js
+ * Bootstrap (v5.1.2): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
- var index_umd = {
+ const index_umd = {
Alert,
Button,
Carousel,
@@ -6808,5 +6808,5 @@
return index_umd;
-})));
+}));
//# sourceMappingURL=bootstrap.bundle.js.map