mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +02:00
Add v5.1.2 docs (#35115)
This commit is contained in:
252
docs/5.1/dist/js/bootstrap.bundle.js
vendored
252
docs/5.1/dist/js/bootstrap.bundle.js
vendored
@@ -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
|
||||
|
2
docs/5.1/dist/js/bootstrap.bundle.js.map
vendored
2
docs/5.1/dist/js/bootstrap.bundle.js.map
vendored
File diff suppressed because one or more lines are too long
4
docs/5.1/dist/js/bootstrap.bundle.min.js
vendored
4
docs/5.1/dist/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/5.1/dist/js/bootstrap.bundle.min.js.map
vendored
2
docs/5.1/dist/js/bootstrap.bundle.min.js.map
vendored
File diff suppressed because one or more lines are too long
106
docs/5.1/dist/js/bootstrap.esm.js
vendored
106
docs/5.1/dist/js/bootstrap.esm.js
vendored
@@ -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,7 +7,7 @@ import * as Popper from '@popperjs/core';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -318,7 +318,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -606,7 +606,7 @@ const EventHandler = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -617,7 +617,7 @@ const EventHandler = {
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
const elementMap = new Map();
|
||||
var Data = {
|
||||
const Data = {
|
||||
set(element, key, instance) {
|
||||
if (!elementMap.has(element)) {
|
||||
elementMap.set(element, new Map());
|
||||
@@ -660,7 +660,7 @@ var Data = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -670,7 +670,7 @@ var Data = {
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const VERSION = '5.1.1';
|
||||
const VERSION = '5.1.2';
|
||||
|
||||
class BaseComponent {
|
||||
constructor(element) {
|
||||
@@ -726,7 +726,7 @@ class BaseComponent {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -752,7 +752,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): alert.js
|
||||
* Bootstrap (v5.1.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -841,7 +841,7 @@ defineJQueryPlugin(Alert);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): button.js
|
||||
* Bootstrap (v5.1.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -912,7 +912,7 @@ defineJQueryPlugin(Button);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -986,7 +986,7 @@ const Manipulator = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1056,7 +1056,7 @@ const SelectorEngine = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): carousel.js
|
||||
* Bootstrap (v5.1.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1324,7 +1324,7 @@ class Carousel extends BaseComponent {
|
||||
};
|
||||
|
||||
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) {
|
||||
@@ -1605,7 +1605,7 @@ defineJQueryPlugin(Carousel);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): collapse.js
|
||||
* Bootstrap (v5.1.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1636,6 +1636,7 @@ const CLASS_NAME_SHOW$7 = 'show';
|
||||
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';
|
||||
@@ -1705,7 +1706,7 @@ class Collapse extends BaseComponent {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -1843,7 +1844,7 @@ class Collapse extends BaseComponent {
|
||||
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);
|
||||
|
||||
@@ -1923,7 +1924,7 @@ defineJQueryPlugin(Collapse);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): dropdown.js
|
||||
* Bootstrap (v5.1.2): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2385,7 +2386,7 @@ defineJQueryPlugin(Dropdown);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2489,8 +2490,8 @@ class ScrollBarHelper {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 = {
|
||||
@@ -2613,8 +2614,8 @@ class Backdrop {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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 = {
|
||||
@@ -2716,7 +2717,7 @@ class FocusTrap {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): modal.js
|
||||
* Bootstrap (v5.1.2): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3145,8 +3146,8 @@ defineJQueryPlugin(Modal);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
@@ -3401,42 +3402,42 @@ defineJQueryPlugin(Offcanvas);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
@@ -3488,23 +3489,22 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3514,7 +3514,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): tooltip.js
|
||||
* Bootstrap (v5.1.2): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4224,7 +4224,7 @@ defineJQueryPlugin(Tooltip);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): popover.js
|
||||
* Bootstrap (v5.1.2): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4334,7 +4334,7 @@ defineJQueryPlugin(Popover);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): scrollspy.js
|
||||
* Bootstrap (v5.1.2): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4569,7 +4569,7 @@ defineJQueryPlugin(ScrollSpy);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): tab.js
|
||||
* Bootstrap (v5.1.2): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4767,7 +4767,7 @@ defineJQueryPlugin(Tab);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): toast.js
|
||||
* Bootstrap (v5.1.2): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
2
docs/5.1/dist/js/bootstrap.esm.js.map
vendored
2
docs/5.1/dist/js/bootstrap.esm.js.map
vendored
File diff suppressed because one or more lines are too long
4
docs/5.1/dist/js/bootstrap.esm.min.js
vendored
4
docs/5.1/dist/js/bootstrap.esm.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/5.1/dist/js/bootstrap.esm.min.js.map
vendored
2
docs/5.1/dist/js/bootstrap.esm.min.js.map
vendored
File diff suppressed because one or more lines are too long
130
docs/5.1/dist/js/bootstrap.js
vendored
130
docs/5.1/dist/js/bootstrap.js
vendored
@@ -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,33 +7,31 @@
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
|
||||
typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
|
||||
}(this, (function (Popper) { 'use strict';
|
||||
})(this, (function (Popper) { 'use strict';
|
||||
|
||||
function _interopNamespace(e) {
|
||||
if (e && e.__esModule) return e;
|
||||
var n = Object.create(null);
|
||||
const n = Object.create(null);
|
||||
if (e) {
|
||||
Object.keys(e).forEach(function (k) {
|
||||
for (const k in e) {
|
||||
if (k !== 'default') {
|
||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
||||
const d = Object.getOwnPropertyDescriptor(e, k);
|
||||
Object.defineProperty(n, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return e[k];
|
||||
}
|
||||
get: () => e[k]
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
n['default'] = e;
|
||||
n.default = e;
|
||||
return Object.freeze(n);
|
||||
}
|
||||
|
||||
var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
|
||||
const Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* 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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -344,7 +342,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -632,7 +630,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -643,7 +641,7 @@
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
const elementMap = new Map();
|
||||
var Data = {
|
||||
const Data = {
|
||||
set(element, key, instance) {
|
||||
if (!elementMap.has(element)) {
|
||||
elementMap.set(element, new Map());
|
||||
@@ -686,7 +684,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -696,7 +694,7 @@
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const VERSION = '5.1.1';
|
||||
const VERSION = '5.1.2';
|
||||
|
||||
class BaseComponent {
|
||||
constructor(element) {
|
||||
@@ -752,7 +750,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -778,7 +776,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): alert.js
|
||||
* Bootstrap (v5.1.2): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -867,7 +865,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): button.js
|
||||
* Bootstrap (v5.1.2): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -938,7 +936,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1012,7 +1010,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1082,7 +1080,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): carousel.js
|
||||
* Bootstrap (v5.1.2): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1350,7 +1348,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) {
|
||||
@@ -1631,7 +1629,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): collapse.js
|
||||
* Bootstrap (v5.1.2): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1662,6 +1660,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';
|
||||
@@ -1731,7 +1730,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
|
||||
}
|
||||
|
||||
@@ -1869,7 +1868,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);
|
||||
|
||||
@@ -1949,7 +1948,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): dropdown.js
|
||||
* Bootstrap (v5.1.2): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2411,7 +2410,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2515,8 +2514,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 = {
|
||||
@@ -2639,8 +2638,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 = {
|
||||
@@ -2742,7 +2741,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): modal.js
|
||||
* Bootstrap (v5.1.2): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -3171,8 +3170,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)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
/**
|
||||
@@ -3427,42 +3426,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;
|
||||
}
|
||||
}
|
||||
@@ -3514,23 +3513,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);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -3540,7 +3538,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): tooltip.js
|
||||
* Bootstrap (v5.1.2): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4250,7 +4248,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): popover.js
|
||||
* Bootstrap (v5.1.2): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4360,7 +4358,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): scrollspy.js
|
||||
* Bootstrap (v5.1.2): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4595,7 +4593,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): tab.js
|
||||
* Bootstrap (v5.1.2): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -4793,7 +4791,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.1.1): toast.js
|
||||
* Bootstrap (v5.1.2): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5023,11 +5021,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,
|
||||
@@ -5044,5 +5042,5 @@
|
||||
|
||||
return index_umd;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=bootstrap.js.map
|
||||
|
2
docs/5.1/dist/js/bootstrap.js.map
vendored
2
docs/5.1/dist/js/bootstrap.js.map
vendored
File diff suppressed because one or more lines are too long
4
docs/5.1/dist/js/bootstrap.min.js
vendored
4
docs/5.1/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/5.1/dist/js/bootstrap.min.js.map
vendored
2
docs/5.1/dist/js/bootstrap.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user