administrate-bootstrap-theme 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -10
  3. data/app/assets/javascripts/administrate-bootstrap-theme/bootstrap/bootstrap.bundle.js +806 -793
  4. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +2 -2
  5. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_accordion.scss +4 -2
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss +7 -13
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_list-group.scss +5 -5
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +1 -0
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +2 -20
  10. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +11 -11
  11. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_spinners.scss +2 -2
  12. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +1 -0
  13. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss +7 -7
  14. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +1 -1
  15. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +1 -1
  16. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss +1 -1
  17. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss +1 -1
  18. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_color-scheme.scss +7 -0
  19. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_forms.scss +15 -5
  20. data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +8 -3
  21. data/app/assets/stylesheets/administrate-bootstrap-theme/flatpickr/{flatpickr.css → flatpickr.scss} +0 -0
  22. data/lib/administrate-bootstrap-theme/version.rb +1 -1
  23. data/package.json +11 -0
  24. metadata +6 -5
  25. data/Rakefile +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cad69b75862fbb6154ec991a8229815262947ab8e2feb50f534b4144d868c827
4
- data.tar.gz: 221e38d25bd3fac6e3acd4a551cdb1cb812597c072c2aef10591ec3fbec40390
3
+ metadata.gz: 7f5c9e7796dff0685744b42182407312126a508ea641a1160f751fbef5c1bf9f
4
+ data.tar.gz: d978d2e0541202ea70fc6f950eb9206e4f4bd91a4dcf95fed51d1e9f1f59e981
5
5
  SHA512:
6
- metadata.gz: d92b856f83e57d4fa11c3bc97ced72eb5fb7f035b0a9962d15a20f9e669ff56d4ec0b6f598efc5e7ac18a5f2a9b114cdb06ce5e273742bd39aeaed1ba7f9c487
7
- data.tar.gz: c9d94ca184cb4ad5ce32adb14aaf67ba807839c7d3a5223b076c3bea1bbf0fb6ef01e70a33006254186a2c6b5204eac2e46ca0b533a76a776cf7cc4e362b9f47
6
+ metadata.gz: 7a710260a02ce0c73a8be1dfc7c34feb095088b777d3f402b0e8882748d5c3e131cf2ac79b3ab7dec0e9254ca97bd26c3a3608e9b91d1eb0c849b9b907581e78
7
+ data.tar.gz: 695d8e6a10925f2567016f443135ac9ed3ebeb821419b63f148d5a63a9d28f3082d67f3ecb9e0ec6e2de76f3b78019b6554c29823e584a55d4353cafac15e93c
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Administrate Bootstrap Theme [![Gem Version](https://badge.fury.io/rb/administrate-bootstrap-theme.svg)](https://badge.fury.io/rb/administrate-bootstrap-theme) [![Specs](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml)
1
+ # Administrate Bootstrap Theme [![Gem Version](https://badge.fury.io/rb/administrate-bootstrap-theme.svg)](https://badge.fury.io/rb/administrate-bootstrap-theme) [![linters](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/linters.yml) [![Specs](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml)
2
2
 
3
- A Bootstrap 5 (_beta_) theme for [Administrate](https://github.com/thoughtbot/administrate).
3
+ A Bootstrap 5 theme for [Administrate](https://github.com/thoughtbot/administrate).
4
4
 
5
5
  Features:
6
6
  - easy to install, just include CSS/JS to apply the theme to a default Administrate structure;
@@ -10,6 +10,7 @@ Features:
10
10
  See some [screenshots](#screenshots).
11
11
 
12
12
  ## Installation
13
+
13
14
  - Add to *Gemfile* (of an Administrate project): `gem 'administrate-bootstrap-theme'` (and execute `bundle`)
14
15
  - Add to *app/assets/config/manifest.js*:
15
16
 
@@ -34,6 +35,7 @@ See some [screenshots](#screenshots).
34
35
  ```
35
36
 
36
37
  ## Customizations
38
+
37
39
  To change variables it's necessary to create a new *.scss* (or *.sass*) file like this one (ex. *admin.scss*):
38
40
 
39
41
  ```scss
@@ -51,22 +53,22 @@ And replace the link tag in the *application.html.erb* with: `<%= stylesheet_lin
51
53
  For the complete list of options take a look [here](app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss).
52
54
 
53
55
  ## Screenshots
54
- - Index page:
55
- ![Administrate Bootstrap Theme index page](extra/screenshot_index.png)
56
- - Show page:
57
- ![Administrate Bootstrap Theme show page](extra/screenshot_show.png)
58
- - Form page:
59
- ![Administrate Bootstrap Theme edit page](extra/screenshot_edit.png)
60
- - Index page with some customized colors:
61
- ![Administrate Bootstrap Theme index page customized](extra/screenshot_index_alt.png)
56
+
57
+ - Index page: ![Administrate Bootstrap Theme index page](extra/screenshot_index.png)
58
+ - Show page: ![Administrate Bootstrap Theme show page](extra/screenshot_show.png)
59
+ - Form page: ![Administrate Bootstrap Theme edit page](extra/screenshot_edit.png)
60
+ - Index page with some customized colors: ![Administrate Bootstrap Theme index page customized](extra/screenshot_index_alt.png)
62
61
 
63
62
  ## Do you like it? Star it!
63
+
64
64
  If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
65
65
 
66
66
  Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
67
67
 
68
68
  ## Contributors
69
+
69
70
  - [Mattia Roccoberton](https://blocknot.es/): author
70
71
 
71
72
  ## License
73
+
72
74
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.0.0-beta3 (https://getbootstrap.com/)
2
+ * Bootstrap v5.0.1 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
@@ -11,10 +11,82 @@
11
11
 
12
12
  /**
13
13
  * --------------------------------------------------------------------------
14
- * Bootstrap (v5.0.0-beta3): util/index.js
14
+ * Bootstrap (v5.0.1): dom/selector-engine.js
15
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
16
  * --------------------------------------------------------------------------
17
17
  */
18
+
19
+ /**
20
+ * ------------------------------------------------------------------------
21
+ * Constants
22
+ * ------------------------------------------------------------------------
23
+ */
24
+ const NODE_TEXT = 3;
25
+ const SelectorEngine = {
26
+ find(selector, element = document.documentElement) {
27
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
28
+ },
29
+
30
+ findOne(selector, element = document.documentElement) {
31
+ return Element.prototype.querySelector.call(element, selector);
32
+ },
33
+
34
+ children(element, selector) {
35
+ return [].concat(...element.children).filter(child => child.matches(selector));
36
+ },
37
+
38
+ parents(element, selector) {
39
+ const parents = [];
40
+ let ancestor = element.parentNode;
41
+
42
+ while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
43
+ if (ancestor.matches(selector)) {
44
+ parents.push(ancestor);
45
+ }
46
+
47
+ ancestor = ancestor.parentNode;
48
+ }
49
+
50
+ return parents;
51
+ },
52
+
53
+ prev(element, selector) {
54
+ let previous = element.previousElementSibling;
55
+
56
+ while (previous) {
57
+ if (previous.matches(selector)) {
58
+ return [previous];
59
+ }
60
+
61
+ previous = previous.previousElementSibling;
62
+ }
63
+
64
+ return [];
65
+ },
66
+
67
+ next(element, selector) {
68
+ let next = element.nextElementSibling;
69
+
70
+ while (next) {
71
+ if (next.matches(selector)) {
72
+ return [next];
73
+ }
74
+
75
+ next = next.nextElementSibling;
76
+ }
77
+
78
+ return [];
79
+ }
80
+
81
+ };
82
+
83
+ /**
84
+ * --------------------------------------------------------------------------
85
+ * Bootstrap (v5.0.1): util/index.js
86
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
87
+ * --------------------------------------------------------------------------
88
+ */
89
+
18
90
  const MAX_UID = 1000000;
19
91
  const MILLISECONDS_MULTIPLIER = 1000;
20
92
  const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
@@ -56,7 +128,7 @@
56
128
 
57
129
 
58
130
  if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
59
- hrefAttr = '#' + hrefAttr.split('#')[1];
131
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
60
132
  }
61
133
 
62
134
  selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
@@ -107,7 +179,30 @@
107
179
  element.dispatchEvent(new Event(TRANSITION_END));
108
180
  };
109
181
 
110
- const isElement$1 = obj => (obj[0] || obj).nodeType;
182
+ const isElement$1 = obj => {
183
+ if (!obj || typeof obj !== 'object') {
184
+ return false;
185
+ }
186
+
187
+ if (typeof obj.jquery !== 'undefined') {
188
+ obj = obj[0];
189
+ }
190
+
191
+ return typeof obj.nodeType !== 'undefined';
192
+ };
193
+
194
+ const getElement = obj => {
195
+ if (isElement$1(obj)) {
196
+ // it's a jQuery object or a node element
197
+ return obj.jquery ? obj[0] : obj;
198
+ }
199
+
200
+ if (typeof obj === 'string' && obj.length > 0) {
201
+ return SelectorEngine.findOne(obj);
202
+ }
203
+
204
+ return null;
205
+ };
111
206
 
112
207
  const emulateTransitionEnd = (element, duration) => {
113
208
  let called = false;
@@ -134,7 +229,7 @@
134
229
  const valueType = value && isElement$1(value) ? 'element' : toType(value);
135
230
 
136
231
  if (!new RegExp(expectedTypes).test(valueType)) {
137
- throw new TypeError(`${componentName.toUpperCase()}: ` + `Option "${property}" provided type "${valueType}" ` + `but expected type "${expectedTypes}".`);
232
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
138
233
  }
139
234
  });
140
235
  };
@@ -192,7 +287,7 @@
192
287
  return findShadowRoot(element.parentNode);
193
288
  };
194
289
 
195
- const noop = () => function () {};
290
+ const noop = () => {};
196
291
 
197
292
  const reflow = element => element.offsetHeight;
198
293
 
@@ -218,12 +313,13 @@
218
313
 
219
314
  const isRTL = () => document.documentElement.dir === 'rtl';
220
315
 
221
- const defineJQueryPlugin = (name, plugin) => {
316
+ const defineJQueryPlugin = plugin => {
222
317
  onDOMContentLoaded(() => {
223
318
  const $ = getjQuery();
224
319
  /* istanbul ignore if */
225
320
 
226
321
  if ($) {
322
+ const name = plugin.NAME;
227
323
  const JQUERY_NO_CONFLICT = $.fn[name];
228
324
  $.fn[name] = plugin.jQueryInterface;
229
325
  $.fn[name].Constructor = plugin;
@@ -236,9 +332,15 @@
236
332
  });
237
333
  };
238
334
 
335
+ const execute = callback => {
336
+ if (typeof callback === 'function') {
337
+ callback();
338
+ }
339
+ };
340
+
239
341
  /**
240
342
  * --------------------------------------------------------------------------
241
- * Bootstrap (v5.0.0-beta3): dom/data.js
343
+ * Bootstrap (v5.0.1): dom/data.js
242
344
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
243
345
  * --------------------------------------------------------------------------
244
346
  */
@@ -292,7 +394,7 @@
292
394
 
293
395
  /**
294
396
  * --------------------------------------------------------------------------
295
- * Bootstrap (v5.0.0-beta3): dom/event-handler.js
397
+ * Bootstrap (v5.0.1): dom/event-handler.js
296
398
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
297
399
  * --------------------------------------------------------------------------
298
400
  */
@@ -312,6 +414,7 @@
312
414
  mouseenter: 'mouseover',
313
415
  mouseleave: 'mouseout'
314
416
  };
417
+ const customEventsRegex = /^(mouseenter|mouseleave)/i;
315
418
  const 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']);
316
419
  /**
317
420
  * ------------------------------------------------------------------------
@@ -355,7 +458,7 @@
355
458
 
356
459
  if (handler.oneOff) {
357
460
  // eslint-disable-next-line unicorn/consistent-destructuring
358
- EventHandler.off(element, event.type, fn);
461
+ EventHandler.off(element, event.type, selector, fn);
359
462
  }
360
463
 
361
464
  return fn.apply(target, [event]);
@@ -384,15 +487,8 @@
384
487
 
385
488
  function normalizeParams(originalTypeEvent, handler, delegationFn) {
386
489
  const delegation = typeof handler === 'string';
387
- const originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
388
-
389
- let typeEvent = originalTypeEvent.replace(stripNameRegex, '');
390
- const custom = customEvents[typeEvent];
391
-
392
- if (custom) {
393
- typeEvent = custom;
394
- }
395
-
490
+ const originalHandler = delegation ? delegationFn : handler;
491
+ let typeEvent = getTypeEvent(originalTypeEvent);
396
492
  const isNative = nativeEvents.has(typeEvent);
397
493
 
398
494
  if (!isNative) {
@@ -410,6 +506,24 @@
410
506
  if (!handler) {
411
507
  handler = delegationFn;
412
508
  delegationFn = null;
509
+ } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
510
+ // this prevents the handler from being dispatched the same way as mouseover or mouseout does
511
+
512
+
513
+ if (customEventsRegex.test(originalTypeEvent)) {
514
+ const wrapFn = fn => {
515
+ return function (event) {
516
+ if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
517
+ return fn.call(this, event);
518
+ }
519
+ };
520
+ };
521
+
522
+ if (delegationFn) {
523
+ delegationFn = wrapFn(delegationFn);
524
+ } else {
525
+ handler = wrapFn(handler);
526
+ }
413
527
  }
414
528
 
415
529
  const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
@@ -453,6 +567,12 @@
453
567
  });
454
568
  }
455
569
 
570
+ function getTypeEvent(event) {
571
+ // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
572
+ event = event.replace(stripNameRegex, '');
573
+ return customEvents[event] || event;
574
+ }
575
+
456
576
  const EventHandler = {
457
577
  on(element, event, handler, delegationFn) {
458
578
  addHandler(element, event, handler, delegationFn, false);
@@ -505,7 +625,7 @@
505
625
  }
506
626
 
507
627
  const $ = getjQuery();
508
- const typeEvent = event.replace(stripNameRegex, '');
628
+ const typeEvent = getTypeEvent(event);
509
629
  const inNamespace = event !== typeEvent;
510
630
  const isNative = nativeEvents.has(typeEvent);
511
631
  let jQueryEvent;
@@ -563,7 +683,7 @@
563
683
 
564
684
  /**
565
685
  * --------------------------------------------------------------------------
566
- * Bootstrap (v5.0.0-beta3): base-component.js
686
+ * Bootstrap (v5.0.1): base-component.js
567
687
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
568
688
  * --------------------------------------------------------------------------
569
689
  */
@@ -573,11 +693,11 @@
573
693
  * ------------------------------------------------------------------------
574
694
  */
575
695
 
576
- const VERSION = '5.0.0-beta3';
696
+ const VERSION = '5.0.1';
577
697
 
578
698
  class BaseComponent {
579
699
  constructor(element) {
580
- element = typeof element === 'string' ? document.querySelector(element) : element;
700
+ element = getElement(element);
581
701
 
582
702
  if (!element) {
583
703
  return;
@@ -589,7 +709,21 @@
589
709
 
590
710
  dispose() {
591
711
  Data.remove(this._element, this.constructor.DATA_KEY);
592
- this._element = null;
712
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
713
+ Object.getOwnPropertyNames(this).forEach(propertyName => {
714
+ this[propertyName] = null;
715
+ });
716
+ }
717
+
718
+ _queueCallback(callback, element, isAnimated = true) {
719
+ if (!isAnimated) {
720
+ execute(callback);
721
+ return;
722
+ }
723
+
724
+ const transitionDuration = getTransitionDurationFromElement(element);
725
+ EventHandler.one(element, 'transitionend', () => execute(callback));
726
+ emulateTransitionEnd(element, transitionDuration);
593
727
  }
594
728
  /** Static */
595
729
 
@@ -602,11 +736,23 @@
602
736
  return VERSION;
603
737
  }
604
738
 
739
+ static get NAME() {
740
+ throw new Error('You have to implement the static method "NAME", for each component!');
741
+ }
742
+
743
+ static get DATA_KEY() {
744
+ return `bs.${this.NAME}`;
745
+ }
746
+
747
+ static get EVENT_KEY() {
748
+ return `.${this.DATA_KEY}`;
749
+ }
750
+
605
751
  }
606
752
 
607
753
  /**
608
754
  * --------------------------------------------------------------------------
609
- * Bootstrap (v5.0.0-beta3): alert.js
755
+ * Bootstrap (v5.0.1): alert.js
610
756
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
611
757
  * --------------------------------------------------------------------------
612
758
  */
@@ -616,7 +762,7 @@
616
762
  * ------------------------------------------------------------------------
617
763
  */
618
764
 
619
- const NAME$b = 'alert';
765
+ const NAME$c = 'alert';
620
766
  const DATA_KEY$b = 'bs.alert';
621
767
  const EVENT_KEY$b = `.${DATA_KEY$b}`;
622
768
  const DATA_API_KEY$8 = '.data-api';
@@ -625,8 +771,8 @@
625
771
  const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
626
772
  const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
627
773
  const CLASS_NAME_ALERT = 'alert';
628
- const CLASS_NAME_FADE$5 = 'fade';
629
- const CLASS_NAME_SHOW$8 = 'show';
774
+ const CLASS_NAME_FADE$6 = 'fade';
775
+ const CLASS_NAME_SHOW$9 = 'show';
630
776
  /**
631
777
  * ------------------------------------------------------------------------
632
778
  * Class Definition
@@ -635,8 +781,8 @@
635
781
 
636
782
  class Alert extends BaseComponent {
637
783
  // Getters
638
- static get DATA_KEY() {
639
- return DATA_KEY$b;
784
+ static get NAME() {
785
+ return NAME$c;
640
786
  } // Public
641
787
 
642
788
 
@@ -662,17 +808,10 @@
662
808
  }
663
809
 
664
810
  _removeElement(element) {
665
- element.classList.remove(CLASS_NAME_SHOW$8);
666
-
667
- if (!element.classList.contains(CLASS_NAME_FADE$5)) {
668
- this._destroyElement(element);
669
-
670
- return;
671
- }
811
+ element.classList.remove(CLASS_NAME_SHOW$9);
812
+ const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);
672
813
 
673
- const transitionDuration = getTransitionDurationFromElement(element);
674
- EventHandler.one(element, 'transitionend', () => this._destroyElement(element));
675
- emulateTransitionEnd(element, transitionDuration);
814
+ this._queueCallback(() => this._destroyElement(element), element, isAnimated);
676
815
  }
677
816
 
678
817
  _destroyElement(element) {
@@ -724,11 +863,11 @@
724
863
  * add .Alert to jQuery only if jQuery is present
725
864
  */
726
865
 
727
- defineJQueryPlugin(NAME$b, Alert);
866
+ defineJQueryPlugin(Alert);
728
867
 
729
868
  /**
730
869
  * --------------------------------------------------------------------------
731
- * Bootstrap (v5.0.0-beta3): button.js
870
+ * Bootstrap (v5.0.1): button.js
732
871
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
733
872
  * --------------------------------------------------------------------------
734
873
  */
@@ -738,7 +877,7 @@
738
877
  * ------------------------------------------------------------------------
739
878
  */
740
879
 
741
- const NAME$a = 'button';
880
+ const NAME$b = 'button';
742
881
  const DATA_KEY$a = 'bs.button';
743
882
  const EVENT_KEY$a = `.${DATA_KEY$a}`;
744
883
  const DATA_API_KEY$7 = '.data-api';
@@ -753,8 +892,8 @@
753
892
 
754
893
  class Button extends BaseComponent {
755
894
  // Getters
756
- static get DATA_KEY() {
757
- return DATA_KEY$a;
895
+ static get NAME() {
896
+ return NAME$b;
758
897
  } // Public
759
898
 
760
899
 
@@ -804,11 +943,11 @@
804
943
  * add .Button to jQuery only if jQuery is present
805
944
  */
806
945
 
807
- defineJQueryPlugin(NAME$a, Button);
946
+ defineJQueryPlugin(Button);
808
947
 
809
948
  /**
810
949
  * --------------------------------------------------------------------------
811
- * Bootstrap (v5.0.0-beta3): dom/manipulator.js
950
+ * Bootstrap (v5.0.1): dom/manipulator.js
812
951
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
813
952
  * --------------------------------------------------------------------------
814
953
  */
@@ -882,78 +1021,7 @@
882
1021
 
883
1022
  /**
884
1023
  * --------------------------------------------------------------------------
885
- * Bootstrap (v5.0.0-beta3): dom/selector-engine.js
886
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
887
- * --------------------------------------------------------------------------
888
- */
889
-
890
- /**
891
- * ------------------------------------------------------------------------
892
- * Constants
893
- * ------------------------------------------------------------------------
894
- */
895
- const NODE_TEXT = 3;
896
- const SelectorEngine = {
897
- find(selector, element = document.documentElement) {
898
- return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
899
- },
900
-
901
- findOne(selector, element = document.documentElement) {
902
- return Element.prototype.querySelector.call(element, selector);
903
- },
904
-
905
- children(element, selector) {
906
- return [].concat(...element.children).filter(child => child.matches(selector));
907
- },
908
-
909
- parents(element, selector) {
910
- const parents = [];
911
- let ancestor = element.parentNode;
912
-
913
- while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
914
- if (ancestor.matches(selector)) {
915
- parents.push(ancestor);
916
- }
917
-
918
- ancestor = ancestor.parentNode;
919
- }
920
-
921
- return parents;
922
- },
923
-
924
- prev(element, selector) {
925
- let previous = element.previousElementSibling;
926
-
927
- while (previous) {
928
- if (previous.matches(selector)) {
929
- return [previous];
930
- }
931
-
932
- previous = previous.previousElementSibling;
933
- }
934
-
935
- return [];
936
- },
937
-
938
- next(element, selector) {
939
- let next = element.nextElementSibling;
940
-
941
- while (next) {
942
- if (next.matches(selector)) {
943
- return [next];
944
- }
945
-
946
- next = next.nextElementSibling;
947
- }
948
-
949
- return [];
950
- }
951
-
952
- };
953
-
954
- /**
955
- * --------------------------------------------------------------------------
956
- * Bootstrap (v5.0.0-beta3): carousel.js
1024
+ * Bootstrap (v5.0.1): carousel.js
957
1025
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
958
1026
  * --------------------------------------------------------------------------
959
1027
  */
@@ -963,7 +1031,7 @@
963
1031
  * ------------------------------------------------------------------------
964
1032
  */
965
1033
 
966
- const NAME$9 = 'carousel';
1034
+ const NAME$a = 'carousel';
967
1035
  const DATA_KEY$9 = 'bs.carousel';
968
1036
  const EVENT_KEY$9 = `.${DATA_KEY$9}`;
969
1037
  const DATA_API_KEY$6 = '.data-api';
@@ -972,7 +1040,7 @@
972
1040
  const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
973
1041
 
974
1042
  const SWIPE_THRESHOLD = 40;
975
- const Default$8 = {
1043
+ const Default$9 = {
976
1044
  interval: 5000,
977
1045
  keyboard: true,
978
1046
  slide: false,
@@ -980,7 +1048,7 @@
980
1048
  wrap: true,
981
1049
  touch: true
982
1050
  };
983
- const DefaultType$8 = {
1051
+ const DefaultType$9 = {
984
1052
  interval: '(number|boolean)',
985
1053
  keyboard: 'boolean',
986
1054
  slide: '(boolean|string)',
@@ -1051,11 +1119,11 @@
1051
1119
 
1052
1120
 
1053
1121
  static get Default() {
1054
- return Default$8;
1122
+ return Default$9;
1055
1123
  }
1056
1124
 
1057
- static get DATA_KEY() {
1058
- return DATA_KEY$9;
1125
+ static get NAME() {
1126
+ return NAME$a;
1059
1127
  } // Public
1060
1128
 
1061
1129
 
@@ -1133,26 +1201,14 @@
1133
1201
  const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1134
1202
 
1135
1203
  this._slide(order, this._items[index]);
1136
- }
1137
-
1138
- dispose() {
1139
- EventHandler.off(this._element, EVENT_KEY$9);
1140
- this._items = null;
1141
- this._config = null;
1142
- this._interval = null;
1143
- this._isPaused = null;
1144
- this._isSliding = null;
1145
- this._activeElement = null;
1146
- this._indicatorsElement = null;
1147
- super.dispose();
1148
1204
  } // Private
1149
1205
 
1150
1206
 
1151
1207
  _getConfig(config) {
1152
- config = { ...Default$8,
1208
+ config = { ...Default$9,
1153
1209
  ...config
1154
1210
  };
1155
- typeCheckConfig(NAME$9, config, DefaultType$8);
1211
+ typeCheckConfig(NAME$a, config, DefaultType$9);
1156
1212
  return config;
1157
1213
  }
1158
1214
 
@@ -1251,11 +1307,11 @@
1251
1307
  if (event.key === ARROW_LEFT_KEY) {
1252
1308
  event.preventDefault();
1253
1309
 
1254
- this._slide(DIRECTION_LEFT);
1310
+ this._slide(DIRECTION_RIGHT);
1255
1311
  } else if (event.key === ARROW_RIGHT_KEY) {
1256
1312
  event.preventDefault();
1257
1313
 
1258
- this._slide(DIRECTION_RIGHT);
1314
+ this._slide(DIRECTION_LEFT);
1259
1315
  }
1260
1316
  }
1261
1317
 
@@ -1373,37 +1429,35 @@
1373
1429
 
1374
1430
  this._activeElement = nextElement;
1375
1431
 
1432
+ const triggerSlidEvent = () => {
1433
+ EventHandler.trigger(this._element, EVENT_SLID, {
1434
+ relatedTarget: nextElement,
1435
+ direction: eventDirectionName,
1436
+ from: activeElementIndex,
1437
+ to: nextElementIndex
1438
+ });
1439
+ };
1440
+
1376
1441
  if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1377
1442
  nextElement.classList.add(orderClassName);
1378
1443
  reflow(nextElement);
1379
1444
  activeElement.classList.add(directionalClassName);
1380
1445
  nextElement.classList.add(directionalClassName);
1381
- const transitionDuration = getTransitionDurationFromElement(activeElement);
1382
- EventHandler.one(activeElement, 'transitionend', () => {
1446
+
1447
+ const completeCallBack = () => {
1383
1448
  nextElement.classList.remove(directionalClassName, orderClassName);
1384
1449
  nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1385
1450
  activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1386
1451
  this._isSliding = false;
1387
- setTimeout(() => {
1388
- EventHandler.trigger(this._element, EVENT_SLID, {
1389
- relatedTarget: nextElement,
1390
- direction: eventDirectionName,
1391
- from: activeElementIndex,
1392
- to: nextElementIndex
1393
- });
1394
- }, 0);
1395
- });
1396
- emulateTransitionEnd(activeElement, transitionDuration);
1452
+ setTimeout(triggerSlidEvent, 0);
1453
+ };
1454
+
1455
+ this._queueCallback(completeCallBack, activeElement, true);
1397
1456
  } else {
1398
1457
  activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
1399
1458
  nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1400
1459
  this._isSliding = false;
1401
- EventHandler.trigger(this._element, EVENT_SLID, {
1402
- relatedTarget: nextElement,
1403
- direction: eventDirectionName,
1404
- from: activeElementIndex,
1405
- to: nextElementIndex
1406
- });
1460
+ triggerSlidEvent();
1407
1461
  }
1408
1462
 
1409
1463
  if (isCycling) {
@@ -1417,10 +1471,10 @@
1417
1471
  }
1418
1472
 
1419
1473
  if (isRTL()) {
1420
- return direction === DIRECTION_RIGHT ? ORDER_PREV : ORDER_NEXT;
1474
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
1421
1475
  }
1422
1476
 
1423
- return direction === DIRECTION_RIGHT ? ORDER_NEXT : ORDER_PREV;
1477
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
1424
1478
  }
1425
1479
 
1426
1480
  _orderToDirection(order) {
@@ -1429,16 +1483,16 @@
1429
1483
  }
1430
1484
 
1431
1485
  if (isRTL()) {
1432
- return order === ORDER_NEXT ? DIRECTION_LEFT : DIRECTION_RIGHT;
1486
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
1433
1487
  }
1434
1488
 
1435
- return order === ORDER_NEXT ? DIRECTION_RIGHT : DIRECTION_LEFT;
1489
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
1436
1490
  } // Static
1437
1491
 
1438
1492
 
1439
1493
  static carouselInterface(element, config) {
1440
1494
  let data = Data.get(element, DATA_KEY$9);
1441
- let _config = { ...Default$8,
1495
+ let _config = { ...Default$9,
1442
1496
  ...Manipulator.getDataAttributes(element)
1443
1497
  };
1444
1498
 
@@ -1522,11 +1576,11 @@
1522
1576
  * add .Carousel to jQuery only if jQuery is present
1523
1577
  */
1524
1578
 
1525
- defineJQueryPlugin(NAME$9, Carousel);
1579
+ defineJQueryPlugin(Carousel);
1526
1580
 
1527
1581
  /**
1528
1582
  * --------------------------------------------------------------------------
1529
- * Bootstrap (v5.0.0-beta3): collapse.js
1583
+ * Bootstrap (v5.0.1): collapse.js
1530
1584
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1531
1585
  * --------------------------------------------------------------------------
1532
1586
  */
@@ -1536,15 +1590,15 @@
1536
1590
  * ------------------------------------------------------------------------
1537
1591
  */
1538
1592
 
1539
- const NAME$8 = 'collapse';
1593
+ const NAME$9 = 'collapse';
1540
1594
  const DATA_KEY$8 = 'bs.collapse';
1541
1595
  const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1542
1596
  const DATA_API_KEY$5 = '.data-api';
1543
- const Default$7 = {
1597
+ const Default$8 = {
1544
1598
  toggle: true,
1545
1599
  parent: ''
1546
1600
  };
1547
- const DefaultType$7 = {
1601
+ const DefaultType$8 = {
1548
1602
  toggle: 'boolean',
1549
1603
  parent: '(string|element)'
1550
1604
  };
@@ -1553,7 +1607,7 @@
1553
1607
  const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;
1554
1608
  const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;
1555
1609
  const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
1556
- const CLASS_NAME_SHOW$7 = 'show';
1610
+ const CLASS_NAME_SHOW$8 = 'show';
1557
1611
  const CLASS_NAME_COLLAPSE = 'collapse';
1558
1612
  const CLASS_NAME_COLLAPSING = 'collapsing';
1559
1613
  const CLASS_NAME_COLLAPSED = 'collapsed';
@@ -1600,16 +1654,16 @@
1600
1654
 
1601
1655
 
1602
1656
  static get Default() {
1603
- return Default$7;
1657
+ return Default$8;
1604
1658
  }
1605
1659
 
1606
- static get DATA_KEY() {
1607
- return DATA_KEY$8;
1660
+ static get NAME() {
1661
+ return NAME$9;
1608
1662
  } // Public
1609
1663
 
1610
1664
 
1611
1665
  toggle() {
1612
- if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
1666
+ if (this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1613
1667
  this.hide();
1614
1668
  } else {
1615
1669
  this.show();
@@ -1617,7 +1671,7 @@
1617
1671
  }
1618
1672
 
1619
1673
  show() {
1620
- if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$7)) {
1674
+ if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1621
1675
  return;
1622
1676
  }
1623
1677
 
@@ -1687,7 +1741,7 @@
1687
1741
  const complete = () => {
1688
1742
  this._element.classList.remove(CLASS_NAME_COLLAPSING);
1689
1743
 
1690
- this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1744
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1691
1745
 
1692
1746
  this._element.style[dimension] = '';
1693
1747
  this.setTransitioning(false);
@@ -1696,14 +1750,14 @@
1696
1750
 
1697
1751
  const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1698
1752
  const scrollSize = `scroll${capitalizedDimension}`;
1699
- const transitionDuration = getTransitionDurationFromElement(this._element);
1700
- EventHandler.one(this._element, 'transitionend', complete);
1701
- emulateTransitionEnd(this._element, transitionDuration);
1753
+
1754
+ this._queueCallback(complete, this._element, true);
1755
+
1702
1756
  this._element.style[dimension] = `${this._element[scrollSize]}px`;
1703
1757
  }
1704
1758
 
1705
1759
  hide() {
1706
- if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$7)) {
1760
+ if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1707
1761
  return;
1708
1762
  }
1709
1763
 
@@ -1720,7 +1774,7 @@
1720
1774
 
1721
1775
  this._element.classList.add(CLASS_NAME_COLLAPSING);
1722
1776
 
1723
- this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1777
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1724
1778
 
1725
1779
  const triggerArrayLength = this._triggerArray.length;
1726
1780
 
@@ -1729,7 +1783,7 @@
1729
1783
  const trigger = this._triggerArray[i];
1730
1784
  const elem = getElementFromSelector(trigger);
1731
1785
 
1732
- if (elem && !elem.classList.contains(CLASS_NAME_SHOW$7)) {
1786
+ if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) {
1733
1787
  trigger.classList.add(CLASS_NAME_COLLAPSED);
1734
1788
  trigger.setAttribute('aria-expanded', false);
1735
1789
  }
@@ -1749,31 +1803,22 @@
1749
1803
  };
1750
1804
 
1751
1805
  this._element.style[dimension] = '';
1752
- const transitionDuration = getTransitionDurationFromElement(this._element);
1753
- EventHandler.one(this._element, 'transitionend', complete);
1754
- emulateTransitionEnd(this._element, transitionDuration);
1806
+
1807
+ this._queueCallback(complete, this._element, true);
1755
1808
  }
1756
1809
 
1757
1810
  setTransitioning(isTransitioning) {
1758
1811
  this._isTransitioning = isTransitioning;
1759
- }
1760
-
1761
- dispose() {
1762
- super.dispose();
1763
- this._config = null;
1764
- this._parent = null;
1765
- this._triggerArray = null;
1766
- this._isTransitioning = null;
1767
- } // Private
1812
+ } // Private
1768
1813
 
1769
1814
 
1770
1815
  _getConfig(config) {
1771
- config = { ...Default$7,
1816
+ config = { ...Default$8,
1772
1817
  ...config
1773
1818
  };
1774
1819
  config.toggle = Boolean(config.toggle); // Coerce string values
1775
1820
 
1776
- typeCheckConfig(NAME$8, config, DefaultType$7);
1821
+ typeCheckConfig(NAME$9, config, DefaultType$8);
1777
1822
  return config;
1778
1823
  }
1779
1824
 
@@ -1785,16 +1830,7 @@
1785
1830
  let {
1786
1831
  parent
1787
1832
  } = this._config;
1788
-
1789
- if (isElement$1(parent)) {
1790
- // it's a jQuery object
1791
- if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
1792
- parent = parent[0];
1793
- }
1794
- } else {
1795
- parent = SelectorEngine.findOne(parent);
1796
- }
1797
-
1833
+ parent = getElement(parent);
1798
1834
  const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
1799
1835
  SelectorEngine.find(selector, parent).forEach(element => {
1800
1836
  const selected = getElementFromSelector(element);
@@ -1809,7 +1845,7 @@
1809
1845
  return;
1810
1846
  }
1811
1847
 
1812
- const isOpen = element.classList.contains(CLASS_NAME_SHOW$7);
1848
+ const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
1813
1849
  triggerArray.forEach(elem => {
1814
1850
  if (isOpen) {
1815
1851
  elem.classList.remove(CLASS_NAME_COLLAPSED);
@@ -1824,7 +1860,7 @@
1824
1860
 
1825
1861
  static collapseInterface(element, config) {
1826
1862
  let data = Data.get(element, DATA_KEY$8);
1827
- const _config = { ...Default$7,
1863
+ const _config = { ...Default$8,
1828
1864
  ...Manipulator.getDataAttributes(element),
1829
1865
  ...(typeof config === 'object' && config ? config : {})
1830
1866
  };
@@ -1895,7 +1931,7 @@
1895
1931
  * add .Collapse to jQuery only if jQuery is present
1896
1932
  */
1897
1933
 
1898
- defineJQueryPlugin(NAME$8, Collapse);
1934
+ defineJQueryPlugin(Collapse);
1899
1935
 
1900
1936
  var top = 'top';
1901
1937
  var bottom = 'bottom';
@@ -2159,6 +2195,17 @@
2159
2195
 
2160
2196
  function getContainingBlock(element) {
2161
2197
  var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
2198
+ var isIE = navigator.userAgent.indexOf('Trident') !== -1;
2199
+
2200
+ if (isIE && isHTMLElement(element)) {
2201
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
2202
+ var elementCss = getComputedStyle$1(element);
2203
+
2204
+ if (elementCss.position === 'fixed') {
2205
+ return null;
2206
+ }
2207
+ }
2208
+
2162
2209
  var currentNode = getParentNode(element);
2163
2210
 
2164
2211
  while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
@@ -3642,7 +3689,7 @@
3642
3689
 
3643
3690
  /**
3644
3691
  * --------------------------------------------------------------------------
3645
- * Bootstrap (v5.0.0-beta3): dropdown.js
3692
+ * Bootstrap (v5.0.1): dropdown.js
3646
3693
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3647
3694
  * --------------------------------------------------------------------------
3648
3695
  */
@@ -3652,7 +3699,7 @@
3652
3699
  * ------------------------------------------------------------------------
3653
3700
  */
3654
3701
 
3655
- const NAME$7 = 'dropdown';
3702
+ const NAME$8 = 'dropdown';
3656
3703
  const DATA_KEY$7 = 'bs.dropdown';
3657
3704
  const EVENT_KEY$7 = `.${DATA_KEY$7}`;
3658
3705
  const DATA_API_KEY$4 = '.data-api';
@@ -3672,8 +3719,7 @@
3672
3719
  const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
3673
3720
  const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
3674
3721
  const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
3675
- const CLASS_NAME_DISABLED = 'disabled';
3676
- const CLASS_NAME_SHOW$6 = 'show';
3722
+ const CLASS_NAME_SHOW$7 = 'show';
3677
3723
  const CLASS_NAME_DROPUP = 'dropup';
3678
3724
  const CLASS_NAME_DROPEND = 'dropend';
3679
3725
  const CLASS_NAME_DROPSTART = 'dropstart';
@@ -3688,19 +3734,21 @@
3688
3734
  const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
3689
3735
  const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
3690
3736
  const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
3691
- const Default$6 = {
3737
+ const Default$7 = {
3692
3738
  offset: [0, 2],
3693
3739
  boundary: 'clippingParents',
3694
3740
  reference: 'toggle',
3695
3741
  display: 'dynamic',
3696
- popperConfig: null
3742
+ popperConfig: null,
3743
+ autoClose: true
3697
3744
  };
3698
- const DefaultType$6 = {
3745
+ const DefaultType$7 = {
3699
3746
  offset: '(array|string|function)',
3700
3747
  boundary: '(string|element)',
3701
3748
  reference: '(string|element|object)',
3702
3749
  display: 'string',
3703
- popperConfig: '(null|object|function)'
3750
+ popperConfig: '(null|object|function)',
3751
+ autoClose: '(boolean|string)'
3704
3752
  };
3705
3753
  /**
3706
3754
  * ------------------------------------------------------------------------
@@ -3721,28 +3769,27 @@
3721
3769
 
3722
3770
 
3723
3771
  static get Default() {
3724
- return Default$6;
3772
+ return Default$7;
3725
3773
  }
3726
3774
 
3727
3775
  static get DefaultType() {
3728
- return DefaultType$6;
3776
+ return DefaultType$7;
3729
3777
  }
3730
3778
 
3731
- static get DATA_KEY() {
3732
- return DATA_KEY$7;
3779
+ static get NAME() {
3780
+ return NAME$8;
3733
3781
  } // Public
3734
3782
 
3735
3783
 
3736
3784
  toggle() {
3737
- if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
3785
+ if (isDisabled(this._element)) {
3738
3786
  return;
3739
3787
  }
3740
3788
 
3741
- const isActive = this._element.classList.contains(CLASS_NAME_SHOW$6);
3742
-
3743
- Dropdown.clearMenus();
3789
+ const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
3744
3790
 
3745
3791
  if (isActive) {
3792
+ this.hide();
3746
3793
  return;
3747
3794
  }
3748
3795
 
@@ -3750,7 +3797,7 @@
3750
3797
  }
3751
3798
 
3752
3799
  show() {
3753
- if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$6)) {
3800
+ if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
3754
3801
  return;
3755
3802
  }
3756
3803
 
@@ -3777,11 +3824,7 @@
3777
3824
  if (this._config.reference === 'parent') {
3778
3825
  referenceElement = parent;
3779
3826
  } else if (isElement$1(this._config.reference)) {
3780
- referenceElement = this._config.reference; // Check if it's jQuery element
3781
-
3782
- if (typeof this._config.reference.jquery !== 'undefined') {
3783
- referenceElement = this._config.reference[0];
3784
- }
3827
+ referenceElement = getElement(this._config.reference);
3785
3828
  } else if (typeof this._config.reference === 'object') {
3786
3829
  referenceElement = this._config.reference;
3787
3830
  }
@@ -3801,54 +3844,35 @@
3801
3844
 
3802
3845
 
3803
3846
  if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
3804
- [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', null, noop()));
3847
+ [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));
3805
3848
  }
3806
3849
 
3807
3850
  this._element.focus();
3808
3851
 
3809
3852
  this._element.setAttribute('aria-expanded', true);
3810
3853
 
3811
- this._menu.classList.toggle(CLASS_NAME_SHOW$6);
3854
+ this._menu.classList.toggle(CLASS_NAME_SHOW$7);
3812
3855
 
3813
- this._element.classList.toggle(CLASS_NAME_SHOW$6);
3856
+ this._element.classList.toggle(CLASS_NAME_SHOW$7);
3814
3857
 
3815
3858
  EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
3816
3859
  }
3817
3860
 
3818
3861
  hide() {
3819
- if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$6)) {
3862
+ if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
3820
3863
  return;
3821
3864
  }
3822
3865
 
3823
3866
  const relatedTarget = {
3824
3867
  relatedTarget: this._element
3825
3868
  };
3826
- const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
3827
-
3828
- if (hideEvent.defaultPrevented) {
3829
- return;
3830
- }
3831
-
3832
- if (this._popper) {
3833
- this._popper.destroy();
3834
- }
3835
-
3836
- this._menu.classList.toggle(CLASS_NAME_SHOW$6);
3837
3869
 
3838
- this._element.classList.toggle(CLASS_NAME_SHOW$6);
3839
-
3840
- Manipulator.removeDataAttribute(this._menu, 'popper');
3841
- EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
3870
+ this._completeHide(relatedTarget);
3842
3871
  }
3843
3872
 
3844
3873
  dispose() {
3845
- EventHandler.off(this._element, EVENT_KEY$7);
3846
- this._menu = null;
3847
-
3848
3874
  if (this._popper) {
3849
3875
  this._popper.destroy();
3850
-
3851
- this._popper = null;
3852
3876
  }
3853
3877
 
3854
3878
  super.dispose();
@@ -3870,16 +3894,43 @@
3870
3894
  });
3871
3895
  }
3872
3896
 
3897
+ _completeHide(relatedTarget) {
3898
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
3899
+
3900
+ if (hideEvent.defaultPrevented) {
3901
+ return;
3902
+ } // If this is a touch-enabled device we remove the extra
3903
+ // empty mouseover listeners we added for iOS support
3904
+
3905
+
3906
+ if ('ontouchstart' in document.documentElement) {
3907
+ [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));
3908
+ }
3909
+
3910
+ if (this._popper) {
3911
+ this._popper.destroy();
3912
+ }
3913
+
3914
+ this._menu.classList.remove(CLASS_NAME_SHOW$7);
3915
+
3916
+ this._element.classList.remove(CLASS_NAME_SHOW$7);
3917
+
3918
+ this._element.setAttribute('aria-expanded', 'false');
3919
+
3920
+ Manipulator.removeDataAttribute(this._menu, 'popper');
3921
+ EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
3922
+ }
3923
+
3873
3924
  _getConfig(config) {
3874
3925
  config = { ...this.constructor.Default,
3875
3926
  ...Manipulator.getDataAttributes(this._element),
3876
3927
  ...config
3877
3928
  };
3878
- typeCheckConfig(NAME$7, config, this.constructor.DefaultType);
3929
+ typeCheckConfig(NAME$8, config, this.constructor.DefaultType);
3879
3930
 
3880
3931
  if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
3881
3932
  // Popper virtual elements require a getBoundingClientRect method
3882
- throw new TypeError(`${NAME$7.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
3933
+ throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
3883
3934
  }
3884
3935
 
3885
3936
  return config;
@@ -3956,6 +4007,29 @@
3956
4007
  return { ...defaultBsPopperConfig,
3957
4008
  ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
3958
4009
  };
4010
+ }
4011
+
4012
+ _selectMenuItem(event) {
4013
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
4014
+
4015
+ if (!items.length) {
4016
+ return;
4017
+ }
4018
+
4019
+ let index = items.indexOf(event.target); // Up
4020
+
4021
+ if (event.key === ARROW_UP_KEY && index > 0) {
4022
+ index--;
4023
+ } // Down
4024
+
4025
+
4026
+ if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
4027
+ index++;
4028
+ } // index is -1 if the first keydown is an ArrowUp
4029
+
4030
+
4031
+ index = index === -1 ? 0 : index;
4032
+ items[index].focus();
3959
4033
  } // Static
3960
4034
 
3961
4035
 
@@ -3984,72 +4058,46 @@
3984
4058
  }
3985
4059
 
3986
4060
  static clearMenus(event) {
3987
- if (event) {
3988
- if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {
3989
- return;
3990
- }
3991
-
3992
- if (/input|select|textarea|form/i.test(event.target.tagName)) {
3993
- return;
3994
- }
4061
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
4062
+ return;
3995
4063
  }
3996
4064
 
3997
4065
  const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
3998
4066
 
3999
4067
  for (let i = 0, len = toggles.length; i < len; i++) {
4000
4068
  const context = Data.get(toggles[i], DATA_KEY$7);
4001
- const relatedTarget = {
4002
- relatedTarget: toggles[i]
4003
- };
4004
4069
 
4005
- if (event && event.type === 'click') {
4006
- relatedTarget.clickEvent = event;
4007
- }
4008
-
4009
- if (!context) {
4070
+ if (!context || context._config.autoClose === false) {
4010
4071
  continue;
4011
4072
  }
4012
4073
 
4013
- const dropdownMenu = context._menu;
4014
-
4015
- if (!toggles[i].classList.contains(CLASS_NAME_SHOW$6)) {
4074
+ if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) {
4016
4075
  continue;
4017
4076
  }
4018
4077
 
4078
+ const relatedTarget = {
4079
+ relatedTarget: context._element
4080
+ };
4081
+
4019
4082
  if (event) {
4020
- // Don't close the menu if the clicked element or one of its parents is the dropdown button
4021
- if ([context._element].some(element => event.composedPath().includes(element))) {
4083
+ const composedPath = event.composedPath();
4084
+ const isMenuTarget = composedPath.includes(context._menu);
4085
+
4086
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
4022
4087
  continue;
4023
- } // Tab navigation through the dropdown menu shouldn't close the menu
4088
+ } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
4024
4089
 
4025
4090
 
4026
- if (event.type === 'keyup' && event.key === TAB_KEY && dropdownMenu.contains(event.target)) {
4091
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
4027
4092
  continue;
4028
4093
  }
4029
- }
4030
-
4031
- const hideEvent = EventHandler.trigger(toggles[i], EVENT_HIDE$4, relatedTarget);
4032
-
4033
- if (hideEvent.defaultPrevented) {
4034
- continue;
4035
- } // If this is a touch-enabled device we remove the extra
4036
- // empty mouseover listeners we added for iOS support
4037
-
4038
-
4039
- if ('ontouchstart' in document.documentElement) {
4040
- [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', null, noop()));
4041
- }
4042
-
4043
- toggles[i].setAttribute('aria-expanded', 'false');
4044
4094
 
4045
- if (context._popper) {
4046
- context._popper.destroy();
4095
+ if (event.type === 'click') {
4096
+ relatedTarget.clickEvent = event;
4097
+ }
4047
4098
  }
4048
4099
 
4049
- dropdownMenu.classList.remove(CLASS_NAME_SHOW$6);
4050
- toggles[i].classList.remove(CLASS_NAME_SHOW$6);
4051
- Manipulator.removeDataAttribute(dropdownMenu, 'popper');
4052
- EventHandler.trigger(toggles[i], EVENT_HIDDEN$4, relatedTarget);
4100
+ context._completeHide(relatedTarget);
4053
4101
  }
4054
4102
  }
4055
4103
 
@@ -4069,26 +4117,29 @@
4069
4117
  return;
4070
4118
  }
4071
4119
 
4120
+ const isActive = this.classList.contains(CLASS_NAME_SHOW$7);
4121
+
4122
+ if (!isActive && event.key === ESCAPE_KEY$2) {
4123
+ return;
4124
+ }
4125
+
4072
4126
  event.preventDefault();
4073
4127
  event.stopPropagation();
4074
4128
 
4075
- if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
4129
+ if (isDisabled(this)) {
4076
4130
  return;
4077
4131
  }
4078
4132
 
4079
- const parent = Dropdown.getParentFromElement(this);
4080
- const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
4133
+ const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
4081
4134
 
4082
4135
  if (event.key === ESCAPE_KEY$2) {
4083
- const button = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
4084
- button.focus();
4136
+ getToggleButton().focus();
4085
4137
  Dropdown.clearMenus();
4086
4138
  return;
4087
4139
  }
4088
4140
 
4089
4141
  if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
4090
- const button = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
4091
- button.click();
4142
+ getToggleButton().click();
4092
4143
  return;
4093
4144
  }
4094
4145
 
@@ -4097,26 +4148,7 @@
4097
4148
  return;
4098
4149
  }
4099
4150
 
4100
- const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
4101
-
4102
- if (!items.length) {
4103
- return;
4104
- }
4105
-
4106
- let index = items.indexOf(event.target); // Up
4107
-
4108
- if (event.key === ARROW_UP_KEY && index > 0) {
4109
- index--;
4110
- } // Down
4111
-
4112
-
4113
- if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
4114
- index++;
4115
- } // index is -1 if the first keydown is an ArrowUp
4116
-
4117
-
4118
- index = index === -1 ? 0 : index;
4119
- items[index].focus();
4151
+ Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
4120
4152
  }
4121
4153
 
4122
4154
  }
@@ -4142,11 +4174,214 @@
4142
4174
  * add .Dropdown to jQuery only if jQuery is present
4143
4175
  */
4144
4176
 
4145
- defineJQueryPlugin(NAME$7, Dropdown);
4177
+ defineJQueryPlugin(Dropdown);
4146
4178
 
4147
4179
  /**
4148
4180
  * --------------------------------------------------------------------------
4149
- * Bootstrap (v5.0.0-beta3): modal.js
4181
+ * Bootstrap (v5.0.1): util/scrollBar.js
4182
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4183
+ * --------------------------------------------------------------------------
4184
+ */
4185
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
4186
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
4187
+
4188
+ const getWidth = () => {
4189
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
4190
+ const documentWidth = document.documentElement.clientWidth;
4191
+ return Math.abs(window.innerWidth - documentWidth);
4192
+ };
4193
+
4194
+ const hide = (width = getWidth()) => {
4195
+ _disableOverFlow(); // give padding to element to balances the hidden scrollbar width
4196
+
4197
+
4198
+ _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
4199
+
4200
+
4201
+ _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
4202
+
4203
+ _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
4204
+ };
4205
+
4206
+ const _disableOverFlow = () => {
4207
+ const actualValue = document.body.style.overflow;
4208
+
4209
+ if (actualValue) {
4210
+ Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
4211
+ }
4212
+
4213
+ document.body.style.overflow = 'hidden';
4214
+ };
4215
+
4216
+ const _setElementAttributes = (selector, styleProp, callback) => {
4217
+ const scrollbarWidth = getWidth();
4218
+ SelectorEngine.find(selector).forEach(element => {
4219
+ if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
4220
+ return;
4221
+ }
4222
+
4223
+ const actualValue = element.style[styleProp];
4224
+ const calculatedValue = window.getComputedStyle(element)[styleProp];
4225
+ Manipulator.setDataAttribute(element, styleProp, actualValue);
4226
+ element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
4227
+ });
4228
+ };
4229
+
4230
+ const reset = () => {
4231
+ _resetElementAttributes('body', 'overflow');
4232
+
4233
+ _resetElementAttributes('body', 'paddingRight');
4234
+
4235
+ _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
4236
+
4237
+ _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
4238
+ };
4239
+
4240
+ const _resetElementAttributes = (selector, styleProp) => {
4241
+ SelectorEngine.find(selector).forEach(element => {
4242
+ const value = Manipulator.getDataAttribute(element, styleProp);
4243
+
4244
+ if (typeof value === 'undefined') {
4245
+ element.style.removeProperty(styleProp);
4246
+ } else {
4247
+ Manipulator.removeDataAttribute(element, styleProp);
4248
+ element.style[styleProp] = value;
4249
+ }
4250
+ });
4251
+ };
4252
+
4253
+ /**
4254
+ * --------------------------------------------------------------------------
4255
+ * Bootstrap (v5.0.1): util/backdrop.js
4256
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4257
+ * --------------------------------------------------------------------------
4258
+ */
4259
+ const Default$6 = {
4260
+ isVisible: true,
4261
+ // if false, we use the backdrop helper without adding any element to the dom
4262
+ isAnimated: false,
4263
+ rootElement: document.body,
4264
+ // give the choice to place backdrop under different elements
4265
+ clickCallback: null
4266
+ };
4267
+ const DefaultType$6 = {
4268
+ isVisible: 'boolean',
4269
+ isAnimated: 'boolean',
4270
+ rootElement: 'element',
4271
+ clickCallback: '(function|null)'
4272
+ };
4273
+ const NAME$7 = 'backdrop';
4274
+ const CLASS_NAME_BACKDROP = 'modal-backdrop';
4275
+ const CLASS_NAME_FADE$5 = 'fade';
4276
+ const CLASS_NAME_SHOW$6 = 'show';
4277
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
4278
+
4279
+ class Backdrop {
4280
+ constructor(config) {
4281
+ this._config = this._getConfig(config);
4282
+ this._isAppended = false;
4283
+ this._element = null;
4284
+ }
4285
+
4286
+ show(callback) {
4287
+ if (!this._config.isVisible) {
4288
+ execute(callback);
4289
+ return;
4290
+ }
4291
+
4292
+ this._append();
4293
+
4294
+ if (this._config.isAnimated) {
4295
+ reflow(this._getElement());
4296
+ }
4297
+
4298
+ this._getElement().classList.add(CLASS_NAME_SHOW$6);
4299
+
4300
+ this._emulateAnimation(() => {
4301
+ execute(callback);
4302
+ });
4303
+ }
4304
+
4305
+ hide(callback) {
4306
+ if (!this._config.isVisible) {
4307
+ execute(callback);
4308
+ return;
4309
+ }
4310
+
4311
+ this._getElement().classList.remove(CLASS_NAME_SHOW$6);
4312
+
4313
+ this._emulateAnimation(() => {
4314
+ this.dispose();
4315
+ execute(callback);
4316
+ });
4317
+ } // Private
4318
+
4319
+
4320
+ _getElement() {
4321
+ if (!this._element) {
4322
+ const backdrop = document.createElement('div');
4323
+ backdrop.className = CLASS_NAME_BACKDROP;
4324
+
4325
+ if (this._config.isAnimated) {
4326
+ backdrop.classList.add(CLASS_NAME_FADE$5);
4327
+ }
4328
+
4329
+ this._element = backdrop;
4330
+ }
4331
+
4332
+ return this._element;
4333
+ }
4334
+
4335
+ _getConfig(config) {
4336
+ config = { ...Default$6,
4337
+ ...(typeof config === 'object' ? config : {})
4338
+ };
4339
+ config.rootElement = config.rootElement || document.body;
4340
+ typeCheckConfig(NAME$7, config, DefaultType$6);
4341
+ return config;
4342
+ }
4343
+
4344
+ _append() {
4345
+ if (this._isAppended) {
4346
+ return;
4347
+ }
4348
+
4349
+ this._config.rootElement.appendChild(this._getElement());
4350
+
4351
+ EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
4352
+ execute(this._config.clickCallback);
4353
+ });
4354
+ this._isAppended = true;
4355
+ }
4356
+
4357
+ dispose() {
4358
+ if (!this._isAppended) {
4359
+ return;
4360
+ }
4361
+
4362
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
4363
+
4364
+ this._getElement().parentNode.removeChild(this._element);
4365
+
4366
+ this._isAppended = false;
4367
+ }
4368
+
4369
+ _emulateAnimation(callback) {
4370
+ if (!this._config.isAnimated) {
4371
+ execute(callback);
4372
+ return;
4373
+ }
4374
+
4375
+ const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
4376
+ EventHandler.one(this._getElement(), 'transitionend', () => execute(callback));
4377
+ emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
4378
+ }
4379
+
4380
+ }
4381
+
4382
+ /**
4383
+ * --------------------------------------------------------------------------
4384
+ * Bootstrap (v5.0.1): modal.js
4150
4385
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4151
4386
  * --------------------------------------------------------------------------
4152
4387
  */
@@ -4176,15 +4411,13 @@
4176
4411
  const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
4177
4412
  const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
4178
4413
  const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
4179
- const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`;
4414
+ const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
4180
4415
  const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
4181
4416
  const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
4182
- const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$6}`;
4417
+ const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
4183
4418
  const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
4184
4419
  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
4185
4420
  const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
4186
- const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
4187
- const CLASS_NAME_BACKDROP = 'modal-backdrop';
4188
4421
  const CLASS_NAME_OPEN = 'modal-open';
4189
4422
  const CLASS_NAME_FADE$4 = 'fade';
4190
4423
  const CLASS_NAME_SHOW$5 = 'show';
@@ -4193,8 +4426,6 @@
4193
4426
  const SELECTOR_MODAL_BODY = '.modal-body';
4194
4427
  const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
4195
4428
  const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
4196
- const SELECTOR_FIXED_CONTENT$1 = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
4197
- const SELECTOR_STICKY_CONTENT$1 = '.sticky-top';
4198
4429
  /**
4199
4430
  * ------------------------------------------------------------------------
4200
4431
  * Class Definition
@@ -4206,12 +4437,10 @@
4206
4437
  super(element);
4207
4438
  this._config = this._getConfig(config);
4208
4439
  this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
4209
- this._backdrop = null;
4440
+ this._backdrop = this._initializeBackDrop();
4210
4441
  this._isShown = false;
4211
- this._isBodyOverflowing = false;
4212
4442
  this._ignoreBackdropClick = false;
4213
4443
  this._isTransitioning = false;
4214
- this._scrollbarWidth = 0;
4215
4444
  } // Getters
4216
4445
 
4217
4446
 
@@ -4219,8 +4448,8 @@
4219
4448
  return Default$5;
4220
4449
  }
4221
4450
 
4222
- static get DATA_KEY() {
4223
- return DATA_KEY$6;
4451
+ static get NAME() {
4452
+ return NAME$6;
4224
4453
  } // Public
4225
4454
 
4226
4455
 
@@ -4246,10 +4475,8 @@
4246
4475
  }
4247
4476
 
4248
4477
  this._isShown = true;
4249
-
4250
- this._checkScrollbar();
4251
-
4252
- this._setScrollbar();
4478
+ hide();
4479
+ document.body.classList.add(CLASS_NAME_OPEN);
4253
4480
 
4254
4481
  this._adjustDialog();
4255
4482
 
@@ -4296,24 +4523,21 @@
4296
4523
 
4297
4524
  this._setResizeEvent();
4298
4525
 
4299
- EventHandler.off(document, EVENT_FOCUSIN$1);
4526
+ EventHandler.off(document, EVENT_FOCUSIN$2);
4300
4527
 
4301
4528
  this._element.classList.remove(CLASS_NAME_SHOW$5);
4302
4529
 
4303
4530
  EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
4304
4531
  EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
4305
4532
 
4306
- if (isAnimated) {
4307
- const transitionDuration = getTransitionDurationFromElement(this._element);
4308
- EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));
4309
- emulateTransitionEnd(this._element, transitionDuration);
4310
- } else {
4311
- this._hideModal();
4312
- }
4533
+ this._queueCallback(() => this._hideModal(), this._element, isAnimated);
4313
4534
  }
4314
4535
 
4315
4536
  dispose() {
4316
- [window, this._element, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
4537
+ [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
4538
+
4539
+ this._backdrop.dispose();
4540
+
4317
4541
  super.dispose();
4318
4542
  /**
4319
4543
  * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@@ -4321,15 +4545,7 @@
4321
4545
  * It will remove `EVENT_CLICK_DATA_API` event that should remain
4322
4546
  */
4323
4547
 
4324
- EventHandler.off(document, EVENT_FOCUSIN$1);
4325
- this._config = null;
4326
- this._dialog = null;
4327
- this._backdrop = null;
4328
- this._isShown = null;
4329
- this._isBodyOverflowing = null;
4330
- this._ignoreBackdropClick = null;
4331
- this._isTransitioning = null;
4332
- this._scrollbarWidth = null;
4548
+ EventHandler.off(document, EVENT_FOCUSIN$2);
4333
4549
  }
4334
4550
 
4335
4551
  handleUpdate() {
@@ -4337,8 +4553,17 @@
4337
4553
  } // Private
4338
4554
 
4339
4555
 
4556
+ _initializeBackDrop() {
4557
+ return new Backdrop({
4558
+ isVisible: Boolean(this._config.backdrop),
4559
+ // 'static' option will be translated to true, and booleans will keep their value
4560
+ isAnimated: this._isAnimated()
4561
+ });
4562
+ }
4563
+
4340
4564
  _getConfig(config) {
4341
4565
  config = { ...Default$5,
4566
+ ...Manipulator.getDataAttributes(this._element),
4342
4567
  ...config
4343
4568
  };
4344
4569
  typeCheckConfig(NAME$6, config, DefaultType$5);
@@ -4390,19 +4615,13 @@
4390
4615
  });
4391
4616
  };
4392
4617
 
4393
- if (isAnimated) {
4394
- const transitionDuration = getTransitionDurationFromElement(this._dialog);
4395
- EventHandler.one(this._dialog, 'transitionend', transitionComplete);
4396
- emulateTransitionEnd(this._dialog, transitionDuration);
4397
- } else {
4398
- transitionComplete();
4399
- }
4618
+ this._queueCallback(transitionComplete, this._dialog, isAnimated);
4400
4619
  }
4401
4620
 
4402
4621
  _enforceFocus() {
4403
- EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
4622
+ EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop
4404
4623
 
4405
- EventHandler.on(document, EVENT_FOCUSIN$1, event => {
4624
+ EventHandler.on(document, EVENT_FOCUSIN$2, event => {
4406
4625
  if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
4407
4626
  this._element.focus();
4408
4627
  }
@@ -4411,7 +4630,7 @@
4411
4630
 
4412
4631
  _setEscapeEvent() {
4413
4632
  if (this._isShown) {
4414
- EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
4633
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
4415
4634
  if (this._config.keyboard && event.key === ESCAPE_KEY$1) {
4416
4635
  event.preventDefault();
4417
4636
  this.hide();
@@ -4420,7 +4639,7 @@
4420
4639
  }
4421
4640
  });
4422
4641
  } else {
4423
- EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
4642
+ EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
4424
4643
  }
4425
4644
  }
4426
4645
 
@@ -4443,85 +4662,35 @@
4443
4662
 
4444
4663
  this._isTransitioning = false;
4445
4664
 
4446
- this._showBackdrop(() => {
4665
+ this._backdrop.hide(() => {
4447
4666
  document.body.classList.remove(CLASS_NAME_OPEN);
4448
4667
 
4449
4668
  this._resetAdjustments();
4450
4669
 
4451
- this._resetScrollbar();
4452
-
4670
+ reset();
4453
4671
  EventHandler.trigger(this._element, EVENT_HIDDEN$3);
4454
4672
  });
4455
4673
  }
4456
4674
 
4457
- _removeBackdrop() {
4458
- this._backdrop.parentNode.removeChild(this._backdrop);
4459
-
4460
- this._backdrop = null;
4461
- }
4462
-
4463
4675
  _showBackdrop(callback) {
4464
- const isAnimated = this._isAnimated();
4465
-
4466
- if (this._isShown && this._config.backdrop) {
4467
- this._backdrop = document.createElement('div');
4468
- this._backdrop.className = CLASS_NAME_BACKDROP;
4469
-
4470
- if (isAnimated) {
4471
- this._backdrop.classList.add(CLASS_NAME_FADE$4);
4472
- }
4473
-
4474
- document.body.appendChild(this._backdrop);
4475
- EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
4476
- if (this._ignoreBackdropClick) {
4477
- this._ignoreBackdropClick = false;
4478
- return;
4479
- }
4480
-
4481
- if (event.target !== event.currentTarget) {
4482
- return;
4483
- }
4484
-
4485
- if (this._config.backdrop === 'static') {
4486
- this._triggerBackdropTransition();
4487
- } else {
4488
- this.hide();
4489
- }
4490
- });
4491
-
4492
- if (isAnimated) {
4493
- reflow(this._backdrop);
4676
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
4677
+ if (this._ignoreBackdropClick) {
4678
+ this._ignoreBackdropClick = false;
4679
+ return;
4494
4680
  }
4495
4681
 
4496
- this._backdrop.classList.add(CLASS_NAME_SHOW$5);
4497
-
4498
- if (!isAnimated) {
4499
- callback();
4682
+ if (event.target !== event.currentTarget) {
4500
4683
  return;
4501
4684
  }
4502
4685
 
4503
- const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
4504
- EventHandler.one(this._backdrop, 'transitionend', callback);
4505
- emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
4506
- } else if (!this._isShown && this._backdrop) {
4507
- this._backdrop.classList.remove(CLASS_NAME_SHOW$5);
4508
-
4509
- const callbackRemove = () => {
4510
- this._removeBackdrop();
4511
-
4512
- callback();
4513
- };
4514
-
4515
- if (isAnimated) {
4516
- const backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
4517
- EventHandler.one(this._backdrop, 'transitionend', callbackRemove);
4518
- emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
4519
- } else {
4520
- callbackRemove();
4521
- }
4522
- } else {
4523
- callback();
4524
- }
4686
+ if (this._config.backdrop === true) {
4687
+ this.hide();
4688
+ } else if (this._config.backdrop === 'static') {
4689
+ this._triggerBackdropTransition();
4690
+ }
4691
+ });
4692
+
4693
+ this._backdrop.show(callback);
4525
4694
  }
4526
4695
 
4527
4696
  _isAnimated() {
@@ -4565,103 +4734,37 @@
4565
4734
 
4566
4735
  _adjustDialog() {
4567
4736
  const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
4737
+ const scrollbarWidth = getWidth();
4738
+ const isBodyOverflowing = scrollbarWidth > 0;
4568
4739
 
4569
- if (!this._isBodyOverflowing && isModalOverflowing && !isRTL() || this._isBodyOverflowing && !isModalOverflowing && isRTL()) {
4570
- this._element.style.paddingLeft = `${this._scrollbarWidth}px`;
4740
+ if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
4741
+ this._element.style.paddingLeft = `${scrollbarWidth}px`;
4571
4742
  }
4572
4743
 
4573
- if (this._isBodyOverflowing && !isModalOverflowing && !isRTL() || !this._isBodyOverflowing && isModalOverflowing && isRTL()) {
4574
- this._element.style.paddingRight = `${this._scrollbarWidth}px`;
4744
+ if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
4745
+ this._element.style.paddingRight = `${scrollbarWidth}px`;
4575
4746
  }
4576
4747
  }
4577
4748
 
4578
4749
  _resetAdjustments() {
4579
4750
  this._element.style.paddingLeft = '';
4580
4751
  this._element.style.paddingRight = '';
4581
- }
4582
-
4583
- _checkScrollbar() {
4584
- const rect = document.body.getBoundingClientRect();
4585
- this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
4586
- this._scrollbarWidth = this._getScrollbarWidth();
4587
- }
4588
-
4589
- _setScrollbar() {
4590
- if (this._isBodyOverflowing) {
4591
- this._setElementAttributes(SELECTOR_FIXED_CONTENT$1, 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);
4592
-
4593
- this._setElementAttributes(SELECTOR_STICKY_CONTENT$1, 'marginRight', calculatedValue => calculatedValue - this._scrollbarWidth);
4594
-
4595
- this._setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + this._scrollbarWidth);
4596
- }
4597
-
4598
- document.body.classList.add(CLASS_NAME_OPEN);
4599
- }
4600
-
4601
- _setElementAttributes(selector, styleProp, callback) {
4602
- SelectorEngine.find(selector).forEach(element => {
4603
- if (element !== document.body && window.innerWidth > element.clientWidth + this._scrollbarWidth) {
4604
- return;
4605
- }
4606
-
4607
- const actualValue = element.style[styleProp];
4608
- const calculatedValue = window.getComputedStyle(element)[styleProp];
4609
- Manipulator.setDataAttribute(element, styleProp, actualValue);
4610
- element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';
4611
- });
4612
- }
4613
-
4614
- _resetScrollbar() {
4615
- this._resetElementAttributes(SELECTOR_FIXED_CONTENT$1, 'paddingRight');
4616
-
4617
- this._resetElementAttributes(SELECTOR_STICKY_CONTENT$1, 'marginRight');
4618
-
4619
- this._resetElementAttributes('body', 'paddingRight');
4620
- }
4621
-
4622
- _resetElementAttributes(selector, styleProp) {
4623
- SelectorEngine.find(selector).forEach(element => {
4624
- const value = Manipulator.getDataAttribute(element, styleProp);
4625
-
4626
- if (typeof value === 'undefined' && element === document.body) {
4627
- element.style[styleProp] = '';
4628
- } else {
4629
- Manipulator.removeDataAttribute(element, styleProp);
4630
- element.style[styleProp] = value;
4631
- }
4632
- });
4633
- }
4634
-
4635
- _getScrollbarWidth() {
4636
- // thx d.walsh
4637
- const scrollDiv = document.createElement('div');
4638
- scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
4639
- document.body.appendChild(scrollDiv);
4640
- const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
4641
- document.body.removeChild(scrollDiv);
4642
- return scrollbarWidth;
4643
4752
  } // Static
4644
4753
 
4645
4754
 
4646
4755
  static jQueryInterface(config, relatedTarget) {
4647
4756
  return this.each(function () {
4648
- let data = Data.get(this, DATA_KEY$6);
4649
- const _config = { ...Default$5,
4650
- ...Manipulator.getDataAttributes(this),
4651
- ...(typeof config === 'object' && config ? config : {})
4652
- };
4757
+ const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
4653
4758
 
4654
- if (!data) {
4655
- data = new Modal(this, _config);
4759
+ if (typeof config !== 'string') {
4760
+ return;
4656
4761
  }
4657
4762
 
4658
- if (typeof config === 'string') {
4659
- if (typeof data[config] === 'undefined') {
4660
- throw new TypeError(`No method named "${config}"`);
4661
- }
4662
-
4663
- data[config](relatedTarget);
4763
+ if (typeof data[config] === 'undefined') {
4764
+ throw new TypeError(`No method named "${config}"`);
4664
4765
  }
4766
+
4767
+ data[config](relatedTarget);
4665
4768
  });
4666
4769
  }
4667
4770
 
@@ -4676,7 +4779,7 @@
4676
4779
  EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
4677
4780
  const target = getElementFromSelector(this);
4678
4781
 
4679
- if (this.tagName === 'A' || this.tagName === 'AREA') {
4782
+ if (['A', 'AREA'].includes(this.tagName)) {
4680
4783
  event.preventDefault();
4681
4784
  }
4682
4785
 
@@ -4692,15 +4795,7 @@
4692
4795
  }
4693
4796
  });
4694
4797
  });
4695
- let data = Data.get(target, DATA_KEY$6);
4696
-
4697
- if (!data) {
4698
- const config = { ...Manipulator.getDataAttributes(target),
4699
- ...Manipulator.getDataAttributes(this)
4700
- };
4701
- data = new Modal(target, config);
4702
- }
4703
-
4798
+ const data = Modal.getInstance(target) || new Modal(target);
4704
4799
  data.toggle(this);
4705
4800
  });
4706
4801
  /**
@@ -4710,73 +4805,11 @@
4710
4805
  * add .Modal to jQuery only if jQuery is present
4711
4806
  */
4712
4807
 
4713
- defineJQueryPlugin(NAME$6, Modal);
4714
-
4715
- /**
4716
- * --------------------------------------------------------------------------
4717
- * Bootstrap (v5.0.0-beta3): util/scrollBar.js
4718
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4719
- * --------------------------------------------------------------------------
4720
- */
4721
- const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed';
4722
- const SELECTOR_STICKY_CONTENT = '.sticky-top';
4723
-
4724
- const getWidth = () => {
4725
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
4726
- const documentWidth = document.documentElement.clientWidth;
4727
- return Math.abs(window.innerWidth - documentWidth);
4728
- };
4729
-
4730
- const hide = (width = getWidth()) => {
4731
- document.body.style.overflow = 'hidden';
4732
-
4733
- _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
4734
-
4735
- _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
4736
-
4737
- _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width);
4738
- };
4739
-
4740
- const _setElementAttributes = (selector, styleProp, callback) => {
4741
- const scrollbarWidth = getWidth();
4742
- SelectorEngine.find(selector).forEach(element => {
4743
- if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
4744
- return;
4745
- }
4746
-
4747
- const actualValue = element.style[styleProp];
4748
- const calculatedValue = window.getComputedStyle(element)[styleProp];
4749
- Manipulator.setDataAttribute(element, styleProp, actualValue);
4750
- element.style[styleProp] = callback(Number.parseFloat(calculatedValue)) + 'px';
4751
- });
4752
- };
4753
-
4754
- const reset = () => {
4755
- document.body.style.overflow = 'auto';
4756
-
4757
- _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
4758
-
4759
- _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
4760
-
4761
- _resetElementAttributes('body', 'paddingRight');
4762
- };
4763
-
4764
- const _resetElementAttributes = (selector, styleProp) => {
4765
- SelectorEngine.find(selector).forEach(element => {
4766
- const value = Manipulator.getDataAttribute(element, styleProp);
4767
-
4768
- if (typeof value === 'undefined' && element === document.body) {
4769
- element.style.removeProperty(styleProp);
4770
- } else {
4771
- Manipulator.removeDataAttribute(element, styleProp);
4772
- element.style[styleProp] = value;
4773
- }
4774
- });
4775
- };
4808
+ defineJQueryPlugin(Modal);
4776
4809
 
4777
4810
  /**
4778
4811
  * --------------------------------------------------------------------------
4779
- * Bootstrap (v5.0.0-beta3): offcanvas.js
4812
+ * Bootstrap (v5.0.1): offcanvas.js
4780
4813
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4781
4814
  * --------------------------------------------------------------------------
4782
4815
  */
@@ -4802,18 +4835,16 @@
4802
4835
  keyboard: 'boolean',
4803
4836
  scroll: 'boolean'
4804
4837
  };
4805
- const CLASS_NAME_BACKDROP_BODY = 'offcanvas-backdrop';
4806
4838
  const CLASS_NAME_SHOW$4 = 'show';
4807
- const CLASS_NAME_TOGGLING = 'offcanvas-toggling';
4808
4839
  const OPEN_SELECTOR = '.offcanvas.show';
4809
- const ACTIVE_SELECTOR = `${OPEN_SELECTOR}, .${CLASS_NAME_TOGGLING}`;
4810
4840
  const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
4811
4841
  const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
4812
4842
  const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
4813
4843
  const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
4814
- const EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`;
4844
+ const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
4815
4845
  const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
4816
4846
  const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
4847
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
4817
4848
  const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
4818
4849
  const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
4819
4850
  /**
@@ -4827,17 +4858,18 @@
4827
4858
  super(element);
4828
4859
  this._config = this._getConfig(config);
4829
4860
  this._isShown = false;
4861
+ this._backdrop = this._initializeBackDrop();
4830
4862
 
4831
4863
  this._addEventListeners();
4832
4864
  } // Getters
4833
4865
 
4834
4866
 
4835
- static get Default() {
4836
- return Default$4;
4867
+ static get NAME() {
4868
+ return NAME$5;
4837
4869
  }
4838
4870
 
4839
- static get DATA_KEY() {
4840
- return DATA_KEY$5;
4871
+ static get Default() {
4872
+ return Default$4;
4841
4873
  } // Public
4842
4874
 
4843
4875
 
@@ -4861,15 +4893,13 @@
4861
4893
  this._isShown = true;
4862
4894
  this._element.style.visibility = 'visible';
4863
4895
 
4864
- if (this._config.backdrop) {
4865
- document.body.classList.add(CLASS_NAME_BACKDROP_BODY);
4866
- }
4896
+ this._backdrop.show();
4867
4897
 
4868
4898
  if (!this._config.scroll) {
4869
4899
  hide();
4870
- }
4871
4900
 
4872
- this._element.classList.add(CLASS_NAME_TOGGLING);
4901
+ this._enforceFocusOnElement(this._element);
4902
+ }
4873
4903
 
4874
4904
  this._element.removeAttribute('aria-hidden');
4875
4905
 
@@ -4880,16 +4910,12 @@
4880
4910
  this._element.classList.add(CLASS_NAME_SHOW$4);
4881
4911
 
4882
4912
  const completeCallBack = () => {
4883
- this._element.classList.remove(CLASS_NAME_TOGGLING);
4884
-
4885
4913
  EventHandler.trigger(this._element, EVENT_SHOWN$2, {
4886
4914
  relatedTarget
4887
4915
  });
4888
-
4889
- this._enforceFocusOnElement(this._element);
4890
4916
  };
4891
4917
 
4892
- setTimeout(completeCallBack, getTransitionDurationFromElement(this._element));
4918
+ this._queueCallback(completeCallBack, this._element, true);
4893
4919
  }
4894
4920
 
4895
4921
  hide() {
@@ -4903,9 +4929,7 @@
4903
4929
  return;
4904
4930
  }
4905
4931
 
4906
- this._element.classList.add(CLASS_NAME_TOGGLING);
4907
-
4908
- EventHandler.off(document, EVENT_FOCUSIN);
4932
+ EventHandler.off(document, EVENT_FOCUSIN$1);
4909
4933
 
4910
4934
  this._element.blur();
4911
4935
 
@@ -4913,6 +4937,8 @@
4913
4937
 
4914
4938
  this._element.classList.remove(CLASS_NAME_SHOW$4);
4915
4939
 
4940
+ this._backdrop.hide();
4941
+
4916
4942
  const completeCallback = () => {
4917
4943
  this._element.setAttribute('aria-hidden', true);
4918
4944
 
@@ -4922,20 +4948,21 @@
4922
4948
 
4923
4949
  this._element.style.visibility = 'hidden';
4924
4950
 
4925
- if (this._config.backdrop) {
4926
- document.body.classList.remove(CLASS_NAME_BACKDROP_BODY);
4927
- }
4928
-
4929
4951
  if (!this._config.scroll) {
4930
4952
  reset();
4931
4953
  }
4932
4954
 
4933
4955
  EventHandler.trigger(this._element, EVENT_HIDDEN$2);
4934
-
4935
- this._element.classList.remove(CLASS_NAME_TOGGLING);
4936
4956
  };
4937
4957
 
4938
- setTimeout(completeCallback, getTransitionDurationFromElement(this._element));
4958
+ this._queueCallback(completeCallback, this._element, true);
4959
+ }
4960
+
4961
+ dispose() {
4962
+ this._backdrop.dispose();
4963
+
4964
+ super.dispose();
4965
+ EventHandler.off(document, EVENT_FOCUSIN$1);
4939
4966
  } // Private
4940
4967
 
4941
4968
 
@@ -4948,10 +4975,19 @@
4948
4975
  return config;
4949
4976
  }
4950
4977
 
4978
+ _initializeBackDrop() {
4979
+ return new Backdrop({
4980
+ isVisible: this._config.backdrop,
4981
+ isAnimated: true,
4982
+ rootElement: this._element.parentNode,
4983
+ clickCallback: () => this.hide()
4984
+ });
4985
+ }
4986
+
4951
4987
  _enforceFocusOnElement(element) {
4952
- EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
4988
+ EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
4953
4989
 
4954
- EventHandler.on(document, EVENT_FOCUSIN, event => {
4990
+ EventHandler.on(document, EVENT_FOCUSIN$1, event => {
4955
4991
  if (document !== event.target && element !== event.target && !element.contains(event.target)) {
4956
4992
  element.focus();
4957
4993
  }
@@ -4961,18 +4997,11 @@
4961
4997
 
4962
4998
  _addEventListeners() {
4963
4999
  EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
4964
- EventHandler.on(document, 'keydown', event => {
5000
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
4965
5001
  if (this._config.keyboard && event.key === ESCAPE_KEY) {
4966
5002
  this.hide();
4967
5003
  }
4968
5004
  });
4969
- EventHandler.on(document, EVENT_CLICK_DATA_API$1, event => {
4970
- const target = SelectorEngine.findOne(getSelectorFromElement(event.target));
4971
-
4972
- if (!this._element.contains(event.target) && target !== this._element) {
4973
- this.hide();
4974
- }
4975
- });
4976
5005
  } // Static
4977
5006
 
4978
5007
 
@@ -5018,10 +5047,10 @@
5018
5047
  }
5019
5048
  }); // avoid conflict when clicking a toggler of an offcanvas, while another is open
5020
5049
 
5021
- const allReadyOpen = SelectorEngine.findOne(ACTIVE_SELECTOR);
5050
+ const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
5022
5051
 
5023
5052
  if (allReadyOpen && allReadyOpen !== target) {
5024
- return;
5053
+ Offcanvas.getInstance(allReadyOpen).hide();
5025
5054
  }
5026
5055
 
5027
5056
  const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);
@@ -5036,11 +5065,11 @@
5036
5065
  * ------------------------------------------------------------------------
5037
5066
  */
5038
5067
 
5039
- defineJQueryPlugin(NAME$5, Offcanvas);
5068
+ defineJQueryPlugin(Offcanvas);
5040
5069
 
5041
5070
  /**
5042
5071
  * --------------------------------------------------------------------------
5043
- * Bootstrap (v5.0.0-beta3): util/sanitizer.js
5072
+ * Bootstrap (v5.0.1): util/sanitizer.js
5044
5073
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5045
5074
  * --------------------------------------------------------------------------
5046
5075
  */
@@ -5153,7 +5182,7 @@
5153
5182
 
5154
5183
  /**
5155
5184
  * --------------------------------------------------------------------------
5156
- * Bootstrap (v5.0.0-beta3): tooltip.js
5185
+ * Bootstrap (v5.0.1): tooltip.js
5157
5186
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5158
5187
  * --------------------------------------------------------------------------
5159
5188
  */
@@ -5256,7 +5285,7 @@
5256
5285
  this._activeTrigger = {};
5257
5286
  this._popper = null; // Protected
5258
5287
 
5259
- this.config = this._getConfig(config);
5288
+ this._config = this._getConfig(config);
5260
5289
  this.tip = null;
5261
5290
 
5262
5291
  this._setListeners();
@@ -5271,18 +5300,10 @@
5271
5300
  return NAME$4;
5272
5301
  }
5273
5302
 
5274
- static get DATA_KEY() {
5275
- return DATA_KEY$4;
5276
- }
5277
-
5278
5303
  static get Event() {
5279
5304
  return Event$2;
5280
5305
  }
5281
5306
 
5282
- static get EVENT_KEY() {
5283
- return EVENT_KEY$4;
5284
- }
5285
-
5286
5307
  static get DefaultType() {
5287
5308
  return DefaultType$3;
5288
5309
  } // Public
@@ -5328,25 +5349,16 @@
5328
5349
 
5329
5350
  dispose() {
5330
5351
  clearTimeout(this._timeout);
5331
- EventHandler.off(this._element, this.constructor.EVENT_KEY);
5332
5352
  EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
5333
5353
 
5334
5354
  if (this.tip && this.tip.parentNode) {
5335
5355
  this.tip.parentNode.removeChild(this.tip);
5336
5356
  }
5337
5357
 
5338
- this._isEnabled = null;
5339
- this._timeout = null;
5340
- this._hoverState = null;
5341
- this._activeTrigger = null;
5342
-
5343
5358
  if (this._popper) {
5344
5359
  this._popper.destroy();
5345
5360
  }
5346
5361
 
5347
- this._popper = null;
5348
- this.config = null;
5349
- this.tip = null;
5350
5362
  super.dispose();
5351
5363
  }
5352
5364
 
@@ -5375,18 +5387,19 @@
5375
5387
 
5376
5388
  this.setContent();
5377
5389
 
5378
- if (this.config.animation) {
5390
+ if (this._config.animation) {
5379
5391
  tip.classList.add(CLASS_NAME_FADE$3);
5380
5392
  }
5381
5393
 
5382
- const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
5394
+ const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
5383
5395
 
5384
5396
  const attachment = this._getAttachment(placement);
5385
5397
 
5386
5398
  this._addAttachmentClass(attachment);
5387
5399
 
5388
- const container = this._getContainer();
5389
-
5400
+ const {
5401
+ container
5402
+ } = this._config;
5390
5403
  Data.set(tip, this.constructor.DATA_KEY, this);
5391
5404
 
5392
5405
  if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
@@ -5401,7 +5414,7 @@
5401
5414
  }
5402
5415
 
5403
5416
  tip.classList.add(CLASS_NAME_SHOW$3);
5404
- const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
5417
+ const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
5405
5418
 
5406
5419
  if (customClass) {
5407
5420
  tip.classList.add(...customClass.split(' '));
@@ -5413,7 +5426,7 @@
5413
5426
 
5414
5427
  if ('ontouchstart' in document.documentElement) {
5415
5428
  [].concat(...document.body.children).forEach(element => {
5416
- EventHandler.on(element, 'mouseover', noop());
5429
+ EventHandler.on(element, 'mouseover', noop);
5417
5430
  });
5418
5431
  }
5419
5432
 
@@ -5427,13 +5440,9 @@
5427
5440
  }
5428
5441
  };
5429
5442
 
5430
- if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {
5431
- const transitionDuration = getTransitionDurationFromElement(this.tip);
5432
- EventHandler.one(this.tip, 'transitionend', complete);
5433
- emulateTransitionEnd(this.tip, transitionDuration);
5434
- } else {
5435
- complete();
5436
- }
5443
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
5444
+
5445
+ this._queueCallback(complete, this.tip, isAnimated);
5437
5446
  }
5438
5447
 
5439
5448
  hide() {
@@ -5481,14 +5490,9 @@
5481
5490
  this._activeTrigger[TRIGGER_CLICK] = false;
5482
5491
  this._activeTrigger[TRIGGER_FOCUS] = false;
5483
5492
  this._activeTrigger[TRIGGER_HOVER] = false;
5493
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
5484
5494
 
5485
- if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {
5486
- const transitionDuration = getTransitionDurationFromElement(tip);
5487
- EventHandler.one(tip, 'transitionend', complete);
5488
- emulateTransitionEnd(tip, transitionDuration);
5489
- } else {
5490
- complete();
5491
- }
5495
+ this._queueCallback(complete, this.tip, isAnimated);
5492
5496
 
5493
5497
  this._hoverState = '';
5494
5498
  }
@@ -5510,7 +5514,7 @@
5510
5514
  }
5511
5515
 
5512
5516
  const element = document.createElement('div');
5513
- element.innerHTML = this.config.template;
5517
+ element.innerHTML = this._config.template;
5514
5518
  this.tip = element.children[0];
5515
5519
  return this.tip;
5516
5520
  }
@@ -5526,13 +5530,10 @@
5526
5530
  return;
5527
5531
  }
5528
5532
 
5529
- if (typeof content === 'object' && isElement$1(content)) {
5530
- if (content.jquery) {
5531
- content = content[0];
5532
- } // content is a DOM node or a jQuery
5533
+ if (isElement$1(content)) {
5534
+ content = getElement(content); // content is a DOM node or a jQuery
5533
5535
 
5534
-
5535
- if (this.config.html) {
5536
+ if (this._config.html) {
5536
5537
  if (content.parentNode !== element) {
5537
5538
  element.innerHTML = '';
5538
5539
  element.appendChild(content);
@@ -5544,9 +5545,9 @@
5544
5545
  return;
5545
5546
  }
5546
5547
 
5547
- if (this.config.html) {
5548
- if (this.config.sanitize) {
5549
- content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);
5548
+ if (this._config.html) {
5549
+ if (this._config.sanitize) {
5550
+ content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
5550
5551
  }
5551
5552
 
5552
5553
  element.innerHTML = content;
@@ -5559,7 +5560,7 @@
5559
5560
  let title = this._element.getAttribute('data-bs-original-title');
5560
5561
 
5561
5562
  if (!title) {
5562
- title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;
5563
+ title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
5563
5564
  }
5564
5565
 
5565
5566
  return title;
@@ -5593,7 +5594,7 @@
5593
5594
  _getOffset() {
5594
5595
  const {
5595
5596
  offset
5596
- } = this.config;
5597
+ } = this._config;
5597
5598
 
5598
5599
  if (typeof offset === 'string') {
5599
5600
  return offset.split(',').map(val => Number.parseInt(val, 10));
@@ -5612,8 +5613,7 @@
5612
5613
  modifiers: [{
5613
5614
  name: 'flip',
5614
5615
  options: {
5615
- altBoundary: true,
5616
- fallbackPlacements: this.config.fallbackPlacements
5616
+ fallbackPlacements: this._config.fallbackPlacements
5617
5617
  }
5618
5618
  }, {
5619
5619
  name: 'offset',
@@ -5623,7 +5623,7 @@
5623
5623
  }, {
5624
5624
  name: 'preventOverflow',
5625
5625
  options: {
5626
- boundary: this.config.boundary
5626
+ boundary: this._config.boundary
5627
5627
  }
5628
5628
  }, {
5629
5629
  name: 'arrow',
@@ -5643,7 +5643,7 @@
5643
5643
  }
5644
5644
  };
5645
5645
  return { ...defaultBsPopperConfig,
5646
- ...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig)
5646
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
5647
5647
  };
5648
5648
  }
5649
5649
 
@@ -5651,32 +5651,21 @@
5651
5651
  this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
5652
5652
  }
5653
5653
 
5654
- _getContainer() {
5655
- if (this.config.container === false) {
5656
- return document.body;
5657
- }
5658
-
5659
- if (isElement$1(this.config.container)) {
5660
- return this.config.container;
5661
- }
5662
-
5663
- return SelectorEngine.findOne(this.config.container);
5664
- }
5665
-
5666
5654
  _getAttachment(placement) {
5667
5655
  return AttachmentMap[placement.toUpperCase()];
5668
5656
  }
5669
5657
 
5670
5658
  _setListeners() {
5671
- const triggers = this.config.trigger.split(' ');
5659
+ const triggers = this._config.trigger.split(' ');
5660
+
5672
5661
  triggers.forEach(trigger => {
5673
5662
  if (trigger === 'click') {
5674
- EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event));
5663
+ EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
5675
5664
  } else if (trigger !== TRIGGER_MANUAL) {
5676
5665
  const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
5677
5666
  const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
5678
- EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event));
5679
- EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event));
5667
+ EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
5668
+ EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
5680
5669
  }
5681
5670
  });
5682
5671
 
@@ -5688,8 +5677,8 @@
5688
5677
 
5689
5678
  EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
5690
5679
 
5691
- if (this.config.selector) {
5692
- this.config = { ...this.config,
5680
+ if (this._config.selector) {
5681
+ this._config = { ...this._config,
5693
5682
  trigger: 'manual',
5694
5683
  selector: ''
5695
5684
  };
@@ -5729,7 +5718,7 @@
5729
5718
  clearTimeout(context._timeout);
5730
5719
  context._hoverState = HOVER_STATE_SHOW;
5731
5720
 
5732
- if (!context.config.delay || !context.config.delay.show) {
5721
+ if (!context._config.delay || !context._config.delay.show) {
5733
5722
  context.show();
5734
5723
  return;
5735
5724
  }
@@ -5738,7 +5727,7 @@
5738
5727
  if (context._hoverState === HOVER_STATE_SHOW) {
5739
5728
  context.show();
5740
5729
  }
5741
- }, context.config.delay.show);
5730
+ }, context._config.delay.show);
5742
5731
  }
5743
5732
 
5744
5733
  _leave(event, context) {
@@ -5755,7 +5744,7 @@
5755
5744
  clearTimeout(context._timeout);
5756
5745
  context._hoverState = HOVER_STATE_OUT;
5757
5746
 
5758
- if (!context.config.delay || !context.config.delay.hide) {
5747
+ if (!context._config.delay || !context._config.delay.hide) {
5759
5748
  context.hide();
5760
5749
  return;
5761
5750
  }
@@ -5764,7 +5753,7 @@
5764
5753
  if (context._hoverState === HOVER_STATE_OUT) {
5765
5754
  context.hide();
5766
5755
  }
5767
- }, context.config.delay.hide);
5756
+ }, context._config.delay.hide);
5768
5757
  }
5769
5758
 
5770
5759
  _isWithActiveTrigger() {
@@ -5784,15 +5773,11 @@
5784
5773
  delete dataAttributes[dataAttr];
5785
5774
  }
5786
5775
  });
5787
-
5788
- if (config && typeof config.container === 'object' && config.container.jquery) {
5789
- config.container = config.container[0];
5790
- }
5791
-
5792
5776
  config = { ...this.constructor.Default,
5793
5777
  ...dataAttributes,
5794
5778
  ...(typeof config === 'object' && config ? config : {})
5795
5779
  };
5780
+ config.container = config.container === false ? document.body : getElement(config.container);
5796
5781
 
5797
5782
  if (typeof config.delay === 'number') {
5798
5783
  config.delay = {
@@ -5821,10 +5806,10 @@
5821
5806
  _getDelegateConfig() {
5822
5807
  const config = {};
5823
5808
 
5824
- if (this.config) {
5825
- for (const key in this.config) {
5826
- if (this.constructor.Default[key] !== this.config[key]) {
5827
- config[key] = this.config[key];
5809
+ if (this._config) {
5810
+ for (const key in this._config) {
5811
+ if (this.constructor.Default[key] !== this._config[key]) {
5812
+ config[key] = this._config[key];
5828
5813
  }
5829
5814
  }
5830
5815
  }
@@ -5891,11 +5876,11 @@
5891
5876
  */
5892
5877
 
5893
5878
 
5894
- defineJQueryPlugin(NAME$4, Tooltip);
5879
+ defineJQueryPlugin(Tooltip);
5895
5880
 
5896
5881
  /**
5897
5882
  * --------------------------------------------------------------------------
5898
- * Bootstrap (v5.0.0-beta3): popover.js
5883
+ * Bootstrap (v5.0.1): popover.js
5899
5884
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5900
5885
  * --------------------------------------------------------------------------
5901
5886
  */
@@ -5952,18 +5937,10 @@
5952
5937
  return NAME$3;
5953
5938
  }
5954
5939
 
5955
- static get DATA_KEY() {
5956
- return DATA_KEY$3;
5957
- }
5958
-
5959
5940
  static get Event() {
5960
5941
  return Event$1;
5961
5942
  }
5962
5943
 
5963
- static get EVENT_KEY() {
5964
- return EVENT_KEY$3;
5965
- }
5966
-
5967
5944
  static get DefaultType() {
5968
5945
  return DefaultType$2;
5969
5946
  } // Overrides
@@ -5994,7 +5971,7 @@
5994
5971
  }
5995
5972
 
5996
5973
  _getContent() {
5997
- return this._element.getAttribute('data-bs-content') || this.config.content;
5974
+ return this._element.getAttribute('data-bs-content') || this._config.content;
5998
5975
  }
5999
5976
 
6000
5977
  _cleanTipClass() {
@@ -6041,11 +6018,11 @@
6041
6018
  */
6042
6019
 
6043
6020
 
6044
- defineJQueryPlugin(NAME$3, Popover);
6021
+ defineJQueryPlugin(Popover);
6045
6022
 
6046
6023
  /**
6047
6024
  * --------------------------------------------------------------------------
6048
- * Bootstrap (v5.0.0-beta3): scrollspy.js
6025
+ * Bootstrap (v5.0.1): scrollspy.js
6049
6026
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6050
6027
  * --------------------------------------------------------------------------
6051
6028
  */
@@ -6110,8 +6087,8 @@
6110
6087
  return Default$1;
6111
6088
  }
6112
6089
 
6113
- static get DATA_KEY() {
6114
- return DATA_KEY$2;
6090
+ static get NAME() {
6091
+ return NAME$2;
6115
6092
  } // Public
6116
6093
 
6117
6094
 
@@ -6144,20 +6121,14 @@
6144
6121
  }
6145
6122
 
6146
6123
  dispose() {
6147
- super.dispose();
6148
6124
  EventHandler.off(this._scrollElement, EVENT_KEY$2);
6149
- this._scrollElement = null;
6150
- this._config = null;
6151
- this._selector = null;
6152
- this._offsets = null;
6153
- this._targets = null;
6154
- this._activeTarget = null;
6155
- this._scrollHeight = null;
6125
+ super.dispose();
6156
6126
  } // Private
6157
6127
 
6158
6128
 
6159
6129
  _getConfig(config) {
6160
6130
  config = { ...Default$1,
6131
+ ...Manipulator.getDataAttributes(this._element),
6161
6132
  ...(typeof config === 'object' && config ? config : {})
6162
6133
  };
6163
6134
 
@@ -6266,21 +6237,17 @@
6266
6237
 
6267
6238
  static jQueryInterface(config) {
6268
6239
  return this.each(function () {
6269
- let data = Data.get(this, DATA_KEY$2);
6270
-
6271
- const _config = typeof config === 'object' && config;
6240
+ const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
6272
6241
 
6273
- if (!data) {
6274
- data = new ScrollSpy(this, _config);
6242
+ if (typeof config !== 'string') {
6243
+ return;
6275
6244
  }
6276
6245
 
6277
- if (typeof config === 'string') {
6278
- if (typeof data[config] === 'undefined') {
6279
- throw new TypeError(`No method named "${config}"`);
6280
- }
6281
-
6282
- data[config]();
6246
+ if (typeof data[config] === 'undefined') {
6247
+ throw new TypeError(`No method named "${config}"`);
6283
6248
  }
6249
+
6250
+ data[config]();
6284
6251
  });
6285
6252
  }
6286
6253
 
@@ -6293,7 +6260,7 @@
6293
6260
 
6294
6261
 
6295
6262
  EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
6296
- SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy, Manipulator.getDataAttributes(spy)));
6263
+ SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
6297
6264
  });
6298
6265
  /**
6299
6266
  * ------------------------------------------------------------------------
@@ -6302,11 +6269,11 @@
6302
6269
  * add .ScrollSpy to jQuery only if jQuery is present
6303
6270
  */
6304
6271
 
6305
- defineJQueryPlugin(NAME$2, ScrollSpy);
6272
+ defineJQueryPlugin(ScrollSpy);
6306
6273
 
6307
6274
  /**
6308
6275
  * --------------------------------------------------------------------------
6309
- * Bootstrap (v5.0.0-beta3): tab.js
6276
+ * Bootstrap (v5.0.1): tab.js
6310
6277
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6311
6278
  * --------------------------------------------------------------------------
6312
6279
  */
@@ -6344,13 +6311,13 @@
6344
6311
 
6345
6312
  class Tab extends BaseComponent {
6346
6313
  // Getters
6347
- static get DATA_KEY() {
6348
- return DATA_KEY$1;
6314
+ static get NAME() {
6315
+ return NAME$1;
6349
6316
  } // Public
6350
6317
 
6351
6318
 
6352
6319
  show() {
6353
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE) || isDisabled(this._element)) {
6320
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
6354
6321
  return;
6355
6322
  }
6356
6323
 
@@ -6403,10 +6370,9 @@
6403
6370
  const complete = () => this._transitionComplete(element, active, callback);
6404
6371
 
6405
6372
  if (active && isTransitioning) {
6406
- const transitionDuration = getTransitionDurationFromElement(active);
6407
6373
  active.classList.remove(CLASS_NAME_SHOW$1);
6408
- EventHandler.one(active, 'transitionend', complete);
6409
- emulateTransitionEnd(active, transitionDuration);
6374
+
6375
+ this._queueCallback(complete, element, true);
6410
6376
  } else {
6411
6377
  complete();
6412
6378
  }
@@ -6438,11 +6404,17 @@
6438
6404
  element.classList.add(CLASS_NAME_SHOW$1);
6439
6405
  }
6440
6406
 
6441
- if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
6407
+ let parent = element.parentNode;
6408
+
6409
+ if (parent && parent.nodeName === 'LI') {
6410
+ parent = parent.parentNode;
6411
+ }
6412
+
6413
+ if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
6442
6414
  const dropdownElement = element.closest(SELECTOR_DROPDOWN);
6443
6415
 
6444
6416
  if (dropdownElement) {
6445
- SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
6417
+ SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
6446
6418
  }
6447
6419
 
6448
6420
  element.setAttribute('aria-expanded', true);
@@ -6477,7 +6449,14 @@
6477
6449
 
6478
6450
 
6479
6451
  EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
6480
- event.preventDefault();
6452
+ if (['A', 'AREA'].includes(this.tagName)) {
6453
+ event.preventDefault();
6454
+ }
6455
+
6456
+ if (isDisabled(this)) {
6457
+ return;
6458
+ }
6459
+
6481
6460
  const data = Data.get(this, DATA_KEY$1) || new Tab(this);
6482
6461
  data.show();
6483
6462
  });
@@ -6488,11 +6467,11 @@
6488
6467
  * add .Tab to jQuery only if jQuery is present
6489
6468
  */
6490
6469
 
6491
- defineJQueryPlugin(NAME$1, Tab);
6470
+ defineJQueryPlugin(Tab);
6492
6471
 
6493
6472
  /**
6494
6473
  * --------------------------------------------------------------------------
6495
- * Bootstrap (v5.0.0-beta3): toast.js
6474
+ * Bootstrap (v5.0.1): toast.js
6496
6475
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6497
6476
  * --------------------------------------------------------------------------
6498
6477
  */
@@ -6506,6 +6485,10 @@
6506
6485
  const DATA_KEY = 'bs.toast';
6507
6486
  const EVENT_KEY = `.${DATA_KEY}`;
6508
6487
  const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
6488
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
6489
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
6490
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
6491
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
6509
6492
  const EVENT_HIDE = `hide${EVENT_KEY}`;
6510
6493
  const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
6511
6494
  const EVENT_SHOW = `show${EVENT_KEY}`;
@@ -6536,6 +6519,8 @@
6536
6519
  super(element);
6537
6520
  this._config = this._getConfig(config);
6538
6521
  this._timeout = null;
6522
+ this._hasMouseInteraction = false;
6523
+ this._hasKeyboardInteraction = false;
6539
6524
 
6540
6525
  this._setListeners();
6541
6526
  } // Getters
@@ -6549,8 +6534,8 @@
6549
6534
  return Default;
6550
6535
  }
6551
6536
 
6552
- static get DATA_KEY() {
6553
- return DATA_KEY;
6537
+ static get NAME() {
6538
+ return NAME;
6554
6539
  } // Public
6555
6540
 
6556
6541
 
@@ -6574,11 +6559,7 @@
6574
6559
 
6575
6560
  EventHandler.trigger(this._element, EVENT_SHOWN);
6576
6561
 
6577
- if (this._config.autohide) {
6578
- this._timeout = setTimeout(() => {
6579
- this.hide();
6580
- }, this._config.delay);
6581
- }
6562
+ this._maybeScheduleHide();
6582
6563
  };
6583
6564
 
6584
6565
  this._element.classList.remove(CLASS_NAME_HIDE);
@@ -6587,13 +6568,7 @@
6587
6568
 
6588
6569
  this._element.classList.add(CLASS_NAME_SHOWING);
6589
6570
 
6590
- if (this._config.animation) {
6591
- const transitionDuration = getTransitionDurationFromElement(this._element);
6592
- EventHandler.one(this._element, 'transitionend', complete);
6593
- emulateTransitionEnd(this._element, transitionDuration);
6594
- } else {
6595
- complete();
6596
- }
6571
+ this._queueCallback(complete, this._element, this._config.animation);
6597
6572
  }
6598
6573
 
6599
6574
  hide() {
@@ -6615,13 +6590,7 @@
6615
6590
 
6616
6591
  this._element.classList.remove(CLASS_NAME_SHOW);
6617
6592
 
6618
- if (this._config.animation) {
6619
- const transitionDuration = getTransitionDurationFromElement(this._element);
6620
- EventHandler.one(this._element, 'transitionend', complete);
6621
- emulateTransitionEnd(this._element, transitionDuration);
6622
- } else {
6623
- complete();
6624
- }
6593
+ this._queueCallback(complete, this._element, this._config.animation);
6625
6594
  }
6626
6595
 
6627
6596
  dispose() {
@@ -6631,9 +6600,7 @@
6631
6600
  this._element.classList.remove(CLASS_NAME_SHOW);
6632
6601
  }
6633
6602
 
6634
- EventHandler.off(this._element, EVENT_CLICK_DISMISS);
6635
6603
  super.dispose();
6636
- this._config = null;
6637
6604
  } // Private
6638
6605
 
6639
6606
 
@@ -6646,8 +6613,54 @@
6646
6613
  return config;
6647
6614
  }
6648
6615
 
6616
+ _maybeScheduleHide() {
6617
+ if (!this._config.autohide) {
6618
+ return;
6619
+ }
6620
+
6621
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
6622
+ return;
6623
+ }
6624
+
6625
+ this._timeout = setTimeout(() => {
6626
+ this.hide();
6627
+ }, this._config.delay);
6628
+ }
6629
+
6630
+ _onInteraction(event, isInteracting) {
6631
+ switch (event.type) {
6632
+ case 'mouseover':
6633
+ case 'mouseout':
6634
+ this._hasMouseInteraction = isInteracting;
6635
+ break;
6636
+
6637
+ case 'focusin':
6638
+ case 'focusout':
6639
+ this._hasKeyboardInteraction = isInteracting;
6640
+ break;
6641
+ }
6642
+
6643
+ if (isInteracting) {
6644
+ this._clearTimeout();
6645
+
6646
+ return;
6647
+ }
6648
+
6649
+ const nextElement = event.relatedTarget;
6650
+
6651
+ if (this._element === nextElement || this._element.contains(nextElement)) {
6652
+ return;
6653
+ }
6654
+
6655
+ this._maybeScheduleHide();
6656
+ }
6657
+
6649
6658
  _setListeners() {
6650
6659
  EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
6660
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
6661
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
6662
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
6663
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
6651
6664
  }
6652
6665
 
6653
6666
  _clearTimeout() {
@@ -6685,11 +6698,11 @@
6685
6698
  */
6686
6699
 
6687
6700
 
6688
- defineJQueryPlugin(NAME, Toast);
6701
+ defineJQueryPlugin(Toast);
6689
6702
 
6690
6703
  /**
6691
6704
  * --------------------------------------------------------------------------
6692
- * Bootstrap (v5.0.0-beta3): index.umd.js
6705
+ * Bootstrap (v5.0.1): index.umd.js
6693
6706
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6694
6707
  * --------------------------------------------------------------------------
6695
6708
  */