nova_git_stats 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +135 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +113 -0
  5. data/bin/git_stats +1 -0
  6. data/lib/git_stats/base.rb +2 -0
  7. data/lib/git_stats/cli.rb +4 -2
  8. data/lib/git_stats/command_parser.rb +2 -0
  9. data/lib/git_stats/command_runner.rb +3 -1
  10. data/lib/git_stats/core_extensions/enumerable.rb +2 -0
  11. data/lib/git_stats/core_extensions/hash.rb +2 -0
  12. data/lib/git_stats/core_extensions/symbol.rb +2 -0
  13. data/lib/git_stats/generator.rb +2 -0
  14. data/lib/git_stats/git_data/activity.rb +2 -0
  15. data/lib/git_stats/git_data/author.rb +2 -0
  16. data/lib/git_stats/git_data/blob.rb +2 -0
  17. data/lib/git_stats/git_data/comment_stat.rb +2 -0
  18. data/lib/git_stats/git_data/commit.rb +2 -0
  19. data/lib/git_stats/git_data/repo.rb +3 -2
  20. data/lib/git_stats/git_data/short_stat.rb +2 -0
  21. data/lib/git_stats/git_data/tree.rb +2 -0
  22. data/lib/git_stats/hash_initializable.rb +2 -0
  23. data/lib/git_stats/i18n.rb +2 -0
  24. data/lib/git_stats/inspector.rb +2 -0
  25. data/lib/git_stats/stats_view/charts/activity_charts.rb +2 -0
  26. data/lib/git_stats/stats_view/charts/authors_charts.rb +2 -0
  27. data/lib/git_stats/stats_view/charts/chart.rb +2 -0
  28. data/lib/git_stats/stats_view/charts/charts.rb +2 -0
  29. data/lib/git_stats/stats_view/charts/repo_charts.rb +2 -0
  30. data/lib/git_stats/stats_view/template.rb +2 -0
  31. data/lib/git_stats/stats_view/view.rb +4 -2
  32. data/lib/git_stats/stats_view/view_data.rb +2 -0
  33. data/lib/git_stats/version.rb +3 -1
  34. data/lib/git_stats.rb +2 -0
  35. data/templates/activity/_activity.haml +14 -14
  36. data/templates/assets/menu.css +11 -2
  37. data/templates/author_details/_author_details.haml +8 -8
  38. data/templates/authors/_authors.haml +16 -12
  39. data/templates/comments/_comments.haml +2 -2
  40. data/templates/files/_files.haml +4 -4
  41. data/templates/general.haml +1 -1
  42. data/templates/layout.haml +17 -13
  43. data/templates/lines/_lines.haml +4 -4
  44. metadata +10 -29
  45. data/templates/assets/bootstrap/css/bootstrap-3.3.7.min.css +0 -6
  46. data/templates/assets/bootstrap/css/bootstrap-theme-3.3.7.min.css +0 -6
  47. data/templates/assets/bootstrap/css/bootstrap-theme.min.css.map +0 -1
  48. data/templates/assets/bootstrap/css/bootstrap.min.css.map +0 -1
  49. data/templates/assets/bootstrap/js/bootstrap-3.3.7.min.js +0 -7
  50. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-grid.css +0 -3872
  51. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-grid.css.map +0 -1
  52. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-grid.min.css +0 -7
  53. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-grid.min.css.map +0 -1
  54. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-reboot.css +0 -325
  55. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-reboot.css.map +0 -1
  56. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-reboot.min.css +0 -8
  57. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap-reboot.min.css.map +0 -1
  58. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap.css +0 -10298
  59. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap.css.map +0 -1
  60. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap.min.css +0 -7
  61. data/templates/assets/bootstrap-4.6.0-dist/css/bootstrap.min.css.map +0 -1
  62. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.bundle.js +0 -7045
  63. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.bundle.js.map +0 -1
  64. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.bundle.min.js +0 -7
  65. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.bundle.min.js.map +0 -1
  66. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.js +0 -4432
  67. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.js.map +0 -1
  68. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.min.js +0 -7
  69. data/templates/assets/bootstrap-4.6.0-dist/js/bootstrap.min.js.map +0 -1
  70. data/templates/assets/jquery-3.6.0.min.js +0 -2
@@ -1,4432 +0,0 @@
1
- /*!
2
- * Bootstrap v4.6.0 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
- */
6
- (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
8
- typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
10
- }(this, (function (exports, $, Popper) { 'use strict';
11
-
12
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
15
- var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
16
-
17
- function _defineProperties(target, props) {
18
- for (var i = 0; i < props.length; i++) {
19
- var descriptor = props[i];
20
- descriptor.enumerable = descriptor.enumerable || false;
21
- descriptor.configurable = true;
22
- if ("value" in descriptor) descriptor.writable = true;
23
- Object.defineProperty(target, descriptor.key, descriptor);
24
- }
25
- }
26
-
27
- function _createClass(Constructor, protoProps, staticProps) {
28
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
29
- if (staticProps) _defineProperties(Constructor, staticProps);
30
- return Constructor;
31
- }
32
-
33
- function _extends() {
34
- _extends = Object.assign || function (target) {
35
- for (var i = 1; i < arguments.length; i++) {
36
- var source = arguments[i];
37
-
38
- for (var key in source) {
39
- if (Object.prototype.hasOwnProperty.call(source, key)) {
40
- target[key] = source[key];
41
- }
42
- }
43
- }
44
-
45
- return target;
46
- };
47
-
48
- return _extends.apply(this, arguments);
49
- }
50
-
51
- function _inheritsLoose(subClass, superClass) {
52
- subClass.prototype = Object.create(superClass.prototype);
53
- subClass.prototype.constructor = subClass;
54
- subClass.__proto__ = superClass;
55
- }
56
-
57
- /**
58
- * --------------------------------------------------------------------------
59
- * Bootstrap (v4.6.0): util.js
60
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
61
- * --------------------------------------------------------------------------
62
- */
63
- /**
64
- * ------------------------------------------------------------------------
65
- * Private TransitionEnd Helpers
66
- * ------------------------------------------------------------------------
67
- */
68
-
69
- var TRANSITION_END = 'transitionend';
70
- var MAX_UID = 1000000;
71
- var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
72
-
73
- function toType(obj) {
74
- if (obj === null || typeof obj === 'undefined') {
75
- return "" + obj;
76
- }
77
-
78
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
79
- }
80
-
81
- function getSpecialTransitionEndEvent() {
82
- return {
83
- bindType: TRANSITION_END,
84
- delegateType: TRANSITION_END,
85
- handle: function handle(event) {
86
- if ($__default['default'](event.target).is(this)) {
87
- return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
88
- }
89
-
90
- return undefined;
91
- }
92
- };
93
- }
94
-
95
- function transitionEndEmulator(duration) {
96
- var _this = this;
97
-
98
- var called = false;
99
- $__default['default'](this).one(Util.TRANSITION_END, function () {
100
- called = true;
101
- });
102
- setTimeout(function () {
103
- if (!called) {
104
- Util.triggerTransitionEnd(_this);
105
- }
106
- }, duration);
107
- return this;
108
- }
109
-
110
- function setTransitionEndSupport() {
111
- $__default['default'].fn.emulateTransitionEnd = transitionEndEmulator;
112
- $__default['default'].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
113
- }
114
- /**
115
- * --------------------------------------------------------------------------
116
- * Public Util Api
117
- * --------------------------------------------------------------------------
118
- */
119
-
120
-
121
- var Util = {
122
- TRANSITION_END: 'bsTransitionEnd',
123
- getUID: function getUID(prefix) {
124
- do {
125
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
126
- } while (document.getElementById(prefix));
127
-
128
- return prefix;
129
- },
130
- getSelectorFromElement: function getSelectorFromElement(element) {
131
- var selector = element.getAttribute('data-target');
132
-
133
- if (!selector || selector === '#') {
134
- var hrefAttr = element.getAttribute('href');
135
- selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
136
- }
137
-
138
- try {
139
- return document.querySelector(selector) ? selector : null;
140
- } catch (_) {
141
- return null;
142
- }
143
- },
144
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
145
- if (!element) {
146
- return 0;
147
- } // Get transition-duration of the element
148
-
149
-
150
- var transitionDuration = $__default['default'](element).css('transition-duration');
151
- var transitionDelay = $__default['default'](element).css('transition-delay');
152
- var floatTransitionDuration = parseFloat(transitionDuration);
153
- var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
154
-
155
- if (!floatTransitionDuration && !floatTransitionDelay) {
156
- return 0;
157
- } // If multiple durations are defined, take the first
158
-
159
-
160
- transitionDuration = transitionDuration.split(',')[0];
161
- transitionDelay = transitionDelay.split(',')[0];
162
- return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
163
- },
164
- reflow: function reflow(element) {
165
- return element.offsetHeight;
166
- },
167
- triggerTransitionEnd: function triggerTransitionEnd(element) {
168
- $__default['default'](element).trigger(TRANSITION_END);
169
- },
170
- supportsTransitionEnd: function supportsTransitionEnd() {
171
- return Boolean(TRANSITION_END);
172
- },
173
- isElement: function isElement(obj) {
174
- return (obj[0] || obj).nodeType;
175
- },
176
- typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
177
- for (var property in configTypes) {
178
- if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
179
- var expectedTypes = configTypes[property];
180
- var value = config[property];
181
- var valueType = value && Util.isElement(value) ? 'element' : toType(value);
182
-
183
- if (!new RegExp(expectedTypes).test(valueType)) {
184
- throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
185
- }
186
- }
187
- }
188
- },
189
- findShadowRoot: function findShadowRoot(element) {
190
- if (!document.documentElement.attachShadow) {
191
- return null;
192
- } // Can find the shadow root otherwise it'll return the document
193
-
194
-
195
- if (typeof element.getRootNode === 'function') {
196
- var root = element.getRootNode();
197
- return root instanceof ShadowRoot ? root : null;
198
- }
199
-
200
- if (element instanceof ShadowRoot) {
201
- return element;
202
- } // when we don't find a shadow root
203
-
204
-
205
- if (!element.parentNode) {
206
- return null;
207
- }
208
-
209
- return Util.findShadowRoot(element.parentNode);
210
- },
211
- jQueryDetection: function jQueryDetection() {
212
- if (typeof $__default['default'] === 'undefined') {
213
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
214
- }
215
-
216
- var version = $__default['default'].fn.jquery.split(' ')[0].split('.');
217
- var minMajor = 1;
218
- var ltMajor = 2;
219
- var minMinor = 9;
220
- var minPatch = 1;
221
- var maxMajor = 4;
222
-
223
- if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
224
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
225
- }
226
- }
227
- };
228
- Util.jQueryDetection();
229
- setTransitionEndSupport();
230
-
231
- /**
232
- * ------------------------------------------------------------------------
233
- * Constants
234
- * ------------------------------------------------------------------------
235
- */
236
-
237
- var NAME = 'alert';
238
- var VERSION = '4.6.0';
239
- var DATA_KEY = 'bs.alert';
240
- var EVENT_KEY = "." + DATA_KEY;
241
- var DATA_API_KEY = '.data-api';
242
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
243
- var SELECTOR_DISMISS = '[data-dismiss="alert"]';
244
- var EVENT_CLOSE = "close" + EVENT_KEY;
245
- var EVENT_CLOSED = "closed" + EVENT_KEY;
246
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
247
- var CLASS_NAME_ALERT = 'alert';
248
- var CLASS_NAME_FADE = 'fade';
249
- var CLASS_NAME_SHOW = 'show';
250
- /**
251
- * ------------------------------------------------------------------------
252
- * Class Definition
253
- * ------------------------------------------------------------------------
254
- */
255
-
256
- var Alert = /*#__PURE__*/function () {
257
- function Alert(element) {
258
- this._element = element;
259
- } // Getters
260
-
261
-
262
- var _proto = Alert.prototype;
263
-
264
- // Public
265
- _proto.close = function close(element) {
266
- var rootElement = this._element;
267
-
268
- if (element) {
269
- rootElement = this._getRootElement(element);
270
- }
271
-
272
- var customEvent = this._triggerCloseEvent(rootElement);
273
-
274
- if (customEvent.isDefaultPrevented()) {
275
- return;
276
- }
277
-
278
- this._removeElement(rootElement);
279
- };
280
-
281
- _proto.dispose = function dispose() {
282
- $__default['default'].removeData(this._element, DATA_KEY);
283
- this._element = null;
284
- } // Private
285
- ;
286
-
287
- _proto._getRootElement = function _getRootElement(element) {
288
- var selector = Util.getSelectorFromElement(element);
289
- var parent = false;
290
-
291
- if (selector) {
292
- parent = document.querySelector(selector);
293
- }
294
-
295
- if (!parent) {
296
- parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0];
297
- }
298
-
299
- return parent;
300
- };
301
-
302
- _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
303
- var closeEvent = $__default['default'].Event(EVENT_CLOSE);
304
- $__default['default'](element).trigger(closeEvent);
305
- return closeEvent;
306
- };
307
-
308
- _proto._removeElement = function _removeElement(element) {
309
- var _this = this;
310
-
311
- $__default['default'](element).removeClass(CLASS_NAME_SHOW);
312
-
313
- if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) {
314
- this._destroyElement(element);
315
-
316
- return;
317
- }
318
-
319
- var transitionDuration = Util.getTransitionDurationFromElement(element);
320
- $__default['default'](element).one(Util.TRANSITION_END, function (event) {
321
- return _this._destroyElement(element, event);
322
- }).emulateTransitionEnd(transitionDuration);
323
- };
324
-
325
- _proto._destroyElement = function _destroyElement(element) {
326
- $__default['default'](element).detach().trigger(EVENT_CLOSED).remove();
327
- } // Static
328
- ;
329
-
330
- Alert._jQueryInterface = function _jQueryInterface(config) {
331
- return this.each(function () {
332
- var $element = $__default['default'](this);
333
- var data = $element.data(DATA_KEY);
334
-
335
- if (!data) {
336
- data = new Alert(this);
337
- $element.data(DATA_KEY, data);
338
- }
339
-
340
- if (config === 'close') {
341
- data[config](this);
342
- }
343
- });
344
- };
345
-
346
- Alert._handleDismiss = function _handleDismiss(alertInstance) {
347
- return function (event) {
348
- if (event) {
349
- event.preventDefault();
350
- }
351
-
352
- alertInstance.close(this);
353
- };
354
- };
355
-
356
- _createClass(Alert, null, [{
357
- key: "VERSION",
358
- get: function get() {
359
- return VERSION;
360
- }
361
- }]);
362
-
363
- return Alert;
364
- }();
365
- /**
366
- * ------------------------------------------------------------------------
367
- * Data Api implementation
368
- * ------------------------------------------------------------------------
369
- */
370
-
371
-
372
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
373
- /**
374
- * ------------------------------------------------------------------------
375
- * jQuery
376
- * ------------------------------------------------------------------------
377
- */
378
-
379
- $__default['default'].fn[NAME] = Alert._jQueryInterface;
380
- $__default['default'].fn[NAME].Constructor = Alert;
381
-
382
- $__default['default'].fn[NAME].noConflict = function () {
383
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
384
- return Alert._jQueryInterface;
385
- };
386
-
387
- /**
388
- * ------------------------------------------------------------------------
389
- * Constants
390
- * ------------------------------------------------------------------------
391
- */
392
-
393
- var NAME$1 = 'button';
394
- var VERSION$1 = '4.6.0';
395
- var DATA_KEY$1 = 'bs.button';
396
- var EVENT_KEY$1 = "." + DATA_KEY$1;
397
- var DATA_API_KEY$1 = '.data-api';
398
- var JQUERY_NO_CONFLICT$1 = $__default['default'].fn[NAME$1];
399
- var CLASS_NAME_ACTIVE = 'active';
400
- var CLASS_NAME_BUTTON = 'btn';
401
- var CLASS_NAME_FOCUS = 'focus';
402
- var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
403
- var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
404
- var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
405
- var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
406
- var SELECTOR_INPUT = 'input:not([type="hidden"])';
407
- var SELECTOR_ACTIVE = '.active';
408
- var SELECTOR_BUTTON = '.btn';
409
- var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1;
410
- var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1);
411
- var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$1 + DATA_API_KEY$1;
412
- /**
413
- * ------------------------------------------------------------------------
414
- * Class Definition
415
- * ------------------------------------------------------------------------
416
- */
417
-
418
- var Button = /*#__PURE__*/function () {
419
- function Button(element) {
420
- this._element = element;
421
- this.shouldAvoidTriggerChange = false;
422
- } // Getters
423
-
424
-
425
- var _proto = Button.prototype;
426
-
427
- // Public
428
- _proto.toggle = function toggle() {
429
- var triggerChangeEvent = true;
430
- var addAriaPressed = true;
431
- var rootElement = $__default['default'](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
432
-
433
- if (rootElement) {
434
- var input = this._element.querySelector(SELECTOR_INPUT);
435
-
436
- if (input) {
437
- if (input.type === 'radio') {
438
- if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
439
- triggerChangeEvent = false;
440
- } else {
441
- var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
442
-
443
- if (activeElement) {
444
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
445
- }
446
- }
447
- }
448
-
449
- if (triggerChangeEvent) {
450
- // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
451
- if (input.type === 'checkbox' || input.type === 'radio') {
452
- input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
453
- }
454
-
455
- if (!this.shouldAvoidTriggerChange) {
456
- $__default['default'](input).trigger('change');
457
- }
458
- }
459
-
460
- input.focus();
461
- addAriaPressed = false;
462
- }
463
- }
464
-
465
- if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
466
- if (addAriaPressed) {
467
- this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
468
- }
469
-
470
- if (triggerChangeEvent) {
471
- $__default['default'](this._element).toggleClass(CLASS_NAME_ACTIVE);
472
- }
473
- }
474
- };
475
-
476
- _proto.dispose = function dispose() {
477
- $__default['default'].removeData(this._element, DATA_KEY$1);
478
- this._element = null;
479
- } // Static
480
- ;
481
-
482
- Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
483
- return this.each(function () {
484
- var $element = $__default['default'](this);
485
- var data = $element.data(DATA_KEY$1);
486
-
487
- if (!data) {
488
- data = new Button(this);
489
- $element.data(DATA_KEY$1, data);
490
- }
491
-
492
- data.shouldAvoidTriggerChange = avoidTriggerChange;
493
-
494
- if (config === 'toggle') {
495
- data[config]();
496
- }
497
- });
498
- };
499
-
500
- _createClass(Button, null, [{
501
- key: "VERSION",
502
- get: function get() {
503
- return VERSION$1;
504
- }
505
- }]);
506
-
507
- return Button;
508
- }();
509
- /**
510
- * ------------------------------------------------------------------------
511
- * Data Api implementation
512
- * ------------------------------------------------------------------------
513
- */
514
-
515
-
516
- $__default['default'](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
517
- var button = event.target;
518
- var initialButton = button;
519
-
520
- if (!$__default['default'](button).hasClass(CLASS_NAME_BUTTON)) {
521
- button = $__default['default'](button).closest(SELECTOR_BUTTON)[0];
522
- }
523
-
524
- if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
525
- event.preventDefault(); // work around Firefox bug #1540995
526
- } else {
527
- var inputBtn = button.querySelector(SELECTOR_INPUT);
528
-
529
- if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
530
- event.preventDefault(); // work around Firefox bug #1540995
531
-
532
- return;
533
- }
534
-
535
- if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
536
- Button._jQueryInterface.call($__default['default'](button), 'toggle', initialButton.tagName === 'INPUT');
537
- }
538
- }
539
- }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
540
- var button = $__default['default'](event.target).closest(SELECTOR_BUTTON)[0];
541
- $__default['default'](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
542
- });
543
- $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
544
- // ensure correct active class is set to match the controls' actual values/states
545
- // find all checkboxes/readio buttons inside data-toggle groups
546
- var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
547
-
548
- for (var i = 0, len = buttons.length; i < len; i++) {
549
- var button = buttons[i];
550
- var input = button.querySelector(SELECTOR_INPUT);
551
-
552
- if (input.checked || input.hasAttribute('checked')) {
553
- button.classList.add(CLASS_NAME_ACTIVE);
554
- } else {
555
- button.classList.remove(CLASS_NAME_ACTIVE);
556
- }
557
- } // find all button toggles
558
-
559
-
560
- buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
561
-
562
- for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
563
- var _button = buttons[_i];
564
-
565
- if (_button.getAttribute('aria-pressed') === 'true') {
566
- _button.classList.add(CLASS_NAME_ACTIVE);
567
- } else {
568
- _button.classList.remove(CLASS_NAME_ACTIVE);
569
- }
570
- }
571
- });
572
- /**
573
- * ------------------------------------------------------------------------
574
- * jQuery
575
- * ------------------------------------------------------------------------
576
- */
577
-
578
- $__default['default'].fn[NAME$1] = Button._jQueryInterface;
579
- $__default['default'].fn[NAME$1].Constructor = Button;
580
-
581
- $__default['default'].fn[NAME$1].noConflict = function () {
582
- $__default['default'].fn[NAME$1] = JQUERY_NO_CONFLICT$1;
583
- return Button._jQueryInterface;
584
- };
585
-
586
- /**
587
- * ------------------------------------------------------------------------
588
- * Constants
589
- * ------------------------------------------------------------------------
590
- */
591
-
592
- var NAME$2 = 'carousel';
593
- var VERSION$2 = '4.6.0';
594
- var DATA_KEY$2 = 'bs.carousel';
595
- var EVENT_KEY$2 = "." + DATA_KEY$2;
596
- var DATA_API_KEY$2 = '.data-api';
597
- var JQUERY_NO_CONFLICT$2 = $__default['default'].fn[NAME$2];
598
- var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
599
-
600
- var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
601
-
602
- var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
603
-
604
- var SWIPE_THRESHOLD = 40;
605
- var Default = {
606
- interval: 5000,
607
- keyboard: true,
608
- slide: false,
609
- pause: 'hover',
610
- wrap: true,
611
- touch: true
612
- };
613
- var DefaultType = {
614
- interval: '(number|boolean)',
615
- keyboard: 'boolean',
616
- slide: '(boolean|string)',
617
- pause: '(string|boolean)',
618
- wrap: 'boolean',
619
- touch: 'boolean'
620
- };
621
- var DIRECTION_NEXT = 'next';
622
- var DIRECTION_PREV = 'prev';
623
- var DIRECTION_LEFT = 'left';
624
- var DIRECTION_RIGHT = 'right';
625
- var EVENT_SLIDE = "slide" + EVENT_KEY$2;
626
- var EVENT_SLID = "slid" + EVENT_KEY$2;
627
- var EVENT_KEYDOWN = "keydown" + EVENT_KEY$2;
628
- var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$2;
629
- var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$2;
630
- var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$2;
631
- var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$2;
632
- var EVENT_TOUCHEND = "touchend" + EVENT_KEY$2;
633
- var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2;
634
- var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2;
635
- var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2;
636
- var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
637
- var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2;
638
- var CLASS_NAME_CAROUSEL = 'carousel';
639
- var CLASS_NAME_ACTIVE$1 = 'active';
640
- var CLASS_NAME_SLIDE = 'slide';
641
- var CLASS_NAME_RIGHT = 'carousel-item-right';
642
- var CLASS_NAME_LEFT = 'carousel-item-left';
643
- var CLASS_NAME_NEXT = 'carousel-item-next';
644
- var CLASS_NAME_PREV = 'carousel-item-prev';
645
- var CLASS_NAME_POINTER_EVENT = 'pointer-event';
646
- var SELECTOR_ACTIVE$1 = '.active';
647
- var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
648
- var SELECTOR_ITEM = '.carousel-item';
649
- var SELECTOR_ITEM_IMG = '.carousel-item img';
650
- var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
651
- var SELECTOR_INDICATORS = '.carousel-indicators';
652
- var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
653
- var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
654
- var PointerType = {
655
- TOUCH: 'touch',
656
- PEN: 'pen'
657
- };
658
- /**
659
- * ------------------------------------------------------------------------
660
- * Class Definition
661
- * ------------------------------------------------------------------------
662
- */
663
-
664
- var Carousel = /*#__PURE__*/function () {
665
- function Carousel(element, config) {
666
- this._items = null;
667
- this._interval = null;
668
- this._activeElement = null;
669
- this._isPaused = false;
670
- this._isSliding = false;
671
- this.touchTimeout = null;
672
- this.touchStartX = 0;
673
- this.touchDeltaX = 0;
674
- this._config = this._getConfig(config);
675
- this._element = element;
676
- this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
677
- this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
678
- this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
679
-
680
- this._addEventListeners();
681
- } // Getters
682
-
683
-
684
- var _proto = Carousel.prototype;
685
-
686
- // Public
687
- _proto.next = function next() {
688
- if (!this._isSliding) {
689
- this._slide(DIRECTION_NEXT);
690
- }
691
- };
692
-
693
- _proto.nextWhenVisible = function nextWhenVisible() {
694
- var $element = $__default['default'](this._element); // Don't call next when the page isn't visible
695
- // or the carousel or its parent isn't visible
696
-
697
- if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
698
- this.next();
699
- }
700
- };
701
-
702
- _proto.prev = function prev() {
703
- if (!this._isSliding) {
704
- this._slide(DIRECTION_PREV);
705
- }
706
- };
707
-
708
- _proto.pause = function pause(event) {
709
- if (!event) {
710
- this._isPaused = true;
711
- }
712
-
713
- if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
714
- Util.triggerTransitionEnd(this._element);
715
- this.cycle(true);
716
- }
717
-
718
- clearInterval(this._interval);
719
- this._interval = null;
720
- };
721
-
722
- _proto.cycle = function cycle(event) {
723
- if (!event) {
724
- this._isPaused = false;
725
- }
726
-
727
- if (this._interval) {
728
- clearInterval(this._interval);
729
- this._interval = null;
730
- }
731
-
732
- if (this._config.interval && !this._isPaused) {
733
- this._updateInterval();
734
-
735
- this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
736
- }
737
- };
738
-
739
- _proto.to = function to(index) {
740
- var _this = this;
741
-
742
- this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
743
-
744
- var activeIndex = this._getItemIndex(this._activeElement);
745
-
746
- if (index > this._items.length - 1 || index < 0) {
747
- return;
748
- }
749
-
750
- if (this._isSliding) {
751
- $__default['default'](this._element).one(EVENT_SLID, function () {
752
- return _this.to(index);
753
- });
754
- return;
755
- }
756
-
757
- if (activeIndex === index) {
758
- this.pause();
759
- this.cycle();
760
- return;
761
- }
762
-
763
- var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
764
-
765
- this._slide(direction, this._items[index]);
766
- };
767
-
768
- _proto.dispose = function dispose() {
769
- $__default['default'](this._element).off(EVENT_KEY$2);
770
- $__default['default'].removeData(this._element, DATA_KEY$2);
771
- this._items = null;
772
- this._config = null;
773
- this._element = null;
774
- this._interval = null;
775
- this._isPaused = null;
776
- this._isSliding = null;
777
- this._activeElement = null;
778
- this._indicatorsElement = null;
779
- } // Private
780
- ;
781
-
782
- _proto._getConfig = function _getConfig(config) {
783
- config = _extends({}, Default, config);
784
- Util.typeCheckConfig(NAME$2, config, DefaultType);
785
- return config;
786
- };
787
-
788
- _proto._handleSwipe = function _handleSwipe() {
789
- var absDeltax = Math.abs(this.touchDeltaX);
790
-
791
- if (absDeltax <= SWIPE_THRESHOLD) {
792
- return;
793
- }
794
-
795
- var direction = absDeltax / this.touchDeltaX;
796
- this.touchDeltaX = 0; // swipe left
797
-
798
- if (direction > 0) {
799
- this.prev();
800
- } // swipe right
801
-
802
-
803
- if (direction < 0) {
804
- this.next();
805
- }
806
- };
807
-
808
- _proto._addEventListeners = function _addEventListeners() {
809
- var _this2 = this;
810
-
811
- if (this._config.keyboard) {
812
- $__default['default'](this._element).on(EVENT_KEYDOWN, function (event) {
813
- return _this2._keydown(event);
814
- });
815
- }
816
-
817
- if (this._config.pause === 'hover') {
818
- $__default['default'](this._element).on(EVENT_MOUSEENTER, function (event) {
819
- return _this2.pause(event);
820
- }).on(EVENT_MOUSELEAVE, function (event) {
821
- return _this2.cycle(event);
822
- });
823
- }
824
-
825
- if (this._config.touch) {
826
- this._addTouchEventListeners();
827
- }
828
- };
829
-
830
- _proto._addTouchEventListeners = function _addTouchEventListeners() {
831
- var _this3 = this;
832
-
833
- if (!this._touchSupported) {
834
- return;
835
- }
836
-
837
- var start = function start(event) {
838
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
839
- _this3.touchStartX = event.originalEvent.clientX;
840
- } else if (!_this3._pointerEvent) {
841
- _this3.touchStartX = event.originalEvent.touches[0].clientX;
842
- }
843
- };
844
-
845
- var move = function move(event) {
846
- // ensure swiping with one touch and not pinching
847
- if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
848
- _this3.touchDeltaX = 0;
849
- } else {
850
- _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
851
- }
852
- };
853
-
854
- var end = function end(event) {
855
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
856
- _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
857
- }
858
-
859
- _this3._handleSwipe();
860
-
861
- if (_this3._config.pause === 'hover') {
862
- // If it's a touch-enabled device, mouseenter/leave are fired as
863
- // part of the mouse compatibility events on first tap - the carousel
864
- // would stop cycling until user tapped out of it;
865
- // here, we listen for touchend, explicitly pause the carousel
866
- // (as if it's the second time we tap on it, mouseenter compat event
867
- // is NOT fired) and after a timeout (to allow for mouse compatibility
868
- // events to fire) we explicitly restart cycling
869
- _this3.pause();
870
-
871
- if (_this3.touchTimeout) {
872
- clearTimeout(_this3.touchTimeout);
873
- }
874
-
875
- _this3.touchTimeout = setTimeout(function (event) {
876
- return _this3.cycle(event);
877
- }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
878
- }
879
- };
880
-
881
- $__default['default'](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
882
- return e.preventDefault();
883
- });
884
-
885
- if (this._pointerEvent) {
886
- $__default['default'](this._element).on(EVENT_POINTERDOWN, function (event) {
887
- return start(event);
888
- });
889
- $__default['default'](this._element).on(EVENT_POINTERUP, function (event) {
890
- return end(event);
891
- });
892
-
893
- this._element.classList.add(CLASS_NAME_POINTER_EVENT);
894
- } else {
895
- $__default['default'](this._element).on(EVENT_TOUCHSTART, function (event) {
896
- return start(event);
897
- });
898
- $__default['default'](this._element).on(EVENT_TOUCHMOVE, function (event) {
899
- return move(event);
900
- });
901
- $__default['default'](this._element).on(EVENT_TOUCHEND, function (event) {
902
- return end(event);
903
- });
904
- }
905
- };
906
-
907
- _proto._keydown = function _keydown(event) {
908
- if (/input|textarea/i.test(event.target.tagName)) {
909
- return;
910
- }
911
-
912
- switch (event.which) {
913
- case ARROW_LEFT_KEYCODE:
914
- event.preventDefault();
915
- this.prev();
916
- break;
917
-
918
- case ARROW_RIGHT_KEYCODE:
919
- event.preventDefault();
920
- this.next();
921
- break;
922
- }
923
- };
924
-
925
- _proto._getItemIndex = function _getItemIndex(element) {
926
- this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
927
- return this._items.indexOf(element);
928
- };
929
-
930
- _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
931
- var isNextDirection = direction === DIRECTION_NEXT;
932
- var isPrevDirection = direction === DIRECTION_PREV;
933
-
934
- var activeIndex = this._getItemIndex(activeElement);
935
-
936
- var lastItemIndex = this._items.length - 1;
937
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
938
-
939
- if (isGoingToWrap && !this._config.wrap) {
940
- return activeElement;
941
- }
942
-
943
- var delta = direction === DIRECTION_PREV ? -1 : 1;
944
- var itemIndex = (activeIndex + delta) % this._items.length;
945
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
946
- };
947
-
948
- _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
949
- var targetIndex = this._getItemIndex(relatedTarget);
950
-
951
- var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
952
-
953
- var slideEvent = $__default['default'].Event(EVENT_SLIDE, {
954
- relatedTarget: relatedTarget,
955
- direction: eventDirectionName,
956
- from: fromIndex,
957
- to: targetIndex
958
- });
959
- $__default['default'](this._element).trigger(slideEvent);
960
- return slideEvent;
961
- };
962
-
963
- _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
964
- if (this._indicatorsElement) {
965
- var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
966
- $__default['default'](indicators).removeClass(CLASS_NAME_ACTIVE$1);
967
-
968
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
969
-
970
- if (nextIndicator) {
971
- $__default['default'](nextIndicator).addClass(CLASS_NAME_ACTIVE$1);
972
- }
973
- }
974
- };
975
-
976
- _proto._updateInterval = function _updateInterval() {
977
- var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
978
-
979
- if (!element) {
980
- return;
981
- }
982
-
983
- var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
984
-
985
- if (elementInterval) {
986
- this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
987
- this._config.interval = elementInterval;
988
- } else {
989
- this._config.interval = this._config.defaultInterval || this._config.interval;
990
- }
991
- };
992
-
993
- _proto._slide = function _slide(direction, element) {
994
- var _this4 = this;
995
-
996
- var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
997
-
998
- var activeElementIndex = this._getItemIndex(activeElement);
999
-
1000
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
1001
-
1002
- var nextElementIndex = this._getItemIndex(nextElement);
1003
-
1004
- var isCycling = Boolean(this._interval);
1005
- var directionalClassName;
1006
- var orderClassName;
1007
- var eventDirectionName;
1008
-
1009
- if (direction === DIRECTION_NEXT) {
1010
- directionalClassName = CLASS_NAME_LEFT;
1011
- orderClassName = CLASS_NAME_NEXT;
1012
- eventDirectionName = DIRECTION_LEFT;
1013
- } else {
1014
- directionalClassName = CLASS_NAME_RIGHT;
1015
- orderClassName = CLASS_NAME_PREV;
1016
- eventDirectionName = DIRECTION_RIGHT;
1017
- }
1018
-
1019
- if (nextElement && $__default['default'](nextElement).hasClass(CLASS_NAME_ACTIVE$1)) {
1020
- this._isSliding = false;
1021
- return;
1022
- }
1023
-
1024
- var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1025
-
1026
- if (slideEvent.isDefaultPrevented()) {
1027
- return;
1028
- }
1029
-
1030
- if (!activeElement || !nextElement) {
1031
- // Some weirdness is happening, so we bail
1032
- return;
1033
- }
1034
-
1035
- this._isSliding = true;
1036
-
1037
- if (isCycling) {
1038
- this.pause();
1039
- }
1040
-
1041
- this._setActiveIndicatorElement(nextElement);
1042
-
1043
- this._activeElement = nextElement;
1044
- var slidEvent = $__default['default'].Event(EVENT_SLID, {
1045
- relatedTarget: nextElement,
1046
- direction: eventDirectionName,
1047
- from: activeElementIndex,
1048
- to: nextElementIndex
1049
- });
1050
-
1051
- if ($__default['default'](this._element).hasClass(CLASS_NAME_SLIDE)) {
1052
- $__default['default'](nextElement).addClass(orderClassName);
1053
- Util.reflow(nextElement);
1054
- $__default['default'](activeElement).addClass(directionalClassName);
1055
- $__default['default'](nextElement).addClass(directionalClassName);
1056
- var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
1057
- $__default['default'](activeElement).one(Util.TRANSITION_END, function () {
1058
- $__default['default'](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$1);
1059
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE$1 + " " + orderClassName + " " + directionalClassName);
1060
- _this4._isSliding = false;
1061
- setTimeout(function () {
1062
- return $__default['default'](_this4._element).trigger(slidEvent);
1063
- }, 0);
1064
- }).emulateTransitionEnd(transitionDuration);
1065
- } else {
1066
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE$1);
1067
- $__default['default'](nextElement).addClass(CLASS_NAME_ACTIVE$1);
1068
- this._isSliding = false;
1069
- $__default['default'](this._element).trigger(slidEvent);
1070
- }
1071
-
1072
- if (isCycling) {
1073
- this.cycle();
1074
- }
1075
- } // Static
1076
- ;
1077
-
1078
- Carousel._jQueryInterface = function _jQueryInterface(config) {
1079
- return this.each(function () {
1080
- var data = $__default['default'](this).data(DATA_KEY$2);
1081
-
1082
- var _config = _extends({}, Default, $__default['default'](this).data());
1083
-
1084
- if (typeof config === 'object') {
1085
- _config = _extends({}, _config, config);
1086
- }
1087
-
1088
- var action = typeof config === 'string' ? config : _config.slide;
1089
-
1090
- if (!data) {
1091
- data = new Carousel(this, _config);
1092
- $__default['default'](this).data(DATA_KEY$2, data);
1093
- }
1094
-
1095
- if (typeof config === 'number') {
1096
- data.to(config);
1097
- } else if (typeof action === 'string') {
1098
- if (typeof data[action] === 'undefined') {
1099
- throw new TypeError("No method named \"" + action + "\"");
1100
- }
1101
-
1102
- data[action]();
1103
- } else if (_config.interval && _config.ride) {
1104
- data.pause();
1105
- data.cycle();
1106
- }
1107
- });
1108
- };
1109
-
1110
- Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
1111
- var selector = Util.getSelectorFromElement(this);
1112
-
1113
- if (!selector) {
1114
- return;
1115
- }
1116
-
1117
- var target = $__default['default'](selector)[0];
1118
-
1119
- if (!target || !$__default['default'](target).hasClass(CLASS_NAME_CAROUSEL)) {
1120
- return;
1121
- }
1122
-
1123
- var config = _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
1124
-
1125
- var slideIndex = this.getAttribute('data-slide-to');
1126
-
1127
- if (slideIndex) {
1128
- config.interval = false;
1129
- }
1130
-
1131
- Carousel._jQueryInterface.call($__default['default'](target), config);
1132
-
1133
- if (slideIndex) {
1134
- $__default['default'](target).data(DATA_KEY$2).to(slideIndex);
1135
- }
1136
-
1137
- event.preventDefault();
1138
- };
1139
-
1140
- _createClass(Carousel, null, [{
1141
- key: "VERSION",
1142
- get: function get() {
1143
- return VERSION$2;
1144
- }
1145
- }, {
1146
- key: "Default",
1147
- get: function get() {
1148
- return Default;
1149
- }
1150
- }]);
1151
-
1152
- return Carousel;
1153
- }();
1154
- /**
1155
- * ------------------------------------------------------------------------
1156
- * Data Api implementation
1157
- * ------------------------------------------------------------------------
1158
- */
1159
-
1160
-
1161
- $__default['default'](document).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
1162
- $__default['default'](window).on(EVENT_LOAD_DATA_API$1, function () {
1163
- var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
1164
-
1165
- for (var i = 0, len = carousels.length; i < len; i++) {
1166
- var $carousel = $__default['default'](carousels[i]);
1167
-
1168
- Carousel._jQueryInterface.call($carousel, $carousel.data());
1169
- }
1170
- });
1171
- /**
1172
- * ------------------------------------------------------------------------
1173
- * jQuery
1174
- * ------------------------------------------------------------------------
1175
- */
1176
-
1177
- $__default['default'].fn[NAME$2] = Carousel._jQueryInterface;
1178
- $__default['default'].fn[NAME$2].Constructor = Carousel;
1179
-
1180
- $__default['default'].fn[NAME$2].noConflict = function () {
1181
- $__default['default'].fn[NAME$2] = JQUERY_NO_CONFLICT$2;
1182
- return Carousel._jQueryInterface;
1183
- };
1184
-
1185
- /**
1186
- * ------------------------------------------------------------------------
1187
- * Constants
1188
- * ------------------------------------------------------------------------
1189
- */
1190
-
1191
- var NAME$3 = 'collapse';
1192
- var VERSION$3 = '4.6.0';
1193
- var DATA_KEY$3 = 'bs.collapse';
1194
- var EVENT_KEY$3 = "." + DATA_KEY$3;
1195
- var DATA_API_KEY$3 = '.data-api';
1196
- var JQUERY_NO_CONFLICT$3 = $__default['default'].fn[NAME$3];
1197
- var Default$1 = {
1198
- toggle: true,
1199
- parent: ''
1200
- };
1201
- var DefaultType$1 = {
1202
- toggle: 'boolean',
1203
- parent: '(string|element)'
1204
- };
1205
- var EVENT_SHOW = "show" + EVENT_KEY$3;
1206
- var EVENT_SHOWN = "shown" + EVENT_KEY$3;
1207
- var EVENT_HIDE = "hide" + EVENT_KEY$3;
1208
- var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
1209
- var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
1210
- var CLASS_NAME_SHOW$1 = 'show';
1211
- var CLASS_NAME_COLLAPSE = 'collapse';
1212
- var CLASS_NAME_COLLAPSING = 'collapsing';
1213
- var CLASS_NAME_COLLAPSED = 'collapsed';
1214
- var DIMENSION_WIDTH = 'width';
1215
- var DIMENSION_HEIGHT = 'height';
1216
- var SELECTOR_ACTIVES = '.show, .collapsing';
1217
- var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="collapse"]';
1218
- /**
1219
- * ------------------------------------------------------------------------
1220
- * Class Definition
1221
- * ------------------------------------------------------------------------
1222
- */
1223
-
1224
- var Collapse = /*#__PURE__*/function () {
1225
- function Collapse(element, config) {
1226
- this._isTransitioning = false;
1227
- this._element = element;
1228
- this._config = this._getConfig(config);
1229
- this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1230
- var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$1));
1231
-
1232
- for (var i = 0, len = toggleList.length; i < len; i++) {
1233
- var elem = toggleList[i];
1234
- var selector = Util.getSelectorFromElement(elem);
1235
- var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1236
- return foundElem === element;
1237
- });
1238
-
1239
- if (selector !== null && filterElement.length > 0) {
1240
- this._selector = selector;
1241
-
1242
- this._triggerArray.push(elem);
1243
- }
1244
- }
1245
-
1246
- this._parent = this._config.parent ? this._getParent() : null;
1247
-
1248
- if (!this._config.parent) {
1249
- this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1250
- }
1251
-
1252
- if (this._config.toggle) {
1253
- this.toggle();
1254
- }
1255
- } // Getters
1256
-
1257
-
1258
- var _proto = Collapse.prototype;
1259
-
1260
- // Public
1261
- _proto.toggle = function toggle() {
1262
- if ($__default['default'](this._element).hasClass(CLASS_NAME_SHOW$1)) {
1263
- this.hide();
1264
- } else {
1265
- this.show();
1266
- }
1267
- };
1268
-
1269
- _proto.show = function show() {
1270
- var _this = this;
1271
-
1272
- if (this._isTransitioning || $__default['default'](this._element).hasClass(CLASS_NAME_SHOW$1)) {
1273
- return;
1274
- }
1275
-
1276
- var actives;
1277
- var activesData;
1278
-
1279
- if (this._parent) {
1280
- actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
1281
- if (typeof _this._config.parent === 'string') {
1282
- return elem.getAttribute('data-parent') === _this._config.parent;
1283
- }
1284
-
1285
- return elem.classList.contains(CLASS_NAME_COLLAPSE);
1286
- });
1287
-
1288
- if (actives.length === 0) {
1289
- actives = null;
1290
- }
1291
- }
1292
-
1293
- if (actives) {
1294
- activesData = $__default['default'](actives).not(this._selector).data(DATA_KEY$3);
1295
-
1296
- if (activesData && activesData._isTransitioning) {
1297
- return;
1298
- }
1299
- }
1300
-
1301
- var startEvent = $__default['default'].Event(EVENT_SHOW);
1302
- $__default['default'](this._element).trigger(startEvent);
1303
-
1304
- if (startEvent.isDefaultPrevented()) {
1305
- return;
1306
- }
1307
-
1308
- if (actives) {
1309
- Collapse._jQueryInterface.call($__default['default'](actives).not(this._selector), 'hide');
1310
-
1311
- if (!activesData) {
1312
- $__default['default'](actives).data(DATA_KEY$3, null);
1313
- }
1314
- }
1315
-
1316
- var dimension = this._getDimension();
1317
-
1318
- $__default['default'](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
1319
- this._element.style[dimension] = 0;
1320
-
1321
- if (this._triggerArray.length) {
1322
- $__default['default'](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
1323
- }
1324
-
1325
- this.setTransitioning(true);
1326
-
1327
- var complete = function complete() {
1328
- $__default['default'](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
1329
- _this._element.style[dimension] = '';
1330
-
1331
- _this.setTransitioning(false);
1332
-
1333
- $__default['default'](_this._element).trigger(EVENT_SHOWN);
1334
- };
1335
-
1336
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1337
- var scrollSize = "scroll" + capitalizedDimension;
1338
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1339
- $__default['default'](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1340
- this._element.style[dimension] = this._element[scrollSize] + "px";
1341
- };
1342
-
1343
- _proto.hide = function hide() {
1344
- var _this2 = this;
1345
-
1346
- if (this._isTransitioning || !$__default['default'](this._element).hasClass(CLASS_NAME_SHOW$1)) {
1347
- return;
1348
- }
1349
-
1350
- var startEvent = $__default['default'].Event(EVENT_HIDE);
1351
- $__default['default'](this._element).trigger(startEvent);
1352
-
1353
- if (startEvent.isDefaultPrevented()) {
1354
- return;
1355
- }
1356
-
1357
- var dimension = this._getDimension();
1358
-
1359
- this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1360
- Util.reflow(this._element);
1361
- $__default['default'](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
1362
- var triggerArrayLength = this._triggerArray.length;
1363
-
1364
- if (triggerArrayLength > 0) {
1365
- for (var i = 0; i < triggerArrayLength; i++) {
1366
- var trigger = this._triggerArray[i];
1367
- var selector = Util.getSelectorFromElement(trigger);
1368
-
1369
- if (selector !== null) {
1370
- var $elem = $__default['default']([].slice.call(document.querySelectorAll(selector)));
1371
-
1372
- if (!$elem.hasClass(CLASS_NAME_SHOW$1)) {
1373
- $__default['default'](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
1374
- }
1375
- }
1376
- }
1377
- }
1378
-
1379
- this.setTransitioning(true);
1380
-
1381
- var complete = function complete() {
1382
- _this2.setTransitioning(false);
1383
-
1384
- $__default['default'](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
1385
- };
1386
-
1387
- this._element.style[dimension] = '';
1388
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1389
- $__default['default'](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1390
- };
1391
-
1392
- _proto.setTransitioning = function setTransitioning(isTransitioning) {
1393
- this._isTransitioning = isTransitioning;
1394
- };
1395
-
1396
- _proto.dispose = function dispose() {
1397
- $__default['default'].removeData(this._element, DATA_KEY$3);
1398
- this._config = null;
1399
- this._parent = null;
1400
- this._element = null;
1401
- this._triggerArray = null;
1402
- this._isTransitioning = null;
1403
- } // Private
1404
- ;
1405
-
1406
- _proto._getConfig = function _getConfig(config) {
1407
- config = _extends({}, Default$1, config);
1408
- config.toggle = Boolean(config.toggle); // Coerce string values
1409
-
1410
- Util.typeCheckConfig(NAME$3, config, DefaultType$1);
1411
- return config;
1412
- };
1413
-
1414
- _proto._getDimension = function _getDimension() {
1415
- var hasWidth = $__default['default'](this._element).hasClass(DIMENSION_WIDTH);
1416
- return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
1417
- };
1418
-
1419
- _proto._getParent = function _getParent() {
1420
- var _this3 = this;
1421
-
1422
- var parent;
1423
-
1424
- if (Util.isElement(this._config.parent)) {
1425
- parent = this._config.parent; // It's a jQuery object
1426
-
1427
- if (typeof this._config.parent.jquery !== 'undefined') {
1428
- parent = this._config.parent[0];
1429
- }
1430
- } else {
1431
- parent = document.querySelector(this._config.parent);
1432
- }
1433
-
1434
- var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1435
- var children = [].slice.call(parent.querySelectorAll(selector));
1436
- $__default['default'](children).each(function (i, element) {
1437
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1438
- });
1439
- return parent;
1440
- };
1441
-
1442
- _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1443
- var isOpen = $__default['default'](element).hasClass(CLASS_NAME_SHOW$1);
1444
-
1445
- if (triggerArray.length) {
1446
- $__default['default'](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1447
- }
1448
- } // Static
1449
- ;
1450
-
1451
- Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1452
- var selector = Util.getSelectorFromElement(element);
1453
- return selector ? document.querySelector(selector) : null;
1454
- };
1455
-
1456
- Collapse._jQueryInterface = function _jQueryInterface(config) {
1457
- return this.each(function () {
1458
- var $element = $__default['default'](this);
1459
- var data = $element.data(DATA_KEY$3);
1460
-
1461
- var _config = _extends({}, Default$1, $element.data(), typeof config === 'object' && config ? config : {});
1462
-
1463
- if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1464
- _config.toggle = false;
1465
- }
1466
-
1467
- if (!data) {
1468
- data = new Collapse(this, _config);
1469
- $element.data(DATA_KEY$3, data);
1470
- }
1471
-
1472
- if (typeof config === 'string') {
1473
- if (typeof data[config] === 'undefined') {
1474
- throw new TypeError("No method named \"" + config + "\"");
1475
- }
1476
-
1477
- data[config]();
1478
- }
1479
- });
1480
- };
1481
-
1482
- _createClass(Collapse, null, [{
1483
- key: "VERSION",
1484
- get: function get() {
1485
- return VERSION$3;
1486
- }
1487
- }, {
1488
- key: "Default",
1489
- get: function get() {
1490
- return Default$1;
1491
- }
1492
- }]);
1493
-
1494
- return Collapse;
1495
- }();
1496
- /**
1497
- * ------------------------------------------------------------------------
1498
- * Data Api implementation
1499
- * ------------------------------------------------------------------------
1500
- */
1501
-
1502
-
1503
- $__default['default'](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
1504
- // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1505
- if (event.currentTarget.tagName === 'A') {
1506
- event.preventDefault();
1507
- }
1508
-
1509
- var $trigger = $__default['default'](this);
1510
- var selector = Util.getSelectorFromElement(this);
1511
- var selectors = [].slice.call(document.querySelectorAll(selector));
1512
- $__default['default'](selectors).each(function () {
1513
- var $target = $__default['default'](this);
1514
- var data = $target.data(DATA_KEY$3);
1515
- var config = data ? 'toggle' : $trigger.data();
1516
-
1517
- Collapse._jQueryInterface.call($target, config);
1518
- });
1519
- });
1520
- /**
1521
- * ------------------------------------------------------------------------
1522
- * jQuery
1523
- * ------------------------------------------------------------------------
1524
- */
1525
-
1526
- $__default['default'].fn[NAME$3] = Collapse._jQueryInterface;
1527
- $__default['default'].fn[NAME$3].Constructor = Collapse;
1528
-
1529
- $__default['default'].fn[NAME$3].noConflict = function () {
1530
- $__default['default'].fn[NAME$3] = JQUERY_NO_CONFLICT$3;
1531
- return Collapse._jQueryInterface;
1532
- };
1533
-
1534
- /**
1535
- * ------------------------------------------------------------------------
1536
- * Constants
1537
- * ------------------------------------------------------------------------
1538
- */
1539
-
1540
- var NAME$4 = 'dropdown';
1541
- var VERSION$4 = '4.6.0';
1542
- var DATA_KEY$4 = 'bs.dropdown';
1543
- var EVENT_KEY$4 = "." + DATA_KEY$4;
1544
- var DATA_API_KEY$4 = '.data-api';
1545
- var JQUERY_NO_CONFLICT$4 = $__default['default'].fn[NAME$4];
1546
- var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1547
-
1548
- var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
1549
-
1550
- var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
1551
-
1552
- var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1553
-
1554
- var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1555
-
1556
- var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1557
-
1558
- var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
1559
- var EVENT_HIDE$1 = "hide" + EVENT_KEY$4;
1560
- var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4;
1561
- var EVENT_SHOW$1 = "show" + EVENT_KEY$4;
1562
- var EVENT_SHOWN$1 = "shown" + EVENT_KEY$4;
1563
- var EVENT_CLICK = "click" + EVENT_KEY$4;
1564
- var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$4 + DATA_API_KEY$4;
1565
- var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
1566
- var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
1567
- var CLASS_NAME_DISABLED = 'disabled';
1568
- var CLASS_NAME_SHOW$2 = 'show';
1569
- var CLASS_NAME_DROPUP = 'dropup';
1570
- var CLASS_NAME_DROPRIGHT = 'dropright';
1571
- var CLASS_NAME_DROPLEFT = 'dropleft';
1572
- var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
1573
- var CLASS_NAME_POSITION_STATIC = 'position-static';
1574
- var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
1575
- var SELECTOR_FORM_CHILD = '.dropdown form';
1576
- var SELECTOR_MENU = '.dropdown-menu';
1577
- var SELECTOR_NAVBAR_NAV = '.navbar-nav';
1578
- var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1579
- var PLACEMENT_TOP = 'top-start';
1580
- var PLACEMENT_TOPEND = 'top-end';
1581
- var PLACEMENT_BOTTOM = 'bottom-start';
1582
- var PLACEMENT_BOTTOMEND = 'bottom-end';
1583
- var PLACEMENT_RIGHT = 'right-start';
1584
- var PLACEMENT_LEFT = 'left-start';
1585
- var Default$2 = {
1586
- offset: 0,
1587
- flip: true,
1588
- boundary: 'scrollParent',
1589
- reference: 'toggle',
1590
- display: 'dynamic',
1591
- popperConfig: null
1592
- };
1593
- var DefaultType$2 = {
1594
- offset: '(number|string|function)',
1595
- flip: 'boolean',
1596
- boundary: '(string|element)',
1597
- reference: '(string|element)',
1598
- display: 'string',
1599
- popperConfig: '(null|object)'
1600
- };
1601
- /**
1602
- * ------------------------------------------------------------------------
1603
- * Class Definition
1604
- * ------------------------------------------------------------------------
1605
- */
1606
-
1607
- var Dropdown = /*#__PURE__*/function () {
1608
- function Dropdown(element, config) {
1609
- this._element = element;
1610
- this._popper = null;
1611
- this._config = this._getConfig(config);
1612
- this._menu = this._getMenuElement();
1613
- this._inNavbar = this._detectNavbar();
1614
-
1615
- this._addEventListeners();
1616
- } // Getters
1617
-
1618
-
1619
- var _proto = Dropdown.prototype;
1620
-
1621
- // Public
1622
- _proto.toggle = function toggle() {
1623
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
1624
- return;
1625
- }
1626
-
1627
- var isActive = $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW$2);
1628
-
1629
- Dropdown._clearMenus();
1630
-
1631
- if (isActive) {
1632
- return;
1633
- }
1634
-
1635
- this.show(true);
1636
- };
1637
-
1638
- _proto.show = function show(usePopper) {
1639
- if (usePopper === void 0) {
1640
- usePopper = false;
1641
- }
1642
-
1643
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW$2)) {
1644
- return;
1645
- }
1646
-
1647
- var relatedTarget = {
1648
- relatedTarget: this._element
1649
- };
1650
- var showEvent = $__default['default'].Event(EVENT_SHOW$1, relatedTarget);
1651
-
1652
- var parent = Dropdown._getParentFromElement(this._element);
1653
-
1654
- $__default['default'](parent).trigger(showEvent);
1655
-
1656
- if (showEvent.isDefaultPrevented()) {
1657
- return;
1658
- } // Totally disable Popper for Dropdowns in Navbar
1659
-
1660
-
1661
- if (!this._inNavbar && usePopper) {
1662
- /**
1663
- * Check for Popper dependency
1664
- * Popper - https://popper.js.org
1665
- */
1666
- if (typeof Popper__default['default'] === 'undefined') {
1667
- throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
1668
- }
1669
-
1670
- var referenceElement = this._element;
1671
-
1672
- if (this._config.reference === 'parent') {
1673
- referenceElement = parent;
1674
- } else if (Util.isElement(this._config.reference)) {
1675
- referenceElement = this._config.reference; // Check if it's jQuery element
1676
-
1677
- if (typeof this._config.reference.jquery !== 'undefined') {
1678
- referenceElement = this._config.reference[0];
1679
- }
1680
- } // If boundary is not `scrollParent`, then set position to `static`
1681
- // to allow the menu to "escape" the scroll parent's boundaries
1682
- // https://github.com/twbs/bootstrap/issues/24251
1683
-
1684
-
1685
- if (this._config.boundary !== 'scrollParent') {
1686
- $__default['default'](parent).addClass(CLASS_NAME_POSITION_STATIC);
1687
- }
1688
-
1689
- this._popper = new Popper__default['default'](referenceElement, this._menu, this._getPopperConfig());
1690
- } // If this is a touch-enabled device we add extra
1691
- // empty mouseover listeners to the body's immediate children;
1692
- // only needed because of broken event delegation on iOS
1693
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
1694
-
1695
-
1696
- if ('ontouchstart' in document.documentElement && $__default['default'](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
1697
- $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
1698
- }
1699
-
1700
- this._element.focus();
1701
-
1702
- this._element.setAttribute('aria-expanded', true);
1703
-
1704
- $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW$2);
1705
- $__default['default'](parent).toggleClass(CLASS_NAME_SHOW$2).trigger($__default['default'].Event(EVENT_SHOWN$1, relatedTarget));
1706
- };
1707
-
1708
- _proto.hide = function hide() {
1709
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default['default'](this._menu).hasClass(CLASS_NAME_SHOW$2)) {
1710
- return;
1711
- }
1712
-
1713
- var relatedTarget = {
1714
- relatedTarget: this._element
1715
- };
1716
- var hideEvent = $__default['default'].Event(EVENT_HIDE$1, relatedTarget);
1717
-
1718
- var parent = Dropdown._getParentFromElement(this._element);
1719
-
1720
- $__default['default'](parent).trigger(hideEvent);
1721
-
1722
- if (hideEvent.isDefaultPrevented()) {
1723
- return;
1724
- }
1725
-
1726
- if (this._popper) {
1727
- this._popper.destroy();
1728
- }
1729
-
1730
- $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW$2);
1731
- $__default['default'](parent).toggleClass(CLASS_NAME_SHOW$2).trigger($__default['default'].Event(EVENT_HIDDEN$1, relatedTarget));
1732
- };
1733
-
1734
- _proto.dispose = function dispose() {
1735
- $__default['default'].removeData(this._element, DATA_KEY$4);
1736
- $__default['default'](this._element).off(EVENT_KEY$4);
1737
- this._element = null;
1738
- this._menu = null;
1739
-
1740
- if (this._popper !== null) {
1741
- this._popper.destroy();
1742
-
1743
- this._popper = null;
1744
- }
1745
- };
1746
-
1747
- _proto.update = function update() {
1748
- this._inNavbar = this._detectNavbar();
1749
-
1750
- if (this._popper !== null) {
1751
- this._popper.scheduleUpdate();
1752
- }
1753
- } // Private
1754
- ;
1755
-
1756
- _proto._addEventListeners = function _addEventListeners() {
1757
- var _this = this;
1758
-
1759
- $__default['default'](this._element).on(EVENT_CLICK, function (event) {
1760
- event.preventDefault();
1761
- event.stopPropagation();
1762
-
1763
- _this.toggle();
1764
- });
1765
- };
1766
-
1767
- _proto._getConfig = function _getConfig(config) {
1768
- config = _extends({}, this.constructor.Default, $__default['default'](this._element).data(), config);
1769
- Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
1770
- return config;
1771
- };
1772
-
1773
- _proto._getMenuElement = function _getMenuElement() {
1774
- if (!this._menu) {
1775
- var parent = Dropdown._getParentFromElement(this._element);
1776
-
1777
- if (parent) {
1778
- this._menu = parent.querySelector(SELECTOR_MENU);
1779
- }
1780
- }
1781
-
1782
- return this._menu;
1783
- };
1784
-
1785
- _proto._getPlacement = function _getPlacement() {
1786
- var $parentDropdown = $__default['default'](this._element.parentNode);
1787
- var placement = PLACEMENT_BOTTOM; // Handle dropup
1788
-
1789
- if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
1790
- placement = $__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
1791
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
1792
- placement = PLACEMENT_RIGHT;
1793
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
1794
- placement = PLACEMENT_LEFT;
1795
- } else if ($__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
1796
- placement = PLACEMENT_BOTTOMEND;
1797
- }
1798
-
1799
- return placement;
1800
- };
1801
-
1802
- _proto._detectNavbar = function _detectNavbar() {
1803
- return $__default['default'](this._element).closest('.navbar').length > 0;
1804
- };
1805
-
1806
- _proto._getOffset = function _getOffset() {
1807
- var _this2 = this;
1808
-
1809
- var offset = {};
1810
-
1811
- if (typeof this._config.offset === 'function') {
1812
- offset.fn = function (data) {
1813
- data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
1814
- return data;
1815
- };
1816
- } else {
1817
- offset.offset = this._config.offset;
1818
- }
1819
-
1820
- return offset;
1821
- };
1822
-
1823
- _proto._getPopperConfig = function _getPopperConfig() {
1824
- var popperConfig = {
1825
- placement: this._getPlacement(),
1826
- modifiers: {
1827
- offset: this._getOffset(),
1828
- flip: {
1829
- enabled: this._config.flip
1830
- },
1831
- preventOverflow: {
1832
- boundariesElement: this._config.boundary
1833
- }
1834
- }
1835
- }; // Disable Popper if we have a static display
1836
-
1837
- if (this._config.display === 'static') {
1838
- popperConfig.modifiers.applyStyle = {
1839
- enabled: false
1840
- };
1841
- }
1842
-
1843
- return _extends({}, popperConfig, this._config.popperConfig);
1844
- } // Static
1845
- ;
1846
-
1847
- Dropdown._jQueryInterface = function _jQueryInterface(config) {
1848
- return this.each(function () {
1849
- var data = $__default['default'](this).data(DATA_KEY$4);
1850
-
1851
- var _config = typeof config === 'object' ? config : null;
1852
-
1853
- if (!data) {
1854
- data = new Dropdown(this, _config);
1855
- $__default['default'](this).data(DATA_KEY$4, data);
1856
- }
1857
-
1858
- if (typeof config === 'string') {
1859
- if (typeof data[config] === 'undefined') {
1860
- throw new TypeError("No method named \"" + config + "\"");
1861
- }
1862
-
1863
- data[config]();
1864
- }
1865
- });
1866
- };
1867
-
1868
- Dropdown._clearMenus = function _clearMenus(event) {
1869
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
1870
- return;
1871
- }
1872
-
1873
- var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
1874
-
1875
- for (var i = 0, len = toggles.length; i < len; i++) {
1876
- var parent = Dropdown._getParentFromElement(toggles[i]);
1877
-
1878
- var context = $__default['default'](toggles[i]).data(DATA_KEY$4);
1879
- var relatedTarget = {
1880
- relatedTarget: toggles[i]
1881
- };
1882
-
1883
- if (event && event.type === 'click') {
1884
- relatedTarget.clickEvent = event;
1885
- }
1886
-
1887
- if (!context) {
1888
- continue;
1889
- }
1890
-
1891
- var dropdownMenu = context._menu;
1892
-
1893
- if (!$__default['default'](parent).hasClass(CLASS_NAME_SHOW$2)) {
1894
- continue;
1895
- }
1896
-
1897
- if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default['default'].contains(parent, event.target)) {
1898
- continue;
1899
- }
1900
-
1901
- var hideEvent = $__default['default'].Event(EVENT_HIDE$1, relatedTarget);
1902
- $__default['default'](parent).trigger(hideEvent);
1903
-
1904
- if (hideEvent.isDefaultPrevented()) {
1905
- continue;
1906
- } // If this is a touch-enabled device we remove the extra
1907
- // empty mouseover listeners we added for iOS support
1908
-
1909
-
1910
- if ('ontouchstart' in document.documentElement) {
1911
- $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
1912
- }
1913
-
1914
- toggles[i].setAttribute('aria-expanded', 'false');
1915
-
1916
- if (context._popper) {
1917
- context._popper.destroy();
1918
- }
1919
-
1920
- $__default['default'](dropdownMenu).removeClass(CLASS_NAME_SHOW$2);
1921
- $__default['default'](parent).removeClass(CLASS_NAME_SHOW$2).trigger($__default['default'].Event(EVENT_HIDDEN$1, relatedTarget));
1922
- }
1923
- };
1924
-
1925
- Dropdown._getParentFromElement = function _getParentFromElement(element) {
1926
- var parent;
1927
- var selector = Util.getSelectorFromElement(element);
1928
-
1929
- if (selector) {
1930
- parent = document.querySelector(selector);
1931
- }
1932
-
1933
- return parent || element.parentNode;
1934
- } // eslint-disable-next-line complexity
1935
- ;
1936
-
1937
- Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
1938
- // If not input/textarea:
1939
- // - And not a key in REGEXP_KEYDOWN => not a dropdown command
1940
- // If input/textarea:
1941
- // - If space key => not a dropdown command
1942
- // - If key is other than escape
1943
- // - If key is not up or down => not a dropdown command
1944
- // - If trigger inside the menu => not a dropdown command
1945
- if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default['default'](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
1946
- return;
1947
- }
1948
-
1949
- if (this.disabled || $__default['default'](this).hasClass(CLASS_NAME_DISABLED)) {
1950
- return;
1951
- }
1952
-
1953
- var parent = Dropdown._getParentFromElement(this);
1954
-
1955
- var isActive = $__default['default'](parent).hasClass(CLASS_NAME_SHOW$2);
1956
-
1957
- if (!isActive && event.which === ESCAPE_KEYCODE) {
1958
- return;
1959
- }
1960
-
1961
- event.preventDefault();
1962
- event.stopPropagation();
1963
-
1964
- if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
1965
- if (event.which === ESCAPE_KEYCODE) {
1966
- $__default['default'](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
1967
- }
1968
-
1969
- $__default['default'](this).trigger('click');
1970
- return;
1971
- }
1972
-
1973
- var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
1974
- return $__default['default'](item).is(':visible');
1975
- });
1976
-
1977
- if (items.length === 0) {
1978
- return;
1979
- }
1980
-
1981
- var index = items.indexOf(event.target);
1982
-
1983
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
1984
- // Up
1985
- index--;
1986
- }
1987
-
1988
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1989
- // Down
1990
- index++;
1991
- }
1992
-
1993
- if (index < 0) {
1994
- index = 0;
1995
- }
1996
-
1997
- items[index].focus();
1998
- };
1999
-
2000
- _createClass(Dropdown, null, [{
2001
- key: "VERSION",
2002
- get: function get() {
2003
- return VERSION$4;
2004
- }
2005
- }, {
2006
- key: "Default",
2007
- get: function get() {
2008
- return Default$2;
2009
- }
2010
- }, {
2011
- key: "DefaultType",
2012
- get: function get() {
2013
- return DefaultType$2;
2014
- }
2015
- }]);
2016
-
2017
- return Dropdown;
2018
- }();
2019
- /**
2020
- * ------------------------------------------------------------------------
2021
- * Data Api implementation
2022
- * ------------------------------------------------------------------------
2023
- */
2024
-
2025
-
2026
- $__default['default'](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$4 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
2027
- event.preventDefault();
2028
- event.stopPropagation();
2029
-
2030
- Dropdown._jQueryInterface.call($__default['default'](this), 'toggle');
2031
- }).on(EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
2032
- e.stopPropagation();
2033
- });
2034
- /**
2035
- * ------------------------------------------------------------------------
2036
- * jQuery
2037
- * ------------------------------------------------------------------------
2038
- */
2039
-
2040
- $__default['default'].fn[NAME$4] = Dropdown._jQueryInterface;
2041
- $__default['default'].fn[NAME$4].Constructor = Dropdown;
2042
-
2043
- $__default['default'].fn[NAME$4].noConflict = function () {
2044
- $__default['default'].fn[NAME$4] = JQUERY_NO_CONFLICT$4;
2045
- return Dropdown._jQueryInterface;
2046
- };
2047
-
2048
- /**
2049
- * ------------------------------------------------------------------------
2050
- * Constants
2051
- * ------------------------------------------------------------------------
2052
- */
2053
-
2054
- var NAME$5 = 'modal';
2055
- var VERSION$5 = '4.6.0';
2056
- var DATA_KEY$5 = 'bs.modal';
2057
- var EVENT_KEY$5 = "." + DATA_KEY$5;
2058
- var DATA_API_KEY$5 = '.data-api';
2059
- var JQUERY_NO_CONFLICT$5 = $__default['default'].fn[NAME$5];
2060
- var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
2061
-
2062
- var Default$3 = {
2063
- backdrop: true,
2064
- keyboard: true,
2065
- focus: true,
2066
- show: true
2067
- };
2068
- var DefaultType$3 = {
2069
- backdrop: '(boolean|string)',
2070
- keyboard: 'boolean',
2071
- focus: 'boolean',
2072
- show: 'boolean'
2073
- };
2074
- var EVENT_HIDE$2 = "hide" + EVENT_KEY$5;
2075
- var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5;
2076
- var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5;
2077
- var EVENT_SHOW$2 = "show" + EVENT_KEY$5;
2078
- var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5;
2079
- var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5;
2080
- var EVENT_RESIZE = "resize" + EVENT_KEY$5;
2081
- var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY$5;
2082
- var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5;
2083
- var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
2084
- var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
2085
- var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5;
2086
- var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
2087
- var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
2088
- var CLASS_NAME_BACKDROP = 'modal-backdrop';
2089
- var CLASS_NAME_OPEN = 'modal-open';
2090
- var CLASS_NAME_FADE$1 = 'fade';
2091
- var CLASS_NAME_SHOW$3 = 'show';
2092
- var CLASS_NAME_STATIC = 'modal-static';
2093
- var SELECTOR_DIALOG = '.modal-dialog';
2094
- var SELECTOR_MODAL_BODY = '.modal-body';
2095
- var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="modal"]';
2096
- var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
2097
- var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2098
- var SELECTOR_STICKY_CONTENT = '.sticky-top';
2099
- /**
2100
- * ------------------------------------------------------------------------
2101
- * Class Definition
2102
- * ------------------------------------------------------------------------
2103
- */
2104
-
2105
- var Modal = /*#__PURE__*/function () {
2106
- function Modal(element, config) {
2107
- this._config = this._getConfig(config);
2108
- this._element = element;
2109
- this._dialog = element.querySelector(SELECTOR_DIALOG);
2110
- this._backdrop = null;
2111
- this._isShown = false;
2112
- this._isBodyOverflowing = false;
2113
- this._ignoreBackdropClick = false;
2114
- this._isTransitioning = false;
2115
- this._scrollbarWidth = 0;
2116
- } // Getters
2117
-
2118
-
2119
- var _proto = Modal.prototype;
2120
-
2121
- // Public
2122
- _proto.toggle = function toggle(relatedTarget) {
2123
- return this._isShown ? this.hide() : this.show(relatedTarget);
2124
- };
2125
-
2126
- _proto.show = function show(relatedTarget) {
2127
- var _this = this;
2128
-
2129
- if (this._isShown || this._isTransitioning) {
2130
- return;
2131
- }
2132
-
2133
- if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE$1)) {
2134
- this._isTransitioning = true;
2135
- }
2136
-
2137
- var showEvent = $__default['default'].Event(EVENT_SHOW$2, {
2138
- relatedTarget: relatedTarget
2139
- });
2140
- $__default['default'](this._element).trigger(showEvent);
2141
-
2142
- if (this._isShown || showEvent.isDefaultPrevented()) {
2143
- return;
2144
- }
2145
-
2146
- this._isShown = true;
2147
-
2148
- this._checkScrollbar();
2149
-
2150
- this._setScrollbar();
2151
-
2152
- this._adjustDialog();
2153
-
2154
- this._setEscapeEvent();
2155
-
2156
- this._setResizeEvent();
2157
-
2158
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
2159
- return _this.hide(event);
2160
- });
2161
- $__default['default'](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
2162
- $__default['default'](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
2163
- if ($__default['default'](event.target).is(_this._element)) {
2164
- _this._ignoreBackdropClick = true;
2165
- }
2166
- });
2167
- });
2168
-
2169
- this._showBackdrop(function () {
2170
- return _this._showElement(relatedTarget);
2171
- });
2172
- };
2173
-
2174
- _proto.hide = function hide(event) {
2175
- var _this2 = this;
2176
-
2177
- if (event) {
2178
- event.preventDefault();
2179
- }
2180
-
2181
- if (!this._isShown || this._isTransitioning) {
2182
- return;
2183
- }
2184
-
2185
- var hideEvent = $__default['default'].Event(EVENT_HIDE$2);
2186
- $__default['default'](this._element).trigger(hideEvent);
2187
-
2188
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
2189
- return;
2190
- }
2191
-
2192
- this._isShown = false;
2193
- var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE$1);
2194
-
2195
- if (transition) {
2196
- this._isTransitioning = true;
2197
- }
2198
-
2199
- this._setEscapeEvent();
2200
-
2201
- this._setResizeEvent();
2202
-
2203
- $__default['default'](document).off(EVENT_FOCUSIN);
2204
- $__default['default'](this._element).removeClass(CLASS_NAME_SHOW$3);
2205
- $__default['default'](this._element).off(EVENT_CLICK_DISMISS);
2206
- $__default['default'](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
2207
-
2208
- if (transition) {
2209
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
2210
- $__default['default'](this._element).one(Util.TRANSITION_END, function (event) {
2211
- return _this2._hideModal(event);
2212
- }).emulateTransitionEnd(transitionDuration);
2213
- } else {
2214
- this._hideModal();
2215
- }
2216
- };
2217
-
2218
- _proto.dispose = function dispose() {
2219
- [window, this._element, this._dialog].forEach(function (htmlElement) {
2220
- return $__default['default'](htmlElement).off(EVENT_KEY$5);
2221
- });
2222
- /**
2223
- * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
2224
- * Do not move `document` in `htmlElements` array
2225
- * It will remove `EVENT_CLICK_DATA_API` event that should remain
2226
- */
2227
-
2228
- $__default['default'](document).off(EVENT_FOCUSIN);
2229
- $__default['default'].removeData(this._element, DATA_KEY$5);
2230
- this._config = null;
2231
- this._element = null;
2232
- this._dialog = null;
2233
- this._backdrop = null;
2234
- this._isShown = null;
2235
- this._isBodyOverflowing = null;
2236
- this._ignoreBackdropClick = null;
2237
- this._isTransitioning = null;
2238
- this._scrollbarWidth = null;
2239
- };
2240
-
2241
- _proto.handleUpdate = function handleUpdate() {
2242
- this._adjustDialog();
2243
- } // Private
2244
- ;
2245
-
2246
- _proto._getConfig = function _getConfig(config) {
2247
- config = _extends({}, Default$3, config);
2248
- Util.typeCheckConfig(NAME$5, config, DefaultType$3);
2249
- return config;
2250
- };
2251
-
2252
- _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
2253
- var _this3 = this;
2254
-
2255
- var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED);
2256
- $__default['default'](this._element).trigger(hideEventPrevented);
2257
-
2258
- if (hideEventPrevented.isDefaultPrevented()) {
2259
- return;
2260
- }
2261
-
2262
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2263
-
2264
- if (!isModalOverflowing) {
2265
- this._element.style.overflowY = 'hidden';
2266
- }
2267
-
2268
- this._element.classList.add(CLASS_NAME_STATIC);
2269
-
2270
- var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog);
2271
- $__default['default'](this._element).off(Util.TRANSITION_END);
2272
- $__default['default'](this._element).one(Util.TRANSITION_END, function () {
2273
- _this3._element.classList.remove(CLASS_NAME_STATIC);
2274
-
2275
- if (!isModalOverflowing) {
2276
- $__default['default'](_this3._element).one(Util.TRANSITION_END, function () {
2277
- _this3._element.style.overflowY = '';
2278
- }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
2279
- }
2280
- }).emulateTransitionEnd(modalTransitionDuration);
2281
-
2282
- this._element.focus();
2283
- };
2284
-
2285
- _proto._showElement = function _showElement(relatedTarget) {
2286
- var _this4 = this;
2287
-
2288
- var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE$1);
2289
- var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
2290
-
2291
- if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2292
- // Don't move modal's DOM position
2293
- document.body.appendChild(this._element);
2294
- }
2295
-
2296
- this._element.style.display = 'block';
2297
-
2298
- this._element.removeAttribute('aria-hidden');
2299
-
2300
- this._element.setAttribute('aria-modal', true);
2301
-
2302
- this._element.setAttribute('role', 'dialog');
2303
-
2304
- if ($__default['default'](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
2305
- modalBody.scrollTop = 0;
2306
- } else {
2307
- this._element.scrollTop = 0;
2308
- }
2309
-
2310
- if (transition) {
2311
- Util.reflow(this._element);
2312
- }
2313
-
2314
- $__default['default'](this._element).addClass(CLASS_NAME_SHOW$3);
2315
-
2316
- if (this._config.focus) {
2317
- this._enforceFocus();
2318
- }
2319
-
2320
- var shownEvent = $__default['default'].Event(EVENT_SHOWN$2, {
2321
- relatedTarget: relatedTarget
2322
- });
2323
-
2324
- var transitionComplete = function transitionComplete() {
2325
- if (_this4._config.focus) {
2326
- _this4._element.focus();
2327
- }
2328
-
2329
- _this4._isTransitioning = false;
2330
- $__default['default'](_this4._element).trigger(shownEvent);
2331
- };
2332
-
2333
- if (transition) {
2334
- var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
2335
- $__default['default'](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
2336
- } else {
2337
- transitionComplete();
2338
- }
2339
- };
2340
-
2341
- _proto._enforceFocus = function _enforceFocus() {
2342
- var _this5 = this;
2343
-
2344
- $__default['default'](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
2345
- .on(EVENT_FOCUSIN, function (event) {
2346
- if (document !== event.target && _this5._element !== event.target && $__default['default'](_this5._element).has(event.target).length === 0) {
2347
- _this5._element.focus();
2348
- }
2349
- });
2350
- };
2351
-
2352
- _proto._setEscapeEvent = function _setEscapeEvent() {
2353
- var _this6 = this;
2354
-
2355
- if (this._isShown) {
2356
- $__default['default'](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
2357
- if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
2358
- event.preventDefault();
2359
-
2360
- _this6.hide();
2361
- } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
2362
- _this6._triggerBackdropTransition();
2363
- }
2364
- });
2365
- } else if (!this._isShown) {
2366
- $__default['default'](this._element).off(EVENT_KEYDOWN_DISMISS);
2367
- }
2368
- };
2369
-
2370
- _proto._setResizeEvent = function _setResizeEvent() {
2371
- var _this7 = this;
2372
-
2373
- if (this._isShown) {
2374
- $__default['default'](window).on(EVENT_RESIZE, function (event) {
2375
- return _this7.handleUpdate(event);
2376
- });
2377
- } else {
2378
- $__default['default'](window).off(EVENT_RESIZE);
2379
- }
2380
- };
2381
-
2382
- _proto._hideModal = function _hideModal() {
2383
- var _this8 = this;
2384
-
2385
- this._element.style.display = 'none';
2386
-
2387
- this._element.setAttribute('aria-hidden', true);
2388
-
2389
- this._element.removeAttribute('aria-modal');
2390
-
2391
- this._element.removeAttribute('role');
2392
-
2393
- this._isTransitioning = false;
2394
-
2395
- this._showBackdrop(function () {
2396
- $__default['default'](document.body).removeClass(CLASS_NAME_OPEN);
2397
-
2398
- _this8._resetAdjustments();
2399
-
2400
- _this8._resetScrollbar();
2401
-
2402
- $__default['default'](_this8._element).trigger(EVENT_HIDDEN$2);
2403
- });
2404
- };
2405
-
2406
- _proto._removeBackdrop = function _removeBackdrop() {
2407
- if (this._backdrop) {
2408
- $__default['default'](this._backdrop).remove();
2409
- this._backdrop = null;
2410
- }
2411
- };
2412
-
2413
- _proto._showBackdrop = function _showBackdrop(callback) {
2414
- var _this9 = this;
2415
-
2416
- var animate = $__default['default'](this._element).hasClass(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : '';
2417
-
2418
- if (this._isShown && this._config.backdrop) {
2419
- this._backdrop = document.createElement('div');
2420
- this._backdrop.className = CLASS_NAME_BACKDROP;
2421
-
2422
- if (animate) {
2423
- this._backdrop.classList.add(animate);
2424
- }
2425
-
2426
- $__default['default'](this._backdrop).appendTo(document.body);
2427
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS, function (event) {
2428
- if (_this9._ignoreBackdropClick) {
2429
- _this9._ignoreBackdropClick = false;
2430
- return;
2431
- }
2432
-
2433
- if (event.target !== event.currentTarget) {
2434
- return;
2435
- }
2436
-
2437
- if (_this9._config.backdrop === 'static') {
2438
- _this9._triggerBackdropTransition();
2439
- } else {
2440
- _this9.hide();
2441
- }
2442
- });
2443
-
2444
- if (animate) {
2445
- Util.reflow(this._backdrop);
2446
- }
2447
-
2448
- $__default['default'](this._backdrop).addClass(CLASS_NAME_SHOW$3);
2449
-
2450
- if (!callback) {
2451
- return;
2452
- }
2453
-
2454
- if (!animate) {
2455
- callback();
2456
- return;
2457
- }
2458
-
2459
- var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
2460
- $__default['default'](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
2461
- } else if (!this._isShown && this._backdrop) {
2462
- $__default['default'](this._backdrop).removeClass(CLASS_NAME_SHOW$3);
2463
-
2464
- var callbackRemove = function callbackRemove() {
2465
- _this9._removeBackdrop();
2466
-
2467
- if (callback) {
2468
- callback();
2469
- }
2470
- };
2471
-
2472
- if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE$1)) {
2473
- var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
2474
-
2475
- $__default['default'](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
2476
- } else {
2477
- callbackRemove();
2478
- }
2479
- } else if (callback) {
2480
- callback();
2481
- }
2482
- } // ----------------------------------------------------------------------
2483
- // the following methods are used to handle overflowing modals
2484
- // todo (fat): these should probably be refactored out of modal.js
2485
- // ----------------------------------------------------------------------
2486
- ;
2487
-
2488
- _proto._adjustDialog = function _adjustDialog() {
2489
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2490
-
2491
- if (!this._isBodyOverflowing && isModalOverflowing) {
2492
- this._element.style.paddingLeft = this._scrollbarWidth + "px";
2493
- }
2494
-
2495
- if (this._isBodyOverflowing && !isModalOverflowing) {
2496
- this._element.style.paddingRight = this._scrollbarWidth + "px";
2497
- }
2498
- };
2499
-
2500
- _proto._resetAdjustments = function _resetAdjustments() {
2501
- this._element.style.paddingLeft = '';
2502
- this._element.style.paddingRight = '';
2503
- };
2504
-
2505
- _proto._checkScrollbar = function _checkScrollbar() {
2506
- var rect = document.body.getBoundingClientRect();
2507
- this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
2508
- this._scrollbarWidth = this._getScrollbarWidth();
2509
- };
2510
-
2511
- _proto._setScrollbar = function _setScrollbar() {
2512
- var _this10 = this;
2513
-
2514
- if (this._isBodyOverflowing) {
2515
- // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
2516
- // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
2517
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
2518
- var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
2519
-
2520
- $__default['default'](fixedContent).each(function (index, element) {
2521
- var actualPadding = element.style.paddingRight;
2522
- var calculatedPadding = $__default['default'](element).css('padding-right');
2523
- $__default['default'](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
2524
- }); // Adjust sticky content margin
2525
-
2526
- $__default['default'](stickyContent).each(function (index, element) {
2527
- var actualMargin = element.style.marginRight;
2528
- var calculatedMargin = $__default['default'](element).css('margin-right');
2529
- $__default['default'](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
2530
- }); // Adjust body padding
2531
-
2532
- var actualPadding = document.body.style.paddingRight;
2533
- var calculatedPadding = $__default['default'](document.body).css('padding-right');
2534
- $__default['default'](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
2535
- }
2536
-
2537
- $__default['default'](document.body).addClass(CLASS_NAME_OPEN);
2538
- };
2539
-
2540
- _proto._resetScrollbar = function _resetScrollbar() {
2541
- // Restore fixed content padding
2542
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
2543
- $__default['default'](fixedContent).each(function (index, element) {
2544
- var padding = $__default['default'](element).data('padding-right');
2545
- $__default['default'](element).removeData('padding-right');
2546
- element.style.paddingRight = padding ? padding : '';
2547
- }); // Restore sticky content
2548
-
2549
- var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
2550
- $__default['default'](elements).each(function (index, element) {
2551
- var margin = $__default['default'](element).data('margin-right');
2552
-
2553
- if (typeof margin !== 'undefined') {
2554
- $__default['default'](element).css('margin-right', margin).removeData('margin-right');
2555
- }
2556
- }); // Restore body padding
2557
-
2558
- var padding = $__default['default'](document.body).data('padding-right');
2559
- $__default['default'](document.body).removeData('padding-right');
2560
- document.body.style.paddingRight = padding ? padding : '';
2561
- };
2562
-
2563
- _proto._getScrollbarWidth = function _getScrollbarWidth() {
2564
- // thx d.walsh
2565
- var scrollDiv = document.createElement('div');
2566
- scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
2567
- document.body.appendChild(scrollDiv);
2568
- var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
2569
- document.body.removeChild(scrollDiv);
2570
- return scrollbarWidth;
2571
- } // Static
2572
- ;
2573
-
2574
- Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
2575
- return this.each(function () {
2576
- var data = $__default['default'](this).data(DATA_KEY$5);
2577
-
2578
- var _config = _extends({}, Default$3, $__default['default'](this).data(), typeof config === 'object' && config ? config : {});
2579
-
2580
- if (!data) {
2581
- data = new Modal(this, _config);
2582
- $__default['default'](this).data(DATA_KEY$5, data);
2583
- }
2584
-
2585
- if (typeof config === 'string') {
2586
- if (typeof data[config] === 'undefined') {
2587
- throw new TypeError("No method named \"" + config + "\"");
2588
- }
2589
-
2590
- data[config](relatedTarget);
2591
- } else if (_config.show) {
2592
- data.show(relatedTarget);
2593
- }
2594
- });
2595
- };
2596
-
2597
- _createClass(Modal, null, [{
2598
- key: "VERSION",
2599
- get: function get() {
2600
- return VERSION$5;
2601
- }
2602
- }, {
2603
- key: "Default",
2604
- get: function get() {
2605
- return Default$3;
2606
- }
2607
- }]);
2608
-
2609
- return Modal;
2610
- }();
2611
- /**
2612
- * ------------------------------------------------------------------------
2613
- * Data Api implementation
2614
- * ------------------------------------------------------------------------
2615
- */
2616
-
2617
-
2618
- $__default['default'](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
2619
- var _this11 = this;
2620
-
2621
- var target;
2622
- var selector = Util.getSelectorFromElement(this);
2623
-
2624
- if (selector) {
2625
- target = document.querySelector(selector);
2626
- }
2627
-
2628
- var config = $__default['default'](target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
2629
-
2630
- if (this.tagName === 'A' || this.tagName === 'AREA') {
2631
- event.preventDefault();
2632
- }
2633
-
2634
- var $target = $__default['default'](target).one(EVENT_SHOW$2, function (showEvent) {
2635
- if (showEvent.isDefaultPrevented()) {
2636
- // Only register focus restorer if modal will actually get shown
2637
- return;
2638
- }
2639
-
2640
- $target.one(EVENT_HIDDEN$2, function () {
2641
- if ($__default['default'](_this11).is(':visible')) {
2642
- _this11.focus();
2643
- }
2644
- });
2645
- });
2646
-
2647
- Modal._jQueryInterface.call($__default['default'](target), config, this);
2648
- });
2649
- /**
2650
- * ------------------------------------------------------------------------
2651
- * jQuery
2652
- * ------------------------------------------------------------------------
2653
- */
2654
-
2655
- $__default['default'].fn[NAME$5] = Modal._jQueryInterface;
2656
- $__default['default'].fn[NAME$5].Constructor = Modal;
2657
-
2658
- $__default['default'].fn[NAME$5].noConflict = function () {
2659
- $__default['default'].fn[NAME$5] = JQUERY_NO_CONFLICT$5;
2660
- return Modal._jQueryInterface;
2661
- };
2662
-
2663
- /**
2664
- * --------------------------------------------------------------------------
2665
- * Bootstrap (v4.6.0): tools/sanitizer.js
2666
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2667
- * --------------------------------------------------------------------------
2668
- */
2669
- var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
2670
- var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
2671
- var DefaultWhitelist = {
2672
- // Global attributes allowed on any supplied element below.
2673
- '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
2674
- a: ['target', 'href', 'title', 'rel'],
2675
- area: [],
2676
- b: [],
2677
- br: [],
2678
- col: [],
2679
- code: [],
2680
- div: [],
2681
- em: [],
2682
- hr: [],
2683
- h1: [],
2684
- h2: [],
2685
- h3: [],
2686
- h4: [],
2687
- h5: [],
2688
- h6: [],
2689
- i: [],
2690
- img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
2691
- li: [],
2692
- ol: [],
2693
- p: [],
2694
- pre: [],
2695
- s: [],
2696
- small: [],
2697
- span: [],
2698
- sub: [],
2699
- sup: [],
2700
- strong: [],
2701
- u: [],
2702
- ul: []
2703
- };
2704
- /**
2705
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
2706
- *
2707
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
2708
- */
2709
-
2710
- var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
2711
- /**
2712
- * A pattern that matches safe data URLs. Only matches image, video and audio types.
2713
- *
2714
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
2715
- */
2716
-
2717
- var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
2718
-
2719
- function allowedAttribute(attr, allowedAttributeList) {
2720
- var attrName = attr.nodeName.toLowerCase();
2721
-
2722
- if (allowedAttributeList.indexOf(attrName) !== -1) {
2723
- if (uriAttrs.indexOf(attrName) !== -1) {
2724
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
2725
- }
2726
-
2727
- return true;
2728
- }
2729
-
2730
- var regExp = allowedAttributeList.filter(function (attrRegex) {
2731
- return attrRegex instanceof RegExp;
2732
- }); // Check if a regular expression validates the attribute.
2733
-
2734
- for (var i = 0, len = regExp.length; i < len; i++) {
2735
- if (attrName.match(regExp[i])) {
2736
- return true;
2737
- }
2738
- }
2739
-
2740
- return false;
2741
- }
2742
-
2743
- function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
2744
- if (unsafeHtml.length === 0) {
2745
- return unsafeHtml;
2746
- }
2747
-
2748
- if (sanitizeFn && typeof sanitizeFn === 'function') {
2749
- return sanitizeFn(unsafeHtml);
2750
- }
2751
-
2752
- var domParser = new window.DOMParser();
2753
- var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
2754
- var whitelistKeys = Object.keys(whiteList);
2755
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
2756
-
2757
- var _loop = function _loop(i, len) {
2758
- var el = elements[i];
2759
- var elName = el.nodeName.toLowerCase();
2760
-
2761
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
2762
- el.parentNode.removeChild(el);
2763
- return "continue";
2764
- }
2765
-
2766
- var attributeList = [].slice.call(el.attributes);
2767
- var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
2768
- attributeList.forEach(function (attr) {
2769
- if (!allowedAttribute(attr, whitelistedAttributes)) {
2770
- el.removeAttribute(attr.nodeName);
2771
- }
2772
- });
2773
- };
2774
-
2775
- for (var i = 0, len = elements.length; i < len; i++) {
2776
- var _ret = _loop(i);
2777
-
2778
- if (_ret === "continue") continue;
2779
- }
2780
-
2781
- return createdDocument.body.innerHTML;
2782
- }
2783
-
2784
- /**
2785
- * ------------------------------------------------------------------------
2786
- * Constants
2787
- * ------------------------------------------------------------------------
2788
- */
2789
-
2790
- var NAME$6 = 'tooltip';
2791
- var VERSION$6 = '4.6.0';
2792
- var DATA_KEY$6 = 'bs.tooltip';
2793
- var EVENT_KEY$6 = "." + DATA_KEY$6;
2794
- var JQUERY_NO_CONFLICT$6 = $__default['default'].fn[NAME$6];
2795
- var CLASS_PREFIX = 'bs-tooltip';
2796
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
2797
- var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
2798
- var DefaultType$4 = {
2799
- animation: 'boolean',
2800
- template: 'string',
2801
- title: '(string|element|function)',
2802
- trigger: 'string',
2803
- delay: '(number|object)',
2804
- html: 'boolean',
2805
- selector: '(string|boolean)',
2806
- placement: '(string|function)',
2807
- offset: '(number|string|function)',
2808
- container: '(string|element|boolean)',
2809
- fallbackPlacement: '(string|array)',
2810
- boundary: '(string|element)',
2811
- customClass: '(string|function)',
2812
- sanitize: 'boolean',
2813
- sanitizeFn: '(null|function)',
2814
- whiteList: 'object',
2815
- popperConfig: '(null|object)'
2816
- };
2817
- var AttachmentMap = {
2818
- AUTO: 'auto',
2819
- TOP: 'top',
2820
- RIGHT: 'right',
2821
- BOTTOM: 'bottom',
2822
- LEFT: 'left'
2823
- };
2824
- var Default$4 = {
2825
- animation: true,
2826
- template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
2827
- trigger: 'hover focus',
2828
- title: '',
2829
- delay: 0,
2830
- html: false,
2831
- selector: false,
2832
- placement: 'top',
2833
- offset: 0,
2834
- container: false,
2835
- fallbackPlacement: 'flip',
2836
- boundary: 'scrollParent',
2837
- customClass: '',
2838
- sanitize: true,
2839
- sanitizeFn: null,
2840
- whiteList: DefaultWhitelist,
2841
- popperConfig: null
2842
- };
2843
- var HOVER_STATE_SHOW = 'show';
2844
- var HOVER_STATE_OUT = 'out';
2845
- var Event = {
2846
- HIDE: "hide" + EVENT_KEY$6,
2847
- HIDDEN: "hidden" + EVENT_KEY$6,
2848
- SHOW: "show" + EVENT_KEY$6,
2849
- SHOWN: "shown" + EVENT_KEY$6,
2850
- INSERTED: "inserted" + EVENT_KEY$6,
2851
- CLICK: "click" + EVENT_KEY$6,
2852
- FOCUSIN: "focusin" + EVENT_KEY$6,
2853
- FOCUSOUT: "focusout" + EVENT_KEY$6,
2854
- MOUSEENTER: "mouseenter" + EVENT_KEY$6,
2855
- MOUSELEAVE: "mouseleave" + EVENT_KEY$6
2856
- };
2857
- var CLASS_NAME_FADE$2 = 'fade';
2858
- var CLASS_NAME_SHOW$4 = 'show';
2859
- var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
2860
- var SELECTOR_ARROW = '.arrow';
2861
- var TRIGGER_HOVER = 'hover';
2862
- var TRIGGER_FOCUS = 'focus';
2863
- var TRIGGER_CLICK = 'click';
2864
- var TRIGGER_MANUAL = 'manual';
2865
- /**
2866
- * ------------------------------------------------------------------------
2867
- * Class Definition
2868
- * ------------------------------------------------------------------------
2869
- */
2870
-
2871
- var Tooltip = /*#__PURE__*/function () {
2872
- function Tooltip(element, config) {
2873
- if (typeof Popper__default['default'] === 'undefined') {
2874
- throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
2875
- } // private
2876
-
2877
-
2878
- this._isEnabled = true;
2879
- this._timeout = 0;
2880
- this._hoverState = '';
2881
- this._activeTrigger = {};
2882
- this._popper = null; // Protected
2883
-
2884
- this.element = element;
2885
- this.config = this._getConfig(config);
2886
- this.tip = null;
2887
-
2888
- this._setListeners();
2889
- } // Getters
2890
-
2891
-
2892
- var _proto = Tooltip.prototype;
2893
-
2894
- // Public
2895
- _proto.enable = function enable() {
2896
- this._isEnabled = true;
2897
- };
2898
-
2899
- _proto.disable = function disable() {
2900
- this._isEnabled = false;
2901
- };
2902
-
2903
- _proto.toggleEnabled = function toggleEnabled() {
2904
- this._isEnabled = !this._isEnabled;
2905
- };
2906
-
2907
- _proto.toggle = function toggle(event) {
2908
- if (!this._isEnabled) {
2909
- return;
2910
- }
2911
-
2912
- if (event) {
2913
- var dataKey = this.constructor.DATA_KEY;
2914
- var context = $__default['default'](event.currentTarget).data(dataKey);
2915
-
2916
- if (!context) {
2917
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
2918
- $__default['default'](event.currentTarget).data(dataKey, context);
2919
- }
2920
-
2921
- context._activeTrigger.click = !context._activeTrigger.click;
2922
-
2923
- if (context._isWithActiveTrigger()) {
2924
- context._enter(null, context);
2925
- } else {
2926
- context._leave(null, context);
2927
- }
2928
- } else {
2929
- if ($__default['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW$4)) {
2930
- this._leave(null, this);
2931
-
2932
- return;
2933
- }
2934
-
2935
- this._enter(null, this);
2936
- }
2937
- };
2938
-
2939
- _proto.dispose = function dispose() {
2940
- clearTimeout(this._timeout);
2941
- $__default['default'].removeData(this.element, this.constructor.DATA_KEY);
2942
- $__default['default'](this.element).off(this.constructor.EVENT_KEY);
2943
- $__default['default'](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
2944
-
2945
- if (this.tip) {
2946
- $__default['default'](this.tip).remove();
2947
- }
2948
-
2949
- this._isEnabled = null;
2950
- this._timeout = null;
2951
- this._hoverState = null;
2952
- this._activeTrigger = null;
2953
-
2954
- if (this._popper) {
2955
- this._popper.destroy();
2956
- }
2957
-
2958
- this._popper = null;
2959
- this.element = null;
2960
- this.config = null;
2961
- this.tip = null;
2962
- };
2963
-
2964
- _proto.show = function show() {
2965
- var _this = this;
2966
-
2967
- if ($__default['default'](this.element).css('display') === 'none') {
2968
- throw new Error('Please use show on visible elements');
2969
- }
2970
-
2971
- var showEvent = $__default['default'].Event(this.constructor.Event.SHOW);
2972
-
2973
- if (this.isWithContent() && this._isEnabled) {
2974
- $__default['default'](this.element).trigger(showEvent);
2975
- var shadowRoot = Util.findShadowRoot(this.element);
2976
- var isInTheDom = $__default['default'].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
2977
-
2978
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
2979
- return;
2980
- }
2981
-
2982
- var tip = this.getTipElement();
2983
- var tipId = Util.getUID(this.constructor.NAME);
2984
- tip.setAttribute('id', tipId);
2985
- this.element.setAttribute('aria-describedby', tipId);
2986
- this.setContent();
2987
-
2988
- if (this.config.animation) {
2989
- $__default['default'](tip).addClass(CLASS_NAME_FADE$2);
2990
- }
2991
-
2992
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
2993
-
2994
- var attachment = this._getAttachment(placement);
2995
-
2996
- this.addAttachmentClass(attachment);
2997
-
2998
- var container = this._getContainer();
2999
-
3000
- $__default['default'](tip).data(this.constructor.DATA_KEY, this);
3001
-
3002
- if (!$__default['default'].contains(this.element.ownerDocument.documentElement, this.tip)) {
3003
- $__default['default'](tip).appendTo(container);
3004
- }
3005
-
3006
- $__default['default'](this.element).trigger(this.constructor.Event.INSERTED);
3007
- this._popper = new Popper__default['default'](this.element, tip, this._getPopperConfig(attachment));
3008
- $__default['default'](tip).addClass(CLASS_NAME_SHOW$4);
3009
- $__default['default'](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
3010
- // empty mouseover listeners to the body's immediate children;
3011
- // only needed because of broken event delegation on iOS
3012
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3013
-
3014
- if ('ontouchstart' in document.documentElement) {
3015
- $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
3016
- }
3017
-
3018
- var complete = function complete() {
3019
- if (_this.config.animation) {
3020
- _this._fixTransition();
3021
- }
3022
-
3023
- var prevHoverState = _this._hoverState;
3024
- _this._hoverState = null;
3025
- $__default['default'](_this.element).trigger(_this.constructor.Event.SHOWN);
3026
-
3027
- if (prevHoverState === HOVER_STATE_OUT) {
3028
- _this._leave(null, _this);
3029
- }
3030
- };
3031
-
3032
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE$2)) {
3033
- var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
3034
- $__default['default'](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3035
- } else {
3036
- complete();
3037
- }
3038
- }
3039
- };
3040
-
3041
- _proto.hide = function hide(callback) {
3042
- var _this2 = this;
3043
-
3044
- var tip = this.getTipElement();
3045
- var hideEvent = $__default['default'].Event(this.constructor.Event.HIDE);
3046
-
3047
- var complete = function complete() {
3048
- if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3049
- tip.parentNode.removeChild(tip);
3050
- }
3051
-
3052
- _this2._cleanTipClass();
3053
-
3054
- _this2.element.removeAttribute('aria-describedby');
3055
-
3056
- $__default['default'](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
3057
-
3058
- if (_this2._popper !== null) {
3059
- _this2._popper.destroy();
3060
- }
3061
-
3062
- if (callback) {
3063
- callback();
3064
- }
3065
- };
3066
-
3067
- $__default['default'](this.element).trigger(hideEvent);
3068
-
3069
- if (hideEvent.isDefaultPrevented()) {
3070
- return;
3071
- }
3072
-
3073
- $__default['default'](tip).removeClass(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra
3074
- // empty mouseover listeners we added for iOS support
3075
-
3076
- if ('ontouchstart' in document.documentElement) {
3077
- $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
3078
- }
3079
-
3080
- this._activeTrigger[TRIGGER_CLICK] = false;
3081
- this._activeTrigger[TRIGGER_FOCUS] = false;
3082
- this._activeTrigger[TRIGGER_HOVER] = false;
3083
-
3084
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE$2)) {
3085
- var transitionDuration = Util.getTransitionDurationFromElement(tip);
3086
- $__default['default'](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3087
- } else {
3088
- complete();
3089
- }
3090
-
3091
- this._hoverState = '';
3092
- };
3093
-
3094
- _proto.update = function update() {
3095
- if (this._popper !== null) {
3096
- this._popper.scheduleUpdate();
3097
- }
3098
- } // Protected
3099
- ;
3100
-
3101
- _proto.isWithContent = function isWithContent() {
3102
- return Boolean(this.getTitle());
3103
- };
3104
-
3105
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
3106
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
3107
- };
3108
-
3109
- _proto.getTipElement = function getTipElement() {
3110
- this.tip = this.tip || $__default['default'](this.config.template)[0];
3111
- return this.tip;
3112
- };
3113
-
3114
- _proto.setContent = function setContent() {
3115
- var tip = this.getTipElement();
3116
- this.setElementContent($__default['default'](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
3117
- $__default['default'](tip).removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$4);
3118
- };
3119
-
3120
- _proto.setElementContent = function setElementContent($element, content) {
3121
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3122
- // Content is a DOM node or a jQuery
3123
- if (this.config.html) {
3124
- if (!$__default['default'](content).parent().is($element)) {
3125
- $element.empty().append(content);
3126
- }
3127
- } else {
3128
- $element.text($__default['default'](content).text());
3129
- }
3130
-
3131
- return;
3132
- }
3133
-
3134
- if (this.config.html) {
3135
- if (this.config.sanitize) {
3136
- content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
3137
- }
3138
-
3139
- $element.html(content);
3140
- } else {
3141
- $element.text(content);
3142
- }
3143
- };
3144
-
3145
- _proto.getTitle = function getTitle() {
3146
- var title = this.element.getAttribute('data-original-title');
3147
-
3148
- if (!title) {
3149
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
3150
- }
3151
-
3152
- return title;
3153
- } // Private
3154
- ;
3155
-
3156
- _proto._getPopperConfig = function _getPopperConfig(attachment) {
3157
- var _this3 = this;
3158
-
3159
- var defaultBsConfig = {
3160
- placement: attachment,
3161
- modifiers: {
3162
- offset: this._getOffset(),
3163
- flip: {
3164
- behavior: this.config.fallbackPlacement
3165
- },
3166
- arrow: {
3167
- element: SELECTOR_ARROW
3168
- },
3169
- preventOverflow: {
3170
- boundariesElement: this.config.boundary
3171
- }
3172
- },
3173
- onCreate: function onCreate(data) {
3174
- if (data.originalPlacement !== data.placement) {
3175
- _this3._handlePopperPlacementChange(data);
3176
- }
3177
- },
3178
- onUpdate: function onUpdate(data) {
3179
- return _this3._handlePopperPlacementChange(data);
3180
- }
3181
- };
3182
- return _extends({}, defaultBsConfig, this.config.popperConfig);
3183
- };
3184
-
3185
- _proto._getOffset = function _getOffset() {
3186
- var _this4 = this;
3187
-
3188
- var offset = {};
3189
-
3190
- if (typeof this.config.offset === 'function') {
3191
- offset.fn = function (data) {
3192
- data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
3193
- return data;
3194
- };
3195
- } else {
3196
- offset.offset = this.config.offset;
3197
- }
3198
-
3199
- return offset;
3200
- };
3201
-
3202
- _proto._getContainer = function _getContainer() {
3203
- if (this.config.container === false) {
3204
- return document.body;
3205
- }
3206
-
3207
- if (Util.isElement(this.config.container)) {
3208
- return $__default['default'](this.config.container);
3209
- }
3210
-
3211
- return $__default['default'](document).find(this.config.container);
3212
- };
3213
-
3214
- _proto._getAttachment = function _getAttachment(placement) {
3215
- return AttachmentMap[placement.toUpperCase()];
3216
- };
3217
-
3218
- _proto._setListeners = function _setListeners() {
3219
- var _this5 = this;
3220
-
3221
- var triggers = this.config.trigger.split(' ');
3222
- triggers.forEach(function (trigger) {
3223
- if (trigger === 'click') {
3224
- $__default['default'](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
3225
- return _this5.toggle(event);
3226
- });
3227
- } else if (trigger !== TRIGGER_MANUAL) {
3228
- var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
3229
- var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
3230
- $__default['default'](_this5.element).on(eventIn, _this5.config.selector, function (event) {
3231
- return _this5._enter(event);
3232
- }).on(eventOut, _this5.config.selector, function (event) {
3233
- return _this5._leave(event);
3234
- });
3235
- }
3236
- });
3237
-
3238
- this._hideModalHandler = function () {
3239
- if (_this5.element) {
3240
- _this5.hide();
3241
- }
3242
- };
3243
-
3244
- $__default['default'](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
3245
-
3246
- if (this.config.selector) {
3247
- this.config = _extends({}, this.config, {
3248
- trigger: 'manual',
3249
- selector: ''
3250
- });
3251
- } else {
3252
- this._fixTitle();
3253
- }
3254
- };
3255
-
3256
- _proto._fixTitle = function _fixTitle() {
3257
- var titleType = typeof this.element.getAttribute('data-original-title');
3258
-
3259
- if (this.element.getAttribute('title') || titleType !== 'string') {
3260
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3261
- this.element.setAttribute('title', '');
3262
- }
3263
- };
3264
-
3265
- _proto._enter = function _enter(event, context) {
3266
- var dataKey = this.constructor.DATA_KEY;
3267
- context = context || $__default['default'](event.currentTarget).data(dataKey);
3268
-
3269
- if (!context) {
3270
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3271
- $__default['default'](event.currentTarget).data(dataKey, context);
3272
- }
3273
-
3274
- if (event) {
3275
- context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3276
- }
3277
-
3278
- if ($__default['default'](context.getTipElement()).hasClass(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) {
3279
- context._hoverState = HOVER_STATE_SHOW;
3280
- return;
3281
- }
3282
-
3283
- clearTimeout(context._timeout);
3284
- context._hoverState = HOVER_STATE_SHOW;
3285
-
3286
- if (!context.config.delay || !context.config.delay.show) {
3287
- context.show();
3288
- return;
3289
- }
3290
-
3291
- context._timeout = setTimeout(function () {
3292
- if (context._hoverState === HOVER_STATE_SHOW) {
3293
- context.show();
3294
- }
3295
- }, context.config.delay.show);
3296
- };
3297
-
3298
- _proto._leave = function _leave(event, context) {
3299
- var dataKey = this.constructor.DATA_KEY;
3300
- context = context || $__default['default'](event.currentTarget).data(dataKey);
3301
-
3302
- if (!context) {
3303
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3304
- $__default['default'](event.currentTarget).data(dataKey, context);
3305
- }
3306
-
3307
- if (event) {
3308
- context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
3309
- }
3310
-
3311
- if (context._isWithActiveTrigger()) {
3312
- return;
3313
- }
3314
-
3315
- clearTimeout(context._timeout);
3316
- context._hoverState = HOVER_STATE_OUT;
3317
-
3318
- if (!context.config.delay || !context.config.delay.hide) {
3319
- context.hide();
3320
- return;
3321
- }
3322
-
3323
- context._timeout = setTimeout(function () {
3324
- if (context._hoverState === HOVER_STATE_OUT) {
3325
- context.hide();
3326
- }
3327
- }, context.config.delay.hide);
3328
- };
3329
-
3330
- _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
3331
- for (var trigger in this._activeTrigger) {
3332
- if (this._activeTrigger[trigger]) {
3333
- return true;
3334
- }
3335
- }
3336
-
3337
- return false;
3338
- };
3339
-
3340
- _proto._getConfig = function _getConfig(config) {
3341
- var dataAttributes = $__default['default'](this.element).data();
3342
- Object.keys(dataAttributes).forEach(function (dataAttr) {
3343
- if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
3344
- delete dataAttributes[dataAttr];
3345
- }
3346
- });
3347
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
3348
-
3349
- if (typeof config.delay === 'number') {
3350
- config.delay = {
3351
- show: config.delay,
3352
- hide: config.delay
3353
- };
3354
- }
3355
-
3356
- if (typeof config.title === 'number') {
3357
- config.title = config.title.toString();
3358
- }
3359
-
3360
- if (typeof config.content === 'number') {
3361
- config.content = config.content.toString();
3362
- }
3363
-
3364
- Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
3365
-
3366
- if (config.sanitize) {
3367
- config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
3368
- }
3369
-
3370
- return config;
3371
- };
3372
-
3373
- _proto._getDelegateConfig = function _getDelegateConfig() {
3374
- var config = {};
3375
-
3376
- if (this.config) {
3377
- for (var key in this.config) {
3378
- if (this.constructor.Default[key] !== this.config[key]) {
3379
- config[key] = this.config[key];
3380
- }
3381
- }
3382
- }
3383
-
3384
- return config;
3385
- };
3386
-
3387
- _proto._cleanTipClass = function _cleanTipClass() {
3388
- var $tip = $__default['default'](this.getTipElement());
3389
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
3390
-
3391
- if (tabClass !== null && tabClass.length) {
3392
- $tip.removeClass(tabClass.join(''));
3393
- }
3394
- };
3395
-
3396
- _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
3397
- this.tip = popperData.instance.popper;
3398
-
3399
- this._cleanTipClass();
3400
-
3401
- this.addAttachmentClass(this._getAttachment(popperData.placement));
3402
- };
3403
-
3404
- _proto._fixTransition = function _fixTransition() {
3405
- var tip = this.getTipElement();
3406
- var initConfigAnimation = this.config.animation;
3407
-
3408
- if (tip.getAttribute('x-placement') !== null) {
3409
- return;
3410
- }
3411
-
3412
- $__default['default'](tip).removeClass(CLASS_NAME_FADE$2);
3413
- this.config.animation = false;
3414
- this.hide();
3415
- this.show();
3416
- this.config.animation = initConfigAnimation;
3417
- } // Static
3418
- ;
3419
-
3420
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
3421
- return this.each(function () {
3422
- var $element = $__default['default'](this);
3423
- var data = $element.data(DATA_KEY$6);
3424
-
3425
- var _config = typeof config === 'object' && config;
3426
-
3427
- if (!data && /dispose|hide/.test(config)) {
3428
- return;
3429
- }
3430
-
3431
- if (!data) {
3432
- data = new Tooltip(this, _config);
3433
- $element.data(DATA_KEY$6, data);
3434
- }
3435
-
3436
- if (typeof config === 'string') {
3437
- if (typeof data[config] === 'undefined') {
3438
- throw new TypeError("No method named \"" + config + "\"");
3439
- }
3440
-
3441
- data[config]();
3442
- }
3443
- });
3444
- };
3445
-
3446
- _createClass(Tooltip, null, [{
3447
- key: "VERSION",
3448
- get: function get() {
3449
- return VERSION$6;
3450
- }
3451
- }, {
3452
- key: "Default",
3453
- get: function get() {
3454
- return Default$4;
3455
- }
3456
- }, {
3457
- key: "NAME",
3458
- get: function get() {
3459
- return NAME$6;
3460
- }
3461
- }, {
3462
- key: "DATA_KEY",
3463
- get: function get() {
3464
- return DATA_KEY$6;
3465
- }
3466
- }, {
3467
- key: "Event",
3468
- get: function get() {
3469
- return Event;
3470
- }
3471
- }, {
3472
- key: "EVENT_KEY",
3473
- get: function get() {
3474
- return EVENT_KEY$6;
3475
- }
3476
- }, {
3477
- key: "DefaultType",
3478
- get: function get() {
3479
- return DefaultType$4;
3480
- }
3481
- }]);
3482
-
3483
- return Tooltip;
3484
- }();
3485
- /**
3486
- * ------------------------------------------------------------------------
3487
- * jQuery
3488
- * ------------------------------------------------------------------------
3489
- */
3490
-
3491
-
3492
- $__default['default'].fn[NAME$6] = Tooltip._jQueryInterface;
3493
- $__default['default'].fn[NAME$6].Constructor = Tooltip;
3494
-
3495
- $__default['default'].fn[NAME$6].noConflict = function () {
3496
- $__default['default'].fn[NAME$6] = JQUERY_NO_CONFLICT$6;
3497
- return Tooltip._jQueryInterface;
3498
- };
3499
-
3500
- /**
3501
- * ------------------------------------------------------------------------
3502
- * Constants
3503
- * ------------------------------------------------------------------------
3504
- */
3505
-
3506
- var NAME$7 = 'popover';
3507
- var VERSION$7 = '4.6.0';
3508
- var DATA_KEY$7 = 'bs.popover';
3509
- var EVENT_KEY$7 = "." + DATA_KEY$7;
3510
- var JQUERY_NO_CONFLICT$7 = $__default['default'].fn[NAME$7];
3511
- var CLASS_PREFIX$1 = 'bs-popover';
3512
- var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
3513
-
3514
- var Default$5 = _extends({}, Tooltip.Default, {
3515
- placement: 'right',
3516
- trigger: 'click',
3517
- content: '',
3518
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
3519
- });
3520
-
3521
- var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
3522
- content: '(string|element|function)'
3523
- });
3524
-
3525
- var CLASS_NAME_FADE$3 = 'fade';
3526
- var CLASS_NAME_SHOW$5 = 'show';
3527
- var SELECTOR_TITLE = '.popover-header';
3528
- var SELECTOR_CONTENT = '.popover-body';
3529
- var Event$1 = {
3530
- HIDE: "hide" + EVENT_KEY$7,
3531
- HIDDEN: "hidden" + EVENT_KEY$7,
3532
- SHOW: "show" + EVENT_KEY$7,
3533
- SHOWN: "shown" + EVENT_KEY$7,
3534
- INSERTED: "inserted" + EVENT_KEY$7,
3535
- CLICK: "click" + EVENT_KEY$7,
3536
- FOCUSIN: "focusin" + EVENT_KEY$7,
3537
- FOCUSOUT: "focusout" + EVENT_KEY$7,
3538
- MOUSEENTER: "mouseenter" + EVENT_KEY$7,
3539
- MOUSELEAVE: "mouseleave" + EVENT_KEY$7
3540
- };
3541
- /**
3542
- * ------------------------------------------------------------------------
3543
- * Class Definition
3544
- * ------------------------------------------------------------------------
3545
- */
3546
-
3547
- var Popover = /*#__PURE__*/function (_Tooltip) {
3548
- _inheritsLoose(Popover, _Tooltip);
3549
-
3550
- function Popover() {
3551
- return _Tooltip.apply(this, arguments) || this;
3552
- }
3553
-
3554
- var _proto = Popover.prototype;
3555
-
3556
- // Overrides
3557
- _proto.isWithContent = function isWithContent() {
3558
- return this.getTitle() || this._getContent();
3559
- };
3560
-
3561
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
3562
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
3563
- };
3564
-
3565
- _proto.getTipElement = function getTipElement() {
3566
- this.tip = this.tip || $__default['default'](this.config.template)[0];
3567
- return this.tip;
3568
- };
3569
-
3570
- _proto.setContent = function setContent() {
3571
- var $tip = $__default['default'](this.getTipElement()); // We use append for html objects to maintain js events
3572
-
3573
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
3574
-
3575
- var content = this._getContent();
3576
-
3577
- if (typeof content === 'function') {
3578
- content = content.call(this.element);
3579
- }
3580
-
3581
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
3582
- $tip.removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$5);
3583
- } // Private
3584
- ;
3585
-
3586
- _proto._getContent = function _getContent() {
3587
- return this.element.getAttribute('data-content') || this.config.content;
3588
- };
3589
-
3590
- _proto._cleanTipClass = function _cleanTipClass() {
3591
- var $tip = $__default['default'](this.getTipElement());
3592
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
3593
-
3594
- if (tabClass !== null && tabClass.length > 0) {
3595
- $tip.removeClass(tabClass.join(''));
3596
- }
3597
- } // Static
3598
- ;
3599
-
3600
- Popover._jQueryInterface = function _jQueryInterface(config) {
3601
- return this.each(function () {
3602
- var data = $__default['default'](this).data(DATA_KEY$7);
3603
-
3604
- var _config = typeof config === 'object' ? config : null;
3605
-
3606
- if (!data && /dispose|hide/.test(config)) {
3607
- return;
3608
- }
3609
-
3610
- if (!data) {
3611
- data = new Popover(this, _config);
3612
- $__default['default'](this).data(DATA_KEY$7, data);
3613
- }
3614
-
3615
- if (typeof config === 'string') {
3616
- if (typeof data[config] === 'undefined') {
3617
- throw new TypeError("No method named \"" + config + "\"");
3618
- }
3619
-
3620
- data[config]();
3621
- }
3622
- });
3623
- };
3624
-
3625
- _createClass(Popover, null, [{
3626
- key: "VERSION",
3627
- // Getters
3628
- get: function get() {
3629
- return VERSION$7;
3630
- }
3631
- }, {
3632
- key: "Default",
3633
- get: function get() {
3634
- return Default$5;
3635
- }
3636
- }, {
3637
- key: "NAME",
3638
- get: function get() {
3639
- return NAME$7;
3640
- }
3641
- }, {
3642
- key: "DATA_KEY",
3643
- get: function get() {
3644
- return DATA_KEY$7;
3645
- }
3646
- }, {
3647
- key: "Event",
3648
- get: function get() {
3649
- return Event$1;
3650
- }
3651
- }, {
3652
- key: "EVENT_KEY",
3653
- get: function get() {
3654
- return EVENT_KEY$7;
3655
- }
3656
- }, {
3657
- key: "DefaultType",
3658
- get: function get() {
3659
- return DefaultType$5;
3660
- }
3661
- }]);
3662
-
3663
- return Popover;
3664
- }(Tooltip);
3665
- /**
3666
- * ------------------------------------------------------------------------
3667
- * jQuery
3668
- * ------------------------------------------------------------------------
3669
- */
3670
-
3671
-
3672
- $__default['default'].fn[NAME$7] = Popover._jQueryInterface;
3673
- $__default['default'].fn[NAME$7].Constructor = Popover;
3674
-
3675
- $__default['default'].fn[NAME$7].noConflict = function () {
3676
- $__default['default'].fn[NAME$7] = JQUERY_NO_CONFLICT$7;
3677
- return Popover._jQueryInterface;
3678
- };
3679
-
3680
- /**
3681
- * ------------------------------------------------------------------------
3682
- * Constants
3683
- * ------------------------------------------------------------------------
3684
- */
3685
-
3686
- var NAME$8 = 'scrollspy';
3687
- var VERSION$8 = '4.6.0';
3688
- var DATA_KEY$8 = 'bs.scrollspy';
3689
- var EVENT_KEY$8 = "." + DATA_KEY$8;
3690
- var DATA_API_KEY$6 = '.data-api';
3691
- var JQUERY_NO_CONFLICT$8 = $__default['default'].fn[NAME$8];
3692
- var Default$6 = {
3693
- offset: 10,
3694
- method: 'auto',
3695
- target: ''
3696
- };
3697
- var DefaultType$6 = {
3698
- offset: 'number',
3699
- method: 'string',
3700
- target: '(string|element)'
3701
- };
3702
- var EVENT_ACTIVATE = "activate" + EVENT_KEY$8;
3703
- var EVENT_SCROLL = "scroll" + EVENT_KEY$8;
3704
- var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
3705
- var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
3706
- var CLASS_NAME_ACTIVE$2 = 'active';
3707
- var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
3708
- var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
3709
- var SELECTOR_NAV_LINKS = '.nav-link';
3710
- var SELECTOR_NAV_ITEMS = '.nav-item';
3711
- var SELECTOR_LIST_ITEMS = '.list-group-item';
3712
- var SELECTOR_DROPDOWN = '.dropdown';
3713
- var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
3714
- var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
3715
- var METHOD_OFFSET = 'offset';
3716
- var METHOD_POSITION = 'position';
3717
- /**
3718
- * ------------------------------------------------------------------------
3719
- * Class Definition
3720
- * ------------------------------------------------------------------------
3721
- */
3722
-
3723
- var ScrollSpy = /*#__PURE__*/function () {
3724
- function ScrollSpy(element, config) {
3725
- var _this = this;
3726
-
3727
- this._element = element;
3728
- this._scrollElement = element.tagName === 'BODY' ? window : element;
3729
- this._config = this._getConfig(config);
3730
- this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
3731
- this._offsets = [];
3732
- this._targets = [];
3733
- this._activeTarget = null;
3734
- this._scrollHeight = 0;
3735
- $__default['default'](this._scrollElement).on(EVENT_SCROLL, function (event) {
3736
- return _this._process(event);
3737
- });
3738
- this.refresh();
3739
-
3740
- this._process();
3741
- } // Getters
3742
-
3743
-
3744
- var _proto = ScrollSpy.prototype;
3745
-
3746
- // Public
3747
- _proto.refresh = function refresh() {
3748
- var _this2 = this;
3749
-
3750
- var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
3751
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
3752
- var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
3753
- this._offsets = [];
3754
- this._targets = [];
3755
- this._scrollHeight = this._getScrollHeight();
3756
- var targets = [].slice.call(document.querySelectorAll(this._selector));
3757
- targets.map(function (element) {
3758
- var target;
3759
- var targetSelector = Util.getSelectorFromElement(element);
3760
-
3761
- if (targetSelector) {
3762
- target = document.querySelector(targetSelector);
3763
- }
3764
-
3765
- if (target) {
3766
- var targetBCR = target.getBoundingClientRect();
3767
-
3768
- if (targetBCR.width || targetBCR.height) {
3769
- // TODO (fat): remove sketch reliance on jQuery position/offset
3770
- return [$__default['default'](target)[offsetMethod]().top + offsetBase, targetSelector];
3771
- }
3772
- }
3773
-
3774
- return null;
3775
- }).filter(function (item) {
3776
- return item;
3777
- }).sort(function (a, b) {
3778
- return a[0] - b[0];
3779
- }).forEach(function (item) {
3780
- _this2._offsets.push(item[0]);
3781
-
3782
- _this2._targets.push(item[1]);
3783
- });
3784
- };
3785
-
3786
- _proto.dispose = function dispose() {
3787
- $__default['default'].removeData(this._element, DATA_KEY$8);
3788
- $__default['default'](this._scrollElement).off(EVENT_KEY$8);
3789
- this._element = null;
3790
- this._scrollElement = null;
3791
- this._config = null;
3792
- this._selector = null;
3793
- this._offsets = null;
3794
- this._targets = null;
3795
- this._activeTarget = null;
3796
- this._scrollHeight = null;
3797
- } // Private
3798
- ;
3799
-
3800
- _proto._getConfig = function _getConfig(config) {
3801
- config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
3802
-
3803
- if (typeof config.target !== 'string' && Util.isElement(config.target)) {
3804
- var id = $__default['default'](config.target).attr('id');
3805
-
3806
- if (!id) {
3807
- id = Util.getUID(NAME$8);
3808
- $__default['default'](config.target).attr('id', id);
3809
- }
3810
-
3811
- config.target = "#" + id;
3812
- }
3813
-
3814
- Util.typeCheckConfig(NAME$8, config, DefaultType$6);
3815
- return config;
3816
- };
3817
-
3818
- _proto._getScrollTop = function _getScrollTop() {
3819
- return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
3820
- };
3821
-
3822
- _proto._getScrollHeight = function _getScrollHeight() {
3823
- return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
3824
- };
3825
-
3826
- _proto._getOffsetHeight = function _getOffsetHeight() {
3827
- return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
3828
- };
3829
-
3830
- _proto._process = function _process() {
3831
- var scrollTop = this._getScrollTop() + this._config.offset;
3832
-
3833
- var scrollHeight = this._getScrollHeight();
3834
-
3835
- var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
3836
-
3837
- if (this._scrollHeight !== scrollHeight) {
3838
- this.refresh();
3839
- }
3840
-
3841
- if (scrollTop >= maxScroll) {
3842
- var target = this._targets[this._targets.length - 1];
3843
-
3844
- if (this._activeTarget !== target) {
3845
- this._activate(target);
3846
- }
3847
-
3848
- return;
3849
- }
3850
-
3851
- if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
3852
- this._activeTarget = null;
3853
-
3854
- this._clear();
3855
-
3856
- return;
3857
- }
3858
-
3859
- for (var i = this._offsets.length; i--;) {
3860
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
3861
-
3862
- if (isActiveTarget) {
3863
- this._activate(this._targets[i]);
3864
- }
3865
- }
3866
- };
3867
-
3868
- _proto._activate = function _activate(target) {
3869
- this._activeTarget = target;
3870
-
3871
- this._clear();
3872
-
3873
- var queries = this._selector.split(',').map(function (selector) {
3874
- return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
3875
- });
3876
-
3877
- var $link = $__default['default']([].slice.call(document.querySelectorAll(queries.join(','))));
3878
-
3879
- if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
3880
- $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE$2);
3881
- $link.addClass(CLASS_NAME_ACTIVE$2);
3882
- } else {
3883
- // Set triggered link as active
3884
- $link.addClass(CLASS_NAME_ACTIVE$2); // Set triggered links parents as active
3885
- // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
3886
-
3887
- $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$2); // Handle special case when .nav-link is inside .nav-item
3888
-
3889
- $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$2);
3890
- }
3891
-
3892
- $__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE, {
3893
- relatedTarget: target
3894
- });
3895
- };
3896
-
3897
- _proto._clear = function _clear() {
3898
- [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
3899
- return node.classList.contains(CLASS_NAME_ACTIVE$2);
3900
- }).forEach(function (node) {
3901
- return node.classList.remove(CLASS_NAME_ACTIVE$2);
3902
- });
3903
- } // Static
3904
- ;
3905
-
3906
- ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
3907
- return this.each(function () {
3908
- var data = $__default['default'](this).data(DATA_KEY$8);
3909
-
3910
- var _config = typeof config === 'object' && config;
3911
-
3912
- if (!data) {
3913
- data = new ScrollSpy(this, _config);
3914
- $__default['default'](this).data(DATA_KEY$8, data);
3915
- }
3916
-
3917
- if (typeof config === 'string') {
3918
- if (typeof data[config] === 'undefined') {
3919
- throw new TypeError("No method named \"" + config + "\"");
3920
- }
3921
-
3922
- data[config]();
3923
- }
3924
- });
3925
- };
3926
-
3927
- _createClass(ScrollSpy, null, [{
3928
- key: "VERSION",
3929
- get: function get() {
3930
- return VERSION$8;
3931
- }
3932
- }, {
3933
- key: "Default",
3934
- get: function get() {
3935
- return Default$6;
3936
- }
3937
- }]);
3938
-
3939
- return ScrollSpy;
3940
- }();
3941
- /**
3942
- * ------------------------------------------------------------------------
3943
- * Data Api implementation
3944
- * ------------------------------------------------------------------------
3945
- */
3946
-
3947
-
3948
- $__default['default'](window).on(EVENT_LOAD_DATA_API$2, function () {
3949
- var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
3950
- var scrollSpysLength = scrollSpys.length;
3951
-
3952
- for (var i = scrollSpysLength; i--;) {
3953
- var $spy = $__default['default'](scrollSpys[i]);
3954
-
3955
- ScrollSpy._jQueryInterface.call($spy, $spy.data());
3956
- }
3957
- });
3958
- /**
3959
- * ------------------------------------------------------------------------
3960
- * jQuery
3961
- * ------------------------------------------------------------------------
3962
- */
3963
-
3964
- $__default['default'].fn[NAME$8] = ScrollSpy._jQueryInterface;
3965
- $__default['default'].fn[NAME$8].Constructor = ScrollSpy;
3966
-
3967
- $__default['default'].fn[NAME$8].noConflict = function () {
3968
- $__default['default'].fn[NAME$8] = JQUERY_NO_CONFLICT$8;
3969
- return ScrollSpy._jQueryInterface;
3970
- };
3971
-
3972
- /**
3973
- * ------------------------------------------------------------------------
3974
- * Constants
3975
- * ------------------------------------------------------------------------
3976
- */
3977
-
3978
- var NAME$9 = 'tab';
3979
- var VERSION$9 = '4.6.0';
3980
- var DATA_KEY$9 = 'bs.tab';
3981
- var EVENT_KEY$9 = "." + DATA_KEY$9;
3982
- var DATA_API_KEY$7 = '.data-api';
3983
- var JQUERY_NO_CONFLICT$9 = $__default['default'].fn[NAME$9];
3984
- var EVENT_HIDE$3 = "hide" + EVENT_KEY$9;
3985
- var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$9;
3986
- var EVENT_SHOW$3 = "show" + EVENT_KEY$9;
3987
- var EVENT_SHOWN$3 = "shown" + EVENT_KEY$9;
3988
- var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$9 + DATA_API_KEY$7;
3989
- var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
3990
- var CLASS_NAME_ACTIVE$3 = 'active';
3991
- var CLASS_NAME_DISABLED$1 = 'disabled';
3992
- var CLASS_NAME_FADE$4 = 'fade';
3993
- var CLASS_NAME_SHOW$6 = 'show';
3994
- var SELECTOR_DROPDOWN$1 = '.dropdown';
3995
- var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
3996
- var SELECTOR_ACTIVE$2 = '.active';
3997
- var SELECTOR_ACTIVE_UL = '> li > .active';
3998
- var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
3999
- var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4000
- var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
4001
- /**
4002
- * ------------------------------------------------------------------------
4003
- * Class Definition
4004
- * ------------------------------------------------------------------------
4005
- */
4006
-
4007
- var Tab = /*#__PURE__*/function () {
4008
- function Tab(element) {
4009
- this._element = element;
4010
- } // Getters
4011
-
4012
-
4013
- var _proto = Tab.prototype;
4014
-
4015
- // Public
4016
- _proto.show = function show() {
4017
- var _this = this;
4018
-
4019
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default['default'](this._element).hasClass(CLASS_NAME_ACTIVE$3) || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED$1)) {
4020
- return;
4021
- }
4022
-
4023
- var target;
4024
- var previous;
4025
- var listElement = $__default['default'](this._element).closest(SELECTOR_NAV_LIST_GROUP$1)[0];
4026
- var selector = Util.getSelectorFromElement(this._element);
4027
-
4028
- if (listElement) {
4029
- var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$2;
4030
- previous = $__default['default'].makeArray($__default['default'](listElement).find(itemSelector));
4031
- previous = previous[previous.length - 1];
4032
- }
4033
-
4034
- var hideEvent = $__default['default'].Event(EVENT_HIDE$3, {
4035
- relatedTarget: this._element
4036
- });
4037
- var showEvent = $__default['default'].Event(EVENT_SHOW$3, {
4038
- relatedTarget: previous
4039
- });
4040
-
4041
- if (previous) {
4042
- $__default['default'](previous).trigger(hideEvent);
4043
- }
4044
-
4045
- $__default['default'](this._element).trigger(showEvent);
4046
-
4047
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
4048
- return;
4049
- }
4050
-
4051
- if (selector) {
4052
- target = document.querySelector(selector);
4053
- }
4054
-
4055
- this._activate(this._element, listElement);
4056
-
4057
- var complete = function complete() {
4058
- var hiddenEvent = $__default['default'].Event(EVENT_HIDDEN$3, {
4059
- relatedTarget: _this._element
4060
- });
4061
- var shownEvent = $__default['default'].Event(EVENT_SHOWN$3, {
4062
- relatedTarget: previous
4063
- });
4064
- $__default['default'](previous).trigger(hiddenEvent);
4065
- $__default['default'](_this._element).trigger(shownEvent);
4066
- };
4067
-
4068
- if (target) {
4069
- this._activate(target, target.parentNode, complete);
4070
- } else {
4071
- complete();
4072
- }
4073
- };
4074
-
4075
- _proto.dispose = function dispose() {
4076
- $__default['default'].removeData(this._element, DATA_KEY$9);
4077
- this._element = null;
4078
- } // Private
4079
- ;
4080
-
4081
- _proto._activate = function _activate(element, container, callback) {
4082
- var _this2 = this;
4083
-
4084
- var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default['default'](container).find(SELECTOR_ACTIVE_UL) : $__default['default'](container).children(SELECTOR_ACTIVE$2);
4085
- var active = activeElements[0];
4086
- var isTransitioning = callback && active && $__default['default'](active).hasClass(CLASS_NAME_FADE$4);
4087
-
4088
- var complete = function complete() {
4089
- return _this2._transitionComplete(element, active, callback);
4090
- };
4091
-
4092
- if (active && isTransitioning) {
4093
- var transitionDuration = Util.getTransitionDurationFromElement(active);
4094
- $__default['default'](active).removeClass(CLASS_NAME_SHOW$6).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4095
- } else {
4096
- complete();
4097
- }
4098
- };
4099
-
4100
- _proto._transitionComplete = function _transitionComplete(element, active, callback) {
4101
- if (active) {
4102
- $__default['default'](active).removeClass(CLASS_NAME_ACTIVE$3);
4103
- var dropdownChild = $__default['default'](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
4104
-
4105
- if (dropdownChild) {
4106
- $__default['default'](dropdownChild).removeClass(CLASS_NAME_ACTIVE$3);
4107
- }
4108
-
4109
- if (active.getAttribute('role') === 'tab') {
4110
- active.setAttribute('aria-selected', false);
4111
- }
4112
- }
4113
-
4114
- $__default['default'](element).addClass(CLASS_NAME_ACTIVE$3);
4115
-
4116
- if (element.getAttribute('role') === 'tab') {
4117
- element.setAttribute('aria-selected', true);
4118
- }
4119
-
4120
- Util.reflow(element);
4121
-
4122
- if (element.classList.contains(CLASS_NAME_FADE$4)) {
4123
- element.classList.add(CLASS_NAME_SHOW$6);
4124
- }
4125
-
4126
- if (element.parentNode && $__default['default'](element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
4127
- var dropdownElement = $__default['default'](element).closest(SELECTOR_DROPDOWN$1)[0];
4128
-
4129
- if (dropdownElement) {
4130
- var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE$1));
4131
- $__default['default'](dropdownToggleList).addClass(CLASS_NAME_ACTIVE$3);
4132
- }
4133
-
4134
- element.setAttribute('aria-expanded', true);
4135
- }
4136
-
4137
- if (callback) {
4138
- callback();
4139
- }
4140
- } // Static
4141
- ;
4142
-
4143
- Tab._jQueryInterface = function _jQueryInterface(config) {
4144
- return this.each(function () {
4145
- var $this = $__default['default'](this);
4146
- var data = $this.data(DATA_KEY$9);
4147
-
4148
- if (!data) {
4149
- data = new Tab(this);
4150
- $this.data(DATA_KEY$9, data);
4151
- }
4152
-
4153
- if (typeof config === 'string') {
4154
- if (typeof data[config] === 'undefined') {
4155
- throw new TypeError("No method named \"" + config + "\"");
4156
- }
4157
-
4158
- data[config]();
4159
- }
4160
- });
4161
- };
4162
-
4163
- _createClass(Tab, null, [{
4164
- key: "VERSION",
4165
- get: function get() {
4166
- return VERSION$9;
4167
- }
4168
- }]);
4169
-
4170
- return Tab;
4171
- }();
4172
- /**
4173
- * ------------------------------------------------------------------------
4174
- * Data Api implementation
4175
- * ------------------------------------------------------------------------
4176
- */
4177
-
4178
-
4179
- $__default['default'](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
4180
- event.preventDefault();
4181
-
4182
- Tab._jQueryInterface.call($__default['default'](this), 'show');
4183
- });
4184
- /**
4185
- * ------------------------------------------------------------------------
4186
- * jQuery
4187
- * ------------------------------------------------------------------------
4188
- */
4189
-
4190
- $__default['default'].fn[NAME$9] = Tab._jQueryInterface;
4191
- $__default['default'].fn[NAME$9].Constructor = Tab;
4192
-
4193
- $__default['default'].fn[NAME$9].noConflict = function () {
4194
- $__default['default'].fn[NAME$9] = JQUERY_NO_CONFLICT$9;
4195
- return Tab._jQueryInterface;
4196
- };
4197
-
4198
- /**
4199
- * ------------------------------------------------------------------------
4200
- * Constants
4201
- * ------------------------------------------------------------------------
4202
- */
4203
-
4204
- var NAME$a = 'toast';
4205
- var VERSION$a = '4.6.0';
4206
- var DATA_KEY$a = 'bs.toast';
4207
- var EVENT_KEY$a = "." + DATA_KEY$a;
4208
- var JQUERY_NO_CONFLICT$a = $__default['default'].fn[NAME$a];
4209
- var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$a;
4210
- var EVENT_HIDE$4 = "hide" + EVENT_KEY$a;
4211
- var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
4212
- var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
4213
- var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
4214
- var CLASS_NAME_FADE$5 = 'fade';
4215
- var CLASS_NAME_HIDE = 'hide';
4216
- var CLASS_NAME_SHOW$7 = 'show';
4217
- var CLASS_NAME_SHOWING = 'showing';
4218
- var DefaultType$7 = {
4219
- animation: 'boolean',
4220
- autohide: 'boolean',
4221
- delay: 'number'
4222
- };
4223
- var Default$7 = {
4224
- animation: true,
4225
- autohide: true,
4226
- delay: 500
4227
- };
4228
- var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="toast"]';
4229
- /**
4230
- * ------------------------------------------------------------------------
4231
- * Class Definition
4232
- * ------------------------------------------------------------------------
4233
- */
4234
-
4235
- var Toast = /*#__PURE__*/function () {
4236
- function Toast(element, config) {
4237
- this._element = element;
4238
- this._config = this._getConfig(config);
4239
- this._timeout = null;
4240
-
4241
- this._setListeners();
4242
- } // Getters
4243
-
4244
-
4245
- var _proto = Toast.prototype;
4246
-
4247
- // Public
4248
- _proto.show = function show() {
4249
- var _this = this;
4250
-
4251
- var showEvent = $__default['default'].Event(EVENT_SHOW$4);
4252
- $__default['default'](this._element).trigger(showEvent);
4253
-
4254
- if (showEvent.isDefaultPrevented()) {
4255
- return;
4256
- }
4257
-
4258
- this._clearTimeout();
4259
-
4260
- if (this._config.animation) {
4261
- this._element.classList.add(CLASS_NAME_FADE$5);
4262
- }
4263
-
4264
- var complete = function complete() {
4265
- _this._element.classList.remove(CLASS_NAME_SHOWING);
4266
-
4267
- _this._element.classList.add(CLASS_NAME_SHOW$7);
4268
-
4269
- $__default['default'](_this._element).trigger(EVENT_SHOWN$4);
4270
-
4271
- if (_this._config.autohide) {
4272
- _this._timeout = setTimeout(function () {
4273
- _this.hide();
4274
- }, _this._config.delay);
4275
- }
4276
- };
4277
-
4278
- this._element.classList.remove(CLASS_NAME_HIDE);
4279
-
4280
- Util.reflow(this._element);
4281
-
4282
- this._element.classList.add(CLASS_NAME_SHOWING);
4283
-
4284
- if (this._config.animation) {
4285
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4286
- $__default['default'](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4287
- } else {
4288
- complete();
4289
- }
4290
- };
4291
-
4292
- _proto.hide = function hide() {
4293
- if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) {
4294
- return;
4295
- }
4296
-
4297
- var hideEvent = $__default['default'].Event(EVENT_HIDE$4);
4298
- $__default['default'](this._element).trigger(hideEvent);
4299
-
4300
- if (hideEvent.isDefaultPrevented()) {
4301
- return;
4302
- }
4303
-
4304
- this._close();
4305
- };
4306
-
4307
- _proto.dispose = function dispose() {
4308
- this._clearTimeout();
4309
-
4310
- if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
4311
- this._element.classList.remove(CLASS_NAME_SHOW$7);
4312
- }
4313
-
4314
- $__default['default'](this._element).off(EVENT_CLICK_DISMISS$1);
4315
- $__default['default'].removeData(this._element, DATA_KEY$a);
4316
- this._element = null;
4317
- this._config = null;
4318
- } // Private
4319
- ;
4320
-
4321
- _proto._getConfig = function _getConfig(config) {
4322
- config = _extends({}, Default$7, $__default['default'](this._element).data(), typeof config === 'object' && config ? config : {});
4323
- Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
4324
- return config;
4325
- };
4326
-
4327
- _proto._setListeners = function _setListeners() {
4328
- var _this2 = this;
4329
-
4330
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
4331
- return _this2.hide();
4332
- });
4333
- };
4334
-
4335
- _proto._close = function _close() {
4336
- var _this3 = this;
4337
-
4338
- var complete = function complete() {
4339
- _this3._element.classList.add(CLASS_NAME_HIDE);
4340
-
4341
- $__default['default'](_this3._element).trigger(EVENT_HIDDEN$4);
4342
- };
4343
-
4344
- this._element.classList.remove(CLASS_NAME_SHOW$7);
4345
-
4346
- if (this._config.animation) {
4347
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4348
- $__default['default'](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4349
- } else {
4350
- complete();
4351
- }
4352
- };
4353
-
4354
- _proto._clearTimeout = function _clearTimeout() {
4355
- clearTimeout(this._timeout);
4356
- this._timeout = null;
4357
- } // Static
4358
- ;
4359
-
4360
- Toast._jQueryInterface = function _jQueryInterface(config) {
4361
- return this.each(function () {
4362
- var $element = $__default['default'](this);
4363
- var data = $element.data(DATA_KEY$a);
4364
-
4365
- var _config = typeof config === 'object' && config;
4366
-
4367
- if (!data) {
4368
- data = new Toast(this, _config);
4369
- $element.data(DATA_KEY$a, data);
4370
- }
4371
-
4372
- if (typeof config === 'string') {
4373
- if (typeof data[config] === 'undefined') {
4374
- throw new TypeError("No method named \"" + config + "\"");
4375
- }
4376
-
4377
- data[config](this);
4378
- }
4379
- });
4380
- };
4381
-
4382
- _createClass(Toast, null, [{
4383
- key: "VERSION",
4384
- get: function get() {
4385
- return VERSION$a;
4386
- }
4387
- }, {
4388
- key: "DefaultType",
4389
- get: function get() {
4390
- return DefaultType$7;
4391
- }
4392
- }, {
4393
- key: "Default",
4394
- get: function get() {
4395
- return Default$7;
4396
- }
4397
- }]);
4398
-
4399
- return Toast;
4400
- }();
4401
- /**
4402
- * ------------------------------------------------------------------------
4403
- * jQuery
4404
- * ------------------------------------------------------------------------
4405
- */
4406
-
4407
-
4408
- $__default['default'].fn[NAME$a] = Toast._jQueryInterface;
4409
- $__default['default'].fn[NAME$a].Constructor = Toast;
4410
-
4411
- $__default['default'].fn[NAME$a].noConflict = function () {
4412
- $__default['default'].fn[NAME$a] = JQUERY_NO_CONFLICT$a;
4413
- return Toast._jQueryInterface;
4414
- };
4415
-
4416
- exports.Alert = Alert;
4417
- exports.Button = Button;
4418
- exports.Carousel = Carousel;
4419
- exports.Collapse = Collapse;
4420
- exports.Dropdown = Dropdown;
4421
- exports.Modal = Modal;
4422
- exports.Popover = Popover;
4423
- exports.Scrollspy = ScrollSpy;
4424
- exports.Tab = Tab;
4425
- exports.Toast = Toast;
4426
- exports.Tooltip = Tooltip;
4427
- exports.Util = Util;
4428
-
4429
- Object.defineProperty(exports, '__esModule', { value: true });
4430
-
4431
- })));
4432
- //# sourceMappingURL=bootstrap.js.map