lino 25.8.2__py3-none-any.whl → 25.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. lino/__init__.py +1 -1
  2. lino/api/dd.py +0 -1
  3. lino/config/unused/403.html +1 -1
  4. lino/config/unused/404.html +1 -1
  5. lino/config/unused/500.html +1 -1
  6. lino/core/__init__.py +0 -1
  7. lino/core/actions.py +2 -2
  8. lino/core/actors.py +10 -2
  9. lino/core/elems.py +1 -1
  10. lino/core/fields.py +4 -1
  11. lino/core/kernel.py +5 -1
  12. lino/core/model.py +2 -11
  13. lino/core/renderer.py +2 -2
  14. lino/core/requests.py +12 -12
  15. lino/core/site.py +5 -82
  16. lino/core/store.py +3 -1
  17. lino/core/urls.py +1 -1
  18. lino/core/user_types.py +1 -10
  19. lino/help_texts.py +6 -6
  20. lino/management/commands/initdb.py +0 -3
  21. lino/modlib/__init__.py +0 -1
  22. lino/modlib/bootstrap5/README.txt +2 -0
  23. lino/modlib/bootstrap5/__init__.py +69 -0
  24. lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/base.html +9 -4
  25. lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/detail.html +1 -1
  26. lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/index.html +1 -1
  27. lino/modlib/{bootstrap3/config/bootstrap3 → bootstrap5/config/bootstrap5}/table.html +1 -1
  28. lino/modlib/bootstrap5/models.py +30 -0
  29. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.css +4085 -0
  30. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.css.map +1 -0
  31. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.min.css +6 -0
  32. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.min.css.map +1 -0
  33. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.css +4084 -0
  34. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.css.map +1 -0
  35. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.min.css +6 -0
  36. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-grid.rtl.min.css.map +1 -0
  37. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.css +597 -0
  38. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.css.map +1 -0
  39. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.min.css +6 -0
  40. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.min.css.map +1 -0
  41. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.css +594 -0
  42. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.css.map +1 -0
  43. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.min.css +6 -0
  44. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-reboot.rtl.min.css.map +1 -0
  45. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.css +5406 -0
  46. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.css.map +1 -0
  47. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.min.css +6 -0
  48. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.min.css.map +1 -0
  49. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.css +5397 -0
  50. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.css.map +1 -0
  51. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.min.css +6 -0
  52. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap-utilities.rtl.min.css.map +1 -0
  53. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.css +12043 -0
  54. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.css.map +1 -0
  55. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.min.css +6 -0
  56. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.min.css.map +1 -0
  57. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.css +12016 -0
  58. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.css.map +1 -0
  59. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.min.css +6 -0
  60. lino/modlib/bootstrap5/static/bootstrap-5.3.7/css/bootstrap.rtl.min.css.map +1 -0
  61. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.js +6315 -0
  62. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.js.map +1 -0
  63. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.min.js +7 -0
  64. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.bundle.min.js.map +1 -0
  65. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.js +4450 -0
  66. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.js.map +1 -0
  67. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.min.js +7 -0
  68. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.esm.min.js.map +1 -0
  69. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.js +4497 -0
  70. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.js.map +1 -0
  71. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.min.js +7 -0
  72. lino/modlib/bootstrap5/static/bootstrap-5.3.7/js/bootstrap.min.js.map +1 -0
  73. lino/modlib/{bootstrap3 → bootstrap5}/views.py +12 -117
  74. lino/modlib/checkdata/choicelists.py +1 -1
  75. lino/modlib/comments/fixtures/demo2.py +1 -0
  76. lino/modlib/comments/mixins.py +1 -8
  77. lino/modlib/comments/models.py +2 -0
  78. lino/modlib/comments/ui.py +7 -7
  79. lino/modlib/extjs/__init__.py +2 -4
  80. lino/modlib/extjs/config/extjs/index.html +1 -1
  81. lino/modlib/extjs/ext_renderer.py +1 -7
  82. lino/modlib/extjs/views.py +2 -0
  83. lino/modlib/help/models.py +1 -12
  84. lino/modlib/jinja/renderer.py +1 -1
  85. lino/modlib/linod/mixins.py +3 -2
  86. lino/modlib/memo/__init__.py +11 -11
  87. lino/modlib/memo/mixins.py +38 -21
  88. lino/modlib/memo/models.py +10 -7
  89. lino/modlib/memo/parser.py +3 -1
  90. lino/modlib/notify/models.py +6 -9
  91. lino/modlib/odata/views.py +7 -7
  92. lino/modlib/publisher/__init__.py +15 -3
  93. lino/modlib/publisher/choicelists.py +8 -94
  94. lino/modlib/publisher/config/publisher/page.pub.html +82 -19
  95. lino/modlib/publisher/fixtures/std.py +14 -1
  96. lino/modlib/publisher/fixtures/synodalworld.py +3 -1
  97. lino/modlib/publisher/mixins.py +59 -77
  98. lino/modlib/publisher/models.py +109 -204
  99. lino/modlib/publisher/renderer.py +31 -11
  100. lino/modlib/publisher/ui.py +46 -98
  101. lino/modlib/publisher/views.py +61 -11
  102. lino/modlib/system/models.py +3 -2
  103. lino/modlib/uploads/__init__.py +1 -0
  104. lino/modlib/uploads/mixins.py +2 -2
  105. lino/modlib/uploads/models.py +55 -21
  106. lino/modlib/uploads/ui.py +1 -0
  107. lino/modlib/uploads/utils.py +2 -2
  108. lino/modlib/users/__init__.py +2 -3
  109. lino/modlib/users/actions.py +12 -17
  110. lino/modlib/users/fixtures/abc.py +20 -0
  111. lino/modlib/users/mixins.py +6 -6
  112. lino/modlib/users/models.py +37 -36
  113. lino/modlib/weasyprint/__init__.py +25 -14
  114. lino/modlib/weasyprint/choicelists.py +6 -0
  115. lino/modlib/weasyprint/config/weasyprint/base.weasy.html +43 -27
  116. lino/utils/diag.py +5 -3
  117. lino/utils/html.py +103 -0
  118. lino/utils/mldbc/mixins.py +2 -2
  119. lino/utils/soup.py +16 -8
  120. {lino-25.8.2.dist-info → lino-25.9.0.dist-info}/METADATA +1 -1
  121. {lino-25.8.2.dist-info → lino-25.9.0.dist-info}/RECORD +135 -95
  122. lino/modlib/bootstrap3/README.txt +0 -2
  123. lino/modlib/bootstrap3/__init__.py +0 -73
  124. lino/modlib/bootstrap3/models.py +0 -30
  125. lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.css +0 -6584
  126. lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.css.map +0 -1
  127. lino/modlib/bootstrap3/static/bootstrap-3.3.4/css/bootstrap.min.css +0 -5
  128. lino/modlib/bootstrap3/static/bootstrap-3.3.4/js/bootstrap.js +0 -2317
  129. lino/modlib/bootstrap3/static/bootstrap-3.3.4/js/bootstrap.min.js +0 -7
  130. /lino/modlib/{bootstrap3 → bootstrap5}/renderer.py +0 -0
  131. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.css +0 -0
  132. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.css.map +0 -0
  133. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/css/bootstrap-theme.min.css +0 -0
  134. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.eot +0 -0
  135. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.svg +0 -0
  136. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.ttf +0 -0
  137. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.woff +0 -0
  138. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/fonts/glyphicons-halflings-regular.woff2 +0 -0
  139. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/js/bootstrap_lino.js +0 -0
  140. /lino/modlib/{bootstrap3/static/bootstrap-3.3.4 → bootstrap5/static/bootstrap-5.3.7}/js/npm.js +0 -0
  141. {lino-25.8.2.dist-info → lino-25.9.0.dist-info}/WHEEL +0 -0
  142. {lino-25.8.2.dist-info → lino-25.9.0.dist-info}/licenses/AUTHORS.rst +0 -0
  143. {lino-25.8.2.dist-info → lino-25.9.0.dist-info}/licenses/COPYING +0 -0
@@ -0,0 +1,4497 @@
1
+ /*!
2
+ * Bootstrap v5.3.7 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 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' ? module.exports = factory(require('@popperjs/core')) :
8
+ typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
10
+ })(this, (function (Popper) { 'use strict';
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== 'default') {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
30
+
31
+ /**
32
+ * --------------------------------------------------------------------------
33
+ * Bootstrap dom/data.js
34
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
35
+ * --------------------------------------------------------------------------
36
+ */
37
+
38
+ /**
39
+ * Constants
40
+ */
41
+
42
+ const elementMap = new Map();
43
+ const Data = {
44
+ set(element, key, instance) {
45
+ if (!elementMap.has(element)) {
46
+ elementMap.set(element, new Map());
47
+ }
48
+ const instanceMap = elementMap.get(element);
49
+
50
+ // make it clear we only want one instance per element
51
+ // can be removed later when multiple key/instances are fine to be used
52
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
53
+ // eslint-disable-next-line no-console
54
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
55
+ return;
56
+ }
57
+ instanceMap.set(key, instance);
58
+ },
59
+ get(element, key) {
60
+ if (elementMap.has(element)) {
61
+ return elementMap.get(element).get(key) || null;
62
+ }
63
+ return null;
64
+ },
65
+ remove(element, key) {
66
+ if (!elementMap.has(element)) {
67
+ return;
68
+ }
69
+ const instanceMap = elementMap.get(element);
70
+ instanceMap.delete(key);
71
+
72
+ // free up element references if there are no instances left for an element
73
+ if (instanceMap.size === 0) {
74
+ elementMap.delete(element);
75
+ }
76
+ }
77
+ };
78
+
79
+ /**
80
+ * --------------------------------------------------------------------------
81
+ * Bootstrap util/index.js
82
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
83
+ * --------------------------------------------------------------------------
84
+ */
85
+
86
+ const MAX_UID = 1000000;
87
+ const MILLISECONDS_MULTIPLIER = 1000;
88
+ const TRANSITION_END = 'transitionend';
89
+
90
+ /**
91
+ * Properly escape IDs selectors to handle weird IDs
92
+ * @param {string} selector
93
+ * @returns {string}
94
+ */
95
+ const parseSelector = selector => {
96
+ if (selector && window.CSS && window.CSS.escape) {
97
+ // document.querySelector needs escaping to handle IDs (html5+) containing for instance /
98
+ selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`);
99
+ }
100
+ return selector;
101
+ };
102
+
103
+ // Shout-out Angus Croll (https://goo.gl/pxwQGp)
104
+ const toType = object => {
105
+ if (object === null || object === undefined) {
106
+ return `${object}`;
107
+ }
108
+ return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase();
109
+ };
110
+
111
+ /**
112
+ * Public Util API
113
+ */
114
+
115
+ const getUID = prefix => {
116
+ do {
117
+ prefix += Math.floor(Math.random() * MAX_UID);
118
+ } while (document.getElementById(prefix));
119
+ return prefix;
120
+ };
121
+ const getTransitionDurationFromElement = element => {
122
+ if (!element) {
123
+ return 0;
124
+ }
125
+
126
+ // Get transition-duration of the element
127
+ let {
128
+ transitionDuration,
129
+ transitionDelay
130
+ } = window.getComputedStyle(element);
131
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
132
+ const floatTransitionDelay = Number.parseFloat(transitionDelay);
133
+
134
+ // Return 0 if element or transition duration is not found
135
+ if (!floatTransitionDuration && !floatTransitionDelay) {
136
+ return 0;
137
+ }
138
+
139
+ // If multiple durations are defined, take the first
140
+ transitionDuration = transitionDuration.split(',')[0];
141
+ transitionDelay = transitionDelay.split(',')[0];
142
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
143
+ };
144
+ const triggerTransitionEnd = element => {
145
+ element.dispatchEvent(new Event(TRANSITION_END));
146
+ };
147
+ const isElement = object => {
148
+ if (!object || typeof object !== 'object') {
149
+ return false;
150
+ }
151
+ if (typeof object.jquery !== 'undefined') {
152
+ object = object[0];
153
+ }
154
+ return typeof object.nodeType !== 'undefined';
155
+ };
156
+ const getElement = object => {
157
+ // it's a jQuery object or a node element
158
+ if (isElement(object)) {
159
+ return object.jquery ? object[0] : object;
160
+ }
161
+ if (typeof object === 'string' && object.length > 0) {
162
+ return document.querySelector(parseSelector(object));
163
+ }
164
+ return null;
165
+ };
166
+ const isVisible = element => {
167
+ if (!isElement(element) || element.getClientRects().length === 0) {
168
+ return false;
169
+ }
170
+ const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
171
+ // Handle `details` element as its content may falsie appear visible when it is closed
172
+ const closedDetails = element.closest('details:not([open])');
173
+ if (!closedDetails) {
174
+ return elementIsVisible;
175
+ }
176
+ if (closedDetails !== element) {
177
+ const summary = element.closest('summary');
178
+ if (summary && summary.parentNode !== closedDetails) {
179
+ return false;
180
+ }
181
+ if (summary === null) {
182
+ return false;
183
+ }
184
+ }
185
+ return elementIsVisible;
186
+ };
187
+ const isDisabled = element => {
188
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
189
+ return true;
190
+ }
191
+ if (element.classList.contains('disabled')) {
192
+ return true;
193
+ }
194
+ if (typeof element.disabled !== 'undefined') {
195
+ return element.disabled;
196
+ }
197
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
198
+ };
199
+ const findShadowRoot = element => {
200
+ if (!document.documentElement.attachShadow) {
201
+ return null;
202
+ }
203
+
204
+ // Can find the shadow root otherwise it'll return the document
205
+ if (typeof element.getRootNode === 'function') {
206
+ const root = element.getRootNode();
207
+ return root instanceof ShadowRoot ? root : null;
208
+ }
209
+ if (element instanceof ShadowRoot) {
210
+ return element;
211
+ }
212
+
213
+ // when we don't find a shadow root
214
+ if (!element.parentNode) {
215
+ return null;
216
+ }
217
+ return findShadowRoot(element.parentNode);
218
+ };
219
+ const noop = () => {};
220
+
221
+ /**
222
+ * Trick to restart an element's animation
223
+ *
224
+ * @param {HTMLElement} element
225
+ * @return void
226
+ *
227
+ * @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
228
+ */
229
+ const reflow = element => {
230
+ element.offsetHeight; // eslint-disable-line no-unused-expressions
231
+ };
232
+ const getjQuery = () => {
233
+ if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
234
+ return window.jQuery;
235
+ }
236
+ return null;
237
+ };
238
+ const DOMContentLoadedCallbacks = [];
239
+ const onDOMContentLoaded = callback => {
240
+ if (document.readyState === 'loading') {
241
+ // add listener on the first call when the document is in loading state
242
+ if (!DOMContentLoadedCallbacks.length) {
243
+ document.addEventListener('DOMContentLoaded', () => {
244
+ for (const callback of DOMContentLoadedCallbacks) {
245
+ callback();
246
+ }
247
+ });
248
+ }
249
+ DOMContentLoadedCallbacks.push(callback);
250
+ } else {
251
+ callback();
252
+ }
253
+ };
254
+ const isRTL = () => document.documentElement.dir === 'rtl';
255
+ const defineJQueryPlugin = plugin => {
256
+ onDOMContentLoaded(() => {
257
+ const $ = getjQuery();
258
+ /* istanbul ignore if */
259
+ if ($) {
260
+ const name = plugin.NAME;
261
+ const JQUERY_NO_CONFLICT = $.fn[name];
262
+ $.fn[name] = plugin.jQueryInterface;
263
+ $.fn[name].Constructor = plugin;
264
+ $.fn[name].noConflict = () => {
265
+ $.fn[name] = JQUERY_NO_CONFLICT;
266
+ return plugin.jQueryInterface;
267
+ };
268
+ }
269
+ });
270
+ };
271
+ const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
272
+ return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
273
+ };
274
+ const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
275
+ if (!waitForTransition) {
276
+ execute(callback);
277
+ return;
278
+ }
279
+ const durationPadding = 5;
280
+ const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
281
+ let called = false;
282
+ const handler = ({
283
+ target
284
+ }) => {
285
+ if (target !== transitionElement) {
286
+ return;
287
+ }
288
+ called = true;
289
+ transitionElement.removeEventListener(TRANSITION_END, handler);
290
+ execute(callback);
291
+ };
292
+ transitionElement.addEventListener(TRANSITION_END, handler);
293
+ setTimeout(() => {
294
+ if (!called) {
295
+ triggerTransitionEnd(transitionElement);
296
+ }
297
+ }, emulatedDuration);
298
+ };
299
+
300
+ /**
301
+ * Return the previous/next element of a list.
302
+ *
303
+ * @param {array} list The list of elements
304
+ * @param activeElement The active element
305
+ * @param shouldGetNext Choose to get next or previous element
306
+ * @param isCycleAllowed
307
+ * @return {Element|elem} The proper element
308
+ */
309
+ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
310
+ const listLength = list.length;
311
+ let index = list.indexOf(activeElement);
312
+
313
+ // if the element does not exist in the list return an element
314
+ // depending on the direction and if cycle is allowed
315
+ if (index === -1) {
316
+ return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
317
+ }
318
+ index += shouldGetNext ? 1 : -1;
319
+ if (isCycleAllowed) {
320
+ index = (index + listLength) % listLength;
321
+ }
322
+ return list[Math.max(0, Math.min(index, listLength - 1))];
323
+ };
324
+
325
+ /**
326
+ * --------------------------------------------------------------------------
327
+ * Bootstrap dom/event-handler.js
328
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
329
+ * --------------------------------------------------------------------------
330
+ */
331
+
332
+
333
+ /**
334
+ * Constants
335
+ */
336
+
337
+ const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
338
+ const stripNameRegex = /\..*/;
339
+ const stripUidRegex = /::\d+$/;
340
+ const eventRegistry = {}; // Events storage
341
+ let uidEvent = 1;
342
+ const customEvents = {
343
+ mouseenter: 'mouseover',
344
+ mouseleave: 'mouseout'
345
+ };
346
+ const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
347
+
348
+ /**
349
+ * Private methods
350
+ */
351
+
352
+ function makeEventUid(element, uid) {
353
+ return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
354
+ }
355
+ function getElementEvents(element) {
356
+ const uid = makeEventUid(element);
357
+ element.uidEvent = uid;
358
+ eventRegistry[uid] = eventRegistry[uid] || {};
359
+ return eventRegistry[uid];
360
+ }
361
+ function bootstrapHandler(element, fn) {
362
+ return function handler(event) {
363
+ hydrateObj(event, {
364
+ delegateTarget: element
365
+ });
366
+ if (handler.oneOff) {
367
+ EventHandler.off(element, event.type, fn);
368
+ }
369
+ return fn.apply(element, [event]);
370
+ };
371
+ }
372
+ function bootstrapDelegationHandler(element, selector, fn) {
373
+ return function handler(event) {
374
+ const domElements = element.querySelectorAll(selector);
375
+ for (let {
376
+ target
377
+ } = event; target && target !== this; target = target.parentNode) {
378
+ for (const domElement of domElements) {
379
+ if (domElement !== target) {
380
+ continue;
381
+ }
382
+ hydrateObj(event, {
383
+ delegateTarget: target
384
+ });
385
+ if (handler.oneOff) {
386
+ EventHandler.off(element, event.type, selector, fn);
387
+ }
388
+ return fn.apply(target, [event]);
389
+ }
390
+ }
391
+ };
392
+ }
393
+ function findHandler(events, callable, delegationSelector = null) {
394
+ return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
395
+ }
396
+ function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
397
+ const isDelegated = typeof handler === 'string';
398
+ // TODO: tooltip passes `false` instead of selector, so we need to check
399
+ const callable = isDelegated ? delegationFunction : handler || delegationFunction;
400
+ let typeEvent = getTypeEvent(originalTypeEvent);
401
+ if (!nativeEvents.has(typeEvent)) {
402
+ typeEvent = originalTypeEvent;
403
+ }
404
+ return [isDelegated, callable, typeEvent];
405
+ }
406
+ function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
407
+ if (typeof originalTypeEvent !== 'string' || !element) {
408
+ return;
409
+ }
410
+ let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
411
+
412
+ // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
413
+ // this prevents the handler from being dispatched the same way as mouseover or mouseout does
414
+ if (originalTypeEvent in customEvents) {
415
+ const wrapFunction = fn => {
416
+ return function (event) {
417
+ if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
418
+ return fn.call(this, event);
419
+ }
420
+ };
421
+ };
422
+ callable = wrapFunction(callable);
423
+ }
424
+ const events = getElementEvents(element);
425
+ const handlers = events[typeEvent] || (events[typeEvent] = {});
426
+ const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
427
+ if (previousFunction) {
428
+ previousFunction.oneOff = previousFunction.oneOff && oneOff;
429
+ return;
430
+ }
431
+ const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
432
+ const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
433
+ fn.delegationSelector = isDelegated ? handler : null;
434
+ fn.callable = callable;
435
+ fn.oneOff = oneOff;
436
+ fn.uidEvent = uid;
437
+ handlers[uid] = fn;
438
+ element.addEventListener(typeEvent, fn, isDelegated);
439
+ }
440
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
441
+ const fn = findHandler(events[typeEvent], handler, delegationSelector);
442
+ if (!fn) {
443
+ return;
444
+ }
445
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
446
+ delete events[typeEvent][fn.uidEvent];
447
+ }
448
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
449
+ const storeElementEvent = events[typeEvent] || {};
450
+ for (const [handlerKey, event] of Object.entries(storeElementEvent)) {
451
+ if (handlerKey.includes(namespace)) {
452
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
453
+ }
454
+ }
455
+ }
456
+ function getTypeEvent(event) {
457
+ // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
458
+ event = event.replace(stripNameRegex, '');
459
+ return customEvents[event] || event;
460
+ }
461
+ const EventHandler = {
462
+ on(element, event, handler, delegationFunction) {
463
+ addHandler(element, event, handler, delegationFunction, false);
464
+ },
465
+ one(element, event, handler, delegationFunction) {
466
+ addHandler(element, event, handler, delegationFunction, true);
467
+ },
468
+ off(element, originalTypeEvent, handler, delegationFunction) {
469
+ if (typeof originalTypeEvent !== 'string' || !element) {
470
+ return;
471
+ }
472
+ const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
473
+ const inNamespace = typeEvent !== originalTypeEvent;
474
+ const events = getElementEvents(element);
475
+ const storeElementEvent = events[typeEvent] || {};
476
+ const isNamespace = originalTypeEvent.startsWith('.');
477
+ if (typeof callable !== 'undefined') {
478
+ // Simplest case: handler is passed, remove that listener ONLY.
479
+ if (!Object.keys(storeElementEvent).length) {
480
+ return;
481
+ }
482
+ removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
483
+ return;
484
+ }
485
+ if (isNamespace) {
486
+ for (const elementEvent of Object.keys(events)) {
487
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
488
+ }
489
+ }
490
+ for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
491
+ const handlerKey = keyHandlers.replace(stripUidRegex, '');
492
+ if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
493
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
494
+ }
495
+ }
496
+ },
497
+ trigger(element, event, args) {
498
+ if (typeof event !== 'string' || !element) {
499
+ return null;
500
+ }
501
+ const $ = getjQuery();
502
+ const typeEvent = getTypeEvent(event);
503
+ const inNamespace = event !== typeEvent;
504
+ let jQueryEvent = null;
505
+ let bubbles = true;
506
+ let nativeDispatch = true;
507
+ let defaultPrevented = false;
508
+ if (inNamespace && $) {
509
+ jQueryEvent = $.Event(event, args);
510
+ $(element).trigger(jQueryEvent);
511
+ bubbles = !jQueryEvent.isPropagationStopped();
512
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
513
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
514
+ }
515
+ const evt = hydrateObj(new Event(event, {
516
+ bubbles,
517
+ cancelable: true
518
+ }), args);
519
+ if (defaultPrevented) {
520
+ evt.preventDefault();
521
+ }
522
+ if (nativeDispatch) {
523
+ element.dispatchEvent(evt);
524
+ }
525
+ if (evt.defaultPrevented && jQueryEvent) {
526
+ jQueryEvent.preventDefault();
527
+ }
528
+ return evt;
529
+ }
530
+ };
531
+ function hydrateObj(obj, meta = {}) {
532
+ for (const [key, value] of Object.entries(meta)) {
533
+ try {
534
+ obj[key] = value;
535
+ } catch (_unused) {
536
+ Object.defineProperty(obj, key, {
537
+ configurable: true,
538
+ get() {
539
+ return value;
540
+ }
541
+ });
542
+ }
543
+ }
544
+ return obj;
545
+ }
546
+
547
+ /**
548
+ * --------------------------------------------------------------------------
549
+ * Bootstrap dom/manipulator.js
550
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
551
+ * --------------------------------------------------------------------------
552
+ */
553
+
554
+ function normalizeData(value) {
555
+ if (value === 'true') {
556
+ return true;
557
+ }
558
+ if (value === 'false') {
559
+ return false;
560
+ }
561
+ if (value === Number(value).toString()) {
562
+ return Number(value);
563
+ }
564
+ if (value === '' || value === 'null') {
565
+ return null;
566
+ }
567
+ if (typeof value !== 'string') {
568
+ return value;
569
+ }
570
+ try {
571
+ return JSON.parse(decodeURIComponent(value));
572
+ } catch (_unused) {
573
+ return value;
574
+ }
575
+ }
576
+ function normalizeDataKey(key) {
577
+ return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
578
+ }
579
+ const Manipulator = {
580
+ setDataAttribute(element, key, value) {
581
+ element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
582
+ },
583
+ removeDataAttribute(element, key) {
584
+ element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
585
+ },
586
+ getDataAttributes(element) {
587
+ if (!element) {
588
+ return {};
589
+ }
590
+ const attributes = {};
591
+ const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));
592
+ for (const key of bsKeys) {
593
+ let pureKey = key.replace(/^bs/, '');
594
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1);
595
+ attributes[pureKey] = normalizeData(element.dataset[key]);
596
+ }
597
+ return attributes;
598
+ },
599
+ getDataAttribute(element, key) {
600
+ return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
601
+ }
602
+ };
603
+
604
+ /**
605
+ * --------------------------------------------------------------------------
606
+ * Bootstrap util/config.js
607
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
608
+ * --------------------------------------------------------------------------
609
+ */
610
+
611
+
612
+ /**
613
+ * Class definition
614
+ */
615
+
616
+ class Config {
617
+ // Getters
618
+ static get Default() {
619
+ return {};
620
+ }
621
+ static get DefaultType() {
622
+ return {};
623
+ }
624
+ static get NAME() {
625
+ throw new Error('You have to implement the static method "NAME", for each component!');
626
+ }
627
+ _getConfig(config) {
628
+ config = this._mergeConfigObj(config);
629
+ config = this._configAfterMerge(config);
630
+ this._typeCheckConfig(config);
631
+ return config;
632
+ }
633
+ _configAfterMerge(config) {
634
+ return config;
635
+ }
636
+ _mergeConfigObj(config, element) {
637
+ const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse
638
+
639
+ return {
640
+ ...this.constructor.Default,
641
+ ...(typeof jsonConfig === 'object' ? jsonConfig : {}),
642
+ ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),
643
+ ...(typeof config === 'object' ? config : {})
644
+ };
645
+ }
646
+ _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
647
+ for (const [property, expectedTypes] of Object.entries(configTypes)) {
648
+ const value = config[property];
649
+ const valueType = isElement(value) ? 'element' : toType(value);
650
+ if (!new RegExp(expectedTypes).test(valueType)) {
651
+ throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
652
+ }
653
+ }
654
+ }
655
+ }
656
+
657
+ /**
658
+ * --------------------------------------------------------------------------
659
+ * Bootstrap base-component.js
660
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
661
+ * --------------------------------------------------------------------------
662
+ */
663
+
664
+
665
+ /**
666
+ * Constants
667
+ */
668
+
669
+ const VERSION = '5.3.7';
670
+
671
+ /**
672
+ * Class definition
673
+ */
674
+
675
+ class BaseComponent extends Config {
676
+ constructor(element, config) {
677
+ super();
678
+ element = getElement(element);
679
+ if (!element) {
680
+ return;
681
+ }
682
+ this._element = element;
683
+ this._config = this._getConfig(config);
684
+ Data.set(this._element, this.constructor.DATA_KEY, this);
685
+ }
686
+
687
+ // Public
688
+ dispose() {
689
+ Data.remove(this._element, this.constructor.DATA_KEY);
690
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
691
+ for (const propertyName of Object.getOwnPropertyNames(this)) {
692
+ this[propertyName] = null;
693
+ }
694
+ }
695
+
696
+ // Private
697
+ _queueCallback(callback, element, isAnimated = true) {
698
+ executeAfterTransition(callback, element, isAnimated);
699
+ }
700
+ _getConfig(config) {
701
+ config = this._mergeConfigObj(config, this._element);
702
+ config = this._configAfterMerge(config);
703
+ this._typeCheckConfig(config);
704
+ return config;
705
+ }
706
+
707
+ // Static
708
+ static getInstance(element) {
709
+ return Data.get(getElement(element), this.DATA_KEY);
710
+ }
711
+ static getOrCreateInstance(element, config = {}) {
712
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
713
+ }
714
+ static get VERSION() {
715
+ return VERSION;
716
+ }
717
+ static get DATA_KEY() {
718
+ return `bs.${this.NAME}`;
719
+ }
720
+ static get EVENT_KEY() {
721
+ return `.${this.DATA_KEY}`;
722
+ }
723
+ static eventName(name) {
724
+ return `${name}${this.EVENT_KEY}`;
725
+ }
726
+ }
727
+
728
+ /**
729
+ * --------------------------------------------------------------------------
730
+ * Bootstrap dom/selector-engine.js
731
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
732
+ * --------------------------------------------------------------------------
733
+ */
734
+
735
+ const getSelector = element => {
736
+ let selector = element.getAttribute('data-bs-target');
737
+ if (!selector || selector === '#') {
738
+ let hrefAttribute = element.getAttribute('href');
739
+
740
+ // The only valid content that could double as a selector are IDs or classes,
741
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
742
+ // `document.querySelector` will rightfully complain it is invalid.
743
+ // See https://github.com/twbs/bootstrap/issues/32273
744
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
745
+ return null;
746
+ }
747
+
748
+ // Just in case some CMS puts out a full URL with the anchor appended
749
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
750
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
751
+ }
752
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
753
+ }
754
+ return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null;
755
+ };
756
+ const SelectorEngine = {
757
+ find(selector, element = document.documentElement) {
758
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
759
+ },
760
+ findOne(selector, element = document.documentElement) {
761
+ return Element.prototype.querySelector.call(element, selector);
762
+ },
763
+ children(element, selector) {
764
+ return [].concat(...element.children).filter(child => child.matches(selector));
765
+ },
766
+ parents(element, selector) {
767
+ const parents = [];
768
+ let ancestor = element.parentNode.closest(selector);
769
+ while (ancestor) {
770
+ parents.push(ancestor);
771
+ ancestor = ancestor.parentNode.closest(selector);
772
+ }
773
+ return parents;
774
+ },
775
+ prev(element, selector) {
776
+ let previous = element.previousElementSibling;
777
+ while (previous) {
778
+ if (previous.matches(selector)) {
779
+ return [previous];
780
+ }
781
+ previous = previous.previousElementSibling;
782
+ }
783
+ return [];
784
+ },
785
+ // TODO: this is now unused; remove later along with prev()
786
+ next(element, selector) {
787
+ let next = element.nextElementSibling;
788
+ while (next) {
789
+ if (next.matches(selector)) {
790
+ return [next];
791
+ }
792
+ next = next.nextElementSibling;
793
+ }
794
+ return [];
795
+ },
796
+ focusableChildren(element) {
797
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
798
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
799
+ },
800
+ getSelectorFromElement(element) {
801
+ const selector = getSelector(element);
802
+ if (selector) {
803
+ return SelectorEngine.findOne(selector) ? selector : null;
804
+ }
805
+ return null;
806
+ },
807
+ getElementFromSelector(element) {
808
+ const selector = getSelector(element);
809
+ return selector ? SelectorEngine.findOne(selector) : null;
810
+ },
811
+ getMultipleElementsFromSelector(element) {
812
+ const selector = getSelector(element);
813
+ return selector ? SelectorEngine.find(selector) : [];
814
+ }
815
+ };
816
+
817
+ /**
818
+ * --------------------------------------------------------------------------
819
+ * Bootstrap util/component-functions.js
820
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
821
+ * --------------------------------------------------------------------------
822
+ */
823
+
824
+ const enableDismissTrigger = (component, method = 'hide') => {
825
+ const clickEvent = `click.dismiss${component.EVENT_KEY}`;
826
+ const name = component.NAME;
827
+ EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
828
+ if (['A', 'AREA'].includes(this.tagName)) {
829
+ event.preventDefault();
830
+ }
831
+ if (isDisabled(this)) {
832
+ return;
833
+ }
834
+ const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
835
+ const instance = component.getOrCreateInstance(target);
836
+
837
+ // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
838
+ instance[method]();
839
+ });
840
+ };
841
+
842
+ /**
843
+ * --------------------------------------------------------------------------
844
+ * Bootstrap alert.js
845
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
846
+ * --------------------------------------------------------------------------
847
+ */
848
+
849
+
850
+ /**
851
+ * Constants
852
+ */
853
+
854
+ const NAME$f = 'alert';
855
+ const DATA_KEY$a = 'bs.alert';
856
+ const EVENT_KEY$b = `.${DATA_KEY$a}`;
857
+ const EVENT_CLOSE = `close${EVENT_KEY$b}`;
858
+ const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
859
+ const CLASS_NAME_FADE$5 = 'fade';
860
+ const CLASS_NAME_SHOW$8 = 'show';
861
+
862
+ /**
863
+ * Class definition
864
+ */
865
+
866
+ class Alert extends BaseComponent {
867
+ // Getters
868
+ static get NAME() {
869
+ return NAME$f;
870
+ }
871
+
872
+ // Public
873
+ close() {
874
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
875
+ if (closeEvent.defaultPrevented) {
876
+ return;
877
+ }
878
+ this._element.classList.remove(CLASS_NAME_SHOW$8);
879
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
880
+ this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
881
+ }
882
+
883
+ // Private
884
+ _destroyElement() {
885
+ this._element.remove();
886
+ EventHandler.trigger(this._element, EVENT_CLOSED);
887
+ this.dispose();
888
+ }
889
+
890
+ // Static
891
+ static jQueryInterface(config) {
892
+ return this.each(function () {
893
+ const data = Alert.getOrCreateInstance(this);
894
+ if (typeof config !== 'string') {
895
+ return;
896
+ }
897
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
898
+ throw new TypeError(`No method named "${config}"`);
899
+ }
900
+ data[config](this);
901
+ });
902
+ }
903
+ }
904
+
905
+ /**
906
+ * Data API implementation
907
+ */
908
+
909
+ enableDismissTrigger(Alert, 'close');
910
+
911
+ /**
912
+ * jQuery
913
+ */
914
+
915
+ defineJQueryPlugin(Alert);
916
+
917
+ /**
918
+ * --------------------------------------------------------------------------
919
+ * Bootstrap button.js
920
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
921
+ * --------------------------------------------------------------------------
922
+ */
923
+
924
+
925
+ /**
926
+ * Constants
927
+ */
928
+
929
+ const NAME$e = 'button';
930
+ const DATA_KEY$9 = 'bs.button';
931
+ const EVENT_KEY$a = `.${DATA_KEY$9}`;
932
+ const DATA_API_KEY$6 = '.data-api';
933
+ const CLASS_NAME_ACTIVE$3 = 'active';
934
+ const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
935
+ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
936
+
937
+ /**
938
+ * Class definition
939
+ */
940
+
941
+ class Button extends BaseComponent {
942
+ // Getters
943
+ static get NAME() {
944
+ return NAME$e;
945
+ }
946
+
947
+ // Public
948
+ toggle() {
949
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
950
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
951
+ }
952
+
953
+ // Static
954
+ static jQueryInterface(config) {
955
+ return this.each(function () {
956
+ const data = Button.getOrCreateInstance(this);
957
+ if (config === 'toggle') {
958
+ data[config]();
959
+ }
960
+ });
961
+ }
962
+ }
963
+
964
+ /**
965
+ * Data API implementation
966
+ */
967
+
968
+ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
969
+ event.preventDefault();
970
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
971
+ const data = Button.getOrCreateInstance(button);
972
+ data.toggle();
973
+ });
974
+
975
+ /**
976
+ * jQuery
977
+ */
978
+
979
+ defineJQueryPlugin(Button);
980
+
981
+ /**
982
+ * --------------------------------------------------------------------------
983
+ * Bootstrap util/swipe.js
984
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
985
+ * --------------------------------------------------------------------------
986
+ */
987
+
988
+
989
+ /**
990
+ * Constants
991
+ */
992
+
993
+ const NAME$d = 'swipe';
994
+ const EVENT_KEY$9 = '.bs.swipe';
995
+ const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
996
+ const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
997
+ const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
998
+ const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
999
+ const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
1000
+ const POINTER_TYPE_TOUCH = 'touch';
1001
+ const POINTER_TYPE_PEN = 'pen';
1002
+ const CLASS_NAME_POINTER_EVENT = 'pointer-event';
1003
+ const SWIPE_THRESHOLD = 40;
1004
+ const Default$c = {
1005
+ endCallback: null,
1006
+ leftCallback: null,
1007
+ rightCallback: null
1008
+ };
1009
+ const DefaultType$c = {
1010
+ endCallback: '(function|null)',
1011
+ leftCallback: '(function|null)',
1012
+ rightCallback: '(function|null)'
1013
+ };
1014
+
1015
+ /**
1016
+ * Class definition
1017
+ */
1018
+
1019
+ class Swipe extends Config {
1020
+ constructor(element, config) {
1021
+ super();
1022
+ this._element = element;
1023
+ if (!element || !Swipe.isSupported()) {
1024
+ return;
1025
+ }
1026
+ this._config = this._getConfig(config);
1027
+ this._deltaX = 0;
1028
+ this._supportPointerEvents = Boolean(window.PointerEvent);
1029
+ this._initEvents();
1030
+ }
1031
+
1032
+ // Getters
1033
+ static get Default() {
1034
+ return Default$c;
1035
+ }
1036
+ static get DefaultType() {
1037
+ return DefaultType$c;
1038
+ }
1039
+ static get NAME() {
1040
+ return NAME$d;
1041
+ }
1042
+
1043
+ // Public
1044
+ dispose() {
1045
+ EventHandler.off(this._element, EVENT_KEY$9);
1046
+ }
1047
+
1048
+ // Private
1049
+ _start(event) {
1050
+ if (!this._supportPointerEvents) {
1051
+ this._deltaX = event.touches[0].clientX;
1052
+ return;
1053
+ }
1054
+ if (this._eventIsPointerPenTouch(event)) {
1055
+ this._deltaX = event.clientX;
1056
+ }
1057
+ }
1058
+ _end(event) {
1059
+ if (this._eventIsPointerPenTouch(event)) {
1060
+ this._deltaX = event.clientX - this._deltaX;
1061
+ }
1062
+ this._handleSwipe();
1063
+ execute(this._config.endCallback);
1064
+ }
1065
+ _move(event) {
1066
+ this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;
1067
+ }
1068
+ _handleSwipe() {
1069
+ const absDeltaX = Math.abs(this._deltaX);
1070
+ if (absDeltaX <= SWIPE_THRESHOLD) {
1071
+ return;
1072
+ }
1073
+ const direction = absDeltaX / this._deltaX;
1074
+ this._deltaX = 0;
1075
+ if (!direction) {
1076
+ return;
1077
+ }
1078
+ execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);
1079
+ }
1080
+ _initEvents() {
1081
+ if (this._supportPointerEvents) {
1082
+ EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));
1083
+ EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));
1084
+ this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1085
+ } else {
1086
+ EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));
1087
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));
1088
+ EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));
1089
+ }
1090
+ }
1091
+ _eventIsPointerPenTouch(event) {
1092
+ return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
1093
+ }
1094
+
1095
+ // Static
1096
+ static isSupported() {
1097
+ return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1098
+ }
1099
+ }
1100
+
1101
+ /**
1102
+ * --------------------------------------------------------------------------
1103
+ * Bootstrap carousel.js
1104
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1105
+ * --------------------------------------------------------------------------
1106
+ */
1107
+
1108
+
1109
+ /**
1110
+ * Constants
1111
+ */
1112
+
1113
+ const NAME$c = 'carousel';
1114
+ const DATA_KEY$8 = 'bs.carousel';
1115
+ const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1116
+ const DATA_API_KEY$5 = '.data-api';
1117
+ const ARROW_LEFT_KEY$1 = 'ArrowLeft';
1118
+ const ARROW_RIGHT_KEY$1 = 'ArrowRight';
1119
+ const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
1120
+
1121
+ const ORDER_NEXT = 'next';
1122
+ const ORDER_PREV = 'prev';
1123
+ const DIRECTION_LEFT = 'left';
1124
+ const DIRECTION_RIGHT = 'right';
1125
+ const EVENT_SLIDE = `slide${EVENT_KEY$8}`;
1126
+ const EVENT_SLID = `slid${EVENT_KEY$8}`;
1127
+ const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;
1128
+ const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;
1129
+ const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;
1130
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;
1131
+ const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;
1132
+ const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
1133
+ const CLASS_NAME_CAROUSEL = 'carousel';
1134
+ const CLASS_NAME_ACTIVE$2 = 'active';
1135
+ const CLASS_NAME_SLIDE = 'slide';
1136
+ const CLASS_NAME_END = 'carousel-item-end';
1137
+ const CLASS_NAME_START = 'carousel-item-start';
1138
+ const CLASS_NAME_NEXT = 'carousel-item-next';
1139
+ const CLASS_NAME_PREV = 'carousel-item-prev';
1140
+ const SELECTOR_ACTIVE = '.active';
1141
+ const SELECTOR_ITEM = '.carousel-item';
1142
+ const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
1143
+ const SELECTOR_ITEM_IMG = '.carousel-item img';
1144
+ const SELECTOR_INDICATORS = '.carousel-indicators';
1145
+ const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1146
+ const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1147
+ const KEY_TO_DIRECTION = {
1148
+ [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,
1149
+ [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT
1150
+ };
1151
+ const Default$b = {
1152
+ interval: 5000,
1153
+ keyboard: true,
1154
+ pause: 'hover',
1155
+ ride: false,
1156
+ touch: true,
1157
+ wrap: true
1158
+ };
1159
+ const DefaultType$b = {
1160
+ interval: '(number|boolean)',
1161
+ // TODO:v6 remove boolean support
1162
+ keyboard: 'boolean',
1163
+ pause: '(string|boolean)',
1164
+ ride: '(boolean|string)',
1165
+ touch: 'boolean',
1166
+ wrap: 'boolean'
1167
+ };
1168
+
1169
+ /**
1170
+ * Class definition
1171
+ */
1172
+
1173
+ class Carousel extends BaseComponent {
1174
+ constructor(element, config) {
1175
+ super(element, config);
1176
+ this._interval = null;
1177
+ this._activeElement = null;
1178
+ this._isSliding = false;
1179
+ this.touchTimeout = null;
1180
+ this._swipeHelper = null;
1181
+ this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
1182
+ this._addEventListeners();
1183
+ if (this._config.ride === CLASS_NAME_CAROUSEL) {
1184
+ this.cycle();
1185
+ }
1186
+ }
1187
+
1188
+ // Getters
1189
+ static get Default() {
1190
+ return Default$b;
1191
+ }
1192
+ static get DefaultType() {
1193
+ return DefaultType$b;
1194
+ }
1195
+ static get NAME() {
1196
+ return NAME$c;
1197
+ }
1198
+
1199
+ // Public
1200
+ next() {
1201
+ this._slide(ORDER_NEXT);
1202
+ }
1203
+ nextWhenVisible() {
1204
+ // FIXME TODO use `document.visibilityState`
1205
+ // Don't call next when the page isn't visible
1206
+ // or the carousel or its parent isn't visible
1207
+ if (!document.hidden && isVisible(this._element)) {
1208
+ this.next();
1209
+ }
1210
+ }
1211
+ prev() {
1212
+ this._slide(ORDER_PREV);
1213
+ }
1214
+ pause() {
1215
+ if (this._isSliding) {
1216
+ triggerTransitionEnd(this._element);
1217
+ }
1218
+ this._clearInterval();
1219
+ }
1220
+ cycle() {
1221
+ this._clearInterval();
1222
+ this._updateInterval();
1223
+ this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
1224
+ }
1225
+ _maybeEnableCycle() {
1226
+ if (!this._config.ride) {
1227
+ return;
1228
+ }
1229
+ if (this._isSliding) {
1230
+ EventHandler.one(this._element, EVENT_SLID, () => this.cycle());
1231
+ return;
1232
+ }
1233
+ this.cycle();
1234
+ }
1235
+ to(index) {
1236
+ const items = this._getItems();
1237
+ if (index > items.length - 1 || index < 0) {
1238
+ return;
1239
+ }
1240
+ if (this._isSliding) {
1241
+ EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
1242
+ return;
1243
+ }
1244
+ const activeIndex = this._getItemIndex(this._getActive());
1245
+ if (activeIndex === index) {
1246
+ return;
1247
+ }
1248
+ const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1249
+ this._slide(order, items[index]);
1250
+ }
1251
+ dispose() {
1252
+ if (this._swipeHelper) {
1253
+ this._swipeHelper.dispose();
1254
+ }
1255
+ super.dispose();
1256
+ }
1257
+
1258
+ // Private
1259
+ _configAfterMerge(config) {
1260
+ config.defaultInterval = config.interval;
1261
+ return config;
1262
+ }
1263
+ _addEventListeners() {
1264
+ if (this._config.keyboard) {
1265
+ EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));
1266
+ }
1267
+ if (this._config.pause === 'hover') {
1268
+ EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());
1269
+ EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());
1270
+ }
1271
+ if (this._config.touch && Swipe.isSupported()) {
1272
+ this._addTouchEventListeners();
1273
+ }
1274
+ }
1275
+ _addTouchEventListeners() {
1276
+ for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {
1277
+ EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());
1278
+ }
1279
+ const endCallBack = () => {
1280
+ if (this._config.pause !== 'hover') {
1281
+ return;
1282
+ }
1283
+
1284
+ // If it's a touch-enabled device, mouseenter/leave are fired as
1285
+ // part of the mouse compatibility events on first tap - the carousel
1286
+ // would stop cycling until user tapped out of it;
1287
+ // here, we listen for touchend, explicitly pause the carousel
1288
+ // (as if it's the second time we tap on it, mouseenter compat event
1289
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
1290
+ // events to fire) we explicitly restart cycling
1291
+
1292
+ this.pause();
1293
+ if (this.touchTimeout) {
1294
+ clearTimeout(this.touchTimeout);
1295
+ }
1296
+ this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
1297
+ };
1298
+ const swipeConfig = {
1299
+ leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
1300
+ rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
1301
+ endCallback: endCallBack
1302
+ };
1303
+ this._swipeHelper = new Swipe(this._element, swipeConfig);
1304
+ }
1305
+ _keydown(event) {
1306
+ if (/input|textarea/i.test(event.target.tagName)) {
1307
+ return;
1308
+ }
1309
+ const direction = KEY_TO_DIRECTION[event.key];
1310
+ if (direction) {
1311
+ event.preventDefault();
1312
+ this._slide(this._directionToOrder(direction));
1313
+ }
1314
+ }
1315
+ _getItemIndex(element) {
1316
+ return this._getItems().indexOf(element);
1317
+ }
1318
+ _setActiveIndicatorElement(index) {
1319
+ if (!this._indicatorsElement) {
1320
+ return;
1321
+ }
1322
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
1323
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
1324
+ activeIndicator.removeAttribute('aria-current');
1325
+ const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
1326
+ if (newActiveIndicator) {
1327
+ newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);
1328
+ newActiveIndicator.setAttribute('aria-current', 'true');
1329
+ }
1330
+ }
1331
+ _updateInterval() {
1332
+ const element = this._activeElement || this._getActive();
1333
+ if (!element) {
1334
+ return;
1335
+ }
1336
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1337
+ this._config.interval = elementInterval || this._config.defaultInterval;
1338
+ }
1339
+ _slide(order, element = null) {
1340
+ if (this._isSliding) {
1341
+ return;
1342
+ }
1343
+ const activeElement = this._getActive();
1344
+ const isNext = order === ORDER_NEXT;
1345
+ const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
1346
+ if (nextElement === activeElement) {
1347
+ return;
1348
+ }
1349
+ const nextElementIndex = this._getItemIndex(nextElement);
1350
+ const triggerEvent = eventName => {
1351
+ return EventHandler.trigger(this._element, eventName, {
1352
+ relatedTarget: nextElement,
1353
+ direction: this._orderToDirection(order),
1354
+ from: this._getItemIndex(activeElement),
1355
+ to: nextElementIndex
1356
+ });
1357
+ };
1358
+ const slideEvent = triggerEvent(EVENT_SLIDE);
1359
+ if (slideEvent.defaultPrevented) {
1360
+ return;
1361
+ }
1362
+ if (!activeElement || !nextElement) {
1363
+ // Some weirdness is happening, so we bail
1364
+ // TODO: change tests that use empty divs to avoid this check
1365
+ return;
1366
+ }
1367
+ const isCycling = Boolean(this._interval);
1368
+ this.pause();
1369
+ this._isSliding = true;
1370
+ this._setActiveIndicatorElement(nextElementIndex);
1371
+ this._activeElement = nextElement;
1372
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
1373
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
1374
+ nextElement.classList.add(orderClassName);
1375
+ reflow(nextElement);
1376
+ activeElement.classList.add(directionalClassName);
1377
+ nextElement.classList.add(directionalClassName);
1378
+ const completeCallBack = () => {
1379
+ nextElement.classList.remove(directionalClassName, orderClassName);
1380
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1381
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1382
+ this._isSliding = false;
1383
+ triggerEvent(EVENT_SLID);
1384
+ };
1385
+ this._queueCallback(completeCallBack, activeElement, this._isAnimated());
1386
+ if (isCycling) {
1387
+ this.cycle();
1388
+ }
1389
+ }
1390
+ _isAnimated() {
1391
+ return this._element.classList.contains(CLASS_NAME_SLIDE);
1392
+ }
1393
+ _getActive() {
1394
+ return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1395
+ }
1396
+ _getItems() {
1397
+ return SelectorEngine.find(SELECTOR_ITEM, this._element);
1398
+ }
1399
+ _clearInterval() {
1400
+ if (this._interval) {
1401
+ clearInterval(this._interval);
1402
+ this._interval = null;
1403
+ }
1404
+ }
1405
+ _directionToOrder(direction) {
1406
+ if (isRTL()) {
1407
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
1408
+ }
1409
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
1410
+ }
1411
+ _orderToDirection(order) {
1412
+ if (isRTL()) {
1413
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
1414
+ }
1415
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
1416
+ }
1417
+
1418
+ // Static
1419
+ static jQueryInterface(config) {
1420
+ return this.each(function () {
1421
+ const data = Carousel.getOrCreateInstance(this, config);
1422
+ if (typeof config === 'number') {
1423
+ data.to(config);
1424
+ return;
1425
+ }
1426
+ if (typeof config === 'string') {
1427
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
1428
+ throw new TypeError(`No method named "${config}"`);
1429
+ }
1430
+ data[config]();
1431
+ }
1432
+ });
1433
+ }
1434
+ }
1435
+
1436
+ /**
1437
+ * Data API implementation
1438
+ */
1439
+
1440
+ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {
1441
+ const target = SelectorEngine.getElementFromSelector(this);
1442
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1443
+ return;
1444
+ }
1445
+ event.preventDefault();
1446
+ const carousel = Carousel.getOrCreateInstance(target);
1447
+ const slideIndex = this.getAttribute('data-bs-slide-to');
1448
+ if (slideIndex) {
1449
+ carousel.to(slideIndex);
1450
+ carousel._maybeEnableCycle();
1451
+ return;
1452
+ }
1453
+ if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
1454
+ carousel.next();
1455
+ carousel._maybeEnableCycle();
1456
+ return;
1457
+ }
1458
+ carousel.prev();
1459
+ carousel._maybeEnableCycle();
1460
+ });
1461
+ EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {
1462
+ const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1463
+ for (const carousel of carousels) {
1464
+ Carousel.getOrCreateInstance(carousel);
1465
+ }
1466
+ });
1467
+
1468
+ /**
1469
+ * jQuery
1470
+ */
1471
+
1472
+ defineJQueryPlugin(Carousel);
1473
+
1474
+ /**
1475
+ * --------------------------------------------------------------------------
1476
+ * Bootstrap collapse.js
1477
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1478
+ * --------------------------------------------------------------------------
1479
+ */
1480
+
1481
+
1482
+ /**
1483
+ * Constants
1484
+ */
1485
+
1486
+ const NAME$b = 'collapse';
1487
+ const DATA_KEY$7 = 'bs.collapse';
1488
+ const EVENT_KEY$7 = `.${DATA_KEY$7}`;
1489
+ const DATA_API_KEY$4 = '.data-api';
1490
+ const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;
1491
+ const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;
1492
+ const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;
1493
+ const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;
1494
+ const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
1495
+ const CLASS_NAME_SHOW$7 = 'show';
1496
+ const CLASS_NAME_COLLAPSE = 'collapse';
1497
+ const CLASS_NAME_COLLAPSING = 'collapsing';
1498
+ const CLASS_NAME_COLLAPSED = 'collapsed';
1499
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
1500
+ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
1501
+ const WIDTH = 'width';
1502
+ const HEIGHT = 'height';
1503
+ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
1504
+ const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
1505
+ const Default$a = {
1506
+ parent: null,
1507
+ toggle: true
1508
+ };
1509
+ const DefaultType$a = {
1510
+ parent: '(null|element)',
1511
+ toggle: 'boolean'
1512
+ };
1513
+
1514
+ /**
1515
+ * Class definition
1516
+ */
1517
+
1518
+ class Collapse extends BaseComponent {
1519
+ constructor(element, config) {
1520
+ super(element, config);
1521
+ this._isTransitioning = false;
1522
+ this._triggerArray = [];
1523
+ const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1524
+ for (const elem of toggleList) {
1525
+ const selector = SelectorEngine.getSelectorFromElement(elem);
1526
+ const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
1527
+ if (selector !== null && filterElement.length) {
1528
+ this._triggerArray.push(elem);
1529
+ }
1530
+ }
1531
+ this._initializeChildren();
1532
+ if (!this._config.parent) {
1533
+ this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
1534
+ }
1535
+ if (this._config.toggle) {
1536
+ this.toggle();
1537
+ }
1538
+ }
1539
+
1540
+ // Getters
1541
+ static get Default() {
1542
+ return Default$a;
1543
+ }
1544
+ static get DefaultType() {
1545
+ return DefaultType$a;
1546
+ }
1547
+ static get NAME() {
1548
+ return NAME$b;
1549
+ }
1550
+
1551
+ // Public
1552
+ toggle() {
1553
+ if (this._isShown()) {
1554
+ this.hide();
1555
+ } else {
1556
+ this.show();
1557
+ }
1558
+ }
1559
+ show() {
1560
+ if (this._isTransitioning || this._isShown()) {
1561
+ return;
1562
+ }
1563
+ let activeChildren = [];
1564
+
1565
+ // find active children
1566
+ if (this._config.parent) {
1567
+ activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {
1568
+ toggle: false
1569
+ }));
1570
+ }
1571
+ if (activeChildren.length && activeChildren[0]._isTransitioning) {
1572
+ return;
1573
+ }
1574
+ const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);
1575
+ if (startEvent.defaultPrevented) {
1576
+ return;
1577
+ }
1578
+ for (const activeInstance of activeChildren) {
1579
+ activeInstance.hide();
1580
+ }
1581
+ const dimension = this._getDimension();
1582
+ this._element.classList.remove(CLASS_NAME_COLLAPSE);
1583
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1584
+ this._element.style[dimension] = 0;
1585
+ this._addAriaAndCollapsedClass(this._triggerArray, true);
1586
+ this._isTransitioning = true;
1587
+ const complete = () => {
1588
+ this._isTransitioning = false;
1589
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
1590
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1591
+ this._element.style[dimension] = '';
1592
+ EventHandler.trigger(this._element, EVENT_SHOWN$6);
1593
+ };
1594
+ const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1595
+ const scrollSize = `scroll${capitalizedDimension}`;
1596
+ this._queueCallback(complete, this._element, true);
1597
+ this._element.style[dimension] = `${this._element[scrollSize]}px`;
1598
+ }
1599
+ hide() {
1600
+ if (this._isTransitioning || !this._isShown()) {
1601
+ return;
1602
+ }
1603
+ const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);
1604
+ if (startEvent.defaultPrevented) {
1605
+ return;
1606
+ }
1607
+ const dimension = this._getDimension();
1608
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
1609
+ reflow(this._element);
1610
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1611
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1612
+ for (const trigger of this._triggerArray) {
1613
+ const element = SelectorEngine.getElementFromSelector(trigger);
1614
+ if (element && !this._isShown(element)) {
1615
+ this._addAriaAndCollapsedClass([trigger], false);
1616
+ }
1617
+ }
1618
+ this._isTransitioning = true;
1619
+ const complete = () => {
1620
+ this._isTransitioning = false;
1621
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
1622
+ this._element.classList.add(CLASS_NAME_COLLAPSE);
1623
+ EventHandler.trigger(this._element, EVENT_HIDDEN$6);
1624
+ };
1625
+ this._element.style[dimension] = '';
1626
+ this._queueCallback(complete, this._element, true);
1627
+ }
1628
+
1629
+ // Private
1630
+ _isShown(element = this._element) {
1631
+ return element.classList.contains(CLASS_NAME_SHOW$7);
1632
+ }
1633
+ _configAfterMerge(config) {
1634
+ config.toggle = Boolean(config.toggle); // Coerce string values
1635
+ config.parent = getElement(config.parent);
1636
+ return config;
1637
+ }
1638
+ _getDimension() {
1639
+ return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
1640
+ }
1641
+ _initializeChildren() {
1642
+ if (!this._config.parent) {
1643
+ return;
1644
+ }
1645
+ const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
1646
+ for (const element of children) {
1647
+ const selected = SelectorEngine.getElementFromSelector(element);
1648
+ if (selected) {
1649
+ this._addAriaAndCollapsedClass([element], this._isShown(selected));
1650
+ }
1651
+ }
1652
+ }
1653
+ _getFirstLevelChildren(selector) {
1654
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
1655
+ // remove children if greater depth
1656
+ return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));
1657
+ }
1658
+ _addAriaAndCollapsedClass(triggerArray, isOpen) {
1659
+ if (!triggerArray.length) {
1660
+ return;
1661
+ }
1662
+ for (const element of triggerArray) {
1663
+ element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
1664
+ element.setAttribute('aria-expanded', isOpen);
1665
+ }
1666
+ }
1667
+
1668
+ // Static
1669
+ static jQueryInterface(config) {
1670
+ const _config = {};
1671
+ if (typeof config === 'string' && /show|hide/.test(config)) {
1672
+ _config.toggle = false;
1673
+ }
1674
+ return this.each(function () {
1675
+ const data = Collapse.getOrCreateInstance(this, _config);
1676
+ if (typeof config === 'string') {
1677
+ if (typeof data[config] === 'undefined') {
1678
+ throw new TypeError(`No method named "${config}"`);
1679
+ }
1680
+ data[config]();
1681
+ }
1682
+ });
1683
+ }
1684
+ }
1685
+
1686
+ /**
1687
+ * Data API implementation
1688
+ */
1689
+
1690
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
1691
+ // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1692
+ if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
1693
+ event.preventDefault();
1694
+ }
1695
+ for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
1696
+ Collapse.getOrCreateInstance(element, {
1697
+ toggle: false
1698
+ }).toggle();
1699
+ }
1700
+ });
1701
+
1702
+ /**
1703
+ * jQuery
1704
+ */
1705
+
1706
+ defineJQueryPlugin(Collapse);
1707
+
1708
+ /**
1709
+ * --------------------------------------------------------------------------
1710
+ * Bootstrap dropdown.js
1711
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1712
+ * --------------------------------------------------------------------------
1713
+ */
1714
+
1715
+
1716
+ /**
1717
+ * Constants
1718
+ */
1719
+
1720
+ const NAME$a = 'dropdown';
1721
+ const DATA_KEY$6 = 'bs.dropdown';
1722
+ const EVENT_KEY$6 = `.${DATA_KEY$6}`;
1723
+ const DATA_API_KEY$3 = '.data-api';
1724
+ const ESCAPE_KEY$2 = 'Escape';
1725
+ const TAB_KEY$1 = 'Tab';
1726
+ const ARROW_UP_KEY$1 = 'ArrowUp';
1727
+ const ARROW_DOWN_KEY$1 = 'ArrowDown';
1728
+ const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
1729
+
1730
+ const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;
1731
+ const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;
1732
+ const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;
1733
+ const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;
1734
+ const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
1735
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;
1736
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;
1737
+ const CLASS_NAME_SHOW$6 = 'show';
1738
+ const CLASS_NAME_DROPUP = 'dropup';
1739
+ const CLASS_NAME_DROPEND = 'dropend';
1740
+ const CLASS_NAME_DROPSTART = 'dropstart';
1741
+ const CLASS_NAME_DROPUP_CENTER = 'dropup-center';
1742
+ const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';
1743
+ const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';
1744
+ const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;
1745
+ const SELECTOR_MENU = '.dropdown-menu';
1746
+ const SELECTOR_NAVBAR = '.navbar';
1747
+ const SELECTOR_NAVBAR_NAV = '.navbar-nav';
1748
+ const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1749
+ const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
1750
+ const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
1751
+ const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
1752
+ const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
1753
+ const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
1754
+ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
1755
+ const PLACEMENT_TOPCENTER = 'top';
1756
+ const PLACEMENT_BOTTOMCENTER = 'bottom';
1757
+ const Default$9 = {
1758
+ autoClose: true,
1759
+ boundary: 'clippingParents',
1760
+ display: 'dynamic',
1761
+ offset: [0, 2],
1762
+ popperConfig: null,
1763
+ reference: 'toggle'
1764
+ };
1765
+ const DefaultType$9 = {
1766
+ autoClose: '(boolean|string)',
1767
+ boundary: '(string|element)',
1768
+ display: 'string',
1769
+ offset: '(array|string|function)',
1770
+ popperConfig: '(null|object|function)',
1771
+ reference: '(string|element|object)'
1772
+ };
1773
+
1774
+ /**
1775
+ * Class definition
1776
+ */
1777
+
1778
+ class Dropdown extends BaseComponent {
1779
+ constructor(element, config) {
1780
+ super(element, config);
1781
+ this._popper = null;
1782
+ this._parent = this._element.parentNode; // dropdown wrapper
1783
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
1784
+ this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
1785
+ this._inNavbar = this._detectNavbar();
1786
+ }
1787
+
1788
+ // Getters
1789
+ static get Default() {
1790
+ return Default$9;
1791
+ }
1792
+ static get DefaultType() {
1793
+ return DefaultType$9;
1794
+ }
1795
+ static get NAME() {
1796
+ return NAME$a;
1797
+ }
1798
+
1799
+ // Public
1800
+ toggle() {
1801
+ return this._isShown() ? this.hide() : this.show();
1802
+ }
1803
+ show() {
1804
+ if (isDisabled(this._element) || this._isShown()) {
1805
+ return;
1806
+ }
1807
+ const relatedTarget = {
1808
+ relatedTarget: this._element
1809
+ };
1810
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);
1811
+ if (showEvent.defaultPrevented) {
1812
+ return;
1813
+ }
1814
+ this._createPopper();
1815
+
1816
+ // If this is a touch-enabled device we add extra
1817
+ // empty mouseover listeners to the body's immediate children;
1818
+ // only needed because of broken event delegation on iOS
1819
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
1820
+ if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
1821
+ for (const element of [].concat(...document.body.children)) {
1822
+ EventHandler.on(element, 'mouseover', noop);
1823
+ }
1824
+ }
1825
+ this._element.focus();
1826
+ this._element.setAttribute('aria-expanded', true);
1827
+ this._menu.classList.add(CLASS_NAME_SHOW$6);
1828
+ this._element.classList.add(CLASS_NAME_SHOW$6);
1829
+ EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);
1830
+ }
1831
+ hide() {
1832
+ if (isDisabled(this._element) || !this._isShown()) {
1833
+ return;
1834
+ }
1835
+ const relatedTarget = {
1836
+ relatedTarget: this._element
1837
+ };
1838
+ this._completeHide(relatedTarget);
1839
+ }
1840
+ dispose() {
1841
+ if (this._popper) {
1842
+ this._popper.destroy();
1843
+ }
1844
+ super.dispose();
1845
+ }
1846
+ update() {
1847
+ this._inNavbar = this._detectNavbar();
1848
+ if (this._popper) {
1849
+ this._popper.update();
1850
+ }
1851
+ }
1852
+
1853
+ // Private
1854
+ _completeHide(relatedTarget) {
1855
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);
1856
+ if (hideEvent.defaultPrevented) {
1857
+ return;
1858
+ }
1859
+
1860
+ // If this is a touch-enabled device we remove the extra
1861
+ // empty mouseover listeners we added for iOS support
1862
+ if ('ontouchstart' in document.documentElement) {
1863
+ for (const element of [].concat(...document.body.children)) {
1864
+ EventHandler.off(element, 'mouseover', noop);
1865
+ }
1866
+ }
1867
+ if (this._popper) {
1868
+ this._popper.destroy();
1869
+ }
1870
+ this._menu.classList.remove(CLASS_NAME_SHOW$6);
1871
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
1872
+ this._element.setAttribute('aria-expanded', 'false');
1873
+ Manipulator.removeDataAttribute(this._menu, 'popper');
1874
+ EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
1875
+
1876
+ // Explicitly return focus to the trigger element
1877
+ this._element.focus();
1878
+ }
1879
+ _getConfig(config) {
1880
+ config = super._getConfig(config);
1881
+ if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
1882
+ // Popper virtual elements require a getBoundingClientRect method
1883
+ throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
1884
+ }
1885
+ return config;
1886
+ }
1887
+ _createPopper() {
1888
+ if (typeof Popper__namespace === 'undefined') {
1889
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
1890
+ }
1891
+ let referenceElement = this._element;
1892
+ if (this._config.reference === 'parent') {
1893
+ referenceElement = this._parent;
1894
+ } else if (isElement(this._config.reference)) {
1895
+ referenceElement = getElement(this._config.reference);
1896
+ } else if (typeof this._config.reference === 'object') {
1897
+ referenceElement = this._config.reference;
1898
+ }
1899
+ const popperConfig = this._getPopperConfig();
1900
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
1901
+ }
1902
+ _isShown() {
1903
+ return this._menu.classList.contains(CLASS_NAME_SHOW$6);
1904
+ }
1905
+ _getPlacement() {
1906
+ const parentDropdown = this._parent;
1907
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
1908
+ return PLACEMENT_RIGHT;
1909
+ }
1910
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
1911
+ return PLACEMENT_LEFT;
1912
+ }
1913
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
1914
+ return PLACEMENT_TOPCENTER;
1915
+ }
1916
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
1917
+ return PLACEMENT_BOTTOMCENTER;
1918
+ }
1919
+
1920
+ // We need to trim the value because custom properties can also include spaces
1921
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
1922
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
1923
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
1924
+ }
1925
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
1926
+ }
1927
+ _detectNavbar() {
1928
+ return this._element.closest(SELECTOR_NAVBAR) !== null;
1929
+ }
1930
+ _getOffset() {
1931
+ const {
1932
+ offset
1933
+ } = this._config;
1934
+ if (typeof offset === 'string') {
1935
+ return offset.split(',').map(value => Number.parseInt(value, 10));
1936
+ }
1937
+ if (typeof offset === 'function') {
1938
+ return popperData => offset(popperData, this._element);
1939
+ }
1940
+ return offset;
1941
+ }
1942
+ _getPopperConfig() {
1943
+ const defaultBsPopperConfig = {
1944
+ placement: this._getPlacement(),
1945
+ modifiers: [{
1946
+ name: 'preventOverflow',
1947
+ options: {
1948
+ boundary: this._config.boundary
1949
+ }
1950
+ }, {
1951
+ name: 'offset',
1952
+ options: {
1953
+ offset: this._getOffset()
1954
+ }
1955
+ }]
1956
+ };
1957
+
1958
+ // Disable Popper if we have a static display or Dropdown is in Navbar
1959
+ if (this._inNavbar || this._config.display === 'static') {
1960
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
1961
+ defaultBsPopperConfig.modifiers = [{
1962
+ name: 'applyStyles',
1963
+ enabled: false
1964
+ }];
1965
+ }
1966
+ return {
1967
+ ...defaultBsPopperConfig,
1968
+ ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
1969
+ };
1970
+ }
1971
+ _selectMenuItem({
1972
+ key,
1973
+ target
1974
+ }) {
1975
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));
1976
+ if (!items.length) {
1977
+ return;
1978
+ }
1979
+
1980
+ // if target isn't included in items (e.g. when expanding the dropdown)
1981
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
1982
+ getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();
1983
+ }
1984
+
1985
+ // Static
1986
+ static jQueryInterface(config) {
1987
+ return this.each(function () {
1988
+ const data = Dropdown.getOrCreateInstance(this, config);
1989
+ if (typeof config !== 'string') {
1990
+ return;
1991
+ }
1992
+ if (typeof data[config] === 'undefined') {
1993
+ throw new TypeError(`No method named "${config}"`);
1994
+ }
1995
+ data[config]();
1996
+ });
1997
+ }
1998
+ static clearMenus(event) {
1999
+ if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {
2000
+ return;
2001
+ }
2002
+ const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
2003
+ for (const toggle of openToggles) {
2004
+ const context = Dropdown.getInstance(toggle);
2005
+ if (!context || context._config.autoClose === false) {
2006
+ continue;
2007
+ }
2008
+ const composedPath = event.composedPath();
2009
+ const isMenuTarget = composedPath.includes(context._menu);
2010
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
2011
+ continue;
2012
+ }
2013
+
2014
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
2015
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
2016
+ continue;
2017
+ }
2018
+ const relatedTarget = {
2019
+ relatedTarget: context._element
2020
+ };
2021
+ if (event.type === 'click') {
2022
+ relatedTarget.clickEvent = event;
2023
+ }
2024
+ context._completeHide(relatedTarget);
2025
+ }
2026
+ }
2027
+ static dataApiKeydownHandler(event) {
2028
+ // If not an UP | DOWN | ESCAPE key => not a dropdown command
2029
+ // If input/textarea && if key is other than ESCAPE => not a dropdown command
2030
+
2031
+ const isInput = /input|textarea/i.test(event.target.tagName);
2032
+ const isEscapeEvent = event.key === ESCAPE_KEY$2;
2033
+ const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);
2034
+ if (!isUpOrDownEvent && !isEscapeEvent) {
2035
+ return;
2036
+ }
2037
+ if (isInput && !isEscapeEvent) {
2038
+ return;
2039
+ }
2040
+ event.preventDefault();
2041
+
2042
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
2043
+ const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
2044
+ const instance = Dropdown.getOrCreateInstance(getToggleButton);
2045
+ if (isUpOrDownEvent) {
2046
+ event.stopPropagation();
2047
+ instance.show();
2048
+ instance._selectMenuItem(event);
2049
+ return;
2050
+ }
2051
+ if (instance._isShown()) {
2052
+ // else is escape and we check if it is shown
2053
+ event.stopPropagation();
2054
+ instance.hide();
2055
+ getToggleButton.focus();
2056
+ }
2057
+ }
2058
+ }
2059
+
2060
+ /**
2061
+ * Data API implementation
2062
+ */
2063
+
2064
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
2065
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2066
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
2067
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2068
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
2069
+ event.preventDefault();
2070
+ Dropdown.getOrCreateInstance(this).toggle();
2071
+ });
2072
+
2073
+ /**
2074
+ * jQuery
2075
+ */
2076
+
2077
+ defineJQueryPlugin(Dropdown);
2078
+
2079
+ /**
2080
+ * --------------------------------------------------------------------------
2081
+ * Bootstrap util/backdrop.js
2082
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2083
+ * --------------------------------------------------------------------------
2084
+ */
2085
+
2086
+
2087
+ /**
2088
+ * Constants
2089
+ */
2090
+
2091
+ const NAME$9 = 'backdrop';
2092
+ const CLASS_NAME_FADE$4 = 'fade';
2093
+ const CLASS_NAME_SHOW$5 = 'show';
2094
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;
2095
+ const Default$8 = {
2096
+ className: 'modal-backdrop',
2097
+ clickCallback: null,
2098
+ isAnimated: false,
2099
+ isVisible: true,
2100
+ // if false, we use the backdrop helper without adding any element to the dom
2101
+ rootElement: 'body' // give the choice to place backdrop under different elements
2102
+ };
2103
+ const DefaultType$8 = {
2104
+ className: 'string',
2105
+ clickCallback: '(function|null)',
2106
+ isAnimated: 'boolean',
2107
+ isVisible: 'boolean',
2108
+ rootElement: '(element|string)'
2109
+ };
2110
+
2111
+ /**
2112
+ * Class definition
2113
+ */
2114
+
2115
+ class Backdrop extends Config {
2116
+ constructor(config) {
2117
+ super();
2118
+ this._config = this._getConfig(config);
2119
+ this._isAppended = false;
2120
+ this._element = null;
2121
+ }
2122
+
2123
+ // Getters
2124
+ static get Default() {
2125
+ return Default$8;
2126
+ }
2127
+ static get DefaultType() {
2128
+ return DefaultType$8;
2129
+ }
2130
+ static get NAME() {
2131
+ return NAME$9;
2132
+ }
2133
+
2134
+ // Public
2135
+ show(callback) {
2136
+ if (!this._config.isVisible) {
2137
+ execute(callback);
2138
+ return;
2139
+ }
2140
+ this._append();
2141
+ const element = this._getElement();
2142
+ if (this._config.isAnimated) {
2143
+ reflow(element);
2144
+ }
2145
+ element.classList.add(CLASS_NAME_SHOW$5);
2146
+ this._emulateAnimation(() => {
2147
+ execute(callback);
2148
+ });
2149
+ }
2150
+ hide(callback) {
2151
+ if (!this._config.isVisible) {
2152
+ execute(callback);
2153
+ return;
2154
+ }
2155
+ this._getElement().classList.remove(CLASS_NAME_SHOW$5);
2156
+ this._emulateAnimation(() => {
2157
+ this.dispose();
2158
+ execute(callback);
2159
+ });
2160
+ }
2161
+ dispose() {
2162
+ if (!this._isAppended) {
2163
+ return;
2164
+ }
2165
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
2166
+ this._element.remove();
2167
+ this._isAppended = false;
2168
+ }
2169
+
2170
+ // Private
2171
+ _getElement() {
2172
+ if (!this._element) {
2173
+ const backdrop = document.createElement('div');
2174
+ backdrop.className = this._config.className;
2175
+ if (this._config.isAnimated) {
2176
+ backdrop.classList.add(CLASS_NAME_FADE$4);
2177
+ }
2178
+ this._element = backdrop;
2179
+ }
2180
+ return this._element;
2181
+ }
2182
+ _configAfterMerge(config) {
2183
+ // use getElement() with the default "body" to get a fresh Element on each instantiation
2184
+ config.rootElement = getElement(config.rootElement);
2185
+ return config;
2186
+ }
2187
+ _append() {
2188
+ if (this._isAppended) {
2189
+ return;
2190
+ }
2191
+ const element = this._getElement();
2192
+ this._config.rootElement.append(element);
2193
+ EventHandler.on(element, EVENT_MOUSEDOWN, () => {
2194
+ execute(this._config.clickCallback);
2195
+ });
2196
+ this._isAppended = true;
2197
+ }
2198
+ _emulateAnimation(callback) {
2199
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
2200
+ }
2201
+ }
2202
+
2203
+ /**
2204
+ * --------------------------------------------------------------------------
2205
+ * Bootstrap util/focustrap.js
2206
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2207
+ * --------------------------------------------------------------------------
2208
+ */
2209
+
2210
+
2211
+ /**
2212
+ * Constants
2213
+ */
2214
+
2215
+ const NAME$8 = 'focustrap';
2216
+ const DATA_KEY$5 = 'bs.focustrap';
2217
+ const EVENT_KEY$5 = `.${DATA_KEY$5}`;
2218
+ const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;
2219
+ const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;
2220
+ const TAB_KEY = 'Tab';
2221
+ const TAB_NAV_FORWARD = 'forward';
2222
+ const TAB_NAV_BACKWARD = 'backward';
2223
+ const Default$7 = {
2224
+ autofocus: true,
2225
+ trapElement: null // The element to trap focus inside of
2226
+ };
2227
+ const DefaultType$7 = {
2228
+ autofocus: 'boolean',
2229
+ trapElement: 'element'
2230
+ };
2231
+
2232
+ /**
2233
+ * Class definition
2234
+ */
2235
+
2236
+ class FocusTrap extends Config {
2237
+ constructor(config) {
2238
+ super();
2239
+ this._config = this._getConfig(config);
2240
+ this._isActive = false;
2241
+ this._lastTabNavDirection = null;
2242
+ }
2243
+
2244
+ // Getters
2245
+ static get Default() {
2246
+ return Default$7;
2247
+ }
2248
+ static get DefaultType() {
2249
+ return DefaultType$7;
2250
+ }
2251
+ static get NAME() {
2252
+ return NAME$8;
2253
+ }
2254
+
2255
+ // Public
2256
+ activate() {
2257
+ if (this._isActive) {
2258
+ return;
2259
+ }
2260
+ if (this._config.autofocus) {
2261
+ this._config.trapElement.focus();
2262
+ }
2263
+ EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop
2264
+ EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));
2265
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
2266
+ this._isActive = true;
2267
+ }
2268
+ deactivate() {
2269
+ if (!this._isActive) {
2270
+ return;
2271
+ }
2272
+ this._isActive = false;
2273
+ EventHandler.off(document, EVENT_KEY$5);
2274
+ }
2275
+
2276
+ // Private
2277
+ _handleFocusin(event) {
2278
+ const {
2279
+ trapElement
2280
+ } = this._config;
2281
+ if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {
2282
+ return;
2283
+ }
2284
+ const elements = SelectorEngine.focusableChildren(trapElement);
2285
+ if (elements.length === 0) {
2286
+ trapElement.focus();
2287
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
2288
+ elements[elements.length - 1].focus();
2289
+ } else {
2290
+ elements[0].focus();
2291
+ }
2292
+ }
2293
+ _handleKeydown(event) {
2294
+ if (event.key !== TAB_KEY) {
2295
+ return;
2296
+ }
2297
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
2298
+ }
2299
+ }
2300
+
2301
+ /**
2302
+ * --------------------------------------------------------------------------
2303
+ * Bootstrap util/scrollBar.js
2304
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2305
+ * --------------------------------------------------------------------------
2306
+ */
2307
+
2308
+
2309
+ /**
2310
+ * Constants
2311
+ */
2312
+
2313
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2314
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
2315
+ const PROPERTY_PADDING = 'padding-right';
2316
+ const PROPERTY_MARGIN = 'margin-right';
2317
+
2318
+ /**
2319
+ * Class definition
2320
+ */
2321
+
2322
+ class ScrollBarHelper {
2323
+ constructor() {
2324
+ this._element = document.body;
2325
+ }
2326
+
2327
+ // Public
2328
+ getWidth() {
2329
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2330
+ const documentWidth = document.documentElement.clientWidth;
2331
+ return Math.abs(window.innerWidth - documentWidth);
2332
+ }
2333
+ hide() {
2334
+ const width = this.getWidth();
2335
+ this._disableOverFlow();
2336
+ // give padding to element to balance the hidden scrollbar width
2337
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2338
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2339
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2340
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
2341
+ }
2342
+ reset() {
2343
+ this._resetElementAttributes(this._element, 'overflow');
2344
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
2345
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
2346
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
2347
+ }
2348
+ isOverflowing() {
2349
+ return this.getWidth() > 0;
2350
+ }
2351
+
2352
+ // Private
2353
+ _disableOverFlow() {
2354
+ this._saveInitialAttribute(this._element, 'overflow');
2355
+ this._element.style.overflow = 'hidden';
2356
+ }
2357
+ _setElementAttributes(selector, styleProperty, callback) {
2358
+ const scrollbarWidth = this.getWidth();
2359
+ const manipulationCallBack = element => {
2360
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2361
+ return;
2362
+ }
2363
+ this._saveInitialAttribute(element, styleProperty);
2364
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
2365
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
2366
+ };
2367
+ this._applyManipulationCallback(selector, manipulationCallBack);
2368
+ }
2369
+ _saveInitialAttribute(element, styleProperty) {
2370
+ const actualValue = element.style.getPropertyValue(styleProperty);
2371
+ if (actualValue) {
2372
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
2373
+ }
2374
+ }
2375
+ _resetElementAttributes(selector, styleProperty) {
2376
+ const manipulationCallBack = element => {
2377
+ const value = Manipulator.getDataAttribute(element, styleProperty);
2378
+ // We only want to remove the property if the value is `null`; the value can also be zero
2379
+ if (value === null) {
2380
+ element.style.removeProperty(styleProperty);
2381
+ return;
2382
+ }
2383
+ Manipulator.removeDataAttribute(element, styleProperty);
2384
+ element.style.setProperty(styleProperty, value);
2385
+ };
2386
+ this._applyManipulationCallback(selector, manipulationCallBack);
2387
+ }
2388
+ _applyManipulationCallback(selector, callBack) {
2389
+ if (isElement(selector)) {
2390
+ callBack(selector);
2391
+ return;
2392
+ }
2393
+ for (const sel of SelectorEngine.find(selector, this._element)) {
2394
+ callBack(sel);
2395
+ }
2396
+ }
2397
+ }
2398
+
2399
+ /**
2400
+ * --------------------------------------------------------------------------
2401
+ * Bootstrap modal.js
2402
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2403
+ * --------------------------------------------------------------------------
2404
+ */
2405
+
2406
+
2407
+ /**
2408
+ * Constants
2409
+ */
2410
+
2411
+ const NAME$7 = 'modal';
2412
+ const DATA_KEY$4 = 'bs.modal';
2413
+ const EVENT_KEY$4 = `.${DATA_KEY$4}`;
2414
+ const DATA_API_KEY$2 = '.data-api';
2415
+ const ESCAPE_KEY$1 = 'Escape';
2416
+ const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;
2417
+ const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;
2418
+ const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;
2419
+ const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
2420
+ const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
2421
+ const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
2422
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
2423
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
2424
+ const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
2425
+ const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
2426
+ const CLASS_NAME_OPEN = 'modal-open';
2427
+ const CLASS_NAME_FADE$3 = 'fade';
2428
+ const CLASS_NAME_SHOW$4 = 'show';
2429
+ const CLASS_NAME_STATIC = 'modal-static';
2430
+ const OPEN_SELECTOR$1 = '.modal.show';
2431
+ const SELECTOR_DIALOG = '.modal-dialog';
2432
+ const SELECTOR_MODAL_BODY = '.modal-body';
2433
+ const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
2434
+ const Default$6 = {
2435
+ backdrop: true,
2436
+ focus: true,
2437
+ keyboard: true
2438
+ };
2439
+ const DefaultType$6 = {
2440
+ backdrop: '(boolean|string)',
2441
+ focus: 'boolean',
2442
+ keyboard: 'boolean'
2443
+ };
2444
+
2445
+ /**
2446
+ * Class definition
2447
+ */
2448
+
2449
+ class Modal extends BaseComponent {
2450
+ constructor(element, config) {
2451
+ super(element, config);
2452
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
2453
+ this._backdrop = this._initializeBackDrop();
2454
+ this._focustrap = this._initializeFocusTrap();
2455
+ this._isShown = false;
2456
+ this._isTransitioning = false;
2457
+ this._scrollBar = new ScrollBarHelper();
2458
+ this._addEventListeners();
2459
+ }
2460
+
2461
+ // Getters
2462
+ static get Default() {
2463
+ return Default$6;
2464
+ }
2465
+ static get DefaultType() {
2466
+ return DefaultType$6;
2467
+ }
2468
+ static get NAME() {
2469
+ return NAME$7;
2470
+ }
2471
+
2472
+ // Public
2473
+ toggle(relatedTarget) {
2474
+ return this._isShown ? this.hide() : this.show(relatedTarget);
2475
+ }
2476
+ show(relatedTarget) {
2477
+ if (this._isShown || this._isTransitioning) {
2478
+ return;
2479
+ }
2480
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {
2481
+ relatedTarget
2482
+ });
2483
+ if (showEvent.defaultPrevented) {
2484
+ return;
2485
+ }
2486
+ this._isShown = true;
2487
+ this._isTransitioning = true;
2488
+ this._scrollBar.hide();
2489
+ document.body.classList.add(CLASS_NAME_OPEN);
2490
+ this._adjustDialog();
2491
+ this._backdrop.show(() => this._showElement(relatedTarget));
2492
+ }
2493
+ hide() {
2494
+ if (!this._isShown || this._isTransitioning) {
2495
+ return;
2496
+ }
2497
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
2498
+ if (hideEvent.defaultPrevented) {
2499
+ return;
2500
+ }
2501
+ this._isShown = false;
2502
+ this._isTransitioning = true;
2503
+ this._focustrap.deactivate();
2504
+ this._element.classList.remove(CLASS_NAME_SHOW$4);
2505
+ this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
2506
+ }
2507
+ dispose() {
2508
+ EventHandler.off(window, EVENT_KEY$4);
2509
+ EventHandler.off(this._dialog, EVENT_KEY$4);
2510
+ this._backdrop.dispose();
2511
+ this._focustrap.deactivate();
2512
+ super.dispose();
2513
+ }
2514
+ handleUpdate() {
2515
+ this._adjustDialog();
2516
+ }
2517
+
2518
+ // Private
2519
+ _initializeBackDrop() {
2520
+ return new Backdrop({
2521
+ isVisible: Boolean(this._config.backdrop),
2522
+ // 'static' option will be translated to true, and booleans will keep their value,
2523
+ isAnimated: this._isAnimated()
2524
+ });
2525
+ }
2526
+ _initializeFocusTrap() {
2527
+ return new FocusTrap({
2528
+ trapElement: this._element
2529
+ });
2530
+ }
2531
+ _showElement(relatedTarget) {
2532
+ // try to append dynamic modal
2533
+ if (!document.body.contains(this._element)) {
2534
+ document.body.append(this._element);
2535
+ }
2536
+ this._element.style.display = 'block';
2537
+ this._element.removeAttribute('aria-hidden');
2538
+ this._element.setAttribute('aria-modal', true);
2539
+ this._element.setAttribute('role', 'dialog');
2540
+ this._element.scrollTop = 0;
2541
+ const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2542
+ if (modalBody) {
2543
+ modalBody.scrollTop = 0;
2544
+ }
2545
+ reflow(this._element);
2546
+ this._element.classList.add(CLASS_NAME_SHOW$4);
2547
+ const transitionComplete = () => {
2548
+ if (this._config.focus) {
2549
+ this._focustrap.activate();
2550
+ }
2551
+ this._isTransitioning = false;
2552
+ EventHandler.trigger(this._element, EVENT_SHOWN$4, {
2553
+ relatedTarget
2554
+ });
2555
+ };
2556
+ this._queueCallback(transitionComplete, this._dialog, this._isAnimated());
2557
+ }
2558
+ _addEventListeners() {
2559
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
2560
+ if (event.key !== ESCAPE_KEY$1) {
2561
+ return;
2562
+ }
2563
+ if (this._config.keyboard) {
2564
+ this.hide();
2565
+ return;
2566
+ }
2567
+ this._triggerBackdropTransition();
2568
+ });
2569
+ EventHandler.on(window, EVENT_RESIZE$1, () => {
2570
+ if (this._isShown && !this._isTransitioning) {
2571
+ this._adjustDialog();
2572
+ }
2573
+ });
2574
+ EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
2575
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
2576
+ EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
2577
+ if (this._element !== event.target || this._element !== event2.target) {
2578
+ return;
2579
+ }
2580
+ if (this._config.backdrop === 'static') {
2581
+ this._triggerBackdropTransition();
2582
+ return;
2583
+ }
2584
+ if (this._config.backdrop) {
2585
+ this.hide();
2586
+ }
2587
+ });
2588
+ });
2589
+ }
2590
+ _hideModal() {
2591
+ this._element.style.display = 'none';
2592
+ this._element.setAttribute('aria-hidden', true);
2593
+ this._element.removeAttribute('aria-modal');
2594
+ this._element.removeAttribute('role');
2595
+ this._isTransitioning = false;
2596
+ this._backdrop.hide(() => {
2597
+ document.body.classList.remove(CLASS_NAME_OPEN);
2598
+ this._resetAdjustments();
2599
+ this._scrollBar.reset();
2600
+ EventHandler.trigger(this._element, EVENT_HIDDEN$4);
2601
+ });
2602
+ }
2603
+ _isAnimated() {
2604
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
2605
+ }
2606
+ _triggerBackdropTransition() {
2607
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);
2608
+ if (hideEvent.defaultPrevented) {
2609
+ return;
2610
+ }
2611
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2612
+ const initialOverflowY = this._element.style.overflowY;
2613
+ // return if the following background transition hasn't yet completed
2614
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
2615
+ return;
2616
+ }
2617
+ if (!isModalOverflowing) {
2618
+ this._element.style.overflowY = 'hidden';
2619
+ }
2620
+ this._element.classList.add(CLASS_NAME_STATIC);
2621
+ this._queueCallback(() => {
2622
+ this._element.classList.remove(CLASS_NAME_STATIC);
2623
+ this._queueCallback(() => {
2624
+ this._element.style.overflowY = initialOverflowY;
2625
+ }, this._dialog);
2626
+ }, this._dialog);
2627
+ this._element.focus();
2628
+ }
2629
+
2630
+ /**
2631
+ * The following methods are used to handle overflowing modals
2632
+ */
2633
+
2634
+ _adjustDialog() {
2635
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2636
+ const scrollbarWidth = this._scrollBar.getWidth();
2637
+ const isBodyOverflowing = scrollbarWidth > 0;
2638
+ if (isBodyOverflowing && !isModalOverflowing) {
2639
+ const property = isRTL() ? 'paddingLeft' : 'paddingRight';
2640
+ this._element.style[property] = `${scrollbarWidth}px`;
2641
+ }
2642
+ if (!isBodyOverflowing && isModalOverflowing) {
2643
+ const property = isRTL() ? 'paddingRight' : 'paddingLeft';
2644
+ this._element.style[property] = `${scrollbarWidth}px`;
2645
+ }
2646
+ }
2647
+ _resetAdjustments() {
2648
+ this._element.style.paddingLeft = '';
2649
+ this._element.style.paddingRight = '';
2650
+ }
2651
+
2652
+ // Static
2653
+ static jQueryInterface(config, relatedTarget) {
2654
+ return this.each(function () {
2655
+ const data = Modal.getOrCreateInstance(this, config);
2656
+ if (typeof config !== 'string') {
2657
+ return;
2658
+ }
2659
+ if (typeof data[config] === 'undefined') {
2660
+ throw new TypeError(`No method named "${config}"`);
2661
+ }
2662
+ data[config](relatedTarget);
2663
+ });
2664
+ }
2665
+ }
2666
+
2667
+ /**
2668
+ * Data API implementation
2669
+ */
2670
+
2671
+ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
2672
+ const target = SelectorEngine.getElementFromSelector(this);
2673
+ if (['A', 'AREA'].includes(this.tagName)) {
2674
+ event.preventDefault();
2675
+ }
2676
+ EventHandler.one(target, EVENT_SHOW$4, showEvent => {
2677
+ if (showEvent.defaultPrevented) {
2678
+ // only register focus restorer if modal will actually get shown
2679
+ return;
2680
+ }
2681
+ EventHandler.one(target, EVENT_HIDDEN$4, () => {
2682
+ if (isVisible(this)) {
2683
+ this.focus();
2684
+ }
2685
+ });
2686
+ });
2687
+
2688
+ // avoid conflict when clicking modal toggler while another one is open
2689
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
2690
+ if (alreadyOpen) {
2691
+ Modal.getInstance(alreadyOpen).hide();
2692
+ }
2693
+ const data = Modal.getOrCreateInstance(target);
2694
+ data.toggle(this);
2695
+ });
2696
+ enableDismissTrigger(Modal);
2697
+
2698
+ /**
2699
+ * jQuery
2700
+ */
2701
+
2702
+ defineJQueryPlugin(Modal);
2703
+
2704
+ /**
2705
+ * --------------------------------------------------------------------------
2706
+ * Bootstrap offcanvas.js
2707
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2708
+ * --------------------------------------------------------------------------
2709
+ */
2710
+
2711
+
2712
+ /**
2713
+ * Constants
2714
+ */
2715
+
2716
+ const NAME$6 = 'offcanvas';
2717
+ const DATA_KEY$3 = 'bs.offcanvas';
2718
+ const EVENT_KEY$3 = `.${DATA_KEY$3}`;
2719
+ const DATA_API_KEY$1 = '.data-api';
2720
+ const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;
2721
+ const ESCAPE_KEY = 'Escape';
2722
+ const CLASS_NAME_SHOW$3 = 'show';
2723
+ const CLASS_NAME_SHOWING$1 = 'showing';
2724
+ const CLASS_NAME_HIDING = 'hiding';
2725
+ const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
2726
+ const OPEN_SELECTOR = '.offcanvas.show';
2727
+ const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;
2728
+ const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;
2729
+ const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;
2730
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;
2731
+ const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;
2732
+ const EVENT_RESIZE = `resize${EVENT_KEY$3}`;
2733
+ const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;
2734
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;
2735
+ const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
2736
+ const Default$5 = {
2737
+ backdrop: true,
2738
+ keyboard: true,
2739
+ scroll: false
2740
+ };
2741
+ const DefaultType$5 = {
2742
+ backdrop: '(boolean|string)',
2743
+ keyboard: 'boolean',
2744
+ scroll: 'boolean'
2745
+ };
2746
+
2747
+ /**
2748
+ * Class definition
2749
+ */
2750
+
2751
+ class Offcanvas extends BaseComponent {
2752
+ constructor(element, config) {
2753
+ super(element, config);
2754
+ this._isShown = false;
2755
+ this._backdrop = this._initializeBackDrop();
2756
+ this._focustrap = this._initializeFocusTrap();
2757
+ this._addEventListeners();
2758
+ }
2759
+
2760
+ // Getters
2761
+ static get Default() {
2762
+ return Default$5;
2763
+ }
2764
+ static get DefaultType() {
2765
+ return DefaultType$5;
2766
+ }
2767
+ static get NAME() {
2768
+ return NAME$6;
2769
+ }
2770
+
2771
+ // Public
2772
+ toggle(relatedTarget) {
2773
+ return this._isShown ? this.hide() : this.show(relatedTarget);
2774
+ }
2775
+ show(relatedTarget) {
2776
+ if (this._isShown) {
2777
+ return;
2778
+ }
2779
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
2780
+ relatedTarget
2781
+ });
2782
+ if (showEvent.defaultPrevented) {
2783
+ return;
2784
+ }
2785
+ this._isShown = true;
2786
+ this._backdrop.show();
2787
+ if (!this._config.scroll) {
2788
+ new ScrollBarHelper().hide();
2789
+ }
2790
+ this._element.setAttribute('aria-modal', true);
2791
+ this._element.setAttribute('role', 'dialog');
2792
+ this._element.classList.add(CLASS_NAME_SHOWING$1);
2793
+ const completeCallBack = () => {
2794
+ if (!this._config.scroll || this._config.backdrop) {
2795
+ this._focustrap.activate();
2796
+ }
2797
+ this._element.classList.add(CLASS_NAME_SHOW$3);
2798
+ this._element.classList.remove(CLASS_NAME_SHOWING$1);
2799
+ EventHandler.trigger(this._element, EVENT_SHOWN$3, {
2800
+ relatedTarget
2801
+ });
2802
+ };
2803
+ this._queueCallback(completeCallBack, this._element, true);
2804
+ }
2805
+ hide() {
2806
+ if (!this._isShown) {
2807
+ return;
2808
+ }
2809
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
2810
+ if (hideEvent.defaultPrevented) {
2811
+ return;
2812
+ }
2813
+ this._focustrap.deactivate();
2814
+ this._element.blur();
2815
+ this._isShown = false;
2816
+ this._element.classList.add(CLASS_NAME_HIDING);
2817
+ this._backdrop.hide();
2818
+ const completeCallback = () => {
2819
+ this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);
2820
+ this._element.removeAttribute('aria-modal');
2821
+ this._element.removeAttribute('role');
2822
+ if (!this._config.scroll) {
2823
+ new ScrollBarHelper().reset();
2824
+ }
2825
+ EventHandler.trigger(this._element, EVENT_HIDDEN$3);
2826
+ };
2827
+ this._queueCallback(completeCallback, this._element, true);
2828
+ }
2829
+ dispose() {
2830
+ this._backdrop.dispose();
2831
+ this._focustrap.deactivate();
2832
+ super.dispose();
2833
+ }
2834
+
2835
+ // Private
2836
+ _initializeBackDrop() {
2837
+ const clickCallback = () => {
2838
+ if (this._config.backdrop === 'static') {
2839
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2840
+ return;
2841
+ }
2842
+ this.hide();
2843
+ };
2844
+
2845
+ // 'static' option will be translated to true, and booleans will keep their value
2846
+ const isVisible = Boolean(this._config.backdrop);
2847
+ return new Backdrop({
2848
+ className: CLASS_NAME_BACKDROP,
2849
+ isVisible,
2850
+ isAnimated: true,
2851
+ rootElement: this._element.parentNode,
2852
+ clickCallback: isVisible ? clickCallback : null
2853
+ });
2854
+ }
2855
+ _initializeFocusTrap() {
2856
+ return new FocusTrap({
2857
+ trapElement: this._element
2858
+ });
2859
+ }
2860
+ _addEventListeners() {
2861
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
2862
+ if (event.key !== ESCAPE_KEY) {
2863
+ return;
2864
+ }
2865
+ if (this._config.keyboard) {
2866
+ this.hide();
2867
+ return;
2868
+ }
2869
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2870
+ });
2871
+ }
2872
+
2873
+ // Static
2874
+ static jQueryInterface(config) {
2875
+ return this.each(function () {
2876
+ const data = Offcanvas.getOrCreateInstance(this, config);
2877
+ if (typeof config !== 'string') {
2878
+ return;
2879
+ }
2880
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
2881
+ throw new TypeError(`No method named "${config}"`);
2882
+ }
2883
+ data[config](this);
2884
+ });
2885
+ }
2886
+ }
2887
+
2888
+ /**
2889
+ * Data API implementation
2890
+ */
2891
+
2892
+ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
2893
+ const target = SelectorEngine.getElementFromSelector(this);
2894
+ if (['A', 'AREA'].includes(this.tagName)) {
2895
+ event.preventDefault();
2896
+ }
2897
+ if (isDisabled(this)) {
2898
+ return;
2899
+ }
2900
+ EventHandler.one(target, EVENT_HIDDEN$3, () => {
2901
+ // focus on trigger when it is closed
2902
+ if (isVisible(this)) {
2903
+ this.focus();
2904
+ }
2905
+ });
2906
+
2907
+ // avoid conflict when clicking a toggler of an offcanvas, while another is open
2908
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
2909
+ if (alreadyOpen && alreadyOpen !== target) {
2910
+ Offcanvas.getInstance(alreadyOpen).hide();
2911
+ }
2912
+ const data = Offcanvas.getOrCreateInstance(target);
2913
+ data.toggle(this);
2914
+ });
2915
+ EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
2916
+ for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {
2917
+ Offcanvas.getOrCreateInstance(selector).show();
2918
+ }
2919
+ });
2920
+ EventHandler.on(window, EVENT_RESIZE, () => {
2921
+ for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {
2922
+ if (getComputedStyle(element).position !== 'fixed') {
2923
+ Offcanvas.getOrCreateInstance(element).hide();
2924
+ }
2925
+ }
2926
+ });
2927
+ enableDismissTrigger(Offcanvas);
2928
+
2929
+ /**
2930
+ * jQuery
2931
+ */
2932
+
2933
+ defineJQueryPlugin(Offcanvas);
2934
+
2935
+ /**
2936
+ * --------------------------------------------------------------------------
2937
+ * Bootstrap util/sanitizer.js
2938
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2939
+ * --------------------------------------------------------------------------
2940
+ */
2941
+
2942
+ // js-docs-start allow-list
2943
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
2944
+ const DefaultAllowlist = {
2945
+ // Global attributes allowed on any supplied element below.
2946
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
2947
+ a: ['target', 'href', 'title', 'rel'],
2948
+ area: [],
2949
+ b: [],
2950
+ br: [],
2951
+ col: [],
2952
+ code: [],
2953
+ dd: [],
2954
+ div: [],
2955
+ dl: [],
2956
+ dt: [],
2957
+ em: [],
2958
+ hr: [],
2959
+ h1: [],
2960
+ h2: [],
2961
+ h3: [],
2962
+ h4: [],
2963
+ h5: [],
2964
+ h6: [],
2965
+ i: [],
2966
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
2967
+ li: [],
2968
+ ol: [],
2969
+ p: [],
2970
+ pre: [],
2971
+ s: [],
2972
+ small: [],
2973
+ span: [],
2974
+ sub: [],
2975
+ sup: [],
2976
+ strong: [],
2977
+ u: [],
2978
+ ul: []
2979
+ };
2980
+ // js-docs-end allow-list
2981
+
2982
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
2983
+
2984
+ /**
2985
+ * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
2986
+ * contexts.
2987
+ *
2988
+ * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
2989
+ */
2990
+ const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
2991
+ const allowedAttribute = (attribute, allowedAttributeList) => {
2992
+ const attributeName = attribute.nodeName.toLowerCase();
2993
+ if (allowedAttributeList.includes(attributeName)) {
2994
+ if (uriAttributes.has(attributeName)) {
2995
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
2996
+ }
2997
+ return true;
2998
+ }
2999
+
3000
+ // Check if a regular expression validates the attribute.
3001
+ return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
3002
+ };
3003
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
3004
+ if (!unsafeHtml.length) {
3005
+ return unsafeHtml;
3006
+ }
3007
+ if (sanitizeFunction && typeof sanitizeFunction === 'function') {
3008
+ return sanitizeFunction(unsafeHtml);
3009
+ }
3010
+ const domParser = new window.DOMParser();
3011
+ const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3012
+ const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
3013
+ for (const element of elements) {
3014
+ const elementName = element.nodeName.toLowerCase();
3015
+ if (!Object.keys(allowList).includes(elementName)) {
3016
+ element.remove();
3017
+ continue;
3018
+ }
3019
+ const attributeList = [].concat(...element.attributes);
3020
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
3021
+ for (const attribute of attributeList) {
3022
+ if (!allowedAttribute(attribute, allowedAttributes)) {
3023
+ element.removeAttribute(attribute.nodeName);
3024
+ }
3025
+ }
3026
+ }
3027
+ return createdDocument.body.innerHTML;
3028
+ }
3029
+
3030
+ /**
3031
+ * --------------------------------------------------------------------------
3032
+ * Bootstrap util/template-factory.js
3033
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3034
+ * --------------------------------------------------------------------------
3035
+ */
3036
+
3037
+
3038
+ /**
3039
+ * Constants
3040
+ */
3041
+
3042
+ const NAME$5 = 'TemplateFactory';
3043
+ const Default$4 = {
3044
+ allowList: DefaultAllowlist,
3045
+ content: {},
3046
+ // { selector : text , selector2 : text2 , }
3047
+ extraClass: '',
3048
+ html: false,
3049
+ sanitize: true,
3050
+ sanitizeFn: null,
3051
+ template: '<div></div>'
3052
+ };
3053
+ const DefaultType$4 = {
3054
+ allowList: 'object',
3055
+ content: 'object',
3056
+ extraClass: '(string|function)',
3057
+ html: 'boolean',
3058
+ sanitize: 'boolean',
3059
+ sanitizeFn: '(null|function)',
3060
+ template: 'string'
3061
+ };
3062
+ const DefaultContentType = {
3063
+ entry: '(string|element|function|null)',
3064
+ selector: '(string|element)'
3065
+ };
3066
+
3067
+ /**
3068
+ * Class definition
3069
+ */
3070
+
3071
+ class TemplateFactory extends Config {
3072
+ constructor(config) {
3073
+ super();
3074
+ this._config = this._getConfig(config);
3075
+ }
3076
+
3077
+ // Getters
3078
+ static get Default() {
3079
+ return Default$4;
3080
+ }
3081
+ static get DefaultType() {
3082
+ return DefaultType$4;
3083
+ }
3084
+ static get NAME() {
3085
+ return NAME$5;
3086
+ }
3087
+
3088
+ // Public
3089
+ getContent() {
3090
+ return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);
3091
+ }
3092
+ hasContent() {
3093
+ return this.getContent().length > 0;
3094
+ }
3095
+ changeContent(content) {
3096
+ this._checkContent(content);
3097
+ this._config.content = {
3098
+ ...this._config.content,
3099
+ ...content
3100
+ };
3101
+ return this;
3102
+ }
3103
+ toHtml() {
3104
+ const templateWrapper = document.createElement('div');
3105
+ templateWrapper.innerHTML = this._maybeSanitize(this._config.template);
3106
+ for (const [selector, text] of Object.entries(this._config.content)) {
3107
+ this._setContent(templateWrapper, text, selector);
3108
+ }
3109
+ const template = templateWrapper.children[0];
3110
+ const extraClass = this._resolvePossibleFunction(this._config.extraClass);
3111
+ if (extraClass) {
3112
+ template.classList.add(...extraClass.split(' '));
3113
+ }
3114
+ return template;
3115
+ }
3116
+
3117
+ // Private
3118
+ _typeCheckConfig(config) {
3119
+ super._typeCheckConfig(config);
3120
+ this._checkContent(config.content);
3121
+ }
3122
+ _checkContent(arg) {
3123
+ for (const [selector, content] of Object.entries(arg)) {
3124
+ super._typeCheckConfig({
3125
+ selector,
3126
+ entry: content
3127
+ }, DefaultContentType);
3128
+ }
3129
+ }
3130
+ _setContent(template, content, selector) {
3131
+ const templateElement = SelectorEngine.findOne(selector, template);
3132
+ if (!templateElement) {
3133
+ return;
3134
+ }
3135
+ content = this._resolvePossibleFunction(content);
3136
+ if (!content) {
3137
+ templateElement.remove();
3138
+ return;
3139
+ }
3140
+ if (isElement(content)) {
3141
+ this._putElementInTemplate(getElement(content), templateElement);
3142
+ return;
3143
+ }
3144
+ if (this._config.html) {
3145
+ templateElement.innerHTML = this._maybeSanitize(content);
3146
+ return;
3147
+ }
3148
+ templateElement.textContent = content;
3149
+ }
3150
+ _maybeSanitize(arg) {
3151
+ return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
3152
+ }
3153
+ _resolvePossibleFunction(arg) {
3154
+ return execute(arg, [undefined, this]);
3155
+ }
3156
+ _putElementInTemplate(element, templateElement) {
3157
+ if (this._config.html) {
3158
+ templateElement.innerHTML = '';
3159
+ templateElement.append(element);
3160
+ return;
3161
+ }
3162
+ templateElement.textContent = element.textContent;
3163
+ }
3164
+ }
3165
+
3166
+ /**
3167
+ * --------------------------------------------------------------------------
3168
+ * Bootstrap tooltip.js
3169
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3170
+ * --------------------------------------------------------------------------
3171
+ */
3172
+
3173
+
3174
+ /**
3175
+ * Constants
3176
+ */
3177
+
3178
+ const NAME$4 = 'tooltip';
3179
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3180
+ const CLASS_NAME_FADE$2 = 'fade';
3181
+ const CLASS_NAME_MODAL = 'modal';
3182
+ const CLASS_NAME_SHOW$2 = 'show';
3183
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3184
+ const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
3185
+ const EVENT_MODAL_HIDE = 'hide.bs.modal';
3186
+ const TRIGGER_HOVER = 'hover';
3187
+ const TRIGGER_FOCUS = 'focus';
3188
+ const TRIGGER_CLICK = 'click';
3189
+ const TRIGGER_MANUAL = 'manual';
3190
+ const EVENT_HIDE$2 = 'hide';
3191
+ const EVENT_HIDDEN$2 = 'hidden';
3192
+ const EVENT_SHOW$2 = 'show';
3193
+ const EVENT_SHOWN$2 = 'shown';
3194
+ const EVENT_INSERTED = 'inserted';
3195
+ const EVENT_CLICK$1 = 'click';
3196
+ const EVENT_FOCUSIN$1 = 'focusin';
3197
+ const EVENT_FOCUSOUT$1 = 'focusout';
3198
+ const EVENT_MOUSEENTER = 'mouseenter';
3199
+ const EVENT_MOUSELEAVE = 'mouseleave';
3200
+ const AttachmentMap = {
3201
+ AUTO: 'auto',
3202
+ TOP: 'top',
3203
+ RIGHT: isRTL() ? 'left' : 'right',
3204
+ BOTTOM: 'bottom',
3205
+ LEFT: isRTL() ? 'right' : 'left'
3206
+ };
3207
+ const Default$3 = {
3208
+ allowList: DefaultAllowlist,
3209
+ animation: true,
3210
+ boundary: 'clippingParents',
3211
+ container: false,
3212
+ customClass: '',
3213
+ delay: 0,
3214
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
3215
+ html: false,
3216
+ offset: [0, 6],
3217
+ placement: 'top',
3218
+ popperConfig: null,
3219
+ sanitize: true,
3220
+ sanitizeFn: null,
3221
+ selector: false,
3222
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3223
+ title: '',
3224
+ trigger: 'hover focus'
3225
+ };
3226
+ const DefaultType$3 = {
3227
+ allowList: 'object',
3228
+ animation: 'boolean',
3229
+ boundary: '(string|element)',
3230
+ container: '(string|element|boolean)',
3231
+ customClass: '(string|function)',
3232
+ delay: '(number|object)',
3233
+ fallbackPlacements: 'array',
3234
+ html: 'boolean',
3235
+ offset: '(array|string|function)',
3236
+ placement: '(string|function)',
3237
+ popperConfig: '(null|object|function)',
3238
+ sanitize: 'boolean',
3239
+ sanitizeFn: '(null|function)',
3240
+ selector: '(string|boolean)',
3241
+ template: 'string',
3242
+ title: '(string|element|function)',
3243
+ trigger: 'string'
3244
+ };
3245
+
3246
+ /**
3247
+ * Class definition
3248
+ */
3249
+
3250
+ class Tooltip extends BaseComponent {
3251
+ constructor(element, config) {
3252
+ if (typeof Popper__namespace === 'undefined') {
3253
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
3254
+ }
3255
+ super(element, config);
3256
+
3257
+ // Private
3258
+ this._isEnabled = true;
3259
+ this._timeout = 0;
3260
+ this._isHovered = null;
3261
+ this._activeTrigger = {};
3262
+ this._popper = null;
3263
+ this._templateFactory = null;
3264
+ this._newContent = null;
3265
+
3266
+ // Protected
3267
+ this.tip = null;
3268
+ this._setListeners();
3269
+ if (!this._config.selector) {
3270
+ this._fixTitle();
3271
+ }
3272
+ }
3273
+
3274
+ // Getters
3275
+ static get Default() {
3276
+ return Default$3;
3277
+ }
3278
+ static get DefaultType() {
3279
+ return DefaultType$3;
3280
+ }
3281
+ static get NAME() {
3282
+ return NAME$4;
3283
+ }
3284
+
3285
+ // Public
3286
+ enable() {
3287
+ this._isEnabled = true;
3288
+ }
3289
+ disable() {
3290
+ this._isEnabled = false;
3291
+ }
3292
+ toggleEnabled() {
3293
+ this._isEnabled = !this._isEnabled;
3294
+ }
3295
+ toggle() {
3296
+ if (!this._isEnabled) {
3297
+ return;
3298
+ }
3299
+ if (this._isShown()) {
3300
+ this._leave();
3301
+ return;
3302
+ }
3303
+ this._enter();
3304
+ }
3305
+ dispose() {
3306
+ clearTimeout(this._timeout);
3307
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3308
+ if (this._element.getAttribute('data-bs-original-title')) {
3309
+ this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
3310
+ }
3311
+ this._disposePopper();
3312
+ super.dispose();
3313
+ }
3314
+ show() {
3315
+ if (this._element.style.display === 'none') {
3316
+ throw new Error('Please use show on visible elements');
3317
+ }
3318
+ if (!(this._isWithContent() && this._isEnabled)) {
3319
+ return;
3320
+ }
3321
+ const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));
3322
+ const shadowRoot = findShadowRoot(this._element);
3323
+ const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
3324
+ if (showEvent.defaultPrevented || !isInTheDom) {
3325
+ return;
3326
+ }
3327
+
3328
+ // TODO: v6 remove this or make it optional
3329
+ this._disposePopper();
3330
+ const tip = this._getTipElement();
3331
+ this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
3332
+ const {
3333
+ container
3334
+ } = this._config;
3335
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3336
+ container.append(tip);
3337
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
3338
+ }
3339
+ this._popper = this._createPopper(tip);
3340
+ tip.classList.add(CLASS_NAME_SHOW$2);
3341
+
3342
+ // If this is a touch-enabled device we add extra
3343
+ // empty mouseover listeners to the body's immediate children;
3344
+ // only needed because of broken event delegation on iOS
3345
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3346
+ if ('ontouchstart' in document.documentElement) {
3347
+ for (const element of [].concat(...document.body.children)) {
3348
+ EventHandler.on(element, 'mouseover', noop);
3349
+ }
3350
+ }
3351
+ const complete = () => {
3352
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
3353
+ if (this._isHovered === false) {
3354
+ this._leave();
3355
+ }
3356
+ this._isHovered = false;
3357
+ };
3358
+ this._queueCallback(complete, this.tip, this._isAnimated());
3359
+ }
3360
+ hide() {
3361
+ if (!this._isShown()) {
3362
+ return;
3363
+ }
3364
+ const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));
3365
+ if (hideEvent.defaultPrevented) {
3366
+ return;
3367
+ }
3368
+ const tip = this._getTipElement();
3369
+ tip.classList.remove(CLASS_NAME_SHOW$2);
3370
+
3371
+ // If this is a touch-enabled device we remove the extra
3372
+ // empty mouseover listeners we added for iOS support
3373
+ if ('ontouchstart' in document.documentElement) {
3374
+ for (const element of [].concat(...document.body.children)) {
3375
+ EventHandler.off(element, 'mouseover', noop);
3376
+ }
3377
+ }
3378
+ this._activeTrigger[TRIGGER_CLICK] = false;
3379
+ this._activeTrigger[TRIGGER_FOCUS] = false;
3380
+ this._activeTrigger[TRIGGER_HOVER] = false;
3381
+ this._isHovered = null; // it is a trick to support manual triggering
3382
+
3383
+ const complete = () => {
3384
+ if (this._isWithActiveTrigger()) {
3385
+ return;
3386
+ }
3387
+ if (!this._isHovered) {
3388
+ this._disposePopper();
3389
+ }
3390
+ this._element.removeAttribute('aria-describedby');
3391
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));
3392
+ };
3393
+ this._queueCallback(complete, this.tip, this._isAnimated());
3394
+ }
3395
+ update() {
3396
+ if (this._popper) {
3397
+ this._popper.update();
3398
+ }
3399
+ }
3400
+
3401
+ // Protected
3402
+ _isWithContent() {
3403
+ return Boolean(this._getTitle());
3404
+ }
3405
+ _getTipElement() {
3406
+ if (!this.tip) {
3407
+ this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
3408
+ }
3409
+ return this.tip;
3410
+ }
3411
+ _createTipElement(content) {
3412
+ const tip = this._getTemplateFactory(content).toHtml();
3413
+
3414
+ // TODO: remove this check in v6
3415
+ if (!tip) {
3416
+ return null;
3417
+ }
3418
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
3419
+ // TODO: v6 the following can be achieved with CSS only
3420
+ tip.classList.add(`bs-${this.constructor.NAME}-auto`);
3421
+ const tipId = getUID(this.constructor.NAME).toString();
3422
+ tip.setAttribute('id', tipId);
3423
+ if (this._isAnimated()) {
3424
+ tip.classList.add(CLASS_NAME_FADE$2);
3425
+ }
3426
+ return tip;
3427
+ }
3428
+ setContent(content) {
3429
+ this._newContent = content;
3430
+ if (this._isShown()) {
3431
+ this._disposePopper();
3432
+ this.show();
3433
+ }
3434
+ }
3435
+ _getTemplateFactory(content) {
3436
+ if (this._templateFactory) {
3437
+ this._templateFactory.changeContent(content);
3438
+ } else {
3439
+ this._templateFactory = new TemplateFactory({
3440
+ ...this._config,
3441
+ // the `content` var has to be after `this._config`
3442
+ // to override config.content in case of popover
3443
+ content,
3444
+ extraClass: this._resolvePossibleFunction(this._config.customClass)
3445
+ });
3446
+ }
3447
+ return this._templateFactory;
3448
+ }
3449
+ _getContentForTemplate() {
3450
+ return {
3451
+ [SELECTOR_TOOLTIP_INNER]: this._getTitle()
3452
+ };
3453
+ }
3454
+ _getTitle() {
3455
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
3456
+ }
3457
+
3458
+ // Private
3459
+ _initializeOnDelegatedTarget(event) {
3460
+ return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
3461
+ }
3462
+ _isAnimated() {
3463
+ return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);
3464
+ }
3465
+ _isShown() {
3466
+ return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
3467
+ }
3468
+ _createPopper(tip) {
3469
+ const placement = execute(this._config.placement, [this, tip, this._element]);
3470
+ const attachment = AttachmentMap[placement.toUpperCase()];
3471
+ return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
3472
+ }
3473
+ _getOffset() {
3474
+ const {
3475
+ offset
3476
+ } = this._config;
3477
+ if (typeof offset === 'string') {
3478
+ return offset.split(',').map(value => Number.parseInt(value, 10));
3479
+ }
3480
+ if (typeof offset === 'function') {
3481
+ return popperData => offset(popperData, this._element);
3482
+ }
3483
+ return offset;
3484
+ }
3485
+ _resolvePossibleFunction(arg) {
3486
+ return execute(arg, [this._element, this._element]);
3487
+ }
3488
+ _getPopperConfig(attachment) {
3489
+ const defaultBsPopperConfig = {
3490
+ placement: attachment,
3491
+ modifiers: [{
3492
+ name: 'flip',
3493
+ options: {
3494
+ fallbackPlacements: this._config.fallbackPlacements
3495
+ }
3496
+ }, {
3497
+ name: 'offset',
3498
+ options: {
3499
+ offset: this._getOffset()
3500
+ }
3501
+ }, {
3502
+ name: 'preventOverflow',
3503
+ options: {
3504
+ boundary: this._config.boundary
3505
+ }
3506
+ }, {
3507
+ name: 'arrow',
3508
+ options: {
3509
+ element: `.${this.constructor.NAME}-arrow`
3510
+ }
3511
+ }, {
3512
+ name: 'preSetPlacement',
3513
+ enabled: true,
3514
+ phase: 'beforeMain',
3515
+ fn: data => {
3516
+ // Pre-set Popper's placement attribute in order to read the arrow sizes properly.
3517
+ // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
3518
+ this._getTipElement().setAttribute('data-popper-placement', data.state.placement);
3519
+ }
3520
+ }]
3521
+ };
3522
+ return {
3523
+ ...defaultBsPopperConfig,
3524
+ ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
3525
+ };
3526
+ }
3527
+ _setListeners() {
3528
+ const triggers = this._config.trigger.split(' ');
3529
+ for (const trigger of triggers) {
3530
+ if (trigger === 'click') {
3531
+ EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
3532
+ const context = this._initializeOnDelegatedTarget(event);
3533
+ context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]);
3534
+ context.toggle();
3535
+ });
3536
+ } else if (trigger !== TRIGGER_MANUAL) {
3537
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
3538
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
3539
+ EventHandler.on(this._element, eventIn, this._config.selector, event => {
3540
+ const context = this._initializeOnDelegatedTarget(event);
3541
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3542
+ context._enter();
3543
+ });
3544
+ EventHandler.on(this._element, eventOut, this._config.selector, event => {
3545
+ const context = this._initializeOnDelegatedTarget(event);
3546
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
3547
+ context._leave();
3548
+ });
3549
+ }
3550
+ }
3551
+ this._hideModalHandler = () => {
3552
+ if (this._element) {
3553
+ this.hide();
3554
+ }
3555
+ };
3556
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3557
+ }
3558
+ _fixTitle() {
3559
+ const title = this._element.getAttribute('title');
3560
+ if (!title) {
3561
+ return;
3562
+ }
3563
+ if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
3564
+ this._element.setAttribute('aria-label', title);
3565
+ }
3566
+ this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
3567
+ this._element.removeAttribute('title');
3568
+ }
3569
+ _enter() {
3570
+ if (this._isShown() || this._isHovered) {
3571
+ this._isHovered = true;
3572
+ return;
3573
+ }
3574
+ this._isHovered = true;
3575
+ this._setTimeout(() => {
3576
+ if (this._isHovered) {
3577
+ this.show();
3578
+ }
3579
+ }, this._config.delay.show);
3580
+ }
3581
+ _leave() {
3582
+ if (this._isWithActiveTrigger()) {
3583
+ return;
3584
+ }
3585
+ this._isHovered = false;
3586
+ this._setTimeout(() => {
3587
+ if (!this._isHovered) {
3588
+ this.hide();
3589
+ }
3590
+ }, this._config.delay.hide);
3591
+ }
3592
+ _setTimeout(handler, timeout) {
3593
+ clearTimeout(this._timeout);
3594
+ this._timeout = setTimeout(handler, timeout);
3595
+ }
3596
+ _isWithActiveTrigger() {
3597
+ return Object.values(this._activeTrigger).includes(true);
3598
+ }
3599
+ _getConfig(config) {
3600
+ const dataAttributes = Manipulator.getDataAttributes(this._element);
3601
+ for (const dataAttribute of Object.keys(dataAttributes)) {
3602
+ if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
3603
+ delete dataAttributes[dataAttribute];
3604
+ }
3605
+ }
3606
+ config = {
3607
+ ...dataAttributes,
3608
+ ...(typeof config === 'object' && config ? config : {})
3609
+ };
3610
+ config = this._mergeConfigObj(config);
3611
+ config = this._configAfterMerge(config);
3612
+ this._typeCheckConfig(config);
3613
+ return config;
3614
+ }
3615
+ _configAfterMerge(config) {
3616
+ config.container = config.container === false ? document.body : getElement(config.container);
3617
+ if (typeof config.delay === 'number') {
3618
+ config.delay = {
3619
+ show: config.delay,
3620
+ hide: config.delay
3621
+ };
3622
+ }
3623
+ if (typeof config.title === 'number') {
3624
+ config.title = config.title.toString();
3625
+ }
3626
+ if (typeof config.content === 'number') {
3627
+ config.content = config.content.toString();
3628
+ }
3629
+ return config;
3630
+ }
3631
+ _getDelegateConfig() {
3632
+ const config = {};
3633
+ for (const [key, value] of Object.entries(this._config)) {
3634
+ if (this.constructor.Default[key] !== value) {
3635
+ config[key] = value;
3636
+ }
3637
+ }
3638
+ config.selector = false;
3639
+ config.trigger = 'manual';
3640
+
3641
+ // In the future can be replaced with:
3642
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
3643
+ // `Object.fromEntries(keysWithDifferentValues)`
3644
+ return config;
3645
+ }
3646
+ _disposePopper() {
3647
+ if (this._popper) {
3648
+ this._popper.destroy();
3649
+ this._popper = null;
3650
+ }
3651
+ if (this.tip) {
3652
+ this.tip.remove();
3653
+ this.tip = null;
3654
+ }
3655
+ }
3656
+
3657
+ // Static
3658
+ static jQueryInterface(config) {
3659
+ return this.each(function () {
3660
+ const data = Tooltip.getOrCreateInstance(this, config);
3661
+ if (typeof config !== 'string') {
3662
+ return;
3663
+ }
3664
+ if (typeof data[config] === 'undefined') {
3665
+ throw new TypeError(`No method named "${config}"`);
3666
+ }
3667
+ data[config]();
3668
+ });
3669
+ }
3670
+ }
3671
+
3672
+ /**
3673
+ * jQuery
3674
+ */
3675
+
3676
+ defineJQueryPlugin(Tooltip);
3677
+
3678
+ /**
3679
+ * --------------------------------------------------------------------------
3680
+ * Bootstrap popover.js
3681
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3682
+ * --------------------------------------------------------------------------
3683
+ */
3684
+
3685
+
3686
+ /**
3687
+ * Constants
3688
+ */
3689
+
3690
+ const NAME$3 = 'popover';
3691
+ const SELECTOR_TITLE = '.popover-header';
3692
+ const SELECTOR_CONTENT = '.popover-body';
3693
+ const Default$2 = {
3694
+ ...Tooltip.Default,
3695
+ content: '',
3696
+ offset: [0, 8],
3697
+ placement: 'right',
3698
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
3699
+ trigger: 'click'
3700
+ };
3701
+ const DefaultType$2 = {
3702
+ ...Tooltip.DefaultType,
3703
+ content: '(null|string|element|function)'
3704
+ };
3705
+
3706
+ /**
3707
+ * Class definition
3708
+ */
3709
+
3710
+ class Popover extends Tooltip {
3711
+ // Getters
3712
+ static get Default() {
3713
+ return Default$2;
3714
+ }
3715
+ static get DefaultType() {
3716
+ return DefaultType$2;
3717
+ }
3718
+ static get NAME() {
3719
+ return NAME$3;
3720
+ }
3721
+
3722
+ // Overrides
3723
+ _isWithContent() {
3724
+ return this._getTitle() || this._getContent();
3725
+ }
3726
+
3727
+ // Private
3728
+ _getContentForTemplate() {
3729
+ return {
3730
+ [SELECTOR_TITLE]: this._getTitle(),
3731
+ [SELECTOR_CONTENT]: this._getContent()
3732
+ };
3733
+ }
3734
+ _getContent() {
3735
+ return this._resolvePossibleFunction(this._config.content);
3736
+ }
3737
+
3738
+ // Static
3739
+ static jQueryInterface(config) {
3740
+ return this.each(function () {
3741
+ const data = Popover.getOrCreateInstance(this, config);
3742
+ if (typeof config !== 'string') {
3743
+ return;
3744
+ }
3745
+ if (typeof data[config] === 'undefined') {
3746
+ throw new TypeError(`No method named "${config}"`);
3747
+ }
3748
+ data[config]();
3749
+ });
3750
+ }
3751
+ }
3752
+
3753
+ /**
3754
+ * jQuery
3755
+ */
3756
+
3757
+ defineJQueryPlugin(Popover);
3758
+
3759
+ /**
3760
+ * --------------------------------------------------------------------------
3761
+ * Bootstrap scrollspy.js
3762
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3763
+ * --------------------------------------------------------------------------
3764
+ */
3765
+
3766
+
3767
+ /**
3768
+ * Constants
3769
+ */
3770
+
3771
+ const NAME$2 = 'scrollspy';
3772
+ const DATA_KEY$2 = 'bs.scrollspy';
3773
+ const EVENT_KEY$2 = `.${DATA_KEY$2}`;
3774
+ const DATA_API_KEY = '.data-api';
3775
+ const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
3776
+ const EVENT_CLICK = `click${EVENT_KEY$2}`;
3777
+ const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;
3778
+ const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
3779
+ const CLASS_NAME_ACTIVE$1 = 'active';
3780
+ const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
3781
+ const SELECTOR_TARGET_LINKS = '[href]';
3782
+ const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
3783
+ const SELECTOR_NAV_LINKS = '.nav-link';
3784
+ const SELECTOR_NAV_ITEMS = '.nav-item';
3785
+ const SELECTOR_LIST_ITEMS = '.list-group-item';
3786
+ const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;
3787
+ const SELECTOR_DROPDOWN = '.dropdown';
3788
+ const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
3789
+ const Default$1 = {
3790
+ offset: null,
3791
+ // TODO: v6 @deprecated, keep it for backwards compatibility reasons
3792
+ rootMargin: '0px 0px -25%',
3793
+ smoothScroll: false,
3794
+ target: null,
3795
+ threshold: [0.1, 0.5, 1]
3796
+ };
3797
+ const DefaultType$1 = {
3798
+ offset: '(number|null)',
3799
+ // TODO v6 @deprecated, keep it for backwards compatibility reasons
3800
+ rootMargin: 'string',
3801
+ smoothScroll: 'boolean',
3802
+ target: 'element',
3803
+ threshold: 'array'
3804
+ };
3805
+
3806
+ /**
3807
+ * Class definition
3808
+ */
3809
+
3810
+ class ScrollSpy extends BaseComponent {
3811
+ constructor(element, config) {
3812
+ super(element, config);
3813
+
3814
+ // this._element is the observablesContainer and config.target the menu links wrapper
3815
+ this._targetLinks = new Map();
3816
+ this._observableSections = new Map();
3817
+ this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;
3818
+ this._activeTarget = null;
3819
+ this._observer = null;
3820
+ this._previousScrollData = {
3821
+ visibleEntryTop: 0,
3822
+ parentScrollTop: 0
3823
+ };
3824
+ this.refresh(); // initialize
3825
+ }
3826
+
3827
+ // Getters
3828
+ static get Default() {
3829
+ return Default$1;
3830
+ }
3831
+ static get DefaultType() {
3832
+ return DefaultType$1;
3833
+ }
3834
+ static get NAME() {
3835
+ return NAME$2;
3836
+ }
3837
+
3838
+ // Public
3839
+ refresh() {
3840
+ this._initializeTargetsAndObservables();
3841
+ this._maybeEnableSmoothScroll();
3842
+ if (this._observer) {
3843
+ this._observer.disconnect();
3844
+ } else {
3845
+ this._observer = this._getNewObserver();
3846
+ }
3847
+ for (const section of this._observableSections.values()) {
3848
+ this._observer.observe(section);
3849
+ }
3850
+ }
3851
+ dispose() {
3852
+ this._observer.disconnect();
3853
+ super.dispose();
3854
+ }
3855
+
3856
+ // Private
3857
+ _configAfterMerge(config) {
3858
+ // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
3859
+ config.target = getElement(config.target) || document.body;
3860
+
3861
+ // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
3862
+ config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
3863
+ if (typeof config.threshold === 'string') {
3864
+ config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
3865
+ }
3866
+ return config;
3867
+ }
3868
+ _maybeEnableSmoothScroll() {
3869
+ if (!this._config.smoothScroll) {
3870
+ return;
3871
+ }
3872
+
3873
+ // unregister any previous listeners
3874
+ EventHandler.off(this._config.target, EVENT_CLICK);
3875
+ EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {
3876
+ const observableSection = this._observableSections.get(event.target.hash);
3877
+ if (observableSection) {
3878
+ event.preventDefault();
3879
+ const root = this._rootElement || window;
3880
+ const height = observableSection.offsetTop - this._element.offsetTop;
3881
+ if (root.scrollTo) {
3882
+ root.scrollTo({
3883
+ top: height,
3884
+ behavior: 'smooth'
3885
+ });
3886
+ return;
3887
+ }
3888
+
3889
+ // Chrome 60 doesn't support `scrollTo`
3890
+ root.scrollTop = height;
3891
+ }
3892
+ });
3893
+ }
3894
+ _getNewObserver() {
3895
+ const options = {
3896
+ root: this._rootElement,
3897
+ threshold: this._config.threshold,
3898
+ rootMargin: this._config.rootMargin
3899
+ };
3900
+ return new IntersectionObserver(entries => this._observerCallback(entries), options);
3901
+ }
3902
+
3903
+ // The logic of selection
3904
+ _observerCallback(entries) {
3905
+ const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);
3906
+ const activate = entry => {
3907
+ this._previousScrollData.visibleEntryTop = entry.target.offsetTop;
3908
+ this._process(targetElement(entry));
3909
+ };
3910
+ const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;
3911
+ const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;
3912
+ this._previousScrollData.parentScrollTop = parentScrollTop;
3913
+ for (const entry of entries) {
3914
+ if (!entry.isIntersecting) {
3915
+ this._activeTarget = null;
3916
+ this._clearActiveClass(targetElement(entry));
3917
+ continue;
3918
+ }
3919
+ const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;
3920
+ // if we are scrolling down, pick the bigger offsetTop
3921
+ if (userScrollsDown && entryIsLowerThanPrevious) {
3922
+ activate(entry);
3923
+ // if parent isn't scrolled, let's keep the first visible item, breaking the iteration
3924
+ if (!parentScrollTop) {
3925
+ return;
3926
+ }
3927
+ continue;
3928
+ }
3929
+
3930
+ // if we are scrolling up, pick the smallest offsetTop
3931
+ if (!userScrollsDown && !entryIsLowerThanPrevious) {
3932
+ activate(entry);
3933
+ }
3934
+ }
3935
+ }
3936
+ _initializeTargetsAndObservables() {
3937
+ this._targetLinks = new Map();
3938
+ this._observableSections = new Map();
3939
+ const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);
3940
+ for (const anchor of targetLinks) {
3941
+ // ensure that the anchor has an id and is not disabled
3942
+ if (!anchor.hash || isDisabled(anchor)) {
3943
+ continue;
3944
+ }
3945
+ const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
3946
+
3947
+ // ensure that the observableSection exists & is visible
3948
+ if (isVisible(observableSection)) {
3949
+ this._targetLinks.set(decodeURI(anchor.hash), anchor);
3950
+ this._observableSections.set(anchor.hash, observableSection);
3951
+ }
3952
+ }
3953
+ }
3954
+ _process(target) {
3955
+ if (this._activeTarget === target) {
3956
+ return;
3957
+ }
3958
+ this._clearActiveClass(this._config.target);
3959
+ this._activeTarget = target;
3960
+ target.classList.add(CLASS_NAME_ACTIVE$1);
3961
+ this._activateParents(target);
3962
+ EventHandler.trigger(this._element, EVENT_ACTIVATE, {
3963
+ relatedTarget: target
3964
+ });
3965
+ }
3966
+ _activateParents(target) {
3967
+ // Activate dropdown parents
3968
+ if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
3969
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);
3970
+ return;
3971
+ }
3972
+ for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {
3973
+ // Set triggered links parents as active
3974
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
3975
+ for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {
3976
+ item.classList.add(CLASS_NAME_ACTIVE$1);
3977
+ }
3978
+ }
3979
+ }
3980
+ _clearActiveClass(parent) {
3981
+ parent.classList.remove(CLASS_NAME_ACTIVE$1);
3982
+ const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);
3983
+ for (const node of activeNodes) {
3984
+ node.classList.remove(CLASS_NAME_ACTIVE$1);
3985
+ }
3986
+ }
3987
+
3988
+ // Static
3989
+ static jQueryInterface(config) {
3990
+ return this.each(function () {
3991
+ const data = ScrollSpy.getOrCreateInstance(this, config);
3992
+ if (typeof config !== 'string') {
3993
+ return;
3994
+ }
3995
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
3996
+ throw new TypeError(`No method named "${config}"`);
3997
+ }
3998
+ data[config]();
3999
+ });
4000
+ }
4001
+ }
4002
+
4003
+ /**
4004
+ * Data API implementation
4005
+ */
4006
+
4007
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
4008
+ for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {
4009
+ ScrollSpy.getOrCreateInstance(spy);
4010
+ }
4011
+ });
4012
+
4013
+ /**
4014
+ * jQuery
4015
+ */
4016
+
4017
+ defineJQueryPlugin(ScrollSpy);
4018
+
4019
+ /**
4020
+ * --------------------------------------------------------------------------
4021
+ * Bootstrap tab.js
4022
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4023
+ * --------------------------------------------------------------------------
4024
+ */
4025
+
4026
+
4027
+ /**
4028
+ * Constants
4029
+ */
4030
+
4031
+ const NAME$1 = 'tab';
4032
+ const DATA_KEY$1 = 'bs.tab';
4033
+ const EVENT_KEY$1 = `.${DATA_KEY$1}`;
4034
+ const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
4035
+ const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
4036
+ const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
4037
+ const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
4038
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;
4039
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;
4040
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;
4041
+ const ARROW_LEFT_KEY = 'ArrowLeft';
4042
+ const ARROW_RIGHT_KEY = 'ArrowRight';
4043
+ const ARROW_UP_KEY = 'ArrowUp';
4044
+ const ARROW_DOWN_KEY = 'ArrowDown';
4045
+ const HOME_KEY = 'Home';
4046
+ const END_KEY = 'End';
4047
+ const CLASS_NAME_ACTIVE = 'active';
4048
+ const CLASS_NAME_FADE$1 = 'fade';
4049
+ const CLASS_NAME_SHOW$1 = 'show';
4050
+ const CLASS_DROPDOWN = 'dropdown';
4051
+ const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4052
+ const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
4053
+ const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`;
4054
+ const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
4055
+ const SELECTOR_OUTER = '.nav-item, .list-group-item';
4056
+ const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
4057
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
4058
+ const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
4059
+ const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
4060
+
4061
+ /**
4062
+ * Class definition
4063
+ */
4064
+
4065
+ class Tab extends BaseComponent {
4066
+ constructor(element) {
4067
+ super(element);
4068
+ this._parent = this._element.closest(SELECTOR_TAB_PANEL);
4069
+ if (!this._parent) {
4070
+ return;
4071
+ // TODO: should throw exception in v6
4072
+ // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
4073
+ }
4074
+
4075
+ // Set up initial aria attributes
4076
+ this._setInitialAttributes(this._parent, this._getChildren());
4077
+ EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
4078
+ }
4079
+
4080
+ // Getters
4081
+ static get NAME() {
4082
+ return NAME$1;
4083
+ }
4084
+
4085
+ // Public
4086
+ show() {
4087
+ // Shows this elem and deactivate the active sibling if exists
4088
+ const innerElem = this._element;
4089
+ if (this._elemIsActive(innerElem)) {
4090
+ return;
4091
+ }
4092
+
4093
+ // Search for active tab on same parent to deactivate it
4094
+ const active = this._getActiveElem();
4095
+ const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {
4096
+ relatedTarget: innerElem
4097
+ }) : null;
4098
+ const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {
4099
+ relatedTarget: active
4100
+ });
4101
+ if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
4102
+ return;
4103
+ }
4104
+ this._deactivate(active, innerElem);
4105
+ this._activate(innerElem, active);
4106
+ }
4107
+
4108
+ // Private
4109
+ _activate(element, relatedElem) {
4110
+ if (!element) {
4111
+ return;
4112
+ }
4113
+ element.classList.add(CLASS_NAME_ACTIVE);
4114
+ this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
4115
+
4116
+ const complete = () => {
4117
+ if (element.getAttribute('role') !== 'tab') {
4118
+ element.classList.add(CLASS_NAME_SHOW$1);
4119
+ return;
4120
+ }
4121
+ element.removeAttribute('tabindex');
4122
+ element.setAttribute('aria-selected', true);
4123
+ this._toggleDropDown(element, true);
4124
+ EventHandler.trigger(element, EVENT_SHOWN$1, {
4125
+ relatedTarget: relatedElem
4126
+ });
4127
+ };
4128
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4129
+ }
4130
+ _deactivate(element, relatedElem) {
4131
+ if (!element) {
4132
+ return;
4133
+ }
4134
+ element.classList.remove(CLASS_NAME_ACTIVE);
4135
+ element.blur();
4136
+ this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
4137
+
4138
+ const complete = () => {
4139
+ if (element.getAttribute('role') !== 'tab') {
4140
+ element.classList.remove(CLASS_NAME_SHOW$1);
4141
+ return;
4142
+ }
4143
+ element.setAttribute('aria-selected', false);
4144
+ element.setAttribute('tabindex', '-1');
4145
+ this._toggleDropDown(element, false);
4146
+ EventHandler.trigger(element, EVENT_HIDDEN$1, {
4147
+ relatedTarget: relatedElem
4148
+ });
4149
+ };
4150
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4151
+ }
4152
+ _keydown(event) {
4153
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
4154
+ return;
4155
+ }
4156
+ event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
4157
+ event.preventDefault();
4158
+ const children = this._getChildren().filter(element => !isDisabled(element));
4159
+ let nextActiveElement;
4160
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
4161
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
4162
+ } else {
4163
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
4164
+ nextActiveElement = getNextActiveElement(children, event.target, isNext, true);
4165
+ }
4166
+ if (nextActiveElement) {
4167
+ nextActiveElement.focus({
4168
+ preventScroll: true
4169
+ });
4170
+ Tab.getOrCreateInstance(nextActiveElement).show();
4171
+ }
4172
+ }
4173
+ _getChildren() {
4174
+ // collection of inner elements
4175
+ return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);
4176
+ }
4177
+ _getActiveElem() {
4178
+ return this._getChildren().find(child => this._elemIsActive(child)) || null;
4179
+ }
4180
+ _setInitialAttributes(parent, children) {
4181
+ this._setAttributeIfNotExists(parent, 'role', 'tablist');
4182
+ for (const child of children) {
4183
+ this._setInitialAttributesOnChild(child);
4184
+ }
4185
+ }
4186
+ _setInitialAttributesOnChild(child) {
4187
+ child = this._getInnerElement(child);
4188
+ const isActive = this._elemIsActive(child);
4189
+ const outerElem = this._getOuterElement(child);
4190
+ child.setAttribute('aria-selected', isActive);
4191
+ if (outerElem !== child) {
4192
+ this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
4193
+ }
4194
+ if (!isActive) {
4195
+ child.setAttribute('tabindex', '-1');
4196
+ }
4197
+ this._setAttributeIfNotExists(child, 'role', 'tab');
4198
+
4199
+ // set attributes to the related panel too
4200
+ this._setInitialAttributesOnTargetPanel(child);
4201
+ }
4202
+ _setInitialAttributesOnTargetPanel(child) {
4203
+ const target = SelectorEngine.getElementFromSelector(child);
4204
+ if (!target) {
4205
+ return;
4206
+ }
4207
+ this._setAttributeIfNotExists(target, 'role', 'tabpanel');
4208
+ if (child.id) {
4209
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
4210
+ }
4211
+ }
4212
+ _toggleDropDown(element, open) {
4213
+ const outerElem = this._getOuterElement(element);
4214
+ if (!outerElem.classList.contains(CLASS_DROPDOWN)) {
4215
+ return;
4216
+ }
4217
+ const toggle = (selector, className) => {
4218
+ const element = SelectorEngine.findOne(selector, outerElem);
4219
+ if (element) {
4220
+ element.classList.toggle(className, open);
4221
+ }
4222
+ };
4223
+ toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
4224
+ toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
4225
+ outerElem.setAttribute('aria-expanded', open);
4226
+ }
4227
+ _setAttributeIfNotExists(element, attribute, value) {
4228
+ if (!element.hasAttribute(attribute)) {
4229
+ element.setAttribute(attribute, value);
4230
+ }
4231
+ }
4232
+ _elemIsActive(elem) {
4233
+ return elem.classList.contains(CLASS_NAME_ACTIVE);
4234
+ }
4235
+
4236
+ // Try to get the inner element (usually the .nav-link)
4237
+ _getInnerElement(elem) {
4238
+ return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);
4239
+ }
4240
+
4241
+ // Try to get the outer element (usually the .nav-item)
4242
+ _getOuterElement(elem) {
4243
+ return elem.closest(SELECTOR_OUTER) || elem;
4244
+ }
4245
+
4246
+ // Static
4247
+ static jQueryInterface(config) {
4248
+ return this.each(function () {
4249
+ const data = Tab.getOrCreateInstance(this);
4250
+ if (typeof config !== 'string') {
4251
+ return;
4252
+ }
4253
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
4254
+ throw new TypeError(`No method named "${config}"`);
4255
+ }
4256
+ data[config]();
4257
+ });
4258
+ }
4259
+ }
4260
+
4261
+ /**
4262
+ * Data API implementation
4263
+ */
4264
+
4265
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
4266
+ if (['A', 'AREA'].includes(this.tagName)) {
4267
+ event.preventDefault();
4268
+ }
4269
+ if (isDisabled(this)) {
4270
+ return;
4271
+ }
4272
+ Tab.getOrCreateInstance(this).show();
4273
+ });
4274
+
4275
+ /**
4276
+ * Initialize on focus
4277
+ */
4278
+ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
4279
+ for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {
4280
+ Tab.getOrCreateInstance(element);
4281
+ }
4282
+ });
4283
+ /**
4284
+ * jQuery
4285
+ */
4286
+
4287
+ defineJQueryPlugin(Tab);
4288
+
4289
+ /**
4290
+ * --------------------------------------------------------------------------
4291
+ * Bootstrap toast.js
4292
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4293
+ * --------------------------------------------------------------------------
4294
+ */
4295
+
4296
+
4297
+ /**
4298
+ * Constants
4299
+ */
4300
+
4301
+ const NAME = 'toast';
4302
+ const DATA_KEY = 'bs.toast';
4303
+ const EVENT_KEY = `.${DATA_KEY}`;
4304
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
4305
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
4306
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
4307
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
4308
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
4309
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
4310
+ const EVENT_SHOW = `show${EVENT_KEY}`;
4311
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
4312
+ const CLASS_NAME_FADE = 'fade';
4313
+ const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
4314
+ const CLASS_NAME_SHOW = 'show';
4315
+ const CLASS_NAME_SHOWING = 'showing';
4316
+ const DefaultType = {
4317
+ animation: 'boolean',
4318
+ autohide: 'boolean',
4319
+ delay: 'number'
4320
+ };
4321
+ const Default = {
4322
+ animation: true,
4323
+ autohide: true,
4324
+ delay: 5000
4325
+ };
4326
+
4327
+ /**
4328
+ * Class definition
4329
+ */
4330
+
4331
+ class Toast extends BaseComponent {
4332
+ constructor(element, config) {
4333
+ super(element, config);
4334
+ this._timeout = null;
4335
+ this._hasMouseInteraction = false;
4336
+ this._hasKeyboardInteraction = false;
4337
+ this._setListeners();
4338
+ }
4339
+
4340
+ // Getters
4341
+ static get Default() {
4342
+ return Default;
4343
+ }
4344
+ static get DefaultType() {
4345
+ return DefaultType;
4346
+ }
4347
+ static get NAME() {
4348
+ return NAME;
4349
+ }
4350
+
4351
+ // Public
4352
+ show() {
4353
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
4354
+ if (showEvent.defaultPrevented) {
4355
+ return;
4356
+ }
4357
+ this._clearTimeout();
4358
+ if (this._config.animation) {
4359
+ this._element.classList.add(CLASS_NAME_FADE);
4360
+ }
4361
+ const complete = () => {
4362
+ this._element.classList.remove(CLASS_NAME_SHOWING);
4363
+ EventHandler.trigger(this._element, EVENT_SHOWN);
4364
+ this._maybeScheduleHide();
4365
+ };
4366
+ this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
4367
+ reflow(this._element);
4368
+ this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);
4369
+ this._queueCallback(complete, this._element, this._config.animation);
4370
+ }
4371
+ hide() {
4372
+ if (!this.isShown()) {
4373
+ return;
4374
+ }
4375
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
4376
+ if (hideEvent.defaultPrevented) {
4377
+ return;
4378
+ }
4379
+ const complete = () => {
4380
+ this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
4381
+ this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);
4382
+ EventHandler.trigger(this._element, EVENT_HIDDEN);
4383
+ };
4384
+ this._element.classList.add(CLASS_NAME_SHOWING);
4385
+ this._queueCallback(complete, this._element, this._config.animation);
4386
+ }
4387
+ dispose() {
4388
+ this._clearTimeout();
4389
+ if (this.isShown()) {
4390
+ this._element.classList.remove(CLASS_NAME_SHOW);
4391
+ }
4392
+ super.dispose();
4393
+ }
4394
+ isShown() {
4395
+ return this._element.classList.contains(CLASS_NAME_SHOW);
4396
+ }
4397
+
4398
+ // Private
4399
+ _maybeScheduleHide() {
4400
+ if (!this._config.autohide) {
4401
+ return;
4402
+ }
4403
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
4404
+ return;
4405
+ }
4406
+ this._timeout = setTimeout(() => {
4407
+ this.hide();
4408
+ }, this._config.delay);
4409
+ }
4410
+ _onInteraction(event, isInteracting) {
4411
+ switch (event.type) {
4412
+ case 'mouseover':
4413
+ case 'mouseout':
4414
+ {
4415
+ this._hasMouseInteraction = isInteracting;
4416
+ break;
4417
+ }
4418
+ case 'focusin':
4419
+ case 'focusout':
4420
+ {
4421
+ this._hasKeyboardInteraction = isInteracting;
4422
+ break;
4423
+ }
4424
+ }
4425
+ if (isInteracting) {
4426
+ this._clearTimeout();
4427
+ return;
4428
+ }
4429
+ const nextElement = event.relatedTarget;
4430
+ if (this._element === nextElement || this._element.contains(nextElement)) {
4431
+ return;
4432
+ }
4433
+ this._maybeScheduleHide();
4434
+ }
4435
+ _setListeners() {
4436
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
4437
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
4438
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
4439
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
4440
+ }
4441
+ _clearTimeout() {
4442
+ clearTimeout(this._timeout);
4443
+ this._timeout = null;
4444
+ }
4445
+
4446
+ // Static
4447
+ static jQueryInterface(config) {
4448
+ return this.each(function () {
4449
+ const data = Toast.getOrCreateInstance(this, config);
4450
+ if (typeof config === 'string') {
4451
+ if (typeof data[config] === 'undefined') {
4452
+ throw new TypeError(`No method named "${config}"`);
4453
+ }
4454
+ data[config](this);
4455
+ }
4456
+ });
4457
+ }
4458
+ }
4459
+
4460
+ /**
4461
+ * Data API implementation
4462
+ */
4463
+
4464
+ enableDismissTrigger(Toast);
4465
+
4466
+ /**
4467
+ * jQuery
4468
+ */
4469
+
4470
+ defineJQueryPlugin(Toast);
4471
+
4472
+ /**
4473
+ * --------------------------------------------------------------------------
4474
+ * Bootstrap index.umd.js
4475
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4476
+ * --------------------------------------------------------------------------
4477
+ */
4478
+
4479
+ const index_umd = {
4480
+ Alert,
4481
+ Button,
4482
+ Carousel,
4483
+ Collapse,
4484
+ Dropdown,
4485
+ Modal,
4486
+ Offcanvas,
4487
+ Popover,
4488
+ ScrollSpy,
4489
+ Tab,
4490
+ Toast,
4491
+ Tooltip
4492
+ };
4493
+
4494
+ return index_umd;
4495
+
4496
+ }));
4497
+ //# sourceMappingURL=bootstrap.js.map