File indexing completed on 2026-04-09 07:58:25
0001
0002
0003
0004
0005
0006 (function (global, factory) {
0007 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
0008 typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
0009 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
0010 }(this, (function (Popper) { 'use strict';
0011
0012 function _interopNamespace(e) {
0013 if (e && e.__esModule) return e;
0014 var n = Object.create(null);
0015 if (e) {
0016 Object.keys(e).forEach(function (k) {
0017 if (k !== 'default') {
0018 var d = Object.getOwnPropertyDescriptor(e, k);
0019 Object.defineProperty(n, k, d.get ? d : {
0020 enumerable: true,
0021 get: function () {
0022 return e[k];
0023 }
0024 });
0025 }
0026 });
0027 }
0028 n['default'] = e;
0029 return Object.freeze(n);
0030 }
0031
0032 var Popper__namespace = _interopNamespace(Popper);
0033
0034 function _defineProperties(target, props) {
0035 for (var i = 0; i < props.length; i++) {
0036 var descriptor = props[i];
0037 descriptor.enumerable = descriptor.enumerable || false;
0038 descriptor.configurable = true;
0039 if ("value" in descriptor) descriptor.writable = true;
0040 Object.defineProperty(target, descriptor.key, descriptor);
0041 }
0042 }
0043
0044 function _createClass(Constructor, protoProps, staticProps) {
0045 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
0046 if (staticProps) _defineProperties(Constructor, staticProps);
0047 return Constructor;
0048 }
0049
0050 function _extends() {
0051 _extends = Object.assign || function (target) {
0052 for (var i = 1; i < arguments.length; i++) {
0053 var source = arguments[i];
0054
0055 for (var key in source) {
0056 if (Object.prototype.hasOwnProperty.call(source, key)) {
0057 target[key] = source[key];
0058 }
0059 }
0060 }
0061
0062 return target;
0063 };
0064
0065 return _extends.apply(this, arguments);
0066 }
0067
0068 function _inheritsLoose(subClass, superClass) {
0069 subClass.prototype = Object.create(superClass.prototype);
0070 subClass.prototype.constructor = subClass;
0071 subClass.__proto__ = superClass;
0072 }
0073
0074
0075
0076
0077
0078
0079
0080 var MAX_UID = 1000000;
0081 var MILLISECONDS_MULTIPLIER = 1000;
0082 var TRANSITION_END = 'transitionend';
0083
0084 var toType = function toType(obj) {
0085 if (obj === null || obj === undefined) {
0086 return "" + obj;
0087 }
0088
0089 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
0090 };
0091
0092
0093
0094
0095
0096
0097
0098 var getUID = function getUID(prefix) {
0099 do {
0100 prefix += Math.floor(Math.random() * MAX_UID);
0101 } while (document.getElementById(prefix));
0102
0103 return prefix;
0104 };
0105
0106 var getSelector = function getSelector(element) {
0107 var selector = element.getAttribute('data-bs-target');
0108
0109 if (!selector || selector === '#') {
0110 var hrefAttr = element.getAttribute('href');
0111 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
0112 }
0113
0114 return selector;
0115 };
0116
0117 var getSelectorFromElement = function getSelectorFromElement(element) {
0118 var selector = getSelector(element);
0119
0120 if (selector) {
0121 return document.querySelector(selector) ? selector : null;
0122 }
0123
0124 return null;
0125 };
0126
0127 var getElementFromSelector = function getElementFromSelector(element) {
0128 var selector = getSelector(element);
0129 return selector ? document.querySelector(selector) : null;
0130 };
0131
0132 var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
0133 if (!element) {
0134 return 0;
0135 }
0136
0137
0138 var _window$getComputedSt = window.getComputedStyle(element),
0139 transitionDuration = _window$getComputedSt.transitionDuration,
0140 transitionDelay = _window$getComputedSt.transitionDelay;
0141
0142 var floatTransitionDuration = Number.parseFloat(transitionDuration);
0143 var floatTransitionDelay = Number.parseFloat(transitionDelay);
0144
0145 if (!floatTransitionDuration && !floatTransitionDelay) {
0146 return 0;
0147 }
0148
0149
0150 transitionDuration = transitionDuration.split(',')[0];
0151 transitionDelay = transitionDelay.split(',')[0];
0152 return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
0153 };
0154
0155 var triggerTransitionEnd = function triggerTransitionEnd(element) {
0156 element.dispatchEvent(new Event(TRANSITION_END));
0157 };
0158
0159 var isElement = function isElement(obj) {
0160 return (obj[0] || obj).nodeType;
0161 };
0162
0163 var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
0164 var called = false;
0165 var durationPadding = 5;
0166 var emulatedDuration = duration + durationPadding;
0167
0168 function listener() {
0169 called = true;
0170 element.removeEventListener(TRANSITION_END, listener);
0171 }
0172
0173 element.addEventListener(TRANSITION_END, listener);
0174 setTimeout(function () {
0175 if (!called) {
0176 triggerTransitionEnd(element);
0177 }
0178 }, emulatedDuration);
0179 };
0180
0181 var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
0182 Object.keys(configTypes).forEach(function (property) {
0183 var expectedTypes = configTypes[property];
0184 var value = config[property];
0185 var valueType = value && isElement(value) ? 'element' : toType(value);
0186
0187 if (!new RegExp(expectedTypes).test(valueType)) {
0188 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
0189 }
0190 });
0191 };
0192
0193 var isVisible = function isVisible(element) {
0194 if (!element) {
0195 return false;
0196 }
0197
0198 if (element.style && element.parentNode && element.parentNode.style) {
0199 var elementStyle = getComputedStyle(element);
0200 var parentNodeStyle = getComputedStyle(element.parentNode);
0201 return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
0202 }
0203
0204 return false;
0205 };
0206
0207 var findShadowRoot = function findShadowRoot(element) {
0208 if (!document.documentElement.attachShadow) {
0209 return null;
0210 }
0211
0212
0213 if (typeof element.getRootNode === 'function') {
0214 var root = element.getRootNode();
0215 return root instanceof ShadowRoot ? root : null;
0216 }
0217
0218 if (element instanceof ShadowRoot) {
0219 return element;
0220 }
0221
0222
0223 if (!element.parentNode) {
0224 return null;
0225 }
0226
0227 return findShadowRoot(element.parentNode);
0228 };
0229
0230 var noop = function noop() {
0231 return function () {};
0232 };
0233
0234 var reflow = function reflow(element) {
0235 return element.offsetHeight;
0236 };
0237
0238 var getjQuery = function getjQuery() {
0239 var _window = window,
0240 jQuery = _window.jQuery;
0241
0242 if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
0243 return jQuery;
0244 }
0245
0246 return null;
0247 };
0248
0249 var onDOMContentLoaded = function onDOMContentLoaded(callback) {
0250 if (document.readyState === 'loading') {
0251 document.addEventListener('DOMContentLoaded', callback);
0252 } else {
0253 callback();
0254 }
0255 };
0256
0257 var isRTL = document.documentElement.dir === 'rtl';
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271 var mapData = function () {
0272 var storeData = {};
0273 var id = 1;
0274 return {
0275 set: function set(element, key, data) {
0276 if (typeof element.bsKey === 'undefined') {
0277 element.bsKey = {
0278 key: key,
0279 id: id
0280 };
0281 id++;
0282 }
0283
0284 storeData[element.bsKey.id] = data;
0285 },
0286 get: function get(element, key) {
0287 if (!element || typeof element.bsKey === 'undefined') {
0288 return null;
0289 }
0290
0291 var keyProperties = element.bsKey;
0292
0293 if (keyProperties.key === key) {
0294 return storeData[keyProperties.id];
0295 }
0296
0297 return null;
0298 },
0299 delete: function _delete(element, key) {
0300 if (typeof element.bsKey === 'undefined') {
0301 return;
0302 }
0303
0304 var keyProperties = element.bsKey;
0305
0306 if (keyProperties.key === key) {
0307 delete storeData[keyProperties.id];
0308 delete element.bsKey;
0309 }
0310 }
0311 };
0312 }();
0313
0314 var Data = {
0315 setData: function setData(instance, key, data) {
0316 mapData.set(instance, key, data);
0317 },
0318 getData: function getData(instance, key) {
0319 return mapData.get(instance, key);
0320 },
0321 removeData: function removeData(instance, key) {
0322 mapData.delete(instance, key);
0323 }
0324 };
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338 var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
0339 var stripNameRegex = /\..*/;
0340 var stripUidRegex = /::\d+$/;
0341 var eventRegistry = {};
0342
0343 var uidEvent = 1;
0344 var customEvents = {
0345 mouseenter: 'mouseover',
0346 mouseleave: 'mouseout'
0347 };
0348 var nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
0349
0350
0351
0352
0353
0354
0355 function getUidEvent(element, uid) {
0356 return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
0357 }
0358
0359 function getEvent(element) {
0360 var uid = getUidEvent(element);
0361 element.uidEvent = uid;
0362 eventRegistry[uid] = eventRegistry[uid] || {};
0363 return eventRegistry[uid];
0364 }
0365
0366 function bootstrapHandler(element, fn) {
0367 return function handler(event) {
0368 event.delegateTarget = element;
0369
0370 if (handler.oneOff) {
0371 EventHandler.off(element, event.type, fn);
0372 }
0373
0374 return fn.apply(element, [event]);
0375 };
0376 }
0377
0378 function bootstrapDelegationHandler(element, selector, fn) {
0379 return function handler(event) {
0380 var domElements = element.querySelectorAll(selector);
0381
0382 for (var target = event.target; target && target !== this; target = target.parentNode) {
0383 for (var i = domElements.length; i--;) {
0384 if (domElements[i] === target) {
0385 event.delegateTarget = target;
0386
0387 if (handler.oneOff) {
0388 EventHandler.off(element, event.type, fn);
0389 }
0390
0391 return fn.apply(target, [event]);
0392 }
0393 }
0394 }
0395
0396
0397 return null;
0398 };
0399 }
0400
0401 function findHandler(events, handler, delegationSelector) {
0402 if (delegationSelector === void 0) {
0403 delegationSelector = null;
0404 }
0405
0406 var uidEventList = Object.keys(events);
0407
0408 for (var i = 0, len = uidEventList.length; i < len; i++) {
0409 var event = events[uidEventList[i]];
0410
0411 if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
0412 return event;
0413 }
0414 }
0415
0416 return null;
0417 }
0418
0419 function normalizeParams(originalTypeEvent, handler, delegationFn) {
0420 var delegation = typeof handler === 'string';
0421 var originalHandler = delegation ? delegationFn : handler;
0422
0423 var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
0424 var custom = customEvents[typeEvent];
0425
0426 if (custom) {
0427 typeEvent = custom;
0428 }
0429
0430 var isNative = nativeEvents.has(typeEvent);
0431
0432 if (!isNative) {
0433 typeEvent = originalTypeEvent;
0434 }
0435
0436 return [delegation, originalHandler, typeEvent];
0437 }
0438
0439 function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
0440 if (typeof originalTypeEvent !== 'string' || !element) {
0441 return;
0442 }
0443
0444 if (!handler) {
0445 handler = delegationFn;
0446 delegationFn = null;
0447 }
0448
0449 var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
0450 delegation = _normalizeParams[0],
0451 originalHandler = _normalizeParams[1],
0452 typeEvent = _normalizeParams[2];
0453
0454 var events = getEvent(element);
0455 var handlers = events[typeEvent] || (events[typeEvent] = {});
0456 var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
0457
0458 if (previousFn) {
0459 previousFn.oneOff = previousFn.oneOff && oneOff;
0460 return;
0461 }
0462
0463 var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
0464 var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
0465 fn.delegationSelector = delegation ? handler : null;
0466 fn.originalHandler = originalHandler;
0467 fn.oneOff = oneOff;
0468 fn.uidEvent = uid;
0469 handlers[uid] = fn;
0470 element.addEventListener(typeEvent, fn, delegation);
0471 }
0472
0473 function removeHandler(element, events, typeEvent, handler, delegationSelector) {
0474 var fn = findHandler(events[typeEvent], handler, delegationSelector);
0475
0476 if (!fn) {
0477 return;
0478 }
0479
0480 element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
0481 delete events[typeEvent][fn.uidEvent];
0482 }
0483
0484 function removeNamespacedHandlers(element, events, typeEvent, namespace) {
0485 var storeElementEvent = events[typeEvent] || {};
0486 Object.keys(storeElementEvent).forEach(function (handlerKey) {
0487 if (handlerKey.includes(namespace)) {
0488 var event = storeElementEvent[handlerKey];
0489 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
0490 }
0491 });
0492 }
0493
0494 var EventHandler = {
0495 on: function on(element, event, handler, delegationFn) {
0496 addHandler(element, event, handler, delegationFn, false);
0497 },
0498 one: function one(element, event, handler, delegationFn) {
0499 addHandler(element, event, handler, delegationFn, true);
0500 },
0501 off: function off(element, originalTypeEvent, handler, delegationFn) {
0502 if (typeof originalTypeEvent !== 'string' || !element) {
0503 return;
0504 }
0505
0506 var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
0507 delegation = _normalizeParams2[0],
0508 originalHandler = _normalizeParams2[1],
0509 typeEvent = _normalizeParams2[2];
0510
0511 var inNamespace = typeEvent !== originalTypeEvent;
0512 var events = getEvent(element);
0513 var isNamespace = originalTypeEvent.startsWith('.');
0514
0515 if (typeof originalHandler !== 'undefined') {
0516
0517 if (!events || !events[typeEvent]) {
0518 return;
0519 }
0520
0521 removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
0522 return;
0523 }
0524
0525 if (isNamespace) {
0526 Object.keys(events).forEach(function (elementEvent) {
0527 removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
0528 });
0529 }
0530
0531 var storeElementEvent = events[typeEvent] || {};
0532 Object.keys(storeElementEvent).forEach(function (keyHandlers) {
0533 var handlerKey = keyHandlers.replace(stripUidRegex, '');
0534
0535 if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
0536 var event = storeElementEvent[keyHandlers];
0537 removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
0538 }
0539 });
0540 },
0541 trigger: function trigger(element, event, args) {
0542 if (typeof event !== 'string' || !element) {
0543 return null;
0544 }
0545
0546 var $ = getjQuery();
0547 var typeEvent = event.replace(stripNameRegex, '');
0548 var inNamespace = event !== typeEvent;
0549 var isNative = nativeEvents.has(typeEvent);
0550 var jQueryEvent;
0551 var bubbles = true;
0552 var nativeDispatch = true;
0553 var defaultPrevented = false;
0554 var evt = null;
0555
0556 if (inNamespace && $) {
0557 jQueryEvent = $.Event(event, args);
0558 $(element).trigger(jQueryEvent);
0559 bubbles = !jQueryEvent.isPropagationStopped();
0560 nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
0561 defaultPrevented = jQueryEvent.isDefaultPrevented();
0562 }
0563
0564 if (isNative) {
0565 evt = document.createEvent('HTMLEvents');
0566 evt.initEvent(typeEvent, bubbles, true);
0567 } else {
0568 evt = new CustomEvent(event, {
0569 bubbles: bubbles,
0570 cancelable: true
0571 });
0572 }
0573
0574
0575 if (typeof args !== 'undefined') {
0576 Object.keys(args).forEach(function (key) {
0577 Object.defineProperty(evt, key, {
0578 get: function get() {
0579 return args[key];
0580 }
0581 });
0582 });
0583 }
0584
0585 if (defaultPrevented) {
0586 evt.preventDefault();
0587 }
0588
0589 if (nativeDispatch) {
0590 element.dispatchEvent(evt);
0591 }
0592
0593 if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
0594 jQueryEvent.preventDefault();
0595 }
0596
0597 return evt;
0598 }
0599 };
0600
0601
0602
0603
0604
0605
0606
0607 var VERSION = '5.0.0-beta1';
0608
0609 var BaseComponent = function () {
0610 function BaseComponent(element) {
0611 if (!element) {
0612 return;
0613 }
0614
0615 this._element = element;
0616 Data.setData(element, this.constructor.DATA_KEY, this);
0617 }
0618
0619 var _proto = BaseComponent.prototype;
0620
0621 _proto.dispose = function dispose() {
0622 Data.removeData(this._element, this.constructor.DATA_KEY);
0623 this._element = null;
0624 }
0625
0626 ;
0627
0628 BaseComponent.getInstance = function getInstance(element) {
0629 return Data.getData(element, this.DATA_KEY);
0630 };
0631
0632 _createClass(BaseComponent, null, [{
0633 key: "VERSION",
0634 get: function get() {
0635 return VERSION;
0636 }
0637 }]);
0638
0639 return BaseComponent;
0640 }();
0641
0642
0643
0644
0645
0646
0647
0648 var NAME = 'alert';
0649 var DATA_KEY = 'bs.alert';
0650 var EVENT_KEY = "." + DATA_KEY;
0651 var DATA_API_KEY = '.data-api';
0652 var SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
0653 var EVENT_CLOSE = "close" + EVENT_KEY;
0654 var EVENT_CLOSED = "closed" + EVENT_KEY;
0655 var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
0656 var CLASSNAME_ALERT = 'alert';
0657 var CLASSNAME_FADE = 'fade';
0658 var CLASSNAME_SHOW = 'show';
0659
0660
0661
0662
0663
0664
0665 var Alert = function (_BaseComponent) {
0666 _inheritsLoose(Alert, _BaseComponent);
0667
0668 function Alert() {
0669 return _BaseComponent.apply(this, arguments) || this;
0670 }
0671
0672 var _proto = Alert.prototype;
0673
0674
0675 _proto.close = function close(element) {
0676 var rootElement = element ? this._getRootElement(element) : this._element;
0677
0678 var customEvent = this._triggerCloseEvent(rootElement);
0679
0680 if (customEvent === null || customEvent.defaultPrevented) {
0681 return;
0682 }
0683
0684 this._removeElement(rootElement);
0685 }
0686 ;
0687
0688 _proto._getRootElement = function _getRootElement(element) {
0689 return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
0690 };
0691
0692 _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
0693 return EventHandler.trigger(element, EVENT_CLOSE);
0694 };
0695
0696 _proto._removeElement = function _removeElement(element) {
0697 var _this = this;
0698
0699 element.classList.remove(CLASSNAME_SHOW);
0700
0701 if (!element.classList.contains(CLASSNAME_FADE)) {
0702 this._destroyElement(element);
0703
0704 return;
0705 }
0706
0707 var transitionDuration = getTransitionDurationFromElement(element);
0708 EventHandler.one(element, TRANSITION_END, function () {
0709 return _this._destroyElement(element);
0710 });
0711 emulateTransitionEnd(element, transitionDuration);
0712 };
0713
0714 _proto._destroyElement = function _destroyElement(element) {
0715 if (element.parentNode) {
0716 element.parentNode.removeChild(element);
0717 }
0718
0719 EventHandler.trigger(element, EVENT_CLOSED);
0720 }
0721 ;
0722
0723 Alert.jQueryInterface = function jQueryInterface(config) {
0724 return this.each(function () {
0725 var data = Data.getData(this, DATA_KEY);
0726
0727 if (!data) {
0728 data = new Alert(this);
0729 }
0730
0731 if (config === 'close') {
0732 data[config](this);
0733 }
0734 });
0735 };
0736
0737 Alert.handleDismiss = function handleDismiss(alertInstance) {
0738 return function (event) {
0739 if (event) {
0740 event.preventDefault();
0741 }
0742
0743 alertInstance.close(this);
0744 };
0745 };
0746
0747 _createClass(Alert, null, [{
0748 key: "DATA_KEY",
0749
0750 get: function get() {
0751 return DATA_KEY;
0752 }
0753 }]);
0754
0755 return Alert;
0756 }(BaseComponent);
0757
0758
0759
0760
0761
0762
0763
0764 EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
0765
0766
0767
0768
0769
0770
0771
0772 onDOMContentLoaded(function () {
0773 var $ = getjQuery();
0774
0775
0776 if ($) {
0777 var JQUERY_NO_CONFLICT = $.fn[NAME];
0778 $.fn[NAME] = Alert.jQueryInterface;
0779 $.fn[NAME].Constructor = Alert;
0780
0781 $.fn[NAME].noConflict = function () {
0782 $.fn[NAME] = JQUERY_NO_CONFLICT;
0783 return Alert.jQueryInterface;
0784 };
0785 }
0786 });
0787
0788
0789
0790
0791
0792
0793
0794 var NAME$1 = 'button';
0795 var DATA_KEY$1 = 'bs.button';
0796 var EVENT_KEY$1 = "." + DATA_KEY$1;
0797 var DATA_API_KEY$1 = '.data-api';
0798 var CLASS_NAME_ACTIVE = 'active';
0799 var SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
0800 var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1;
0801
0802
0803
0804
0805
0806
0807 var Button = function (_BaseComponent) {
0808 _inheritsLoose(Button, _BaseComponent);
0809
0810 function Button() {
0811 return _BaseComponent.apply(this, arguments) || this;
0812 }
0813
0814 var _proto = Button.prototype;
0815
0816
0817 _proto.toggle = function toggle() {
0818
0819 this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
0820 }
0821 ;
0822
0823 Button.jQueryInterface = function jQueryInterface(config) {
0824 return this.each(function () {
0825 var data = Data.getData(this, DATA_KEY$1);
0826
0827 if (!data) {
0828 data = new Button(this);
0829 }
0830
0831 if (config === 'toggle') {
0832 data[config]();
0833 }
0834 });
0835 };
0836
0837 _createClass(Button, null, [{
0838 key: "DATA_KEY",
0839
0840 get: function get() {
0841 return DATA_KEY$1;
0842 }
0843 }]);
0844
0845 return Button;
0846 }(BaseComponent);
0847
0848
0849
0850
0851
0852
0853
0854 EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE, function (event) {
0855 event.preventDefault();
0856 var button = event.target.closest(SELECTOR_DATA_TOGGLE);
0857 var data = Data.getData(button, DATA_KEY$1);
0858
0859 if (!data) {
0860 data = new Button(button);
0861 }
0862
0863 data.toggle();
0864 });
0865
0866
0867
0868
0869
0870
0871
0872 onDOMContentLoaded(function () {
0873 var $ = getjQuery();
0874
0875
0876 if ($) {
0877 var JQUERY_NO_CONFLICT = $.fn[NAME$1];
0878 $.fn[NAME$1] = Button.jQueryInterface;
0879 $.fn[NAME$1].Constructor = Button;
0880
0881 $.fn[NAME$1].noConflict = function () {
0882 $.fn[NAME$1] = JQUERY_NO_CONFLICT;
0883 return Button.jQueryInterface;
0884 };
0885 }
0886 });
0887
0888
0889
0890
0891
0892
0893
0894 function normalizeData(val) {
0895 if (val === 'true') {
0896 return true;
0897 }
0898
0899 if (val === 'false') {
0900 return false;
0901 }
0902
0903 if (val === Number(val).toString()) {
0904 return Number(val);
0905 }
0906
0907 if (val === '' || val === 'null') {
0908 return null;
0909 }
0910
0911 return val;
0912 }
0913
0914 function normalizeDataKey(key) {
0915 return key.replace(/[A-Z]/g, function (chr) {
0916 return "-" + chr.toLowerCase();
0917 });
0918 }
0919
0920 var Manipulator = {
0921 setDataAttribute: function setDataAttribute(element, key, value) {
0922 element.setAttribute("data-bs-" + normalizeDataKey(key), value);
0923 },
0924 removeDataAttribute: function removeDataAttribute(element, key) {
0925 element.removeAttribute("data-bs-" + normalizeDataKey(key));
0926 },
0927 getDataAttributes: function getDataAttributes(element) {
0928 if (!element) {
0929 return {};
0930 }
0931
0932 var attributes = {};
0933 Object.keys(element.dataset).filter(function (key) {
0934 return key.startsWith('bs');
0935 }).forEach(function (key) {
0936 var pureKey = key.replace(/^bs/, '');
0937 pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
0938 attributes[pureKey] = normalizeData(element.dataset[key]);
0939 });
0940 return attributes;
0941 },
0942 getDataAttribute: function getDataAttribute(element, key) {
0943 return normalizeData(element.getAttribute("data-bs-" + normalizeDataKey(key)));
0944 },
0945 offset: function offset(element) {
0946 var rect = element.getBoundingClientRect();
0947 return {
0948 top: rect.top + document.body.scrollTop,
0949 left: rect.left + document.body.scrollLeft
0950 };
0951 },
0952 position: function position(element) {
0953 return {
0954 top: element.offsetTop,
0955 left: element.offsetLeft
0956 };
0957 }
0958 };
0959
0960
0961
0962
0963
0964
0965
0966
0967
0968
0969
0970
0971
0972 var NODE_TEXT = 3;
0973 var SelectorEngine = {
0974 matches: function matches(element, selector) {
0975 return element.matches(selector);
0976 },
0977 find: function find(selector, element) {
0978 var _ref;
0979
0980 if (element === void 0) {
0981 element = document.documentElement;
0982 }
0983
0984 return (_ref = []).concat.apply(_ref, Element.prototype.querySelectorAll.call(element, selector));
0985 },
0986 findOne: function findOne(selector, element) {
0987 if (element === void 0) {
0988 element = document.documentElement;
0989 }
0990
0991 return Element.prototype.querySelector.call(element, selector);
0992 },
0993 children: function children(element, selector) {
0994 var _ref2;
0995
0996 var children = (_ref2 = []).concat.apply(_ref2, element.children);
0997
0998 return children.filter(function (child) {
0999 return child.matches(selector);
1000 });
1001 },
1002 parents: function parents(element, selector) {
1003 var parents = [];
1004 var ancestor = element.parentNode;
1005
1006 while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
1007 if (this.matches(ancestor, selector)) {
1008 parents.push(ancestor);
1009 }
1010
1011 ancestor = ancestor.parentNode;
1012 }
1013
1014 return parents;
1015 },
1016 prev: function prev(element, selector) {
1017 var previous = element.previousElementSibling;
1018
1019 while (previous) {
1020 if (previous.matches(selector)) {
1021 return [previous];
1022 }
1023
1024 previous = previous.previousElementSibling;
1025 }
1026
1027 return [];
1028 },
1029 next: function next(element, selector) {
1030 var next = element.nextElementSibling;
1031
1032 while (next) {
1033 if (this.matches(next, selector)) {
1034 return [next];
1035 }
1036
1037 next = next.nextElementSibling;
1038 }
1039
1040 return [];
1041 }
1042 };
1043
1044
1045
1046
1047
1048
1049
1050 var NAME$2 = 'carousel';
1051 var DATA_KEY$2 = 'bs.carousel';
1052 var EVENT_KEY$2 = "." + DATA_KEY$2;
1053 var DATA_API_KEY$2 = '.data-api';
1054 var ARROW_LEFT_KEY = 'ArrowLeft';
1055 var ARROW_RIGHT_KEY = 'ArrowRight';
1056 var TOUCHEVENT_COMPAT_WAIT = 500;
1057
1058 var SWIPE_THRESHOLD = 40;
1059 var Default = {
1060 interval: 5000,
1061 keyboard: true,
1062 slide: false,
1063 pause: 'hover',
1064 wrap: true,
1065 touch: true
1066 };
1067 var DefaultType = {
1068 interval: '(number|boolean)',
1069 keyboard: 'boolean',
1070 slide: '(boolean|string)',
1071 pause: '(string|boolean)',
1072 wrap: 'boolean',
1073 touch: 'boolean'
1074 };
1075 var DIRECTION_NEXT = 'next';
1076 var DIRECTION_PREV = 'prev';
1077 var DIRECTION_LEFT = 'left';
1078 var DIRECTION_RIGHT = 'right';
1079 var EVENT_SLIDE = "slide" + EVENT_KEY$2;
1080 var EVENT_SLID = "slid" + EVENT_KEY$2;
1081 var EVENT_KEYDOWN = "keydown" + EVENT_KEY$2;
1082 var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$2;
1083 var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$2;
1084 var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$2;
1085 var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$2;
1086 var EVENT_TOUCHEND = "touchend" + EVENT_KEY$2;
1087 var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2;
1088 var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2;
1089 var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2;
1090 var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
1091 var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2;
1092 var CLASS_NAME_CAROUSEL = 'carousel';
1093 var CLASS_NAME_ACTIVE$1 = 'active';
1094 var CLASS_NAME_SLIDE = 'slide';
1095 var CLASS_NAME_END = 'carousel-item-end';
1096 var CLASS_NAME_START = 'carousel-item-start';
1097 var CLASS_NAME_NEXT = 'carousel-item-next';
1098 var CLASS_NAME_PREV = 'carousel-item-prev';
1099 var CLASS_NAME_POINTER_EVENT = 'pointer-event';
1100 var SELECTOR_ACTIVE = '.active';
1101 var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
1102 var SELECTOR_ITEM = '.carousel-item';
1103 var SELECTOR_ITEM_IMG = '.carousel-item img';
1104 var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
1105 var SELECTOR_INDICATORS = '.carousel-indicators';
1106 var SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1107 var SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1108 var PointerType = {
1109 TOUCH: 'touch',
1110 PEN: 'pen'
1111 };
1112
1113
1114
1115
1116
1117
1118 var Carousel = function (_BaseComponent) {
1119 _inheritsLoose(Carousel, _BaseComponent);
1120
1121 function Carousel(element, config) {
1122 var _this;
1123
1124 _this = _BaseComponent.call(this, element) || this;
1125 _this._items = null;
1126 _this._interval = null;
1127 _this._activeElement = null;
1128 _this._isPaused = false;
1129 _this._isSliding = false;
1130 _this.touchTimeout = null;
1131 _this.touchStartX = 0;
1132 _this.touchDeltaX = 0;
1133 _this._config = _this._getConfig(config);
1134 _this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, _this._element);
1135 _this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1136 _this._pointerEvent = Boolean(window.PointerEvent);
1137
1138 _this._addEventListeners();
1139
1140 return _this;
1141 }
1142
1143
1144 var _proto = Carousel.prototype;
1145
1146
1147 _proto.next = function next() {
1148 if (!this._isSliding) {
1149 this._slide(DIRECTION_NEXT);
1150 }
1151 };
1152
1153 _proto.nextWhenVisible = function nextWhenVisible() {
1154
1155
1156 if (!document.hidden && isVisible(this._element)) {
1157 this.next();
1158 }
1159 };
1160
1161 _proto.prev = function prev() {
1162 if (!this._isSliding) {
1163 this._slide(DIRECTION_PREV);
1164 }
1165 };
1166
1167 _proto.pause = function pause(event) {
1168 if (!event) {
1169 this._isPaused = true;
1170 }
1171
1172 if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
1173 triggerTransitionEnd(this._element);
1174 this.cycle(true);
1175 }
1176
1177 clearInterval(this._interval);
1178 this._interval = null;
1179 };
1180
1181 _proto.cycle = function cycle(event) {
1182 if (!event) {
1183 this._isPaused = false;
1184 }
1185
1186 if (this._interval) {
1187 clearInterval(this._interval);
1188 this._interval = null;
1189 }
1190
1191 if (this._config && this._config.interval && !this._isPaused) {
1192 this._updateInterval();
1193
1194 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
1195 }
1196 };
1197
1198 _proto.to = function to(index) {
1199 var _this2 = this;
1200
1201 this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1202
1203 var activeIndex = this._getItemIndex(this._activeElement);
1204
1205 if (index > this._items.length - 1 || index < 0) {
1206 return;
1207 }
1208
1209 if (this._isSliding) {
1210 EventHandler.one(this._element, EVENT_SLID, function () {
1211 return _this2.to(index);
1212 });
1213 return;
1214 }
1215
1216 if (activeIndex === index) {
1217 this.pause();
1218 this.cycle();
1219 return;
1220 }
1221
1222 var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
1223
1224 this._slide(direction, this._items[index]);
1225 };
1226
1227 _proto.dispose = function dispose() {
1228 _BaseComponent.prototype.dispose.call(this);
1229
1230 EventHandler.off(this._element, EVENT_KEY$2);
1231 this._items = null;
1232 this._config = null;
1233 this._interval = null;
1234 this._isPaused = null;
1235 this._isSliding = null;
1236 this._activeElement = null;
1237 this._indicatorsElement = null;
1238 }
1239 ;
1240
1241 _proto._getConfig = function _getConfig(config) {
1242 config = _extends({}, Default, config);
1243 typeCheckConfig(NAME$2, config, DefaultType);
1244 return config;
1245 };
1246
1247 _proto._handleSwipe = function _handleSwipe() {
1248 var absDeltax = Math.abs(this.touchDeltaX);
1249
1250 if (absDeltax <= SWIPE_THRESHOLD) {
1251 return;
1252 }
1253
1254 var direction = absDeltax / this.touchDeltaX;
1255 this.touchDeltaX = 0;
1256
1257 if (direction > 0) {
1258 this.prev();
1259 }
1260
1261
1262 if (direction < 0) {
1263 this.next();
1264 }
1265 };
1266
1267 _proto._addEventListeners = function _addEventListeners() {
1268 var _this3 = this;
1269
1270 if (this._config.keyboard) {
1271 EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
1272 return _this3._keydown(event);
1273 });
1274 }
1275
1276 if (this._config.pause === 'hover') {
1277 EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
1278 return _this3.pause(event);
1279 });
1280 EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
1281 return _this3.cycle(event);
1282 });
1283 }
1284
1285 if (this._config.touch && this._touchSupported) {
1286 this._addTouchEventListeners();
1287 }
1288 };
1289
1290 _proto._addTouchEventListeners = function _addTouchEventListeners() {
1291 var _this4 = this;
1292
1293 var start = function start(event) {
1294 if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
1295 _this4.touchStartX = event.clientX;
1296 } else if (!_this4._pointerEvent) {
1297 _this4.touchStartX = event.touches[0].clientX;
1298 }
1299 };
1300
1301 var move = function move(event) {
1302
1303 if (event.touches && event.touches.length > 1) {
1304 _this4.touchDeltaX = 0;
1305 } else {
1306 _this4.touchDeltaX = event.touches[0].clientX - _this4.touchStartX;
1307 }
1308 };
1309
1310 var end = function end(event) {
1311 if (_this4._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
1312 _this4.touchDeltaX = event.clientX - _this4.touchStartX;
1313 }
1314
1315 _this4._handleSwipe();
1316
1317 if (_this4._config.pause === 'hover') {
1318
1319
1320
1321
1322
1323
1324
1325 _this4.pause();
1326
1327 if (_this4.touchTimeout) {
1328 clearTimeout(_this4.touchTimeout);
1329 }
1330
1331 _this4.touchTimeout = setTimeout(function (event) {
1332 return _this4.cycle(event);
1333 }, TOUCHEVENT_COMPAT_WAIT + _this4._config.interval);
1334 }
1335 };
1336
1337 SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
1338 EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
1339 return e.preventDefault();
1340 });
1341 });
1342
1343 if (this._pointerEvent) {
1344 EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
1345 return start(event);
1346 });
1347 EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
1348 return end(event);
1349 });
1350
1351 this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1352 } else {
1353 EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
1354 return start(event);
1355 });
1356 EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
1357 return move(event);
1358 });
1359 EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
1360 return end(event);
1361 });
1362 }
1363 };
1364
1365 _proto._keydown = function _keydown(event) {
1366 if (/input|textarea/i.test(event.target.tagName)) {
1367 return;
1368 }
1369
1370 switch (event.key) {
1371 case ARROW_LEFT_KEY:
1372 event.preventDefault();
1373 this.prev();
1374 break;
1375
1376 case ARROW_RIGHT_KEY:
1377 event.preventDefault();
1378 this.next();
1379 break;
1380 }
1381 };
1382
1383 _proto._getItemIndex = function _getItemIndex(element) {
1384 this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
1385 return this._items.indexOf(element);
1386 };
1387
1388 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
1389 var isNextDirection = direction === DIRECTION_NEXT;
1390 var isPrevDirection = direction === DIRECTION_PREV;
1391
1392 var activeIndex = this._getItemIndex(activeElement);
1393
1394 var lastItemIndex = this._items.length - 1;
1395 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
1396
1397 if (isGoingToWrap && !this._config.wrap) {
1398 return activeElement;
1399 }
1400
1401 var delta = direction === DIRECTION_PREV ? -1 : 1;
1402 var itemIndex = (activeIndex + delta) % this._items.length;
1403 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
1404 };
1405
1406 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
1407 var targetIndex = this._getItemIndex(relatedTarget);
1408
1409 var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
1410
1411 return EventHandler.trigger(this._element, EVENT_SLIDE, {
1412 relatedTarget: relatedTarget,
1413 direction: eventDirectionName,
1414 from: fromIndex,
1415 to: targetIndex
1416 });
1417 };
1418
1419 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
1420 if (this._indicatorsElement) {
1421 var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
1422
1423 for (var i = 0; i < indicators.length; i++) {
1424 indicators[i].classList.remove(CLASS_NAME_ACTIVE$1);
1425 }
1426
1427 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
1428
1429 if (nextIndicator) {
1430 nextIndicator.classList.add(CLASS_NAME_ACTIVE$1);
1431 }
1432 }
1433 };
1434
1435 _proto._updateInterval = function _updateInterval() {
1436 var element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1437
1438 if (!element) {
1439 return;
1440 }
1441
1442 var elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1443
1444 if (elementInterval) {
1445 this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1446 this._config.interval = elementInterval;
1447 } else {
1448 this._config.interval = this._config.defaultInterval || this._config.interval;
1449 }
1450 };
1451
1452 _proto._slide = function _slide(direction, element) {
1453 var _this5 = this;
1454
1455 var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1456
1457 var activeElementIndex = this._getItemIndex(activeElement);
1458
1459 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
1460
1461 var nextElementIndex = this._getItemIndex(nextElement);
1462
1463 var isCycling = Boolean(this._interval);
1464 var directionalClassName;
1465 var orderClassName;
1466 var eventDirectionName;
1467
1468 if (direction === DIRECTION_NEXT) {
1469 directionalClassName = CLASS_NAME_START;
1470 orderClassName = CLASS_NAME_NEXT;
1471 eventDirectionName = DIRECTION_LEFT;
1472 } else {
1473 directionalClassName = CLASS_NAME_END;
1474 orderClassName = CLASS_NAME_PREV;
1475 eventDirectionName = DIRECTION_RIGHT;
1476 }
1477
1478 if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) {
1479 this._isSliding = false;
1480 return;
1481 }
1482
1483 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1484
1485 if (slideEvent.defaultPrevented) {
1486 return;
1487 }
1488
1489 if (!activeElement || !nextElement) {
1490
1491 return;
1492 }
1493
1494 this._isSliding = true;
1495
1496 if (isCycling) {
1497 this.pause();
1498 }
1499
1500 this._setActiveIndicatorElement(nextElement);
1501
1502 this._activeElement = nextElement;
1503
1504 if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1505 nextElement.classList.add(orderClassName);
1506 reflow(nextElement);
1507 activeElement.classList.add(directionalClassName);
1508 nextElement.classList.add(directionalClassName);
1509 var transitionDuration = getTransitionDurationFromElement(activeElement);
1510 EventHandler.one(activeElement, TRANSITION_END, function () {
1511 nextElement.classList.remove(directionalClassName, orderClassName);
1512 nextElement.classList.add(CLASS_NAME_ACTIVE$1);
1513 activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName);
1514 _this5._isSliding = false;
1515 setTimeout(function () {
1516 EventHandler.trigger(_this5._element, EVENT_SLID, {
1517 relatedTarget: nextElement,
1518 direction: eventDirectionName,
1519 from: activeElementIndex,
1520 to: nextElementIndex
1521 });
1522 }, 0);
1523 });
1524 emulateTransitionEnd(activeElement, transitionDuration);
1525 } else {
1526 activeElement.classList.remove(CLASS_NAME_ACTIVE$1);
1527 nextElement.classList.add(CLASS_NAME_ACTIVE$1);
1528 this._isSliding = false;
1529 EventHandler.trigger(this._element, EVENT_SLID, {
1530 relatedTarget: nextElement,
1531 direction: eventDirectionName,
1532 from: activeElementIndex,
1533 to: nextElementIndex
1534 });
1535 }
1536
1537 if (isCycling) {
1538 this.cycle();
1539 }
1540 }
1541 ;
1542
1543 Carousel.carouselInterface = function carouselInterface(element, config) {
1544 var data = Data.getData(element, DATA_KEY$2);
1545
1546 var _config = _extends({}, Default, Manipulator.getDataAttributes(element));
1547
1548 if (typeof config === 'object') {
1549 _config = _extends({}, _config, config);
1550 }
1551
1552 var action = typeof config === 'string' ? config : _config.slide;
1553
1554 if (!data) {
1555 data = new Carousel(element, _config);
1556 }
1557
1558 if (typeof config === 'number') {
1559 data.to(config);
1560 } else if (typeof action === 'string') {
1561 if (typeof data[action] === 'undefined') {
1562 throw new TypeError("No method named \"" + action + "\"");
1563 }
1564
1565 data[action]();
1566 } else if (_config.interval && _config.ride) {
1567 data.pause();
1568 data.cycle();
1569 }
1570 };
1571
1572 Carousel.jQueryInterface = function jQueryInterface(config) {
1573 return this.each(function () {
1574 Carousel.carouselInterface(this, config);
1575 });
1576 };
1577
1578 Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
1579 var target = getElementFromSelector(this);
1580
1581 if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1582 return;
1583 }
1584
1585 var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
1586
1587 var slideIndex = this.getAttribute('data-bs-slide-to');
1588
1589 if (slideIndex) {
1590 config.interval = false;
1591 }
1592
1593 Carousel.carouselInterface(target, config);
1594
1595 if (slideIndex) {
1596 Data.getData(target, DATA_KEY$2).to(slideIndex);
1597 }
1598
1599 event.preventDefault();
1600 };
1601
1602 _createClass(Carousel, null, [{
1603 key: "Default",
1604 get: function get() {
1605 return Default;
1606 }
1607 }, {
1608 key: "DATA_KEY",
1609 get: function get() {
1610 return DATA_KEY$2;
1611 }
1612 }]);
1613
1614 return Carousel;
1615 }(BaseComponent);
1616
1617
1618
1619
1620
1621
1622
1623 EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
1624 EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
1625 var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1626
1627 for (var i = 0, len = carousels.length; i < len; i++) {
1628 Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
1629 }
1630 });
1631
1632
1633
1634
1635
1636
1637
1638 onDOMContentLoaded(function () {
1639 var $ = getjQuery();
1640
1641
1642 if ($) {
1643 var JQUERY_NO_CONFLICT = $.fn[NAME$2];
1644 $.fn[NAME$2] = Carousel.jQueryInterface;
1645 $.fn[NAME$2].Constructor = Carousel;
1646
1647 $.fn[NAME$2].noConflict = function () {
1648 $.fn[NAME$2] = JQUERY_NO_CONFLICT;
1649 return Carousel.jQueryInterface;
1650 };
1651 }
1652 });
1653
1654
1655
1656
1657
1658
1659
1660 var NAME$3 = 'collapse';
1661 var DATA_KEY$3 = 'bs.collapse';
1662 var EVENT_KEY$3 = "." + DATA_KEY$3;
1663 var DATA_API_KEY$3 = '.data-api';
1664 var Default$1 = {
1665 toggle: true,
1666 parent: ''
1667 };
1668 var DefaultType$1 = {
1669 toggle: 'boolean',
1670 parent: '(string|element)'
1671 };
1672 var EVENT_SHOW = "show" + EVENT_KEY$3;
1673 var EVENT_SHOWN = "shown" + EVENT_KEY$3;
1674 var EVENT_HIDE = "hide" + EVENT_KEY$3;
1675 var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
1676 var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
1677 var CLASS_NAME_SHOW = 'show';
1678 var CLASS_NAME_COLLAPSE = 'collapse';
1679 var CLASS_NAME_COLLAPSING = 'collapsing';
1680 var CLASS_NAME_COLLAPSED = 'collapsed';
1681 var WIDTH = 'width';
1682 var HEIGHT = 'height';
1683 var SELECTOR_ACTIVES = '.show, .collapsing';
1684 var SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="collapse"]';
1685
1686
1687
1688
1689
1690
1691 var Collapse = function (_BaseComponent) {
1692 _inheritsLoose(Collapse, _BaseComponent);
1693
1694 function Collapse(element, config) {
1695 var _this;
1696
1697 _this = _BaseComponent.call(this, element) || this;
1698 _this._isTransitioning = false;
1699 _this._config = _this._getConfig(config);
1700 _this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1 + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE$1 + "[data-bs-target=\"#" + element.id + "\"]"));
1701 var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1);
1702
1703 for (var i = 0, len = toggleList.length; i < len; i++) {
1704 var elem = toggleList[i];
1705 var selector = getSelectorFromElement(elem);
1706 var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
1707 return foundElem === element;
1708 });
1709
1710 if (selector !== null && filterElement.length) {
1711 _this._selector = selector;
1712
1713 _this._triggerArray.push(elem);
1714 }
1715 }
1716
1717 _this._parent = _this._config.parent ? _this._getParent() : null;
1718
1719 if (!_this._config.parent) {
1720 _this._addAriaAndCollapsedClass(_this._element, _this._triggerArray);
1721 }
1722
1723 if (_this._config.toggle) {
1724 _this.toggle();
1725 }
1726
1727 return _this;
1728 }
1729
1730
1731 var _proto = Collapse.prototype;
1732
1733
1734 _proto.toggle = function toggle() {
1735 if (this._element.classList.contains(CLASS_NAME_SHOW)) {
1736 this.hide();
1737 } else {
1738 this.show();
1739 }
1740 };
1741
1742 _proto.show = function show() {
1743 var _this2 = this;
1744
1745 if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
1746 return;
1747 }
1748
1749 var actives;
1750 var activesData;
1751
1752 if (this._parent) {
1753 actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
1754 if (typeof _this2._config.parent === 'string') {
1755 return elem.getAttribute('data-bs-parent') === _this2._config.parent;
1756 }
1757
1758 return elem.classList.contains(CLASS_NAME_COLLAPSE);
1759 });
1760
1761 if (actives.length === 0) {
1762 actives = null;
1763 }
1764 }
1765
1766 var container = SelectorEngine.findOne(this._selector);
1767
1768 if (actives) {
1769 var tempActiveData = actives.find(function (elem) {
1770 return container !== elem;
1771 });
1772 activesData = tempActiveData ? Data.getData(tempActiveData, DATA_KEY$3) : null;
1773
1774 if (activesData && activesData._isTransitioning) {
1775 return;
1776 }
1777 }
1778
1779 var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
1780
1781 if (startEvent.defaultPrevented) {
1782 return;
1783 }
1784
1785 if (actives) {
1786 actives.forEach(function (elemActive) {
1787 if (container !== elemActive) {
1788 Collapse.collapseInterface(elemActive, 'hide');
1789 }
1790
1791 if (!activesData) {
1792 Data.setData(elemActive, DATA_KEY$3, null);
1793 }
1794 });
1795 }
1796
1797 var dimension = this._getDimension();
1798
1799 this._element.classList.remove(CLASS_NAME_COLLAPSE);
1800
1801 this._element.classList.add(CLASS_NAME_COLLAPSING);
1802
1803 this._element.style[dimension] = 0;
1804
1805 if (this._triggerArray.length) {
1806 this._triggerArray.forEach(function (element) {
1807 element.classList.remove(CLASS_NAME_COLLAPSED);
1808 element.setAttribute('aria-expanded', true);
1809 });
1810 }
1811
1812 this.setTransitioning(true);
1813
1814 var complete = function complete() {
1815 _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
1816
1817 _this2._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
1818
1819 _this2._element.style[dimension] = '';
1820
1821 _this2.setTransitioning(false);
1822
1823 EventHandler.trigger(_this2._element, EVENT_SHOWN);
1824 };
1825
1826 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1827 var scrollSize = "scroll" + capitalizedDimension;
1828 var transitionDuration = getTransitionDurationFromElement(this._element);
1829 EventHandler.one(this._element, TRANSITION_END, complete);
1830 emulateTransitionEnd(this._element, transitionDuration);
1831 this._element.style[dimension] = this._element[scrollSize] + "px";
1832 };
1833
1834 _proto.hide = function hide() {
1835 var _this3 = this;
1836
1837 if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
1838 return;
1839 }
1840
1841 var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
1842
1843 if (startEvent.defaultPrevented) {
1844 return;
1845 }
1846
1847 var dimension = this._getDimension();
1848
1849 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1850 reflow(this._element);
1851
1852 this._element.classList.add(CLASS_NAME_COLLAPSING);
1853
1854 this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
1855
1856 var triggerArrayLength = this._triggerArray.length;
1857
1858 if (triggerArrayLength > 0) {
1859 for (var i = 0; i < triggerArrayLength; i++) {
1860 var trigger = this._triggerArray[i];
1861 var elem = getElementFromSelector(trigger);
1862
1863 if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
1864 trigger.classList.add(CLASS_NAME_COLLAPSED);
1865 trigger.setAttribute('aria-expanded', false);
1866 }
1867 }
1868 }
1869
1870 this.setTransitioning(true);
1871
1872 var complete = function complete() {
1873 _this3.setTransitioning(false);
1874
1875 _this3._element.classList.remove(CLASS_NAME_COLLAPSING);
1876
1877 _this3._element.classList.add(CLASS_NAME_COLLAPSE);
1878
1879 EventHandler.trigger(_this3._element, EVENT_HIDDEN);
1880 };
1881
1882 this._element.style[dimension] = '';
1883 var transitionDuration = getTransitionDurationFromElement(this._element);
1884 EventHandler.one(this._element, TRANSITION_END, complete);
1885 emulateTransitionEnd(this._element, transitionDuration);
1886 };
1887
1888 _proto.setTransitioning = function setTransitioning(isTransitioning) {
1889 this._isTransitioning = isTransitioning;
1890 };
1891
1892 _proto.dispose = function dispose() {
1893 _BaseComponent.prototype.dispose.call(this);
1894
1895 this._config = null;
1896 this._parent = null;
1897 this._triggerArray = null;
1898 this._isTransitioning = null;
1899 }
1900 ;
1901
1902 _proto._getConfig = function _getConfig(config) {
1903 config = _extends({}, Default$1, config);
1904 config.toggle = Boolean(config.toggle);
1905
1906 typeCheckConfig(NAME$3, config, DefaultType$1);
1907 return config;
1908 };
1909
1910 _proto._getDimension = function _getDimension() {
1911 return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
1912 };
1913
1914 _proto._getParent = function _getParent() {
1915 var _this4 = this;
1916
1917 var parent = this._config.parent;
1918
1919 if (isElement(parent)) {
1920
1921 if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
1922 parent = parent[0];
1923 }
1924 } else {
1925 parent = SelectorEngine.findOne(parent);
1926 }
1927
1928 var selector = SELECTOR_DATA_TOGGLE$1 + "[data-bs-parent=\"" + parent + "\"]";
1929 SelectorEngine.find(selector, parent).forEach(function (element) {
1930 var selected = getElementFromSelector(element);
1931
1932 _this4._addAriaAndCollapsedClass(selected, [element]);
1933 });
1934 return parent;
1935 };
1936
1937 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1938 if (!element || !triggerArray.length) {
1939 return;
1940 }
1941
1942 var isOpen = element.classList.contains(CLASS_NAME_SHOW);
1943 triggerArray.forEach(function (elem) {
1944 if (isOpen) {
1945 elem.classList.remove(CLASS_NAME_COLLAPSED);
1946 } else {
1947 elem.classList.add(CLASS_NAME_COLLAPSED);
1948 }
1949
1950 elem.setAttribute('aria-expanded', isOpen);
1951 });
1952 }
1953 ;
1954
1955 Collapse.collapseInterface = function collapseInterface(element, config) {
1956 var data = Data.getData(element, DATA_KEY$3);
1957
1958 var _config = _extends({}, Default$1, Manipulator.getDataAttributes(element), typeof config === 'object' && config ? config : {});
1959
1960 if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1961 _config.toggle = false;
1962 }
1963
1964 if (!data) {
1965 data = new Collapse(element, _config);
1966 }
1967
1968 if (typeof config === 'string') {
1969 if (typeof data[config] === 'undefined') {
1970 throw new TypeError("No method named \"" + config + "\"");
1971 }
1972
1973 data[config]();
1974 }
1975 };
1976
1977 Collapse.jQueryInterface = function jQueryInterface(config) {
1978 return this.each(function () {
1979 Collapse.collapseInterface(this, config);
1980 });
1981 };
1982
1983 _createClass(Collapse, null, [{
1984 key: "Default",
1985 get: function get() {
1986 return Default$1;
1987 }
1988 }, {
1989 key: "DATA_KEY",
1990 get: function get() {
1991 return DATA_KEY$3;
1992 }
1993 }]);
1994
1995 return Collapse;
1996 }(BaseComponent);
1997
1998
1999
2000
2001
2002
2003
2004 EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
2005
2006 if (event.target.tagName === 'A') {
2007 event.preventDefault();
2008 }
2009
2010 var triggerData = Manipulator.getDataAttributes(this);
2011 var selector = getSelectorFromElement(this);
2012 var selectorElements = SelectorEngine.find(selector);
2013 selectorElements.forEach(function (element) {
2014 var data = Data.getData(element, DATA_KEY$3);
2015 var config;
2016
2017 if (data) {
2018
2019 if (data._parent === null && typeof triggerData.parent === 'string') {
2020 data._config.parent = triggerData.parent;
2021 data._parent = data._getParent();
2022 }
2023
2024 config = 'toggle';
2025 } else {
2026 config = triggerData;
2027 }
2028
2029 Collapse.collapseInterface(element, config);
2030 });
2031 });
2032
2033
2034
2035
2036
2037
2038
2039 onDOMContentLoaded(function () {
2040 var $ = getjQuery();
2041
2042
2043 if ($) {
2044 var JQUERY_NO_CONFLICT = $.fn[NAME$3];
2045 $.fn[NAME$3] = Collapse.jQueryInterface;
2046 $.fn[NAME$3].Constructor = Collapse;
2047
2048 $.fn[NAME$3].noConflict = function () {
2049 $.fn[NAME$3] = JQUERY_NO_CONFLICT;
2050 return Collapse.jQueryInterface;
2051 };
2052 }
2053 });
2054
2055
2056
2057
2058
2059
2060
2061 var NAME$4 = 'dropdown';
2062 var DATA_KEY$4 = 'bs.dropdown';
2063 var EVENT_KEY$4 = "." + DATA_KEY$4;
2064 var DATA_API_KEY$4 = '.data-api';
2065 var ESCAPE_KEY = 'Escape';
2066 var SPACE_KEY = 'Space';
2067 var TAB_KEY = 'Tab';
2068 var ARROW_UP_KEY = 'ArrowUp';
2069 var ARROW_DOWN_KEY = 'ArrowDown';
2070 var RIGHT_MOUSE_BUTTON = 2;
2071
2072 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
2073 var EVENT_HIDE$1 = "hide" + EVENT_KEY$4;
2074 var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4;
2075 var EVENT_SHOW$1 = "show" + EVENT_KEY$4;
2076 var EVENT_SHOWN$1 = "shown" + EVENT_KEY$4;
2077 var EVENT_CLICK = "click" + EVENT_KEY$4;
2078 var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$4 + DATA_API_KEY$4;
2079 var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
2080 var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
2081 var CLASS_NAME_DISABLED = 'disabled';
2082 var CLASS_NAME_SHOW$1 = 'show';
2083 var CLASS_NAME_DROPUP = 'dropup';
2084 var CLASS_NAME_DROPEND = 'dropend';
2085 var CLASS_NAME_DROPSTART = 'dropstart';
2086 var CLASS_NAME_NAVBAR = 'navbar';
2087 var SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="dropdown"]';
2088 var SELECTOR_FORM_CHILD = '.dropdown form';
2089 var SELECTOR_MENU = '.dropdown-menu';
2090 var SELECTOR_NAVBAR_NAV = '.navbar-nav';
2091 var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
2092 var PLACEMENT_TOP = isRTL ? 'top-end' : 'top-start';
2093 var PLACEMENT_TOPEND = isRTL ? 'top-start' : 'top-end';
2094 var PLACEMENT_BOTTOM = isRTL ? 'bottom-end' : 'bottom-start';
2095 var PLACEMENT_BOTTOMEND = isRTL ? 'bottom-start' : 'bottom-end';
2096 var PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start';
2097 var PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start';
2098 var Default$2 = {
2099 offset: 0,
2100 flip: true,
2101 boundary: 'clippingParents',
2102 reference: 'toggle',
2103 display: 'dynamic',
2104 popperConfig: null
2105 };
2106 var DefaultType$2 = {
2107 offset: '(number|string|function)',
2108 flip: 'boolean',
2109 boundary: '(string|element)',
2110 reference: '(string|element)',
2111 display: 'string',
2112 popperConfig: '(null|object)'
2113 };
2114
2115
2116
2117
2118
2119
2120 var Dropdown = function (_BaseComponent) {
2121 _inheritsLoose(Dropdown, _BaseComponent);
2122
2123 function Dropdown(element, config) {
2124 var _this;
2125
2126 _this = _BaseComponent.call(this, element) || this;
2127 _this._popper = null;
2128 _this._config = _this._getConfig(config);
2129 _this._menu = _this._getMenuElement();
2130 _this._inNavbar = _this._detectNavbar();
2131
2132 _this._addEventListeners();
2133
2134 return _this;
2135 }
2136
2137
2138 var _proto = Dropdown.prototype;
2139
2140
2141 _proto.toggle = function toggle() {
2142 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
2143 return;
2144 }
2145
2146 var isActive = this._element.classList.contains(CLASS_NAME_SHOW$1);
2147
2148 Dropdown.clearMenus();
2149
2150 if (isActive) {
2151 return;
2152 }
2153
2154 this.show();
2155 };
2156
2157 _proto.show = function show() {
2158 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
2159 return;
2160 }
2161
2162 var parent = Dropdown.getParentFromElement(this._element);
2163 var relatedTarget = {
2164 relatedTarget: this._element
2165 };
2166 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, relatedTarget);
2167
2168 if (showEvent.defaultPrevented) {
2169 return;
2170 }
2171
2172
2173 if (!this._inNavbar) {
2174 if (typeof Popper__namespace === 'undefined') {
2175 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
2176 }
2177
2178 var referenceElement = this._element;
2179
2180 if (this._config.reference === 'parent') {
2181 referenceElement = parent;
2182 } else if (isElement(this._config.reference)) {
2183 referenceElement = this._config.reference;
2184
2185 if (typeof this._config.reference.jquery !== 'undefined') {
2186 referenceElement = this._config.reference[0];
2187 }
2188 }
2189
2190 this._popper = Popper.createPopper(referenceElement, this._menu, this._getPopperConfig());
2191 }
2192
2193
2194
2195
2196
2197 if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
2198 var _ref;
2199
2200 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
2201 return EventHandler.on(elem, 'mouseover', null, noop());
2202 });
2203 }
2204
2205 this._element.focus();
2206
2207 this._element.setAttribute('aria-expanded', true);
2208
2209 this._menu.classList.toggle(CLASS_NAME_SHOW$1);
2210
2211 this._element.classList.toggle(CLASS_NAME_SHOW$1);
2212
2213 EventHandler.trigger(parent, EVENT_SHOWN$1, relatedTarget);
2214 };
2215
2216 _proto.hide = function hide() {
2217 if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
2218 return;
2219 }
2220
2221 var parent = Dropdown.getParentFromElement(this._element);
2222 var relatedTarget = {
2223 relatedTarget: this._element
2224 };
2225 var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
2226
2227 if (hideEvent.defaultPrevented) {
2228 return;
2229 }
2230
2231 if (this._popper) {
2232 this._popper.destroy();
2233 }
2234
2235 this._menu.classList.toggle(CLASS_NAME_SHOW$1);
2236
2237 this._element.classList.toggle(CLASS_NAME_SHOW$1);
2238
2239 EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
2240 };
2241
2242 _proto.dispose = function dispose() {
2243 _BaseComponent.prototype.dispose.call(this);
2244
2245 EventHandler.off(this._element, EVENT_KEY$4);
2246 this._menu = null;
2247
2248 if (this._popper) {
2249 this._popper.destroy();
2250
2251 this._popper = null;
2252 }
2253 };
2254
2255 _proto.update = function update() {
2256 this._inNavbar = this._detectNavbar();
2257
2258 if (this._popper) {
2259 this._popper.update();
2260 }
2261 }
2262 ;
2263
2264 _proto._addEventListeners = function _addEventListeners() {
2265 var _this2 = this;
2266
2267 EventHandler.on(this._element, EVENT_CLICK, function (event) {
2268 event.preventDefault();
2269 event.stopPropagation();
2270
2271 _this2.toggle();
2272 });
2273 };
2274
2275 _proto._getConfig = function _getConfig(config) {
2276 config = _extends({}, this.constructor.Default, Manipulator.getDataAttributes(this._element), config);
2277 typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
2278 return config;
2279 };
2280
2281 _proto._getMenuElement = function _getMenuElement() {
2282 return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
2283 };
2284
2285 _proto._getPlacement = function _getPlacement() {
2286 var parentDropdown = this._element.parentNode;
2287
2288 if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
2289 return PLACEMENT_RIGHT;
2290 }
2291
2292 if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
2293 return PLACEMENT_LEFT;
2294 }
2295
2296
2297 var isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
2298
2299 if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
2300 return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
2301 }
2302
2303 return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
2304 };
2305
2306 _proto._detectNavbar = function _detectNavbar() {
2307 return this._element.closest("." + CLASS_NAME_NAVBAR) !== null;
2308 };
2309
2310 _proto._getPopperConfig = function _getPopperConfig() {
2311 var popperConfig = {
2312 placement: this._getPlacement(),
2313 modifiers: [{
2314 name: 'preventOverflow',
2315 options: {
2316 altBoundary: this._config.flip,
2317 rootBoundary: this._config.boundary
2318 }
2319 }]
2320 };
2321
2322 if (this._config.display === 'static') {
2323 popperConfig.modifiers = [{
2324 name: 'applyStyles',
2325 enabled: false
2326 }];
2327 }
2328
2329 return _extends({}, popperConfig, this._config.popperConfig);
2330 }
2331 ;
2332
2333 Dropdown.dropdownInterface = function dropdownInterface(element, config) {
2334 var data = Data.getData(element, DATA_KEY$4);
2335
2336 var _config = typeof config === 'object' ? config : null;
2337
2338 if (!data) {
2339 data = new Dropdown(element, _config);
2340 }
2341
2342 if (typeof config === 'string') {
2343 if (typeof data[config] === 'undefined') {
2344 throw new TypeError("No method named \"" + config + "\"");
2345 }
2346
2347 data[config]();
2348 }
2349 };
2350
2351 Dropdown.jQueryInterface = function jQueryInterface(config) {
2352 return this.each(function () {
2353 Dropdown.dropdownInterface(this, config);
2354 });
2355 };
2356
2357 Dropdown.clearMenus = function clearMenus(event) {
2358 if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
2359 return;
2360 }
2361
2362 var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2);
2363
2364 for (var i = 0, len = toggles.length; i < len; i++) {
2365 var parent = Dropdown.getParentFromElement(toggles[i]);
2366 var context = Data.getData(toggles[i], DATA_KEY$4);
2367 var relatedTarget = {
2368 relatedTarget: toggles[i]
2369 };
2370
2371 if (event && event.type === 'click') {
2372 relatedTarget.clickEvent = event;
2373 }
2374
2375 if (!context) {
2376 continue;
2377 }
2378
2379 var dropdownMenu = context._menu;
2380
2381 if (!toggles[i].classList.contains(CLASS_NAME_SHOW$1)) {
2382 continue;
2383 }
2384
2385 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
2386 continue;
2387 }
2388
2389 var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
2390
2391 if (hideEvent.defaultPrevented) {
2392 continue;
2393 }
2394
2395
2396
2397 if ('ontouchstart' in document.documentElement) {
2398 var _ref2;
2399
2400 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
2401 return EventHandler.off(elem, 'mouseover', null, noop());
2402 });
2403 }
2404
2405 toggles[i].setAttribute('aria-expanded', 'false');
2406
2407 if (context._popper) {
2408 context._popper.destroy();
2409 }
2410
2411 dropdownMenu.classList.remove(CLASS_NAME_SHOW$1);
2412 toggles[i].classList.remove(CLASS_NAME_SHOW$1);
2413 EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
2414 }
2415 };
2416
2417 Dropdown.getParentFromElement = function getParentFromElement(element) {
2418 return getElementFromSelector(element) || element.parentNode;
2419 };
2420
2421 Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
2422
2423
2424
2425
2426
2427
2428
2429 if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
2430 return;
2431 }
2432
2433 event.preventDefault();
2434 event.stopPropagation();
2435
2436 if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
2437 return;
2438 }
2439
2440 var parent = Dropdown.getParentFromElement(this);
2441 var isActive = this.classList.contains(CLASS_NAME_SHOW$1);
2442
2443 if (event.key === ESCAPE_KEY) {
2444 var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];
2445 button.focus();
2446 Dropdown.clearMenus();
2447 return;
2448 }
2449
2450 if (!isActive || event.key === SPACE_KEY) {
2451 Dropdown.clearMenus();
2452 return;
2453 }
2454
2455 var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
2456
2457 if (!items.length) {
2458 return;
2459 }
2460
2461 var index = items.indexOf(event.target);
2462
2463 if (event.key === ARROW_UP_KEY && index > 0) {
2464 index--;
2465 }
2466
2467
2468 if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
2469 index++;
2470 }
2471
2472
2473 index = index === -1 ? 0 : index;
2474 items[index].focus();
2475 };
2476
2477 _createClass(Dropdown, null, [{
2478 key: "Default",
2479 get: function get() {
2480 return Default$2;
2481 }
2482 }, {
2483 key: "DefaultType",
2484 get: function get() {
2485 return DefaultType$2;
2486 }
2487 }, {
2488 key: "DATA_KEY",
2489 get: function get() {
2490 return DATA_KEY$4;
2491 }
2492 }]);
2493
2494 return Dropdown;
2495 }(BaseComponent);
2496
2497
2498
2499
2500
2501
2502
2503 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown.dataApiKeydownHandler);
2504 EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2505 EventHandler.on(document, EVENT_CLICK_DATA_API$4, Dropdown.clearMenus);
2506 EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2507 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
2508 event.preventDefault();
2509 event.stopPropagation();
2510 Dropdown.dropdownInterface(this, 'toggle');
2511 });
2512 EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
2513 return e.stopPropagation();
2514 });
2515
2516
2517
2518
2519
2520
2521
2522 onDOMContentLoaded(function () {
2523 var $ = getjQuery();
2524
2525
2526 if ($) {
2527 var JQUERY_NO_CONFLICT = $.fn[NAME$4];
2528 $.fn[NAME$4] = Dropdown.jQueryInterface;
2529 $.fn[NAME$4].Constructor = Dropdown;
2530
2531 $.fn[NAME$4].noConflict = function () {
2532 $.fn[NAME$4] = JQUERY_NO_CONFLICT;
2533 return Dropdown.jQueryInterface;
2534 };
2535 }
2536 });
2537
2538
2539
2540
2541
2542
2543
2544 var NAME$5 = 'modal';
2545 var DATA_KEY$5 = 'bs.modal';
2546 var EVENT_KEY$5 = "." + DATA_KEY$5;
2547 var DATA_API_KEY$5 = '.data-api';
2548 var ESCAPE_KEY$1 = 'Escape';
2549 var Default$3 = {
2550 backdrop: true,
2551 keyboard: true,
2552 focus: true
2553 };
2554 var DefaultType$3 = {
2555 backdrop: '(boolean|string)',
2556 keyboard: 'boolean',
2557 focus: 'boolean'
2558 };
2559 var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
2560 var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
2561 var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
2562 var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
2563 var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
2564 var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
2565 var EVENT_RESIZE = "resize" + EVENT_KEY$5;
2566 var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$5;
2567 var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
2568 var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
2569 var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
2570 var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5;
2571 var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
2572 var CLASS_NAME_BACKDROP = 'modal-backdrop';
2573 var CLASS_NAME_OPEN = 'modal-open';
2574 var CLASS_NAME_FADE = 'fade';
2575 var CLASS_NAME_SHOW$2 = 'show';
2576 var CLASS_NAME_STATIC = 'modal-static';
2577 var SELECTOR_DIALOG = '.modal-dialog';
2578 var SELECTOR_MODAL_BODY = '.modal-body';
2579 var SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="modal"]';
2580 var SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
2581 var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2582 var SELECTOR_STICKY_CONTENT = '.sticky-top';
2583
2584
2585
2586
2587
2588
2589 var Modal = function (_BaseComponent) {
2590 _inheritsLoose(Modal, _BaseComponent);
2591
2592 function Modal(element, config) {
2593 var _this;
2594
2595 _this = _BaseComponent.call(this, element) || this;
2596 _this._config = _this._getConfig(config);
2597 _this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
2598 _this._backdrop = null;
2599 _this._isShown = false;
2600 _this._isBodyOverflowing = false;
2601 _this._ignoreBackdropClick = false;
2602 _this._isTransitioning = false;
2603 _this._scrollbarWidth = 0;
2604 return _this;
2605 }
2606
2607
2608 var _proto = Modal.prototype;
2609
2610
2611 _proto.toggle = function toggle(relatedTarget) {
2612 return this._isShown ? this.hide() : this.show(relatedTarget);
2613 };
2614
2615 _proto.show = function show(relatedTarget) {
2616 var _this2 = this;
2617
2618 if (this._isShown || this._isTransitioning) {
2619 return;
2620 }
2621
2622 if (this._element.classList.contains(CLASS_NAME_FADE)) {
2623 this._isTransitioning = true;
2624 }
2625
2626 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
2627 relatedTarget: relatedTarget
2628 });
2629
2630 if (this._isShown || showEvent.defaultPrevented) {
2631 return;
2632 }
2633
2634 this._isShown = true;
2635
2636 this._checkScrollbar();
2637
2638 this._setScrollbar();
2639
2640 this._adjustDialog();
2641
2642 this._setEscapeEvent();
2643
2644 this._setResizeEvent();
2645
2646 EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
2647 return _this2.hide(event);
2648 });
2649 EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
2650 EventHandler.one(_this2._element, EVENT_MOUSEUP_DISMISS, function (event) {
2651 if (event.target === _this2._element) {
2652 _this2._ignoreBackdropClick = true;
2653 }
2654 });
2655 });
2656
2657 this._showBackdrop(function () {
2658 return _this2._showElement(relatedTarget);
2659 });
2660 };
2661
2662 _proto.hide = function hide(event) {
2663 var _this3 = this;
2664
2665 if (event) {
2666 event.preventDefault();
2667 }
2668
2669 if (!this._isShown || this._isTransitioning) {
2670 return;
2671 }
2672
2673 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
2674
2675 if (hideEvent.defaultPrevented) {
2676 return;
2677 }
2678
2679 this._isShown = false;
2680
2681 var transition = this._element.classList.contains(CLASS_NAME_FADE);
2682
2683 if (transition) {
2684 this._isTransitioning = true;
2685 }
2686
2687 this._setEscapeEvent();
2688
2689 this._setResizeEvent();
2690
2691 EventHandler.off(document, EVENT_FOCUSIN);
2692
2693 this._element.classList.remove(CLASS_NAME_SHOW$2);
2694
2695 EventHandler.off(this._element, EVENT_CLICK_DISMISS);
2696 EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
2697
2698 if (transition) {
2699 var transitionDuration = getTransitionDurationFromElement(this._element);
2700 EventHandler.one(this._element, TRANSITION_END, function (event) {
2701 return _this3._hideModal(event);
2702 });
2703 emulateTransitionEnd(this._element, transitionDuration);
2704 } else {
2705 this._hideModal();
2706 }
2707 };
2708
2709 _proto.dispose = function dispose() {
2710 [window, this._element, this._dialog].forEach(function (htmlElement) {
2711 return EventHandler.off(htmlElement, EVENT_KEY$5);
2712 });
2713
2714 _BaseComponent.prototype.dispose.call(this);
2715
2716
2717
2718
2719
2720
2721
2722 EventHandler.off(document, EVENT_FOCUSIN);
2723 this._config = null;
2724 this._dialog = null;
2725 this._backdrop = null;
2726 this._isShown = null;
2727 this._isBodyOverflowing = null;
2728 this._ignoreBackdropClick = null;
2729 this._isTransitioning = null;
2730 this._scrollbarWidth = null;
2731 };
2732
2733 _proto.handleUpdate = function handleUpdate() {
2734 this._adjustDialog();
2735 }
2736 ;
2737
2738 _proto._getConfig = function _getConfig(config) {
2739 config = _extends({}, Default$3, config);
2740 typeCheckConfig(NAME$5, config, DefaultType$3);
2741 return config;
2742 };
2743
2744 _proto._showElement = function _showElement(relatedTarget) {
2745 var _this4 = this;
2746
2747 var transition = this._element.classList.contains(CLASS_NAME_FADE);
2748
2749 var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2750
2751 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2752
2753 document.body.appendChild(this._element);
2754 }
2755
2756 this._element.style.display = 'block';
2757
2758 this._element.removeAttribute('aria-hidden');
2759
2760 this._element.setAttribute('aria-modal', true);
2761
2762 this._element.setAttribute('role', 'dialog');
2763
2764 this._element.scrollTop = 0;
2765
2766 if (modalBody) {
2767 modalBody.scrollTop = 0;
2768 }
2769
2770 if (transition) {
2771 reflow(this._element);
2772 }
2773
2774 this._element.classList.add(CLASS_NAME_SHOW$2);
2775
2776 if (this._config.focus) {
2777 this._enforceFocus();
2778 }
2779
2780 var transitionComplete = function transitionComplete() {
2781 if (_this4._config.focus) {
2782 _this4._element.focus();
2783 }
2784
2785 _this4._isTransitioning = false;
2786 EventHandler.trigger(_this4._element, EVENT_SHOWN$2, {
2787 relatedTarget: relatedTarget
2788 });
2789 };
2790
2791 if (transition) {
2792 var transitionDuration = getTransitionDurationFromElement(this._dialog);
2793 EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
2794 emulateTransitionEnd(this._dialog, transitionDuration);
2795 } else {
2796 transitionComplete();
2797 }
2798 };
2799
2800 _proto._enforceFocus = function _enforceFocus() {
2801 var _this5 = this;
2802
2803 EventHandler.off(document, EVENT_FOCUSIN);
2804
2805 EventHandler.on(document, EVENT_FOCUSIN, function (event) {
2806 if (document !== event.target && _this5._element !== event.target && !_this5._element.contains(event.target)) {
2807 _this5._element.focus();
2808 }
2809 });
2810 };
2811
2812 _proto._setEscapeEvent = function _setEscapeEvent() {
2813 var _this6 = this;
2814
2815 if (this._isShown) {
2816 EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
2817 if (_this6._config.keyboard && event.key === ESCAPE_KEY$1) {
2818 event.preventDefault();
2819
2820 _this6.hide();
2821 } else if (!_this6._config.keyboard && event.key === ESCAPE_KEY$1) {
2822 _this6._triggerBackdropTransition();
2823 }
2824 });
2825 } else {
2826 EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
2827 }
2828 };
2829
2830 _proto._setResizeEvent = function _setResizeEvent() {
2831 var _this7 = this;
2832
2833 if (this._isShown) {
2834 EventHandler.on(window, EVENT_RESIZE, function () {
2835 return _this7._adjustDialog();
2836 });
2837 } else {
2838 EventHandler.off(window, EVENT_RESIZE);
2839 }
2840 };
2841
2842 _proto._hideModal = function _hideModal() {
2843 var _this8 = this;
2844
2845 this._element.style.display = 'none';
2846
2847 this._element.setAttribute('aria-hidden', true);
2848
2849 this._element.removeAttribute('aria-modal');
2850
2851 this._element.removeAttribute('role');
2852
2853 this._isTransitioning = false;
2854
2855 this._showBackdrop(function () {
2856 document.body.classList.remove(CLASS_NAME_OPEN);
2857
2858 _this8._resetAdjustments();
2859
2860 _this8._resetScrollbar();
2861
2862 EventHandler.trigger(_this8._element, EVENT_HIDDEN$2);
2863 });
2864 };
2865
2866 _proto._removeBackdrop = function _removeBackdrop() {
2867 this._backdrop.parentNode.removeChild(this._backdrop);
2868
2869 this._backdrop = null;
2870 };
2871
2872 _proto._showBackdrop = function _showBackdrop(callback) {
2873 var _this9 = this;
2874
2875 var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
2876
2877 if (this._isShown && this._config.backdrop) {
2878 this._backdrop = document.createElement('div');
2879 this._backdrop.className = CLASS_NAME_BACKDROP;
2880
2881 if (animate) {
2882 this._backdrop.classList.add(animate);
2883 }
2884
2885 document.body.appendChild(this._backdrop);
2886 EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
2887 if (_this9._ignoreBackdropClick) {
2888 _this9._ignoreBackdropClick = false;
2889 return;
2890 }
2891
2892 if (event.target !== event.currentTarget) {
2893 return;
2894 }
2895
2896 if (_this9._config.backdrop === 'static') {
2897 _this9._triggerBackdropTransition();
2898 } else {
2899 _this9.hide();
2900 }
2901 });
2902
2903 if (animate) {
2904 reflow(this._backdrop);
2905 }
2906
2907 this._backdrop.classList.add(CLASS_NAME_SHOW$2);
2908
2909 if (!animate) {
2910 callback();
2911 return;
2912 }
2913
2914 var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
2915 EventHandler.one(this._backdrop, TRANSITION_END, callback);
2916 emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
2917 } else if (!this._isShown && this._backdrop) {
2918 this._backdrop.classList.remove(CLASS_NAME_SHOW$2);
2919
2920 var callbackRemove = function callbackRemove() {
2921 _this9._removeBackdrop();
2922
2923 callback();
2924 };
2925
2926 if (this._element.classList.contains(CLASS_NAME_FADE)) {
2927 var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
2928
2929 EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
2930 emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
2931 } else {
2932 callbackRemove();
2933 }
2934 } else {
2935 callback();
2936 }
2937 };
2938
2939 _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
2940 var _this10 = this;
2941
2942 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2943
2944 if (hideEvent.defaultPrevented) {
2945 return;
2946 }
2947
2948 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2949
2950 if (!isModalOverflowing) {
2951 this._element.style.overflowY = 'hidden';
2952 }
2953
2954 this._element.classList.add(CLASS_NAME_STATIC);
2955
2956 var modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
2957 EventHandler.off(this._element, TRANSITION_END);
2958 EventHandler.one(this._element, TRANSITION_END, function () {
2959 _this10._element.classList.remove(CLASS_NAME_STATIC);
2960
2961 if (!isModalOverflowing) {
2962 EventHandler.one(_this10._element, TRANSITION_END, function () {
2963 _this10._element.style.overflowY = '';
2964 });
2965 emulateTransitionEnd(_this10._element, modalTransitionDuration);
2966 }
2967 });
2968 emulateTransitionEnd(this._element, modalTransitionDuration);
2969
2970 this._element.focus();
2971 }
2972
2973
2974 ;
2975
2976 _proto._adjustDialog = function _adjustDialog() {
2977 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2978
2979 if (!this._isBodyOverflowing && isModalOverflowing && !isRTL || this._isBodyOverflowing && !isModalOverflowing && isRTL) {
2980 this._element.style.paddingLeft = this._scrollbarWidth + "px";
2981 }
2982
2983 if (this._isBodyOverflowing && !isModalOverflowing && !isRTL || !this._isBodyOverflowing && isModalOverflowing && isRTL) {
2984 this._element.style.paddingRight = this._scrollbarWidth + "px";
2985 }
2986 };
2987
2988 _proto._resetAdjustments = function _resetAdjustments() {
2989 this._element.style.paddingLeft = '';
2990 this._element.style.paddingRight = '';
2991 };
2992
2993 _proto._checkScrollbar = function _checkScrollbar() {
2994 var rect = document.body.getBoundingClientRect();
2995 this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
2996 this._scrollbarWidth = this._getScrollbarWidth();
2997 };
2998
2999 _proto._setScrollbar = function _setScrollbar() {
3000 var _this11 = this;
3001
3002 if (this._isBodyOverflowing) {
3003
3004
3005
3006 SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
3007 var actualPadding = element.style.paddingRight;
3008 var calculatedPadding = window.getComputedStyle(element)['padding-right'];
3009 Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
3010 element.style.paddingRight = Number.parseFloat(calculatedPadding) + _this11._scrollbarWidth + "px";
3011 });
3012
3013 SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
3014 var actualMargin = element.style.marginRight;
3015 var calculatedMargin = window.getComputedStyle(element)['margin-right'];
3016 Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
3017 element.style.marginRight = Number.parseFloat(calculatedMargin) - _this11._scrollbarWidth + "px";
3018 });
3019
3020 var actualPadding = document.body.style.paddingRight;
3021 var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
3022 Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
3023 document.body.style.paddingRight = Number.parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
3024 }
3025
3026 document.body.classList.add(CLASS_NAME_OPEN);
3027 };
3028
3029 _proto._resetScrollbar = function _resetScrollbar() {
3030
3031 SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
3032 var padding = Manipulator.getDataAttribute(element, 'padding-right');
3033
3034 if (typeof padding !== 'undefined') {
3035 Manipulator.removeDataAttribute(element, 'padding-right');
3036 element.style.paddingRight = padding;
3037 }
3038 });
3039
3040 SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
3041 var margin = Manipulator.getDataAttribute(element, 'margin-right');
3042
3043 if (typeof margin !== 'undefined') {
3044 Manipulator.removeDataAttribute(element, 'margin-right');
3045 element.style.marginRight = margin;
3046 }
3047 });
3048
3049 var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
3050
3051 if (typeof padding === 'undefined') {
3052 document.body.style.paddingRight = '';
3053 } else {
3054 Manipulator.removeDataAttribute(document.body, 'padding-right');
3055 document.body.style.paddingRight = padding;
3056 }
3057 };
3058
3059 _proto._getScrollbarWidth = function _getScrollbarWidth() {
3060
3061 var scrollDiv = document.createElement('div');
3062 scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
3063 document.body.appendChild(scrollDiv);
3064 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
3065 document.body.removeChild(scrollDiv);
3066 return scrollbarWidth;
3067 }
3068 ;
3069
3070 Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
3071 return this.each(function () {
3072 var data = Data.getData(this, DATA_KEY$5);
3073
3074 var _config = _extends({}, Default$3, Manipulator.getDataAttributes(this), typeof config === 'object' && config ? config : {});
3075
3076 if (!data) {
3077 data = new Modal(this, _config);
3078 }
3079
3080 if (typeof config === 'string') {
3081 if (typeof data[config] === 'undefined') {
3082 throw new TypeError("No method named \"" + config + "\"");
3083 }
3084
3085 data[config](relatedTarget);
3086 }
3087 });
3088 };
3089
3090 _createClass(Modal, null, [{
3091 key: "Default",
3092 get: function get() {
3093 return Default$3;
3094 }
3095 }, {
3096 key: "DATA_KEY",
3097 get: function get() {
3098 return DATA_KEY$5;
3099 }
3100 }]);
3101
3102 return Modal;
3103 }(BaseComponent);
3104
3105
3106
3107
3108
3109
3110
3111 EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
3112 var _this12 = this;
3113
3114 var target = getElementFromSelector(this);
3115
3116 if (this.tagName === 'A' || this.tagName === 'AREA') {
3117 event.preventDefault();
3118 }
3119
3120 EventHandler.one(target, EVENT_SHOW$2, function (showEvent) {
3121 if (showEvent.defaultPrevented) {
3122
3123 return;
3124 }
3125
3126 EventHandler.one(target, EVENT_HIDDEN$2, function () {
3127 if (isVisible(_this12)) {
3128 _this12.focus();
3129 }
3130 });
3131 });
3132 var data = Data.getData(target, DATA_KEY$5);
3133
3134 if (!data) {
3135 var config = _extends({}, Manipulator.getDataAttributes(target), Manipulator.getDataAttributes(this));
3136
3137 data = new Modal(target, config);
3138 }
3139
3140 data.show(this);
3141 });
3142
3143
3144
3145
3146
3147
3148
3149 onDOMContentLoaded(function () {
3150 var $ = getjQuery();
3151
3152
3153 if ($) {
3154 var JQUERY_NO_CONFLICT = $.fn[NAME$5];
3155 $.fn[NAME$5] = Modal.jQueryInterface;
3156 $.fn[NAME$5].Constructor = Modal;
3157
3158 $.fn[NAME$5].noConflict = function () {
3159 $.fn[NAME$5] = JQUERY_NO_CONFLICT;
3160 return Modal.jQueryInterface;
3161 };
3162 }
3163 });
3164
3165
3166
3167
3168
3169
3170
3171 var uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3172 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3173
3174
3175
3176
3177
3178
3179 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
3180
3181
3182
3183
3184
3185
3186 var 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;
3187
3188 var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
3189 var attrName = attr.nodeName.toLowerCase();
3190
3191 if (allowedAttributeList.includes(attrName)) {
3192 if (uriAttrs.has(attrName)) {
3193 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
3194 }
3195
3196 return true;
3197 }
3198
3199 var regExp = allowedAttributeList.filter(function (attrRegex) {
3200 return attrRegex instanceof RegExp;
3201 });
3202
3203 for (var i = 0, len = regExp.length; i < len; i++) {
3204 if (attrName.match(regExp[i])) {
3205 return true;
3206 }
3207 }
3208
3209 return false;
3210 };
3211
3212 var DefaultAllowlist = {
3213
3214 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
3215 a: ['target', 'href', 'title', 'rel'],
3216 area: [],
3217 b: [],
3218 br: [],
3219 col: [],
3220 code: [],
3221 div: [],
3222 em: [],
3223 hr: [],
3224 h1: [],
3225 h2: [],
3226 h3: [],
3227 h4: [],
3228 h5: [],
3229 h6: [],
3230 i: [],
3231 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
3232 li: [],
3233 ol: [],
3234 p: [],
3235 pre: [],
3236 s: [],
3237 small: [],
3238 span: [],
3239 sub: [],
3240 sup: [],
3241 strong: [],
3242 u: [],
3243 ul: []
3244 };
3245 function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
3246 var _ref;
3247
3248 if (!unsafeHtml.length) {
3249 return unsafeHtml;
3250 }
3251
3252 if (sanitizeFn && typeof sanitizeFn === 'function') {
3253 return sanitizeFn(unsafeHtml);
3254 }
3255
3256 var domParser = new window.DOMParser();
3257 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3258 var allowlistKeys = Object.keys(allowList);
3259
3260 var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
3261
3262 var _loop = function _loop(i, len) {
3263 var _ref2;
3264
3265 var el = elements[i];
3266 var elName = el.nodeName.toLowerCase();
3267
3268 if (!allowlistKeys.includes(elName)) {
3269 el.parentNode.removeChild(el);
3270 return "continue";
3271 }
3272
3273 var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
3274
3275 var allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
3276 attributeList.forEach(function (attr) {
3277 if (!allowedAttribute(attr, allowedAttributes)) {
3278 el.removeAttribute(attr.nodeName);
3279 }
3280 });
3281 };
3282
3283 for (var i = 0, len = elements.length; i < len; i++) {
3284 var _ret = _loop(i);
3285
3286 if (_ret === "continue") continue;
3287 }
3288
3289 return createdDocument.body.innerHTML;
3290 }
3291
3292
3293
3294
3295
3296
3297
3298 var NAME$6 = 'tooltip';
3299 var DATA_KEY$6 = 'bs.tooltip';
3300 var EVENT_KEY$6 = "." + DATA_KEY$6;
3301 var CLASS_PREFIX = 'bs-tooltip';
3302 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
3303 var DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3304 var DefaultType$4 = {
3305 animation: 'boolean',
3306 template: 'string',
3307 title: '(string|element|function)',
3308 trigger: 'string',
3309 delay: '(number|object)',
3310 html: 'boolean',
3311 selector: '(string|boolean)',
3312 placement: '(string|function)',
3313 container: '(string|element|boolean)',
3314 fallbackPlacements: '(null|array)',
3315 boundary: '(string|element)',
3316 customClass: '(string|function)',
3317 sanitize: 'boolean',
3318 sanitizeFn: '(null|function)',
3319 allowList: 'object',
3320 popperConfig: '(null|object)'
3321 };
3322 var AttachmentMap = {
3323 AUTO: 'auto',
3324 TOP: 'top',
3325 RIGHT: isRTL ? 'left' : 'right',
3326 BOTTOM: 'bottom',
3327 LEFT: isRTL ? 'right' : 'left'
3328 };
3329 var Default$4 = {
3330 animation: true,
3331 template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3332 trigger: 'hover focus',
3333 title: '',
3334 delay: 0,
3335 html: false,
3336 selector: false,
3337 placement: 'top',
3338 container: false,
3339 fallbackPlacements: null,
3340 boundary: 'clippingParents',
3341 customClass: '',
3342 sanitize: true,
3343 sanitizeFn: null,
3344 allowList: DefaultAllowlist,
3345 popperConfig: null
3346 };
3347 var Event$1 = {
3348 HIDE: "hide" + EVENT_KEY$6,
3349 HIDDEN: "hidden" + EVENT_KEY$6,
3350 SHOW: "show" + EVENT_KEY$6,
3351 SHOWN: "shown" + EVENT_KEY$6,
3352 INSERTED: "inserted" + EVENT_KEY$6,
3353 CLICK: "click" + EVENT_KEY$6,
3354 FOCUSIN: "focusin" + EVENT_KEY$6,
3355 FOCUSOUT: "focusout" + EVENT_KEY$6,
3356 MOUSEENTER: "mouseenter" + EVENT_KEY$6,
3357 MOUSELEAVE: "mouseleave" + EVENT_KEY$6
3358 };
3359 var CLASS_NAME_FADE$1 = 'fade';
3360 var CLASS_NAME_MODAL = 'modal';
3361 var CLASS_NAME_SHOW$3 = 'show';
3362 var HOVER_STATE_SHOW = 'show';
3363 var HOVER_STATE_OUT = 'out';
3364 var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3365 var TRIGGER_HOVER = 'hover';
3366 var TRIGGER_FOCUS = 'focus';
3367 var TRIGGER_CLICK = 'click';
3368 var TRIGGER_MANUAL = 'manual';
3369
3370
3371
3372
3373
3374
3375 var Tooltip = function (_BaseComponent) {
3376 _inheritsLoose(Tooltip, _BaseComponent);
3377
3378 function Tooltip(element, config) {
3379 var _this;
3380
3381 if (typeof Popper__namespace === 'undefined') {
3382 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
3383 }
3384
3385 _this = _BaseComponent.call(this, element) || this;
3386
3387 _this._isEnabled = true;
3388 _this._timeout = 0;
3389 _this._hoverState = '';
3390 _this._activeTrigger = {};
3391 _this._popper = null;
3392
3393 _this.config = _this._getConfig(config);
3394 _this.tip = null;
3395
3396 _this._setListeners();
3397
3398 return _this;
3399 }
3400
3401
3402 var _proto = Tooltip.prototype;
3403
3404
3405 _proto.enable = function enable() {
3406 this._isEnabled = true;
3407 };
3408
3409 _proto.disable = function disable() {
3410 this._isEnabled = false;
3411 };
3412
3413 _proto.toggleEnabled = function toggleEnabled() {
3414 this._isEnabled = !this._isEnabled;
3415 };
3416
3417 _proto.toggle = function toggle(event) {
3418 if (!this._isEnabled) {
3419 return;
3420 }
3421
3422 if (event) {
3423 var dataKey = this.constructor.DATA_KEY;
3424 var context = Data.getData(event.delegateTarget, dataKey);
3425
3426 if (!context) {
3427 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3428 Data.setData(event.delegateTarget, dataKey, context);
3429 }
3430
3431 context._activeTrigger.click = !context._activeTrigger.click;
3432
3433 if (context._isWithActiveTrigger()) {
3434 context._enter(null, context);
3435 } else {
3436 context._leave(null, context);
3437 }
3438 } else {
3439 if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
3440 this._leave(null, this);
3441
3442 return;
3443 }
3444
3445 this._enter(null, this);
3446 }
3447 };
3448
3449 _proto.dispose = function dispose() {
3450 clearTimeout(this._timeout);
3451 EventHandler.off(this._element, this.constructor.EVENT_KEY);
3452 EventHandler.off(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
3453
3454 if (this.tip) {
3455 this.tip.parentNode.removeChild(this.tip);
3456 }
3457
3458 this._isEnabled = null;
3459 this._timeout = null;
3460 this._hoverState = null;
3461 this._activeTrigger = null;
3462
3463 if (this._popper) {
3464 this._popper.destroy();
3465 }
3466
3467 this._popper = null;
3468 this.config = null;
3469 this.tip = null;
3470
3471 _BaseComponent.prototype.dispose.call(this);
3472 };
3473
3474 _proto.show = function show() {
3475 var _this2 = this;
3476
3477 if (this._element.style.display === 'none') {
3478 throw new Error('Please use show on visible elements');
3479 }
3480
3481 if (this.isWithContent() && this._isEnabled) {
3482 var showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
3483 var shadowRoot = findShadowRoot(this._element);
3484 var isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
3485
3486 if (showEvent.defaultPrevented || !isInTheDom) {
3487 return;
3488 }
3489
3490 var tip = this.getTipElement();
3491 var tipId = getUID(this.constructor.NAME);
3492 tip.setAttribute('id', tipId);
3493
3494 this._element.setAttribute('aria-describedby', tipId);
3495
3496 this.setContent();
3497
3498 if (this.config.animation) {
3499 tip.classList.add(CLASS_NAME_FADE$1);
3500 }
3501
3502 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
3503
3504 var attachment = this._getAttachment(placement);
3505
3506 this._addAttachmentClass(attachment);
3507
3508 var container = this._getContainer();
3509
3510 Data.setData(tip, this.constructor.DATA_KEY, this);
3511
3512 if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3513 container.appendChild(tip);
3514 }
3515
3516 EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
3517 this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
3518 tip.classList.add(CLASS_NAME_SHOW$3);
3519 var customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
3520
3521 if (customClass) {
3522 var _tip$classList;
3523
3524 (_tip$classList = tip.classList).add.apply(_tip$classList, customClass.split(' '));
3525 }
3526
3527
3528
3529
3530
3531 if ('ontouchstart' in document.documentElement) {
3532 var _ref;
3533
3534 (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
3535 EventHandler.on(element, 'mouseover', noop());
3536 });
3537 }
3538
3539 var complete = function complete() {
3540 var prevHoverState = _this2._hoverState;
3541 _this2._hoverState = null;
3542 EventHandler.trigger(_this2._element, _this2.constructor.Event.SHOWN);
3543
3544 if (prevHoverState === HOVER_STATE_OUT) {
3545 _this2._leave(null, _this2);
3546 }
3547 };
3548
3549 if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
3550 var transitionDuration = getTransitionDurationFromElement(this.tip);
3551 EventHandler.one(this.tip, TRANSITION_END, complete);
3552 emulateTransitionEnd(this.tip, transitionDuration);
3553 } else {
3554 complete();
3555 }
3556 }
3557 };
3558
3559 _proto.hide = function hide() {
3560 var _this3 = this;
3561
3562 if (!this._popper) {
3563 return;
3564 }
3565
3566 var tip = this.getTipElement();
3567
3568 var complete = function complete() {
3569 if (_this3._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3570 tip.parentNode.removeChild(tip);
3571 }
3572
3573 _this3._cleanTipClass();
3574
3575 _this3._element.removeAttribute('aria-describedby');
3576
3577 EventHandler.trigger(_this3._element, _this3.constructor.Event.HIDDEN);
3578
3579 if (_this3._popper) {
3580 _this3._popper.destroy();
3581
3582 _this3._popper = null;
3583 }
3584 };
3585
3586 var hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
3587
3588 if (hideEvent.defaultPrevented) {
3589 return;
3590 }
3591
3592 tip.classList.remove(CLASS_NAME_SHOW$3);
3593
3594
3595 if ('ontouchstart' in document.documentElement) {
3596 var _ref2;
3597
3598 (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
3599 return EventHandler.off(element, 'mouseover', noop);
3600 });
3601 }
3602
3603 this._activeTrigger[TRIGGER_CLICK] = false;
3604 this._activeTrigger[TRIGGER_FOCUS] = false;
3605 this._activeTrigger[TRIGGER_HOVER] = false;
3606
3607 if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
3608 var transitionDuration = getTransitionDurationFromElement(tip);
3609 EventHandler.one(tip, TRANSITION_END, complete);
3610 emulateTransitionEnd(tip, transitionDuration);
3611 } else {
3612 complete();
3613 }
3614
3615 this._hoverState = '';
3616 };
3617
3618 _proto.update = function update() {
3619 if (this._popper !== null) {
3620 this._popper.update();
3621 }
3622 }
3623 ;
3624
3625 _proto.isWithContent = function isWithContent() {
3626 return Boolean(this.getTitle());
3627 };
3628
3629 _proto.getTipElement = function getTipElement() {
3630 if (this.tip) {
3631 return this.tip;
3632 }
3633
3634 var element = document.createElement('div');
3635 element.innerHTML = this.config.template;
3636 this.tip = element.children[0];
3637 return this.tip;
3638 };
3639
3640 _proto.setContent = function setContent() {
3641 var tip = this.getTipElement();
3642 this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
3643 tip.classList.remove(CLASS_NAME_FADE$1, CLASS_NAME_SHOW$3);
3644 };
3645
3646 _proto.setElementContent = function setElementContent(element, content) {
3647 if (element === null) {
3648 return;
3649 }
3650
3651 if (typeof content === 'object' && isElement(content)) {
3652 if (content.jquery) {
3653 content = content[0];
3654 }
3655
3656
3657 if (this.config.html) {
3658 if (content.parentNode !== element) {
3659 element.innerHTML = '';
3660 element.appendChild(content);
3661 }
3662 } else {
3663 element.textContent = content.textContent;
3664 }
3665
3666 return;
3667 }
3668
3669 if (this.config.html) {
3670 if (this.config.sanitize) {
3671 content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);
3672 }
3673
3674 element.innerHTML = content;
3675 } else {
3676 element.textContent = content;
3677 }
3678 };
3679
3680 _proto.getTitle = function getTitle() {
3681 var title = this._element.getAttribute('data-bs-original-title');
3682
3683 if (!title) {
3684 title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;
3685 }
3686
3687 return title;
3688 };
3689
3690 _proto.updateAttachment = function updateAttachment(attachment) {
3691 if (attachment === 'right') {
3692 return 'end';
3693 }
3694
3695 if (attachment === 'left') {
3696 return 'start';
3697 }
3698
3699 return attachment;
3700 }
3701 ;
3702
3703 _proto._getPopperConfig = function _getPopperConfig(attachment) {
3704 var _this4 = this;
3705
3706 var flipModifier = {
3707 name: 'flip',
3708 options: {
3709 altBoundary: true
3710 }
3711 };
3712
3713 if (this.config.fallbackPlacements) {
3714 flipModifier.options.fallbackPlacements = this.config.fallbackPlacements;
3715 }
3716
3717 var defaultBsConfig = {
3718 placement: attachment,
3719 modifiers: [flipModifier, {
3720 name: 'preventOverflow',
3721 options: {
3722 rootBoundary: this.config.boundary
3723 }
3724 }, {
3725 name: 'arrow',
3726 options: {
3727 element: "." + this.constructor.NAME + "-arrow"
3728 }
3729 }, {
3730 name: 'onChange',
3731 enabled: true,
3732 phase: 'afterWrite',
3733 fn: function fn(data) {
3734 return _this4._handlePopperPlacementChange(data);
3735 }
3736 }],
3737 onFirstUpdate: function onFirstUpdate(data) {
3738 if (data.options.placement !== data.placement) {
3739 _this4._handlePopperPlacementChange(data);
3740 }
3741 }
3742 };
3743 return _extends({}, defaultBsConfig, this.config.popperConfig);
3744 };
3745
3746 _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
3747 this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
3748 };
3749
3750 _proto._getContainer = function _getContainer() {
3751 if (this.config.container === false) {
3752 return document.body;
3753 }
3754
3755 if (isElement(this.config.container)) {
3756 return this.config.container;
3757 }
3758
3759 return SelectorEngine.findOne(this.config.container);
3760 };
3761
3762 _proto._getAttachment = function _getAttachment(placement) {
3763 return AttachmentMap[placement.toUpperCase()];
3764 };
3765
3766 _proto._setListeners = function _setListeners() {
3767 var _this5 = this;
3768
3769 var triggers = this.config.trigger.split(' ');
3770 triggers.forEach(function (trigger) {
3771 if (trigger === 'click') {
3772 EventHandler.on(_this5._element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
3773 return _this5.toggle(event);
3774 });
3775 } else if (trigger !== TRIGGER_MANUAL) {
3776 var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
3777 var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
3778 EventHandler.on(_this5._element, eventIn, _this5.config.selector, function (event) {
3779 return _this5._enter(event);
3780 });
3781 EventHandler.on(_this5._element, eventOut, _this5.config.selector, function (event) {
3782 return _this5._leave(event);
3783 });
3784 }
3785 });
3786
3787 this._hideModalHandler = function () {
3788 if (_this5._element) {
3789 _this5.hide();
3790 }
3791 };
3792
3793 EventHandler.on(this._element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
3794
3795 if (this.config.selector) {
3796 this.config = _extends({}, this.config, {
3797 trigger: 'manual',
3798 selector: ''
3799 });
3800 } else {
3801 this._fixTitle();
3802 }
3803 };
3804
3805 _proto._fixTitle = function _fixTitle() {
3806 var title = this._element.getAttribute('title');
3807
3808 var originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
3809
3810 if (title || originalTitleType !== 'string') {
3811 this._element.setAttribute('data-bs-original-title', title || '');
3812
3813 if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
3814 this._element.setAttribute('aria-label', title);
3815 }
3816
3817 this._element.setAttribute('title', '');
3818 }
3819 };
3820
3821 _proto._enter = function _enter(event, context) {
3822 var dataKey = this.constructor.DATA_KEY;
3823 context = context || Data.getData(event.delegateTarget, dataKey);
3824
3825 if (!context) {
3826 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3827 Data.setData(event.delegateTarget, dataKey, context);
3828 }
3829
3830 if (event) {
3831 context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3832 }
3833
3834 if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
3835 context._hoverState = HOVER_STATE_SHOW;
3836 return;
3837 }
3838
3839 clearTimeout(context._timeout);
3840 context._hoverState = HOVER_STATE_SHOW;
3841
3842 if (!context.config.delay || !context.config.delay.show) {
3843 context.show();
3844 return;
3845 }
3846
3847 context._timeout = setTimeout(function () {
3848 if (context._hoverState === HOVER_STATE_SHOW) {
3849 context.show();
3850 }
3851 }, context.config.delay.show);
3852 };
3853
3854 _proto._leave = function _leave(event, context) {
3855 var dataKey = this.constructor.DATA_KEY;
3856 context = context || Data.getData(event.delegateTarget, dataKey);
3857
3858 if (!context) {
3859 context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3860 Data.setData(event.delegateTarget, dataKey, context);
3861 }
3862
3863 if (event) {
3864 context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
3865 }
3866
3867 if (context._isWithActiveTrigger()) {
3868 return;
3869 }
3870
3871 clearTimeout(context._timeout);
3872 context._hoverState = HOVER_STATE_OUT;
3873
3874 if (!context.config.delay || !context.config.delay.hide) {
3875 context.hide();
3876 return;
3877 }
3878
3879 context._timeout = setTimeout(function () {
3880 if (context._hoverState === HOVER_STATE_OUT) {
3881 context.hide();
3882 }
3883 }, context.config.delay.hide);
3884 };
3885
3886 _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
3887 for (var trigger in this._activeTrigger) {
3888 if (this._activeTrigger[trigger]) {
3889 return true;
3890 }
3891 }
3892
3893 return false;
3894 };
3895
3896 _proto._getConfig = function _getConfig(config) {
3897 var dataAttributes = Manipulator.getDataAttributes(this._element);
3898 Object.keys(dataAttributes).forEach(function (dataAttr) {
3899 if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
3900 delete dataAttributes[dataAttr];
3901 }
3902 });
3903
3904 if (config && typeof config.container === 'object' && config.container.jquery) {
3905 config.container = config.container[0];
3906 }
3907
3908 config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
3909
3910 if (typeof config.delay === 'number') {
3911 config.delay = {
3912 show: config.delay,
3913 hide: config.delay
3914 };
3915 }
3916
3917 if (typeof config.title === 'number') {
3918 config.title = config.title.toString();
3919 }
3920
3921 if (typeof config.content === 'number') {
3922 config.content = config.content.toString();
3923 }
3924
3925 typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
3926
3927 if (config.sanitize) {
3928 config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
3929 }
3930
3931 return config;
3932 };
3933
3934 _proto._getDelegateConfig = function _getDelegateConfig() {
3935 var config = {};
3936
3937 if (this.config) {
3938 for (var key in this.config) {
3939 if (this.constructor.Default[key] !== this.config[key]) {
3940 config[key] = this.config[key];
3941 }
3942 }
3943 }
3944
3945 return config;
3946 };
3947
3948 _proto._cleanTipClass = function _cleanTipClass() {
3949 var tip = this.getTipElement();
3950 var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
3951
3952 if (tabClass !== null && tabClass.length > 0) {
3953 tabClass.map(function (token) {
3954 return token.trim();
3955 }).forEach(function (tClass) {
3956 return tip.classList.remove(tClass);
3957 });
3958 }
3959 };
3960
3961 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
3962 var state = popperData.state;
3963
3964 if (!state) {
3965 return;
3966 }
3967
3968 this.tip = state.elements.popper;
3969
3970 this._cleanTipClass();
3971
3972 this._addAttachmentClass(this._getAttachment(state.placement));
3973 }
3974 ;
3975
3976 Tooltip.jQueryInterface = function jQueryInterface(config) {
3977 return this.each(function () {
3978 var data = Data.getData(this, DATA_KEY$6);
3979
3980 var _config = typeof config === 'object' && config;
3981
3982 if (!data && /dispose|hide/.test(config)) {
3983 return;
3984 }
3985
3986 if (!data) {
3987 data = new Tooltip(this, _config);
3988 }
3989
3990 if (typeof config === 'string') {
3991 if (typeof data[config] === 'undefined') {
3992 throw new TypeError("No method named \"" + config + "\"");
3993 }
3994
3995 data[config]();
3996 }
3997 });
3998 };
3999
4000 _createClass(Tooltip, null, [{
4001 key: "Default",
4002 get: function get() {
4003 return Default$4;
4004 }
4005 }, {
4006 key: "NAME",
4007 get: function get() {
4008 return NAME$6;
4009 }
4010 }, {
4011 key: "DATA_KEY",
4012 get: function get() {
4013 return DATA_KEY$6;
4014 }
4015 }, {
4016 key: "Event",
4017 get: function get() {
4018 return Event$1;
4019 }
4020 }, {
4021 key: "EVENT_KEY",
4022 get: function get() {
4023 return EVENT_KEY$6;
4024 }
4025 }, {
4026 key: "DefaultType",
4027 get: function get() {
4028 return DefaultType$4;
4029 }
4030 }]);
4031
4032 return Tooltip;
4033 }(BaseComponent);
4034
4035
4036
4037
4038
4039
4040
4041
4042 onDOMContentLoaded(function () {
4043 var $ = getjQuery();
4044
4045
4046 if ($) {
4047 var JQUERY_NO_CONFLICT = $.fn[NAME$6];
4048 $.fn[NAME$6] = Tooltip.jQueryInterface;
4049 $.fn[NAME$6].Constructor = Tooltip;
4050
4051 $.fn[NAME$6].noConflict = function () {
4052 $.fn[NAME$6] = JQUERY_NO_CONFLICT;
4053 return Tooltip.jQueryInterface;
4054 };
4055 }
4056 });
4057
4058
4059
4060
4061
4062
4063
4064 var NAME$7 = 'popover';
4065 var DATA_KEY$7 = 'bs.popover';
4066 var EVENT_KEY$7 = "." + DATA_KEY$7;
4067 var CLASS_PREFIX$1 = 'bs-popover';
4068 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
4069
4070 var Default$5 = _extends({}, Tooltip.Default, {
4071 placement: 'right',
4072 trigger: 'click',
4073 content: '',
4074 template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
4075 });
4076
4077 var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
4078 content: '(string|element|function)'
4079 });
4080
4081 var Event$2 = {
4082 HIDE: "hide" + EVENT_KEY$7,
4083 HIDDEN: "hidden" + EVENT_KEY$7,
4084 SHOW: "show" + EVENT_KEY$7,
4085 SHOWN: "shown" + EVENT_KEY$7,
4086 INSERTED: "inserted" + EVENT_KEY$7,
4087 CLICK: "click" + EVENT_KEY$7,
4088 FOCUSIN: "focusin" + EVENT_KEY$7,
4089 FOCUSOUT: "focusout" + EVENT_KEY$7,
4090 MOUSEENTER: "mouseenter" + EVENT_KEY$7,
4091 MOUSELEAVE: "mouseleave" + EVENT_KEY$7
4092 };
4093 var CLASS_NAME_FADE$2 = 'fade';
4094 var CLASS_NAME_SHOW$4 = 'show';
4095 var SELECTOR_TITLE = '.popover-header';
4096 var SELECTOR_CONTENT = '.popover-body';
4097
4098
4099
4100
4101
4102
4103 var Popover = function (_Tooltip) {
4104 _inheritsLoose(Popover, _Tooltip);
4105
4106 function Popover() {
4107 return _Tooltip.apply(this, arguments) || this;
4108 }
4109
4110 var _proto = Popover.prototype;
4111
4112
4113 _proto.isWithContent = function isWithContent() {
4114 return this.getTitle() || this._getContent();
4115 };
4116
4117 _proto.setContent = function setContent() {
4118 var tip = this.getTipElement();
4119
4120 this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
4121
4122 var content = this._getContent();
4123
4124 if (typeof content === 'function') {
4125 content = content.call(this._element);
4126 }
4127
4128 this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
4129 tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4);
4130 }
4131 ;
4132
4133 _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
4134 this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + this.updateAttachment(attachment));
4135 };
4136
4137 _proto._getContent = function _getContent() {
4138 return this._element.getAttribute('data-bs-content') || this.config.content;
4139 };
4140
4141 _proto._cleanTipClass = function _cleanTipClass() {
4142 var tip = this.getTipElement();
4143 var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
4144
4145 if (tabClass !== null && tabClass.length > 0) {
4146 tabClass.map(function (token) {
4147 return token.trim();
4148 }).forEach(function (tClass) {
4149 return tip.classList.remove(tClass);
4150 });
4151 }
4152 }
4153 ;
4154
4155 Popover.jQueryInterface = function jQueryInterface(config) {
4156 return this.each(function () {
4157 var data = Data.getData(this, DATA_KEY$7);
4158
4159 var _config = typeof config === 'object' ? config : null;
4160
4161 if (!data && /dispose|hide/.test(config)) {
4162 return;
4163 }
4164
4165 if (!data) {
4166 data = new Popover(this, _config);
4167 Data.setData(this, DATA_KEY$7, data);
4168 }
4169
4170 if (typeof config === 'string') {
4171 if (typeof data[config] === 'undefined') {
4172 throw new TypeError("No method named \"" + config + "\"");
4173 }
4174
4175 data[config]();
4176 }
4177 });
4178 };
4179
4180 _createClass(Popover, null, [{
4181 key: "Default",
4182
4183 get: function get() {
4184 return Default$5;
4185 }
4186 }, {
4187 key: "NAME",
4188 get: function get() {
4189 return NAME$7;
4190 }
4191 }, {
4192 key: "DATA_KEY",
4193 get: function get() {
4194 return DATA_KEY$7;
4195 }
4196 }, {
4197 key: "Event",
4198 get: function get() {
4199 return Event$2;
4200 }
4201 }, {
4202 key: "EVENT_KEY",
4203 get: function get() {
4204 return EVENT_KEY$7;
4205 }
4206 }, {
4207 key: "DefaultType",
4208 get: function get() {
4209 return DefaultType$5;
4210 }
4211 }]);
4212
4213 return Popover;
4214 }(Tooltip);
4215
4216
4217
4218
4219
4220
4221
4222
4223 onDOMContentLoaded(function () {
4224 var $ = getjQuery();
4225
4226
4227 if ($) {
4228 var JQUERY_NO_CONFLICT = $.fn[NAME$7];
4229 $.fn[NAME$7] = Popover.jQueryInterface;
4230 $.fn[NAME$7].Constructor = Popover;
4231
4232 $.fn[NAME$7].noConflict = function () {
4233 $.fn[NAME$7] = JQUERY_NO_CONFLICT;
4234 return Popover.jQueryInterface;
4235 };
4236 }
4237 });
4238
4239
4240
4241
4242
4243
4244
4245 var NAME$8 = 'scrollspy';
4246 var DATA_KEY$8 = 'bs.scrollspy';
4247 var EVENT_KEY$8 = "." + DATA_KEY$8;
4248 var DATA_API_KEY$6 = '.data-api';
4249 var Default$6 = {
4250 offset: 10,
4251 method: 'auto',
4252 target: ''
4253 };
4254 var DefaultType$6 = {
4255 offset: 'number',
4256 method: 'string',
4257 target: '(string|element)'
4258 };
4259 var EVENT_ACTIVATE = "activate" + EVENT_KEY$8;
4260 var EVENT_SCROLL = "scroll" + EVENT_KEY$8;
4261 var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
4262 var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
4263 var CLASS_NAME_ACTIVE$2 = 'active';
4264 var SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
4265 var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
4266 var SELECTOR_NAV_LINKS = '.nav-link';
4267 var SELECTOR_NAV_ITEMS = '.nav-item';
4268 var SELECTOR_LIST_ITEMS = '.list-group-item';
4269 var SELECTOR_DROPDOWN = '.dropdown';
4270 var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4271 var METHOD_OFFSET = 'offset';
4272 var METHOD_POSITION = 'position';
4273
4274
4275
4276
4277
4278
4279 var ScrollSpy = function (_BaseComponent) {
4280 _inheritsLoose(ScrollSpy, _BaseComponent);
4281
4282 function ScrollSpy(element, config) {
4283 var _this;
4284
4285 _this = _BaseComponent.call(this, element) || this;
4286 _this._scrollElement = element.tagName === 'BODY' ? window : element;
4287 _this._config = _this._getConfig(config);
4288 _this._selector = _this._config.target + " " + SELECTOR_NAV_LINKS + ", " + _this._config.target + " " + SELECTOR_LIST_ITEMS + ", " + _this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM;
4289 _this._offsets = [];
4290 _this._targets = [];
4291 _this._activeTarget = null;
4292 _this._scrollHeight = 0;
4293 EventHandler.on(_this._scrollElement, EVENT_SCROLL, function (event) {
4294 return _this._process(event);
4295 });
4296
4297 _this.refresh();
4298
4299 _this._process();
4300
4301 return _this;
4302 }
4303
4304
4305 var _proto = ScrollSpy.prototype;
4306
4307
4308 _proto.refresh = function refresh() {
4309 var _this2 = this;
4310
4311 var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
4312 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
4313 var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
4314 this._offsets = [];
4315 this._targets = [];
4316 this._scrollHeight = this._getScrollHeight();
4317 var targets = SelectorEngine.find(this._selector);
4318 targets.map(function (element) {
4319 var targetSelector = getSelectorFromElement(element);
4320 var target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
4321
4322 if (target) {
4323 var targetBCR = target.getBoundingClientRect();
4324
4325 if (targetBCR.width || targetBCR.height) {
4326 return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
4327 }
4328 }
4329
4330 return null;
4331 }).filter(function (item) {
4332 return item;
4333 }).sort(function (a, b) {
4334 return a[0] - b[0];
4335 }).forEach(function (item) {
4336 _this2._offsets.push(item[0]);
4337
4338 _this2._targets.push(item[1]);
4339 });
4340 };
4341
4342 _proto.dispose = function dispose() {
4343 _BaseComponent.prototype.dispose.call(this);
4344
4345 EventHandler.off(this._scrollElement, EVENT_KEY$8);
4346 this._scrollElement = null;
4347 this._config = null;
4348 this._selector = null;
4349 this._offsets = null;
4350 this._targets = null;
4351 this._activeTarget = null;
4352 this._scrollHeight = null;
4353 }
4354 ;
4355
4356 _proto._getConfig = function _getConfig(config) {
4357 config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
4358
4359 if (typeof config.target !== 'string' && isElement(config.target)) {
4360 var id = config.target.id;
4361
4362 if (!id) {
4363 id = getUID(NAME$8);
4364 config.target.id = id;
4365 }
4366
4367 config.target = "#" + id;
4368 }
4369
4370 typeCheckConfig(NAME$8, config, DefaultType$6);
4371 return config;
4372 };
4373
4374 _proto._getScrollTop = function _getScrollTop() {
4375 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
4376 };
4377
4378 _proto._getScrollHeight = function _getScrollHeight() {
4379 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
4380 };
4381
4382 _proto._getOffsetHeight = function _getOffsetHeight() {
4383 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
4384 };
4385
4386 _proto._process = function _process() {
4387 var scrollTop = this._getScrollTop() + this._config.offset;
4388
4389 var scrollHeight = this._getScrollHeight();
4390
4391 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
4392
4393 if (this._scrollHeight !== scrollHeight) {
4394 this.refresh();
4395 }
4396
4397 if (scrollTop >= maxScroll) {
4398 var target = this._targets[this._targets.length - 1];
4399
4400 if (this._activeTarget !== target) {
4401 this._activate(target);
4402 }
4403
4404 return;
4405 }
4406
4407 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
4408 this._activeTarget = null;
4409
4410 this._clear();
4411
4412 return;
4413 }
4414
4415 for (var i = this._offsets.length; i--;) {
4416 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
4417
4418 if (isActiveTarget) {
4419 this._activate(this._targets[i]);
4420 }
4421 }
4422 };
4423
4424 _proto._activate = function _activate(target) {
4425 this._activeTarget = target;
4426
4427 this._clear();
4428
4429 var queries = this._selector.split(',').map(function (selector) {
4430 return selector + "[data-bs-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
4431 });
4432
4433 var link = SelectorEngine.findOne(queries.join(','));
4434
4435 if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
4436 SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$2);
4437 link.classList.add(CLASS_NAME_ACTIVE$2);
4438 } else {
4439
4440 link.classList.add(CLASS_NAME_ACTIVE$2);
4441 SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {
4442
4443
4444 SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
4445 return item.classList.add(CLASS_NAME_ACTIVE$2);
4446 });
4447
4448 SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
4449 SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
4450 return item.classList.add(CLASS_NAME_ACTIVE$2);
4451 });
4452 });
4453 });
4454 }
4455
4456 EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
4457 relatedTarget: target
4458 });
4459 };
4460
4461 _proto._clear = function _clear() {
4462 SelectorEngine.find(this._selector).filter(function (node) {
4463 return node.classList.contains(CLASS_NAME_ACTIVE$2);
4464 }).forEach(function (node) {
4465 return node.classList.remove(CLASS_NAME_ACTIVE$2);
4466 });
4467 }
4468 ;
4469
4470 ScrollSpy.jQueryInterface = function jQueryInterface(config) {
4471 return this.each(function () {
4472 var data = Data.getData(this, DATA_KEY$8);
4473
4474 var _config = typeof config === 'object' && config;
4475
4476 if (!data) {
4477 data = new ScrollSpy(this, _config);
4478 }
4479
4480 if (typeof config === 'string') {
4481 if (typeof data[config] === 'undefined') {
4482 throw new TypeError("No method named \"" + config + "\"");
4483 }
4484
4485 data[config]();
4486 }
4487 });
4488 };
4489
4490 _createClass(ScrollSpy, null, [{
4491 key: "Default",
4492 get: function get() {
4493 return Default$6;
4494 }
4495 }, {
4496 key: "DATA_KEY",
4497 get: function get() {
4498 return DATA_KEY$8;
4499 }
4500 }]);
4501
4502 return ScrollSpy;
4503 }(BaseComponent);
4504
4505
4506
4507
4508
4509
4510
4511 EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () {
4512 SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
4513 return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
4514 });
4515 });
4516
4517
4518
4519
4520
4521
4522
4523 onDOMContentLoaded(function () {
4524 var $ = getjQuery();
4525
4526
4527 if ($) {
4528 var JQUERY_NO_CONFLICT = $.fn[NAME$8];
4529 $.fn[NAME$8] = ScrollSpy.jQueryInterface;
4530 $.fn[NAME$8].Constructor = ScrollSpy;
4531
4532 $.fn[NAME$8].noConflict = function () {
4533 $.fn[NAME$8] = JQUERY_NO_CONFLICT;
4534 return ScrollSpy.jQueryInterface;
4535 };
4536 }
4537 });
4538
4539
4540
4541
4542
4543
4544
4545 var NAME$9 = 'tab';
4546 var DATA_KEY$9 = 'bs.tab';
4547 var EVENT_KEY$9 = "." + DATA_KEY$9;
4548 var DATA_API_KEY$7 = '.data-api';
4549 var EVENT_HIDE$3 = "hide" + EVENT_KEY$9;
4550 var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$9;
4551 var EVENT_SHOW$3 = "show" + EVENT_KEY$9;
4552 var EVENT_SHOWN$3 = "shown" + EVENT_KEY$9;
4553 var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$9 + DATA_API_KEY$7;
4554 var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
4555 var CLASS_NAME_ACTIVE$3 = 'active';
4556 var CLASS_NAME_DISABLED$1 = 'disabled';
4557 var CLASS_NAME_FADE$3 = 'fade';
4558 var CLASS_NAME_SHOW$5 = 'show';
4559 var SELECTOR_DROPDOWN$1 = '.dropdown';
4560 var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
4561 var SELECTOR_ACTIVE$1 = '.active';
4562 var SELECTOR_ACTIVE_UL = ':scope > li > .active';
4563 var SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
4564 var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4565 var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
4566
4567
4568
4569
4570
4571
4572 var Tab = function (_BaseComponent) {
4573 _inheritsLoose(Tab, _BaseComponent);
4574
4575 function Tab() {
4576 return _BaseComponent.apply(this, arguments) || this;
4577 }
4578
4579 var _proto = Tab.prototype;
4580
4581
4582 _proto.show = function show() {
4583 var _this = this;
4584
4585 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE$3) || this._element.classList.contains(CLASS_NAME_DISABLED$1)) {
4586 return;
4587 }
4588
4589 var previous;
4590 var target = getElementFromSelector(this._element);
4591
4592 var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP$1);
4593
4594 if (listElement) {
4595 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$1;
4596 previous = SelectorEngine.find(itemSelector, listElement);
4597 previous = previous[previous.length - 1];
4598 }
4599
4600 var hideEvent = null;
4601
4602 if (previous) {
4603 hideEvent = EventHandler.trigger(previous, EVENT_HIDE$3, {
4604 relatedTarget: this._element
4605 });
4606 }
4607
4608 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
4609 relatedTarget: previous
4610 });
4611
4612 if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
4613 return;
4614 }
4615
4616 this._activate(this._element, listElement);
4617
4618 var complete = function complete() {
4619 EventHandler.trigger(previous, EVENT_HIDDEN$3, {
4620 relatedTarget: _this._element
4621 });
4622 EventHandler.trigger(_this._element, EVENT_SHOWN$3, {
4623 relatedTarget: previous
4624 });
4625 };
4626
4627 if (target) {
4628 this._activate(target, target.parentNode, complete);
4629 } else {
4630 complete();
4631 }
4632 }
4633 ;
4634
4635 _proto._activate = function _activate(element, container, callback) {
4636 var _this2 = this;
4637
4638 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1);
4639 var active = activeElements[0];
4640 var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$3);
4641
4642 var complete = function complete() {
4643 return _this2._transitionComplete(element, active, callback);
4644 };
4645
4646 if (active && isTransitioning) {
4647 var transitionDuration = getTransitionDurationFromElement(active);
4648 active.classList.remove(CLASS_NAME_SHOW$5);
4649 EventHandler.one(active, TRANSITION_END, complete);
4650 emulateTransitionEnd(active, transitionDuration);
4651 } else {
4652 complete();
4653 }
4654 };
4655
4656 _proto._transitionComplete = function _transitionComplete(element, active, callback) {
4657 if (active) {
4658 active.classList.remove(CLASS_NAME_ACTIVE$3);
4659 var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
4660
4661 if (dropdownChild) {
4662 dropdownChild.classList.remove(CLASS_NAME_ACTIVE$3);
4663 }
4664
4665 if (active.getAttribute('role') === 'tab') {
4666 active.setAttribute('aria-selected', false);
4667 }
4668 }
4669
4670 element.classList.add(CLASS_NAME_ACTIVE$3);
4671
4672 if (element.getAttribute('role') === 'tab') {
4673 element.setAttribute('aria-selected', true);
4674 }
4675
4676 reflow(element);
4677
4678 if (element.classList.contains(CLASS_NAME_FADE$3)) {
4679 element.classList.add(CLASS_NAME_SHOW$5);
4680 }
4681
4682 if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
4683 var dropdownElement = element.closest(SELECTOR_DROPDOWN$1);
4684
4685 if (dropdownElement) {
4686 SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE$1).forEach(function (dropdown) {
4687 return dropdown.classList.add(CLASS_NAME_ACTIVE$3);
4688 });
4689 }
4690
4691 element.setAttribute('aria-expanded', true);
4692 }
4693
4694 if (callback) {
4695 callback();
4696 }
4697 }
4698 ;
4699
4700 Tab.jQueryInterface = function jQueryInterface(config) {
4701 return this.each(function () {
4702 var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
4703
4704 if (typeof config === 'string') {
4705 if (typeof data[config] === 'undefined') {
4706 throw new TypeError("No method named \"" + config + "\"");
4707 }
4708
4709 data[config]();
4710 }
4711 });
4712 };
4713
4714 _createClass(Tab, null, [{
4715 key: "DATA_KEY",
4716
4717 get: function get() {
4718 return DATA_KEY$9;
4719 }
4720 }]);
4721
4722 return Tab;
4723 }(BaseComponent);
4724
4725
4726
4727
4728
4729
4730
4731 EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
4732 event.preventDefault();
4733 var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
4734 data.show();
4735 });
4736
4737
4738
4739
4740
4741
4742
4743 onDOMContentLoaded(function () {
4744 var $ = getjQuery();
4745
4746
4747 if ($) {
4748 var JQUERY_NO_CONFLICT = $.fn[NAME$9];
4749 $.fn[NAME$9] = Tab.jQueryInterface;
4750 $.fn[NAME$9].Constructor = Tab;
4751
4752 $.fn[NAME$9].noConflict = function () {
4753 $.fn[NAME$9] = JQUERY_NO_CONFLICT;
4754 return Tab.jQueryInterface;
4755 };
4756 }
4757 });
4758
4759
4760
4761
4762
4763
4764
4765 var NAME$a = 'toast';
4766 var DATA_KEY$a = 'bs.toast';
4767 var EVENT_KEY$a = "." + DATA_KEY$a;
4768 var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$a;
4769 var EVENT_HIDE$4 = "hide" + EVENT_KEY$a;
4770 var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
4771 var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
4772 var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
4773 var CLASS_NAME_FADE$4 = 'fade';
4774 var CLASS_NAME_HIDE = 'hide';
4775 var CLASS_NAME_SHOW$6 = 'show';
4776 var CLASS_NAME_SHOWING = 'showing';
4777 var DefaultType$7 = {
4778 animation: 'boolean',
4779 autohide: 'boolean',
4780 delay: 'number'
4781 };
4782 var Default$7 = {
4783 animation: true,
4784 autohide: true,
4785 delay: 5000
4786 };
4787 var SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="toast"]';
4788
4789
4790
4791
4792
4793
4794 var Toast = function (_BaseComponent) {
4795 _inheritsLoose(Toast, _BaseComponent);
4796
4797 function Toast(element, config) {
4798 var _this;
4799
4800 _this = _BaseComponent.call(this, element) || this;
4801 _this._config = _this._getConfig(config);
4802 _this._timeout = null;
4803
4804 _this._setListeners();
4805
4806 return _this;
4807 }
4808
4809
4810 var _proto = Toast.prototype;
4811
4812
4813 _proto.show = function show() {
4814 var _this2 = this;
4815
4816 var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4);
4817
4818 if (showEvent.defaultPrevented) {
4819 return;
4820 }
4821
4822 this._clearTimeout();
4823
4824 if (this._config.animation) {
4825 this._element.classList.add(CLASS_NAME_FADE$4);
4826 }
4827
4828 var complete = function complete() {
4829 _this2._element.classList.remove(CLASS_NAME_SHOWING);
4830
4831 _this2._element.classList.add(CLASS_NAME_SHOW$6);
4832
4833 EventHandler.trigger(_this2._element, EVENT_SHOWN$4);
4834
4835 if (_this2._config.autohide) {
4836 _this2._timeout = setTimeout(function () {
4837 _this2.hide();
4838 }, _this2._config.delay);
4839 }
4840 };
4841
4842 this._element.classList.remove(CLASS_NAME_HIDE);
4843
4844 reflow(this._element);
4845
4846 this._element.classList.add(CLASS_NAME_SHOWING);
4847
4848 if (this._config.animation) {
4849 var transitionDuration = getTransitionDurationFromElement(this._element);
4850 EventHandler.one(this._element, TRANSITION_END, complete);
4851 emulateTransitionEnd(this._element, transitionDuration);
4852 } else {
4853 complete();
4854 }
4855 };
4856
4857 _proto.hide = function hide() {
4858 var _this3 = this;
4859
4860 if (!this._element.classList.contains(CLASS_NAME_SHOW$6)) {
4861 return;
4862 }
4863
4864 var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
4865
4866 if (hideEvent.defaultPrevented) {
4867 return;
4868 }
4869
4870 var complete = function complete() {
4871 _this3._element.classList.add(CLASS_NAME_HIDE);
4872
4873 EventHandler.trigger(_this3._element, EVENT_HIDDEN$4);
4874 };
4875
4876 this._element.classList.remove(CLASS_NAME_SHOW$6);
4877
4878 if (this._config.animation) {
4879 var transitionDuration = getTransitionDurationFromElement(this._element);
4880 EventHandler.one(this._element, TRANSITION_END, complete);
4881 emulateTransitionEnd(this._element, transitionDuration);
4882 } else {
4883 complete();
4884 }
4885 };
4886
4887 _proto.dispose = function dispose() {
4888 this._clearTimeout();
4889
4890 if (this._element.classList.contains(CLASS_NAME_SHOW$6)) {
4891 this._element.classList.remove(CLASS_NAME_SHOW$6);
4892 }
4893
4894 EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);
4895
4896 _BaseComponent.prototype.dispose.call(this);
4897
4898 this._config = null;
4899 }
4900 ;
4901
4902 _proto._getConfig = function _getConfig(config) {
4903 config = _extends({}, Default$7, Manipulator.getDataAttributes(this._element), typeof config === 'object' && config ? config : {});
4904 typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
4905 return config;
4906 };
4907
4908 _proto._setListeners = function _setListeners() {
4909 var _this4 = this;
4910
4911 EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
4912 return _this4.hide();
4913 });
4914 };
4915
4916 _proto._clearTimeout = function _clearTimeout() {
4917 clearTimeout(this._timeout);
4918 this._timeout = null;
4919 }
4920 ;
4921
4922 Toast.jQueryInterface = function jQueryInterface(config) {
4923 return this.each(function () {
4924 var data = Data.getData(this, DATA_KEY$a);
4925
4926 var _config = typeof config === 'object' && config;
4927
4928 if (!data) {
4929 data = new Toast(this, _config);
4930 }
4931
4932 if (typeof config === 'string') {
4933 if (typeof data[config] === 'undefined') {
4934 throw new TypeError("No method named \"" + config + "\"");
4935 }
4936
4937 data[config](this);
4938 }
4939 });
4940 };
4941
4942 _createClass(Toast, null, [{
4943 key: "DefaultType",
4944 get: function get() {
4945 return DefaultType$7;
4946 }
4947 }, {
4948 key: "Default",
4949 get: function get() {
4950 return Default$7;
4951 }
4952 }, {
4953 key: "DATA_KEY",
4954 get: function get() {
4955 return DATA_KEY$a;
4956 }
4957 }]);
4958
4959 return Toast;
4960 }(BaseComponent);
4961
4962
4963
4964
4965
4966
4967
4968
4969 onDOMContentLoaded(function () {
4970 var $ = getjQuery();
4971
4972
4973 if ($) {
4974 var JQUERY_NO_CONFLICT = $.fn[NAME$a];
4975 $.fn[NAME$a] = Toast.jQueryInterface;
4976 $.fn[NAME$a].Constructor = Toast;
4977
4978 $.fn[NAME$a].noConflict = function () {
4979 $.fn[NAME$a] = JQUERY_NO_CONFLICT;
4980 return Toast.jQueryInterface;
4981 };
4982 }
4983 });
4984
4985
4986
4987
4988
4989
4990
4991 var index_umd = {
4992 Alert: Alert,
4993 Button: Button,
4994 Carousel: Carousel,
4995 Collapse: Collapse,
4996 Dropdown: Dropdown,
4997 Modal: Modal,
4998 Popover: Popover,
4999 ScrollSpy: ScrollSpy,
5000 Tab: Tab,
5001 Toast: Toast,
5002 Tooltip: Tooltip
5003 };
5004
5005 return index_umd;
5006
5007 })));
5008