@easyjur/design-system 1.0.0

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.
@@ -0,0 +1,3812 @@
1
+ var R = "top", Y = "bottom", F = "right", V = "left", De = "auto", Wt = [R, Y, F, V], Et = "start", kt = "end", vn = "clippingParents", us = "viewport", Lt = "popper", En = "reference", Je = /* @__PURE__ */ Wt.reduce(function(s, t) {
2
+ return s.concat([t + "-" + Et, t + "-" + kt]);
3
+ }, []), fs = /* @__PURE__ */ [].concat(Wt, [De]).reduce(function(s, t) {
4
+ return s.concat([t, t + "-" + Et, t + "-" + kt]);
5
+ }, []), bn = "beforeRead", yn = "read", An = "afterRead", Tn = "beforeMain", wn = "main", Sn = "afterMain", Cn = "beforeWrite", On = "write", Dn = "afterWrite", Ln = [bn, yn, An, Tn, wn, Sn, Cn, On, Dn];
6
+ function Z(s) {
7
+ return s ? (s.nodeName || "").toLowerCase() : null;
8
+ }
9
+ function B(s) {
10
+ if (s == null)
11
+ return window;
12
+ if (s.toString() !== "[object Window]") {
13
+ var t = s.ownerDocument;
14
+ return t && t.defaultView || window;
15
+ }
16
+ return s;
17
+ }
18
+ function bt(s) {
19
+ var t = B(s).Element;
20
+ return s instanceof t || s instanceof Element;
21
+ }
22
+ function j(s) {
23
+ var t = B(s).HTMLElement;
24
+ return s instanceof t || s instanceof HTMLElement;
25
+ }
26
+ function hs(s) {
27
+ if (typeof ShadowRoot > "u")
28
+ return !1;
29
+ var t = B(s).ShadowRoot;
30
+ return s instanceof t || s instanceof ShadowRoot;
31
+ }
32
+ function Ii(s) {
33
+ var t = s.state;
34
+ Object.keys(t.elements).forEach(function(e) {
35
+ var n = t.styles[e] || {}, i = t.attributes[e] || {}, r = t.elements[e];
36
+ !j(r) || !Z(r) || (Object.assign(r.style, n), Object.keys(i).forEach(function(o) {
37
+ var l = i[o];
38
+ l === !1 ? r.removeAttribute(o) : r.setAttribute(o, l === !0 ? "" : l);
39
+ }));
40
+ });
41
+ }
42
+ function Mi(s) {
43
+ var t = s.state, e = {
44
+ popper: {
45
+ position: t.options.strategy,
46
+ left: "0",
47
+ top: "0",
48
+ margin: "0"
49
+ },
50
+ arrow: {
51
+ position: "absolute"
52
+ },
53
+ reference: {}
54
+ };
55
+ return Object.assign(t.elements.popper.style, e.popper), t.styles = e, t.elements.arrow && Object.assign(t.elements.arrow.style, e.arrow), function() {
56
+ Object.keys(t.elements).forEach(function(n) {
57
+ var i = t.elements[n], r = t.attributes[n] || {}, o = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : e[n]), l = o.reduce(function(c, u) {
58
+ return c[u] = "", c;
59
+ }, {});
60
+ !j(i) || !Z(i) || (Object.assign(i.style, l), Object.keys(r).forEach(function(c) {
61
+ i.removeAttribute(c);
62
+ }));
63
+ });
64
+ };
65
+ }
66
+ const Nn = {
67
+ name: "applyStyles",
68
+ enabled: !0,
69
+ phase: "write",
70
+ fn: Ii,
71
+ effect: Mi,
72
+ requires: ["computeStyles"]
73
+ };
74
+ function J(s) {
75
+ return s.split("-")[0];
76
+ }
77
+ var vt = Math.max, be = Math.min, Pt = Math.round;
78
+ function Ze() {
79
+ var s = navigator.userAgentData;
80
+ return s != null && s.brands && Array.isArray(s.brands) ? s.brands.map(function(t) {
81
+ return t.brand + "/" + t.version;
82
+ }).join(" ") : navigator.userAgent;
83
+ }
84
+ function $n() {
85
+ return !/^((?!chrome|android).)*safari/i.test(Ze());
86
+ }
87
+ function xt(s, t, e) {
88
+ t === void 0 && (t = !1), e === void 0 && (e = !1);
89
+ var n = s.getBoundingClientRect(), i = 1, r = 1;
90
+ t && j(s) && (i = s.offsetWidth > 0 && Pt(n.width) / s.offsetWidth || 1, r = s.offsetHeight > 0 && Pt(n.height) / s.offsetHeight || 1);
91
+ var o = bt(s) ? B(s) : window, l = o.visualViewport, c = !$n() && e, u = (n.left + (c && l ? l.offsetLeft : 0)) / i, a = (n.top + (c && l ? l.offsetTop : 0)) / r, d = n.width / i, h = n.height / r;
92
+ return {
93
+ width: d,
94
+ height: h,
95
+ top: a,
96
+ right: u + d,
97
+ bottom: a + h,
98
+ left: u,
99
+ x: u,
100
+ y: a
101
+ };
102
+ }
103
+ function ps(s) {
104
+ var t = xt(s), e = s.offsetWidth, n = s.offsetHeight;
105
+ return Math.abs(t.width - e) <= 1 && (e = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
106
+ x: s.offsetLeft,
107
+ y: s.offsetTop,
108
+ width: e,
109
+ height: n
110
+ };
111
+ }
112
+ function In(s, t) {
113
+ var e = t.getRootNode && t.getRootNode();
114
+ if (s.contains(t))
115
+ return !0;
116
+ if (e && hs(e)) {
117
+ var n = t;
118
+ do {
119
+ if (n && s.isSameNode(n))
120
+ return !0;
121
+ n = n.parentNode || n.host;
122
+ } while (n);
123
+ }
124
+ return !1;
125
+ }
126
+ function st(s) {
127
+ return B(s).getComputedStyle(s);
128
+ }
129
+ function ki(s) {
130
+ return ["table", "td", "th"].indexOf(Z(s)) >= 0;
131
+ }
132
+ function ct(s) {
133
+ return ((bt(s) ? s.ownerDocument : (
134
+ // $FlowFixMe[prop-missing]
135
+ s.document
136
+ )) || window.document).documentElement;
137
+ }
138
+ function Le(s) {
139
+ return Z(s) === "html" ? s : (
140
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
141
+ // $FlowFixMe[incompatible-return]
142
+ // $FlowFixMe[prop-missing]
143
+ s.assignedSlot || // step into the shadow DOM of the parent of a slotted node
144
+ s.parentNode || // DOM Element detected
145
+ (hs(s) ? s.host : null) || // ShadowRoot detected
146
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
147
+ ct(s)
148
+ );
149
+ }
150
+ function Ms(s) {
151
+ return !j(s) || // https://github.com/popperjs/popper-core/issues/837
152
+ st(s).position === "fixed" ? null : s.offsetParent;
153
+ }
154
+ function Pi(s) {
155
+ var t = /firefox/i.test(Ze()), e = /Trident/i.test(Ze());
156
+ if (e && j(s)) {
157
+ var n = st(s);
158
+ if (n.position === "fixed")
159
+ return null;
160
+ }
161
+ var i = Le(s);
162
+ for (hs(i) && (i = i.host); j(i) && ["html", "body"].indexOf(Z(i)) < 0; ) {
163
+ var r = st(i);
164
+ if (r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].indexOf(r.willChange) !== -1 || t && r.willChange === "filter" || t && r.filter && r.filter !== "none")
165
+ return i;
166
+ i = i.parentNode;
167
+ }
168
+ return null;
169
+ }
170
+ function Qt(s) {
171
+ for (var t = B(s), e = Ms(s); e && ki(e) && st(e).position === "static"; )
172
+ e = Ms(e);
173
+ return e && (Z(e) === "html" || Z(e) === "body" && st(e).position === "static") ? t : e || Pi(s) || t;
174
+ }
175
+ function _s(s) {
176
+ return ["top", "bottom"].indexOf(s) >= 0 ? "x" : "y";
177
+ }
178
+ function zt(s, t, e) {
179
+ return vt(s, be(t, e));
180
+ }
181
+ function xi(s, t, e) {
182
+ var n = zt(s, t, e);
183
+ return n > e ? e : n;
184
+ }
185
+ function Mn() {
186
+ return {
187
+ top: 0,
188
+ right: 0,
189
+ bottom: 0,
190
+ left: 0
191
+ };
192
+ }
193
+ function kn(s) {
194
+ return Object.assign({}, Mn(), s);
195
+ }
196
+ function Pn(s, t) {
197
+ return t.reduce(function(e, n) {
198
+ return e[n] = s, e;
199
+ }, {});
200
+ }
201
+ var Ri = function(t, e) {
202
+ return t = typeof t == "function" ? t(Object.assign({}, e.rects, {
203
+ placement: e.placement
204
+ })) : t, kn(typeof t != "number" ? t : Pn(t, Wt));
205
+ };
206
+ function Vi(s) {
207
+ var t, e = s.state, n = s.name, i = s.options, r = e.elements.arrow, o = e.modifiersData.popperOffsets, l = J(e.placement), c = _s(l), u = [V, F].indexOf(l) >= 0, a = u ? "height" : "width";
208
+ if (!(!r || !o)) {
209
+ var d = Ri(i.padding, e), h = ps(r), _ = c === "y" ? R : V, S = c === "y" ? Y : F, p = e.rects.reference[a] + e.rects.reference[c] - o[c] - e.rects.popper[a], m = o[c] - e.rects.reference[c], g = Qt(r), v = g ? c === "y" ? g.clientHeight || 0 : g.clientWidth || 0 : 0, D = p / 2 - m / 2, y = d[_], T = v - h[a] - d[S], C = v / 2 - h[a] / 2 + D, E = zt(y, C, T), A = c;
210
+ e.modifiersData[n] = (t = {}, t[A] = E, t.centerOffset = E - C, t);
211
+ }
212
+ }
213
+ function Hi(s) {
214
+ var t = s.state, e = s.options, n = e.element, i = n === void 0 ? "[data-popper-arrow]" : n;
215
+ i != null && (typeof i == "string" && (i = t.elements.popper.querySelector(i), !i) || In(t.elements.popper, i) && (t.elements.arrow = i));
216
+ }
217
+ const xn = {
218
+ name: "arrow",
219
+ enabled: !0,
220
+ phase: "main",
221
+ fn: Vi,
222
+ effect: Hi,
223
+ requires: ["popperOffsets"],
224
+ requiresIfExists: ["preventOverflow"]
225
+ };
226
+ function Rt(s) {
227
+ return s.split("-")[1];
228
+ }
229
+ var Wi = {
230
+ top: "auto",
231
+ right: "auto",
232
+ bottom: "auto",
233
+ left: "auto"
234
+ };
235
+ function Yi(s, t) {
236
+ var e = s.x, n = s.y, i = t.devicePixelRatio || 1;
237
+ return {
238
+ x: Pt(e * i) / i || 0,
239
+ y: Pt(n * i) / i || 0
240
+ };
241
+ }
242
+ function ks(s) {
243
+ var t, e = s.popper, n = s.popperRect, i = s.placement, r = s.variation, o = s.offsets, l = s.position, c = s.gpuAcceleration, u = s.adaptive, a = s.roundOffsets, d = s.isFixed, h = o.x, _ = h === void 0 ? 0 : h, S = o.y, p = S === void 0 ? 0 : S, m = typeof a == "function" ? a({
244
+ x: _,
245
+ y: p
246
+ }) : {
247
+ x: _,
248
+ y: p
249
+ };
250
+ _ = m.x, p = m.y;
251
+ var g = o.hasOwnProperty("x"), v = o.hasOwnProperty("y"), D = V, y = R, T = window;
252
+ if (u) {
253
+ var C = Qt(e), E = "clientHeight", A = "clientWidth";
254
+ if (C === B(e) && (C = ct(e), st(C).position !== "static" && l === "absolute" && (E = "scrollHeight", A = "scrollWidth")), C = C, i === R || (i === V || i === F) && r === kt) {
255
+ y = Y;
256
+ var w = d && C === T && T.visualViewport ? T.visualViewport.height : (
257
+ // $FlowFixMe[prop-missing]
258
+ C[E]
259
+ );
260
+ p -= w - n.height, p *= c ? 1 : -1;
261
+ }
262
+ if (i === V || (i === R || i === Y) && r === kt) {
263
+ D = F;
264
+ var O = d && C === T && T.visualViewport ? T.visualViewport.width : (
265
+ // $FlowFixMe[prop-missing]
266
+ C[A]
267
+ );
268
+ _ -= O - n.width, _ *= c ? 1 : -1;
269
+ }
270
+ }
271
+ var L = Object.assign({
272
+ position: l
273
+ }, u && Wi), M = a === !0 ? Yi({
274
+ x: _,
275
+ y: p
276
+ }, B(e)) : {
277
+ x: _,
278
+ y: p
279
+ };
280
+ if (_ = M.x, p = M.y, c) {
281
+ var $;
282
+ return Object.assign({}, L, ($ = {}, $[y] = v ? "0" : "", $[D] = g ? "0" : "", $.transform = (T.devicePixelRatio || 1) <= 1 ? "translate(" + _ + "px, " + p + "px)" : "translate3d(" + _ + "px, " + p + "px, 0)", $));
283
+ }
284
+ return Object.assign({}, L, (t = {}, t[y] = v ? p + "px" : "", t[D] = g ? _ + "px" : "", t.transform = "", t));
285
+ }
286
+ function Fi(s) {
287
+ var t = s.state, e = s.options, n = e.gpuAcceleration, i = n === void 0 ? !0 : n, r = e.adaptive, o = r === void 0 ? !0 : r, l = e.roundOffsets, c = l === void 0 ? !0 : l, u = {
288
+ placement: J(t.placement),
289
+ variation: Rt(t.placement),
290
+ popper: t.elements.popper,
291
+ popperRect: t.rects.popper,
292
+ gpuAcceleration: i,
293
+ isFixed: t.options.strategy === "fixed"
294
+ };
295
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, ks(Object.assign({}, u, {
296
+ offsets: t.modifiersData.popperOffsets,
297
+ position: t.options.strategy,
298
+ adaptive: o,
299
+ roundOffsets: c
300
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, ks(Object.assign({}, u, {
301
+ offsets: t.modifiersData.arrow,
302
+ position: "absolute",
303
+ adaptive: !1,
304
+ roundOffsets: c
305
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
306
+ "data-popper-placement": t.placement
307
+ });
308
+ }
309
+ const Rn = {
310
+ name: "computeStyles",
311
+ enabled: !0,
312
+ phase: "beforeWrite",
313
+ fn: Fi,
314
+ data: {}
315
+ };
316
+ var de = {
317
+ passive: !0
318
+ };
319
+ function Bi(s) {
320
+ var t = s.state, e = s.instance, n = s.options, i = n.scroll, r = i === void 0 ? !0 : i, o = n.resize, l = o === void 0 ? !0 : o, c = B(t.elements.popper), u = [].concat(t.scrollParents.reference, t.scrollParents.popper);
321
+ return r && u.forEach(function(a) {
322
+ a.addEventListener("scroll", e.update, de);
323
+ }), l && c.addEventListener("resize", e.update, de), function() {
324
+ r && u.forEach(function(a) {
325
+ a.removeEventListener("scroll", e.update, de);
326
+ }), l && c.removeEventListener("resize", e.update, de);
327
+ };
328
+ }
329
+ const Vn = {
330
+ name: "eventListeners",
331
+ enabled: !0,
332
+ phase: "write",
333
+ fn: function() {
334
+ },
335
+ effect: Bi,
336
+ data: {}
337
+ };
338
+ var ji = {
339
+ left: "right",
340
+ right: "left",
341
+ bottom: "top",
342
+ top: "bottom"
343
+ };
344
+ function ge(s) {
345
+ return s.replace(/left|right|bottom|top/g, function(t) {
346
+ return ji[t];
347
+ });
348
+ }
349
+ var Ki = {
350
+ start: "end",
351
+ end: "start"
352
+ };
353
+ function Ps(s) {
354
+ return s.replace(/start|end/g, function(t) {
355
+ return Ki[t];
356
+ });
357
+ }
358
+ function ms(s) {
359
+ var t = B(s), e = t.pageXOffset, n = t.pageYOffset;
360
+ return {
361
+ scrollLeft: e,
362
+ scrollTop: n
363
+ };
364
+ }
365
+ function gs(s) {
366
+ return xt(ct(s)).left + ms(s).scrollLeft;
367
+ }
368
+ function qi(s, t) {
369
+ var e = B(s), n = ct(s), i = e.visualViewport, r = n.clientWidth, o = n.clientHeight, l = 0, c = 0;
370
+ if (i) {
371
+ r = i.width, o = i.height;
372
+ var u = $n();
373
+ (u || !u && t === "fixed") && (l = i.offsetLeft, c = i.offsetTop);
374
+ }
375
+ return {
376
+ width: r,
377
+ height: o,
378
+ x: l + gs(s),
379
+ y: c
380
+ };
381
+ }
382
+ function Ui(s) {
383
+ var t, e = ct(s), n = ms(s), i = (t = s.ownerDocument) == null ? void 0 : t.body, r = vt(e.scrollWidth, e.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = vt(e.scrollHeight, e.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), l = -n.scrollLeft + gs(s), c = -n.scrollTop;
384
+ return st(i || e).direction === "rtl" && (l += vt(e.clientWidth, i ? i.clientWidth : 0) - r), {
385
+ width: r,
386
+ height: o,
387
+ x: l,
388
+ y: c
389
+ };
390
+ }
391
+ function vs(s) {
392
+ var t = st(s), e = t.overflow, n = t.overflowX, i = t.overflowY;
393
+ return /auto|scroll|overlay|hidden/.test(e + i + n);
394
+ }
395
+ function Hn(s) {
396
+ return ["html", "body", "#document"].indexOf(Z(s)) >= 0 ? s.ownerDocument.body : j(s) && vs(s) ? s : Hn(Le(s));
397
+ }
398
+ function Gt(s, t) {
399
+ var e;
400
+ t === void 0 && (t = []);
401
+ var n = Hn(s), i = n === ((e = s.ownerDocument) == null ? void 0 : e.body), r = B(n), o = i ? [r].concat(r.visualViewport || [], vs(n) ? n : []) : n, l = t.concat(o);
402
+ return i ? l : (
403
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
404
+ l.concat(Gt(Le(o)))
405
+ );
406
+ }
407
+ function ts(s) {
408
+ return Object.assign({}, s, {
409
+ left: s.x,
410
+ top: s.y,
411
+ right: s.x + s.width,
412
+ bottom: s.y + s.height
413
+ });
414
+ }
415
+ function zi(s, t) {
416
+ var e = xt(s, !1, t === "fixed");
417
+ return e.top = e.top + s.clientTop, e.left = e.left + s.clientLeft, e.bottom = e.top + s.clientHeight, e.right = e.left + s.clientWidth, e.width = s.clientWidth, e.height = s.clientHeight, e.x = e.left, e.y = e.top, e;
418
+ }
419
+ function xs(s, t, e) {
420
+ return t === us ? ts(qi(s, e)) : bt(t) ? zi(t, e) : ts(Ui(ct(s)));
421
+ }
422
+ function Gi(s) {
423
+ var t = Gt(Le(s)), e = ["absolute", "fixed"].indexOf(st(s).position) >= 0, n = e && j(s) ? Qt(s) : s;
424
+ return bt(n) ? t.filter(function(i) {
425
+ return bt(i) && In(i, n) && Z(i) !== "body";
426
+ }) : [];
427
+ }
428
+ function Xi(s, t, e, n) {
429
+ var i = t === "clippingParents" ? Gi(s) : [].concat(t), r = [].concat(i, [e]), o = r[0], l = r.reduce(function(c, u) {
430
+ var a = xs(s, u, n);
431
+ return c.top = vt(a.top, c.top), c.right = be(a.right, c.right), c.bottom = be(a.bottom, c.bottom), c.left = vt(a.left, c.left), c;
432
+ }, xs(s, o, n));
433
+ return l.width = l.right - l.left, l.height = l.bottom - l.top, l.x = l.left, l.y = l.top, l;
434
+ }
435
+ function Wn(s) {
436
+ var t = s.reference, e = s.element, n = s.placement, i = n ? J(n) : null, r = n ? Rt(n) : null, o = t.x + t.width / 2 - e.width / 2, l = t.y + t.height / 2 - e.height / 2, c;
437
+ switch (i) {
438
+ case R:
439
+ c = {
440
+ x: o,
441
+ y: t.y - e.height
442
+ };
443
+ break;
444
+ case Y:
445
+ c = {
446
+ x: o,
447
+ y: t.y + t.height
448
+ };
449
+ break;
450
+ case F:
451
+ c = {
452
+ x: t.x + t.width,
453
+ y: l
454
+ };
455
+ break;
456
+ case V:
457
+ c = {
458
+ x: t.x - e.width,
459
+ y: l
460
+ };
461
+ break;
462
+ default:
463
+ c = {
464
+ x: t.x,
465
+ y: t.y
466
+ };
467
+ }
468
+ var u = i ? _s(i) : null;
469
+ if (u != null) {
470
+ var a = u === "y" ? "height" : "width";
471
+ switch (r) {
472
+ case Et:
473
+ c[u] = c[u] - (t[a] / 2 - e[a] / 2);
474
+ break;
475
+ case kt:
476
+ c[u] = c[u] + (t[a] / 2 - e[a] / 2);
477
+ break;
478
+ }
479
+ }
480
+ return c;
481
+ }
482
+ function Vt(s, t) {
483
+ t === void 0 && (t = {});
484
+ var e = t, n = e.placement, i = n === void 0 ? s.placement : n, r = e.strategy, o = r === void 0 ? s.strategy : r, l = e.boundary, c = l === void 0 ? vn : l, u = e.rootBoundary, a = u === void 0 ? us : u, d = e.elementContext, h = d === void 0 ? Lt : d, _ = e.altBoundary, S = _ === void 0 ? !1 : _, p = e.padding, m = p === void 0 ? 0 : p, g = kn(typeof m != "number" ? m : Pn(m, Wt)), v = h === Lt ? En : Lt, D = s.rects.popper, y = s.elements[S ? v : h], T = Xi(bt(y) ? y : y.contextElement || ct(s.elements.popper), c, a, o), C = xt(s.elements.reference), E = Wn({
485
+ reference: C,
486
+ element: D,
487
+ placement: i
488
+ }), A = ts(Object.assign({}, D, E)), w = h === Lt ? A : C, O = {
489
+ top: T.top - w.top + g.top,
490
+ bottom: w.bottom - T.bottom + g.bottom,
491
+ left: T.left - w.left + g.left,
492
+ right: w.right - T.right + g.right
493
+ }, L = s.modifiersData.offset;
494
+ if (h === Lt && L) {
495
+ var M = L[i];
496
+ Object.keys(O).forEach(function($) {
497
+ var P = [F, Y].indexOf($) >= 0 ? 1 : -1, k = [R, Y].indexOf($) >= 0 ? "y" : "x";
498
+ O[$] += M[k] * P;
499
+ });
500
+ }
501
+ return O;
502
+ }
503
+ function Qi(s, t) {
504
+ t === void 0 && (t = {});
505
+ var e = t, n = e.placement, i = e.boundary, r = e.rootBoundary, o = e.padding, l = e.flipVariations, c = e.allowedAutoPlacements, u = c === void 0 ? fs : c, a = Rt(n), d = a ? l ? Je : Je.filter(function(S) {
506
+ return Rt(S) === a;
507
+ }) : Wt, h = d.filter(function(S) {
508
+ return u.indexOf(S) >= 0;
509
+ });
510
+ h.length === 0 && (h = d);
511
+ var _ = h.reduce(function(S, p) {
512
+ return S[p] = Vt(s, {
513
+ placement: p,
514
+ boundary: i,
515
+ rootBoundary: r,
516
+ padding: o
517
+ })[J(p)], S;
518
+ }, {});
519
+ return Object.keys(_).sort(function(S, p) {
520
+ return _[S] - _[p];
521
+ });
522
+ }
523
+ function Ji(s) {
524
+ if (J(s) === De)
525
+ return [];
526
+ var t = ge(s);
527
+ return [Ps(s), t, Ps(t)];
528
+ }
529
+ function Zi(s) {
530
+ var t = s.state, e = s.options, n = s.name;
531
+ if (!t.modifiersData[n]._skip) {
532
+ for (var i = e.mainAxis, r = i === void 0 ? !0 : i, o = e.altAxis, l = o === void 0 ? !0 : o, c = e.fallbackPlacements, u = e.padding, a = e.boundary, d = e.rootBoundary, h = e.altBoundary, _ = e.flipVariations, S = _ === void 0 ? !0 : _, p = e.allowedAutoPlacements, m = t.options.placement, g = J(m), v = g === m, D = c || (v || !S ? [ge(m)] : Ji(m)), y = [m].concat(D).reduce(function(Ct, rt) {
533
+ return Ct.concat(J(rt) === De ? Qi(t, {
534
+ placement: rt,
535
+ boundary: a,
536
+ rootBoundary: d,
537
+ padding: u,
538
+ flipVariations: S,
539
+ allowedAutoPlacements: p
540
+ }) : rt);
541
+ }, []), T = t.rects.reference, C = t.rects.popper, E = /* @__PURE__ */ new Map(), A = !0, w = y[0], O = 0; O < y.length; O++) {
542
+ var L = y[O], M = J(L), $ = Rt(L) === Et, P = [R, Y].indexOf(M) >= 0, k = P ? "width" : "height", I = Vt(t, {
543
+ placement: L,
544
+ boundary: a,
545
+ rootBoundary: d,
546
+ altBoundary: h,
547
+ padding: u
548
+ }), z = P ? $ ? F : V : $ ? Y : R;
549
+ T[k] > C[k] && (z = ge(z));
550
+ var re = ge(z), ft = [];
551
+ if (r && ft.push(I[M] <= 0), l && ft.push(I[z] <= 0, I[re] <= 0), ft.every(function(Ct) {
552
+ return Ct;
553
+ })) {
554
+ w = L, A = !1;
555
+ break;
556
+ }
557
+ E.set(L, ft);
558
+ }
559
+ if (A)
560
+ for (var oe = S ? 3 : 1, Ie = function(rt) {
561
+ var Kt = y.find(function(le) {
562
+ var ht = E.get(le);
563
+ if (ht)
564
+ return ht.slice(0, rt).every(function(Me) {
565
+ return Me;
566
+ });
567
+ });
568
+ if (Kt)
569
+ return w = Kt, "break";
570
+ }, jt = oe; jt > 0; jt--) {
571
+ var ae = Ie(jt);
572
+ if (ae === "break") break;
573
+ }
574
+ t.placement !== w && (t.modifiersData[n]._skip = !0, t.placement = w, t.reset = !0);
575
+ }
576
+ }
577
+ const Yn = {
578
+ name: "flip",
579
+ enabled: !0,
580
+ phase: "main",
581
+ fn: Zi,
582
+ requiresIfExists: ["offset"],
583
+ data: {
584
+ _skip: !1
585
+ }
586
+ };
587
+ function Rs(s, t, e) {
588
+ return e === void 0 && (e = {
589
+ x: 0,
590
+ y: 0
591
+ }), {
592
+ top: s.top - t.height - e.y,
593
+ right: s.right - t.width + e.x,
594
+ bottom: s.bottom - t.height + e.y,
595
+ left: s.left - t.width - e.x
596
+ };
597
+ }
598
+ function Vs(s) {
599
+ return [R, F, Y, V].some(function(t) {
600
+ return s[t] >= 0;
601
+ });
602
+ }
603
+ function tr(s) {
604
+ var t = s.state, e = s.name, n = t.rects.reference, i = t.rects.popper, r = t.modifiersData.preventOverflow, o = Vt(t, {
605
+ elementContext: "reference"
606
+ }), l = Vt(t, {
607
+ altBoundary: !0
608
+ }), c = Rs(o, n), u = Rs(l, i, r), a = Vs(c), d = Vs(u);
609
+ t.modifiersData[e] = {
610
+ referenceClippingOffsets: c,
611
+ popperEscapeOffsets: u,
612
+ isReferenceHidden: a,
613
+ hasPopperEscaped: d
614
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
615
+ "data-popper-reference-hidden": a,
616
+ "data-popper-escaped": d
617
+ });
618
+ }
619
+ const Fn = {
620
+ name: "hide",
621
+ enabled: !0,
622
+ phase: "main",
623
+ requiresIfExists: ["preventOverflow"],
624
+ fn: tr
625
+ };
626
+ function er(s, t, e) {
627
+ var n = J(s), i = [V, R].indexOf(n) >= 0 ? -1 : 1, r = typeof e == "function" ? e(Object.assign({}, t, {
628
+ placement: s
629
+ })) : e, o = r[0], l = r[1];
630
+ return o = o || 0, l = (l || 0) * i, [V, F].indexOf(n) >= 0 ? {
631
+ x: l,
632
+ y: o
633
+ } : {
634
+ x: o,
635
+ y: l
636
+ };
637
+ }
638
+ function sr(s) {
639
+ var t = s.state, e = s.options, n = s.name, i = e.offset, r = i === void 0 ? [0, 0] : i, o = fs.reduce(function(a, d) {
640
+ return a[d] = er(d, t.rects, r), a;
641
+ }, {}), l = o[t.placement], c = l.x, u = l.y;
642
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += u), t.modifiersData[n] = o;
643
+ }
644
+ const Bn = {
645
+ name: "offset",
646
+ enabled: !0,
647
+ phase: "main",
648
+ requires: ["popperOffsets"],
649
+ fn: sr
650
+ };
651
+ function nr(s) {
652
+ var t = s.state, e = s.name;
653
+ t.modifiersData[e] = Wn({
654
+ reference: t.rects.reference,
655
+ element: t.rects.popper,
656
+ placement: t.placement
657
+ });
658
+ }
659
+ const jn = {
660
+ name: "popperOffsets",
661
+ enabled: !0,
662
+ phase: "read",
663
+ fn: nr,
664
+ data: {}
665
+ };
666
+ function ir(s) {
667
+ return s === "x" ? "y" : "x";
668
+ }
669
+ function rr(s) {
670
+ var t = s.state, e = s.options, n = s.name, i = e.mainAxis, r = i === void 0 ? !0 : i, o = e.altAxis, l = o === void 0 ? !1 : o, c = e.boundary, u = e.rootBoundary, a = e.altBoundary, d = e.padding, h = e.tether, _ = h === void 0 ? !0 : h, S = e.tetherOffset, p = S === void 0 ? 0 : S, m = Vt(t, {
671
+ boundary: c,
672
+ rootBoundary: u,
673
+ padding: d,
674
+ altBoundary: a
675
+ }), g = J(t.placement), v = Rt(t.placement), D = !v, y = _s(g), T = ir(y), C = t.modifiersData.popperOffsets, E = t.rects.reference, A = t.rects.popper, w = typeof p == "function" ? p(Object.assign({}, t.rects, {
676
+ placement: t.placement
677
+ })) : p, O = typeof w == "number" ? {
678
+ mainAxis: w,
679
+ altAxis: w
680
+ } : Object.assign({
681
+ mainAxis: 0,
682
+ altAxis: 0
683
+ }, w), L = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
684
+ x: 0,
685
+ y: 0
686
+ };
687
+ if (C) {
688
+ if (r) {
689
+ var $, P = y === "y" ? R : V, k = y === "y" ? Y : F, I = y === "y" ? "height" : "width", z = C[y], re = z + m[P], ft = z - m[k], oe = _ ? -A[I] / 2 : 0, Ie = v === Et ? E[I] : A[I], jt = v === Et ? -A[I] : -E[I], ae = t.elements.arrow, Ct = _ && ae ? ps(ae) : {
690
+ width: 0,
691
+ height: 0
692
+ }, rt = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Mn(), Kt = rt[P], le = rt[k], ht = zt(0, E[I], Ct[I]), Me = D ? E[I] / 2 - oe - ht - Kt - O.mainAxis : Ie - ht - Kt - O.mainAxis, Ci = D ? -E[I] / 2 + oe + ht + le + O.mainAxis : jt + ht + le + O.mainAxis, ke = t.elements.arrow && Qt(t.elements.arrow), Oi = ke ? y === "y" ? ke.clientTop || 0 : ke.clientLeft || 0 : 0, ws = ($ = L?.[y]) != null ? $ : 0, Di = z + Me - ws - Oi, Li = z + Ci - ws, Ss = zt(_ ? be(re, Di) : re, z, _ ? vt(ft, Li) : ft);
693
+ C[y] = Ss, M[y] = Ss - z;
694
+ }
695
+ if (l) {
696
+ var Cs, Ni = y === "x" ? R : V, $i = y === "x" ? Y : F, pt = C[T], ce = T === "y" ? "height" : "width", Os = pt + m[Ni], Ds = pt - m[$i], Pe = [R, V].indexOf(g) !== -1, Ls = (Cs = L?.[T]) != null ? Cs : 0, Ns = Pe ? Os : pt - E[ce] - A[ce] - Ls + O.altAxis, $s = Pe ? pt + E[ce] + A[ce] - Ls - O.altAxis : Ds, Is = _ && Pe ? xi(Ns, pt, $s) : zt(_ ? Ns : Os, pt, _ ? $s : Ds);
697
+ C[T] = Is, M[T] = Is - pt;
698
+ }
699
+ t.modifiersData[n] = M;
700
+ }
701
+ }
702
+ const Kn = {
703
+ name: "preventOverflow",
704
+ enabled: !0,
705
+ phase: "main",
706
+ fn: rr,
707
+ requiresIfExists: ["offset"]
708
+ };
709
+ function or(s) {
710
+ return {
711
+ scrollLeft: s.scrollLeft,
712
+ scrollTop: s.scrollTop
713
+ };
714
+ }
715
+ function ar(s) {
716
+ return s === B(s) || !j(s) ? ms(s) : or(s);
717
+ }
718
+ function lr(s) {
719
+ var t = s.getBoundingClientRect(), e = Pt(t.width) / s.offsetWidth || 1, n = Pt(t.height) / s.offsetHeight || 1;
720
+ return e !== 1 || n !== 1;
721
+ }
722
+ function cr(s, t, e) {
723
+ e === void 0 && (e = !1);
724
+ var n = j(t), i = j(t) && lr(t), r = ct(t), o = xt(s, i, e), l = {
725
+ scrollLeft: 0,
726
+ scrollTop: 0
727
+ }, c = {
728
+ x: 0,
729
+ y: 0
730
+ };
731
+ return (n || !n && !e) && ((Z(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
732
+ vs(r)) && (l = ar(t)), j(t) ? (c = xt(t, !0), c.x += t.clientLeft, c.y += t.clientTop) : r && (c.x = gs(r))), {
733
+ x: o.left + l.scrollLeft - c.x,
734
+ y: o.top + l.scrollTop - c.y,
735
+ width: o.width,
736
+ height: o.height
737
+ };
738
+ }
739
+ function dr(s) {
740
+ var t = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Set(), n = [];
741
+ s.forEach(function(r) {
742
+ t.set(r.name, r);
743
+ });
744
+ function i(r) {
745
+ e.add(r.name);
746
+ var o = [].concat(r.requires || [], r.requiresIfExists || []);
747
+ o.forEach(function(l) {
748
+ if (!e.has(l)) {
749
+ var c = t.get(l);
750
+ c && i(c);
751
+ }
752
+ }), n.push(r);
753
+ }
754
+ return s.forEach(function(r) {
755
+ e.has(r.name) || i(r);
756
+ }), n;
757
+ }
758
+ function ur(s) {
759
+ var t = dr(s);
760
+ return Ln.reduce(function(e, n) {
761
+ return e.concat(t.filter(function(i) {
762
+ return i.phase === n;
763
+ }));
764
+ }, []);
765
+ }
766
+ function fr(s) {
767
+ var t;
768
+ return function() {
769
+ return t || (t = new Promise(function(e) {
770
+ Promise.resolve().then(function() {
771
+ t = void 0, e(s());
772
+ });
773
+ })), t;
774
+ };
775
+ }
776
+ function hr(s) {
777
+ var t = s.reduce(function(e, n) {
778
+ var i = e[n.name];
779
+ return e[n.name] = i ? Object.assign({}, i, n, {
780
+ options: Object.assign({}, i.options, n.options),
781
+ data: Object.assign({}, i.data, n.data)
782
+ }) : n, e;
783
+ }, {});
784
+ return Object.keys(t).map(function(e) {
785
+ return t[e];
786
+ });
787
+ }
788
+ var Hs = {
789
+ placement: "bottom",
790
+ modifiers: [],
791
+ strategy: "absolute"
792
+ };
793
+ function Ws() {
794
+ for (var s = arguments.length, t = new Array(s), e = 0; e < s; e++)
795
+ t[e] = arguments[e];
796
+ return !t.some(function(n) {
797
+ return !(n && typeof n.getBoundingClientRect == "function");
798
+ });
799
+ }
800
+ function qn(s) {
801
+ s === void 0 && (s = {});
802
+ var t = s, e = t.defaultModifiers, n = e === void 0 ? [] : e, i = t.defaultOptions, r = i === void 0 ? Hs : i;
803
+ return function(l, c, u) {
804
+ u === void 0 && (u = r);
805
+ var a = {
806
+ placement: "bottom",
807
+ orderedModifiers: [],
808
+ options: Object.assign({}, Hs, r),
809
+ modifiersData: {},
810
+ elements: {
811
+ reference: l,
812
+ popper: c
813
+ },
814
+ attributes: {},
815
+ styles: {}
816
+ }, d = [], h = !1, _ = {
817
+ state: a,
818
+ setOptions: function(g) {
819
+ var v = typeof g == "function" ? g(a.options) : g;
820
+ p(), a.options = Object.assign({}, r, a.options, v), a.scrollParents = {
821
+ reference: bt(l) ? Gt(l) : l.contextElement ? Gt(l.contextElement) : [],
822
+ popper: Gt(c)
823
+ };
824
+ var D = ur(hr([].concat(n, a.options.modifiers)));
825
+ return a.orderedModifiers = D.filter(function(y) {
826
+ return y.enabled;
827
+ }), S(), _.update();
828
+ },
829
+ // Sync update – it will always be executed, even if not necessary. This
830
+ // is useful for low frequency updates where sync behavior simplifies the
831
+ // logic.
832
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
833
+ // prefer the async Popper#update method
834
+ forceUpdate: function() {
835
+ if (!h) {
836
+ var g = a.elements, v = g.reference, D = g.popper;
837
+ if (Ws(v, D)) {
838
+ a.rects = {
839
+ reference: cr(v, Qt(D), a.options.strategy === "fixed"),
840
+ popper: ps(D)
841
+ }, a.reset = !1, a.placement = a.options.placement, a.orderedModifiers.forEach(function(O) {
842
+ return a.modifiersData[O.name] = Object.assign({}, O.data);
843
+ });
844
+ for (var y = 0; y < a.orderedModifiers.length; y++) {
845
+ if (a.reset === !0) {
846
+ a.reset = !1, y = -1;
847
+ continue;
848
+ }
849
+ var T = a.orderedModifiers[y], C = T.fn, E = T.options, A = E === void 0 ? {} : E, w = T.name;
850
+ typeof C == "function" && (a = C({
851
+ state: a,
852
+ options: A,
853
+ name: w,
854
+ instance: _
855
+ }) || a);
856
+ }
857
+ }
858
+ }
859
+ },
860
+ // Async and optimistically optimized update – it will not be executed if
861
+ // not necessary (debounced to run at most once-per-tick)
862
+ update: fr(function() {
863
+ return new Promise(function(m) {
864
+ _.forceUpdate(), m(a);
865
+ });
866
+ }),
867
+ destroy: function() {
868
+ p(), h = !0;
869
+ }
870
+ };
871
+ if (!Ws(l, c))
872
+ return _;
873
+ _.setOptions(u).then(function(m) {
874
+ !h && u.onFirstUpdate && u.onFirstUpdate(m);
875
+ });
876
+ function S() {
877
+ a.orderedModifiers.forEach(function(m) {
878
+ var g = m.name, v = m.options, D = v === void 0 ? {} : v, y = m.effect;
879
+ if (typeof y == "function") {
880
+ var T = y({
881
+ state: a,
882
+ name: g,
883
+ instance: _,
884
+ options: D
885
+ }), C = function() {
886
+ };
887
+ d.push(T || C);
888
+ }
889
+ });
890
+ }
891
+ function p() {
892
+ d.forEach(function(m) {
893
+ return m();
894
+ }), d = [];
895
+ }
896
+ return _;
897
+ };
898
+ }
899
+ var pr = [Vn, jn, Rn, Nn, Bn, Yn, Kn, xn, Fn], Es = /* @__PURE__ */ qn({
900
+ defaultModifiers: pr
901
+ });
902
+ const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
903
+ __proto__: null,
904
+ afterMain: Sn,
905
+ afterRead: An,
906
+ afterWrite: Dn,
907
+ applyStyles: Nn,
908
+ arrow: xn,
909
+ auto: De,
910
+ basePlacements: Wt,
911
+ beforeMain: Tn,
912
+ beforeRead: bn,
913
+ beforeWrite: Cn,
914
+ bottom: Y,
915
+ clippingParents: vn,
916
+ computeStyles: Rn,
917
+ createPopper: Es,
918
+ detectOverflow: Vt,
919
+ end: kt,
920
+ eventListeners: Vn,
921
+ flip: Yn,
922
+ hide: Fn,
923
+ left: V,
924
+ main: wn,
925
+ modifierPhases: Ln,
926
+ offset: Bn,
927
+ placements: fs,
928
+ popper: Lt,
929
+ popperGenerator: qn,
930
+ popperOffsets: jn,
931
+ preventOverflow: Kn,
932
+ read: yn,
933
+ reference: En,
934
+ right: F,
935
+ start: Et,
936
+ top: R,
937
+ variationPlacements: Je,
938
+ viewport: us,
939
+ write: On
940
+ }, Symbol.toStringTag, { value: "Module" }));
941
+ const ot = /* @__PURE__ */ new Map(), xe = {
942
+ set(s, t, e) {
943
+ ot.has(s) || ot.set(s, /* @__PURE__ */ new Map());
944
+ const n = ot.get(s);
945
+ if (!n.has(t) && n.size !== 0) {
946
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);
947
+ return;
948
+ }
949
+ n.set(t, e);
950
+ },
951
+ get(s, t) {
952
+ return ot.has(s) && ot.get(s).get(t) || null;
953
+ },
954
+ remove(s, t) {
955
+ if (!ot.has(s))
956
+ return;
957
+ const e = ot.get(s);
958
+ e.delete(t), e.size === 0 && ot.delete(s);
959
+ }
960
+ }, _r = 1e6, mr = 1e3, es = "transitionend", zn = (s) => (s && window.CSS && window.CSS.escape && (s = s.replace(/#([^\s"#']+)/g, (t, e) => `#${CSS.escape(e)}`)), s), gr = (s) => s == null ? `${s}` : Object.prototype.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase(), vr = (s) => {
961
+ do
962
+ s += Math.floor(Math.random() * _r);
963
+ while (document.getElementById(s));
964
+ return s;
965
+ }, Er = (s) => {
966
+ if (!s)
967
+ return 0;
968
+ let {
969
+ transitionDuration: t,
970
+ transitionDelay: e
971
+ } = window.getComputedStyle(s);
972
+ const n = Number.parseFloat(t), i = Number.parseFloat(e);
973
+ return !n && !i ? 0 : (t = t.split(",")[0], e = e.split(",")[0], (Number.parseFloat(t) + Number.parseFloat(e)) * mr);
974
+ }, Gn = (s) => {
975
+ s.dispatchEvent(new Event(es));
976
+ }, tt = (s) => !s || typeof s != "object" ? !1 : (typeof s.jquery < "u" && (s = s[0]), typeof s.nodeType < "u"), at = (s) => tt(s) ? s.jquery ? s[0] : s : typeof s == "string" && s.length > 0 ? document.querySelector(zn(s)) : null, Yt = (s) => {
977
+ if (!tt(s) || s.getClientRects().length === 0)
978
+ return !1;
979
+ const t = getComputedStyle(s).getPropertyValue("visibility") === "visible", e = s.closest("details:not([open])");
980
+ if (!e)
981
+ return t;
982
+ if (e !== s) {
983
+ const n = s.closest("summary");
984
+ if (n && n.parentNode !== e || n === null)
985
+ return !1;
986
+ }
987
+ return t;
988
+ }, lt = (s) => !s || s.nodeType !== Node.ELEMENT_NODE || s.classList.contains("disabled") ? !0 : typeof s.disabled < "u" ? s.disabled : s.hasAttribute("disabled") && s.getAttribute("disabled") !== "false", Xn = (s) => {
989
+ if (!document.documentElement.attachShadow)
990
+ return null;
991
+ if (typeof s.getRootNode == "function") {
992
+ const t = s.getRootNode();
993
+ return t instanceof ShadowRoot ? t : null;
994
+ }
995
+ return s instanceof ShadowRoot ? s : s.parentNode ? Xn(s.parentNode) : null;
996
+ }, ye = () => {
997
+ }, Jt = (s) => {
998
+ s.offsetHeight;
999
+ }, Qn = () => window.jQuery && !document.body.hasAttribute("data-ds-no-jquery") ? window.jQuery : null, Re = [], br = (s) => {
1000
+ document.readyState === "loading" ? (Re.length || document.addEventListener("DOMContentLoaded", () => {
1001
+ for (const t of Re)
1002
+ t();
1003
+ }), Re.push(s)) : s();
1004
+ }, K = () => document.documentElement.dir === "rtl", U = (s) => {
1005
+ br(() => {
1006
+ const t = Qn();
1007
+ if (t) {
1008
+ const e = s.NAME, n = t.fn[e];
1009
+ t.fn[e] = s.jQueryInterface, t.fn[e].Constructor = s, t.fn[e].noConflict = () => (t.fn[e] = n, s.jQueryInterface);
1010
+ }
1011
+ });
1012
+ }, H = (s, t = [], e = s) => typeof s == "function" ? s.call(...t) : e, Jn = (s, t, e = !0) => {
1013
+ if (!e) {
1014
+ H(s);
1015
+ return;
1016
+ }
1017
+ const i = Er(t) + 5;
1018
+ let r = !1;
1019
+ const o = ({
1020
+ target: l
1021
+ }) => {
1022
+ l === t && (r = !0, t.removeEventListener(es, o), H(s));
1023
+ };
1024
+ t.addEventListener(es, o), setTimeout(() => {
1025
+ r || Gn(t);
1026
+ }, i);
1027
+ }, bs = (s, t, e, n) => {
1028
+ const i = s.length;
1029
+ let r = s.indexOf(t);
1030
+ return r === -1 ? !e && n ? s[i - 1] : s[0] : (r += e ? 1 : -1, n && (r = (r + i) % i), s[Math.max(0, Math.min(r, i - 1))]);
1031
+ }, yr = /[^.]*(?=\..*)\.|.*/, Ar = /\..*/, Tr = /::\d+$/, Ve = {};
1032
+ let Ys = 1;
1033
+ const Zn = {
1034
+ mouseenter: "mouseover",
1035
+ mouseleave: "mouseout"
1036
+ }, wr = /* @__PURE__ */ 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"]);
1037
+ function ti(s, t) {
1038
+ return t && `${t}::${Ys++}` || s.uidEvent || Ys++;
1039
+ }
1040
+ function ei(s) {
1041
+ const t = ti(s);
1042
+ return s.uidEvent = t, Ve[t] = Ve[t] || {}, Ve[t];
1043
+ }
1044
+ function Sr(s, t) {
1045
+ return function e(n) {
1046
+ return ys(n, {
1047
+ delegateTarget: s
1048
+ }), e.oneOff && f.off(s, n.type, t), t.apply(s, [n]);
1049
+ };
1050
+ }
1051
+ function Cr(s, t, e) {
1052
+ return function n(i) {
1053
+ const r = s.querySelectorAll(t);
1054
+ for (let {
1055
+ target: o
1056
+ } = i; o && o !== this; o = o.parentNode)
1057
+ for (const l of r)
1058
+ if (l === o)
1059
+ return ys(i, {
1060
+ delegateTarget: o
1061
+ }), n.oneOff && f.off(s, i.type, t, e), e.apply(o, [i]);
1062
+ };
1063
+ }
1064
+ function si(s, t, e = null) {
1065
+ return Object.values(s).find((n) => n.callable === t && n.delegationSelector === e);
1066
+ }
1067
+ function ni(s, t, e) {
1068
+ const n = typeof t == "string", i = n ? e : t || e;
1069
+ let r = ii(s);
1070
+ return wr.has(r) || (r = s), [n, i, r];
1071
+ }
1072
+ function Fs(s, t, e, n, i) {
1073
+ if (typeof t != "string" || !s)
1074
+ return;
1075
+ let [r, o, l] = ni(t, e, n);
1076
+ t in Zn && (o = ((S) => function(p) {
1077
+ if (!p.relatedTarget || p.relatedTarget !== p.delegateTarget && !p.delegateTarget.contains(p.relatedTarget))
1078
+ return S.call(this, p);
1079
+ })(o));
1080
+ const c = ei(s), u = c[l] || (c[l] = {}), a = si(u, o, r ? e : null);
1081
+ if (a) {
1082
+ a.oneOff = a.oneOff && i;
1083
+ return;
1084
+ }
1085
+ const d = ti(o, t.replace(yr, "")), h = r ? Cr(s, e, o) : Sr(s, o);
1086
+ h.delegationSelector = r ? e : null, h.callable = o, h.oneOff = i, h.uidEvent = d, u[d] = h, s.addEventListener(l, h, r);
1087
+ }
1088
+ function ss(s, t, e, n, i) {
1089
+ const r = si(t[e], n, i);
1090
+ r && (s.removeEventListener(e, r, !!i), delete t[e][r.uidEvent]);
1091
+ }
1092
+ function Or(s, t, e, n) {
1093
+ const i = t[e] || {};
1094
+ for (const [r, o] of Object.entries(i))
1095
+ r.includes(n) && ss(s, t, e, o.callable, o.delegationSelector);
1096
+ }
1097
+ function ii(s) {
1098
+ return s = s.replace(Ar, ""), Zn[s] || s;
1099
+ }
1100
+ const f = {
1101
+ on(s, t, e, n) {
1102
+ Fs(s, t, e, n, !1);
1103
+ },
1104
+ one(s, t, e, n) {
1105
+ Fs(s, t, e, n, !0);
1106
+ },
1107
+ off(s, t, e, n) {
1108
+ if (typeof t != "string" || !s)
1109
+ return;
1110
+ const [i, r, o] = ni(t, e, n), l = o !== t, c = ei(s), u = c[o] || {}, a = t.startsWith(".");
1111
+ if (typeof r < "u") {
1112
+ if (!Object.keys(u).length)
1113
+ return;
1114
+ ss(s, c, o, r, i ? e : null);
1115
+ return;
1116
+ }
1117
+ if (a)
1118
+ for (const d of Object.keys(c))
1119
+ Or(s, c, d, t.slice(1));
1120
+ for (const [d, h] of Object.entries(u)) {
1121
+ const _ = d.replace(Tr, "");
1122
+ (!l || t.includes(_)) && ss(s, c, o, h.callable, h.delegationSelector);
1123
+ }
1124
+ },
1125
+ trigger(s, t, e) {
1126
+ if (typeof t != "string" || !s)
1127
+ return null;
1128
+ const n = Qn(), i = ii(t), r = t !== i;
1129
+ let o = null, l = !0, c = !0, u = !1;
1130
+ r && n && (o = n.Event(t, e), n(s).trigger(o), l = !o.isPropagationStopped(), c = !o.isImmediatePropagationStopped(), u = o.isDefaultPrevented());
1131
+ const a = ys(new Event(t, {
1132
+ bubbles: l,
1133
+ cancelable: !0
1134
+ }), e);
1135
+ return u && a.preventDefault(), c && s.dispatchEvent(a), a.defaultPrevented && o && o.preventDefault(), a;
1136
+ }
1137
+ };
1138
+ function ys(s, t = {}) {
1139
+ for (const [e, n] of Object.entries(t))
1140
+ try {
1141
+ s[e] = n;
1142
+ } catch {
1143
+ Object.defineProperty(s, e, {
1144
+ configurable: !0,
1145
+ get() {
1146
+ return n;
1147
+ }
1148
+ });
1149
+ }
1150
+ return s;
1151
+ }
1152
+ function Bs(s) {
1153
+ if (s === "true")
1154
+ return !0;
1155
+ if (s === "false")
1156
+ return !1;
1157
+ if (s === Number(s).toString())
1158
+ return Number(s);
1159
+ if (s === "" || s === "null")
1160
+ return null;
1161
+ if (typeof s != "string")
1162
+ return s;
1163
+ try {
1164
+ return JSON.parse(decodeURIComponent(s));
1165
+ } catch {
1166
+ return s;
1167
+ }
1168
+ }
1169
+ function He(s) {
1170
+ return s.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
1171
+ }
1172
+ const et = {
1173
+ setDataAttribute(s, t, e) {
1174
+ s.setAttribute(`data-ds-${He(t)}`, e);
1175
+ },
1176
+ removeDataAttribute(s, t) {
1177
+ s.removeAttribute(`data-ds-${He(t)}`);
1178
+ },
1179
+ getDataAttributes(s) {
1180
+ if (!s)
1181
+ return {};
1182
+ const t = {}, e = Object.keys(s.dataset).filter((n) => n.startsWith("ds") && !n.startsWith("dsConfig"));
1183
+ for (const n of e) {
1184
+ let i = n.replace(/^ds/, "");
1185
+ i = i.charAt(0).toLowerCase() + i.slice(1), t[i] = Bs(s.dataset[n]);
1186
+ }
1187
+ return t;
1188
+ },
1189
+ getDataAttribute(s, t) {
1190
+ return Bs(s.getAttribute(`data-ds-${He(t)}`));
1191
+ }
1192
+ };
1193
+ class Zt {
1194
+ // Getters
1195
+ static get Default() {
1196
+ return {};
1197
+ }
1198
+ static get DefaultType() {
1199
+ return {};
1200
+ }
1201
+ static get NAME() {
1202
+ throw new Error('You have to implement the static method "NAME", for each component!');
1203
+ }
1204
+ _getConfig(t) {
1205
+ return t = this._mergeConfigObj(t), t = this._configAfterMerge(t), this._typeCheckConfig(t), t;
1206
+ }
1207
+ _configAfterMerge(t) {
1208
+ return t;
1209
+ }
1210
+ _mergeConfigObj(t, e) {
1211
+ const n = tt(e) ? et.getDataAttribute(e, "config") : {};
1212
+ return {
1213
+ ...this.constructor.Default,
1214
+ ...typeof n == "object" ? n : {},
1215
+ ...tt(e) ? et.getDataAttributes(e) : {},
1216
+ ...typeof t == "object" ? t : {}
1217
+ };
1218
+ }
1219
+ _typeCheckConfig(t, e = this.constructor.DefaultType) {
1220
+ for (const [n, i] of Object.entries(e)) {
1221
+ const r = t[n], o = tt(r) ? "element" : gr(r);
1222
+ if (!new RegExp(i).test(o))
1223
+ throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${i}".`);
1224
+ }
1225
+ }
1226
+ }
1227
+ const Dr = "5.3.8";
1228
+ class Q extends Zt {
1229
+ constructor(t, e) {
1230
+ super(), t = at(t), t && (this._element = t, this._config = this._getConfig(e), xe.set(this._element, this.constructor.DATA_KEY, this));
1231
+ }
1232
+ // Public
1233
+ dispose() {
1234
+ xe.remove(this._element, this.constructor.DATA_KEY), f.off(this._element, this.constructor.EVENT_KEY);
1235
+ for (const t of Object.getOwnPropertyNames(this))
1236
+ this[t] = null;
1237
+ }
1238
+ // Private
1239
+ _queueCallback(t, e, n = !0) {
1240
+ Jn(t, e, n);
1241
+ }
1242
+ _getConfig(t) {
1243
+ return t = this._mergeConfigObj(t, this._element), t = this._configAfterMerge(t), this._typeCheckConfig(t), t;
1244
+ }
1245
+ // Static
1246
+ static getInstance(t) {
1247
+ return xe.get(at(t), this.DATA_KEY);
1248
+ }
1249
+ static getOrCreateInstance(t, e = {}) {
1250
+ return this.getInstance(t) || new this(t, typeof e == "object" ? e : null);
1251
+ }
1252
+ static get VERSION() {
1253
+ return Dr;
1254
+ }
1255
+ static get DATA_KEY() {
1256
+ return `bs.${this.NAME}`;
1257
+ }
1258
+ static get EVENT_KEY() {
1259
+ return `.${this.DATA_KEY}`;
1260
+ }
1261
+ static eventName(t) {
1262
+ return `${t}${this.EVENT_KEY}`;
1263
+ }
1264
+ }
1265
+ const We = (s) => {
1266
+ let t = s.getAttribute("data-ds-target");
1267
+ if (!t || t === "#") {
1268
+ let e = s.getAttribute("href");
1269
+ if (!e || !e.includes("#") && !e.startsWith("."))
1270
+ return null;
1271
+ e.includes("#") && !e.startsWith("#") && (e = `#${e.split("#")[1]}`), t = e && e !== "#" ? e.trim() : null;
1272
+ }
1273
+ return t ? t.split(",").map((e) => zn(e)).join(",") : null;
1274
+ }, b = {
1275
+ find(s, t = document.documentElement) {
1276
+ return [].concat(...Element.prototype.querySelectorAll.call(t, s));
1277
+ },
1278
+ findOne(s, t = document.documentElement) {
1279
+ return Element.prototype.querySelector.call(t, s);
1280
+ },
1281
+ children(s, t) {
1282
+ return [].concat(...s.children).filter((e) => e.matches(t));
1283
+ },
1284
+ parents(s, t) {
1285
+ const e = [];
1286
+ let n = s.parentNode.closest(t);
1287
+ for (; n; )
1288
+ e.push(n), n = n.parentNode.closest(t);
1289
+ return e;
1290
+ },
1291
+ prev(s, t) {
1292
+ let e = s.previousElementSibling;
1293
+ for (; e; ) {
1294
+ if (e.matches(t))
1295
+ return [e];
1296
+ e = e.previousElementSibling;
1297
+ }
1298
+ return [];
1299
+ },
1300
+ // TODO: this is now unused; remove later along with prev()
1301
+ next(s, t) {
1302
+ let e = s.nextElementSibling;
1303
+ for (; e; ) {
1304
+ if (e.matches(t))
1305
+ return [e];
1306
+ e = e.nextElementSibling;
1307
+ }
1308
+ return [];
1309
+ },
1310
+ focusableChildren(s) {
1311
+ const t = ["a", "button", "input", "textarea", "select", "details", "[tabindex]", '[contenteditable="true"]'].map((e) => `${e}:not([tabindex^="-"])`).join(",");
1312
+ return this.find(t, s).filter((e) => !lt(e) && Yt(e));
1313
+ },
1314
+ getSelectorFromElement(s) {
1315
+ const t = We(s);
1316
+ return t && b.findOne(t) ? t : null;
1317
+ },
1318
+ getElementFromSelector(s) {
1319
+ const t = We(s);
1320
+ return t ? b.findOne(t) : null;
1321
+ },
1322
+ getMultipleElementsFromSelector(s) {
1323
+ const t = We(s);
1324
+ return t ? b.find(t) : [];
1325
+ }
1326
+ }, Ne = (s, t = "hide") => {
1327
+ const e = `click.dismiss${s.EVENT_KEY}`, n = s.NAME;
1328
+ f.on(document, e, `[data-ds-dismiss="${n}"]`, function(i) {
1329
+ if (["A", "AREA"].includes(this.tagName) && i.preventDefault(), lt(this))
1330
+ return;
1331
+ const r = b.getElementFromSelector(this) || this.closest(`.${n}`);
1332
+ s.getOrCreateInstance(r)[t]();
1333
+ });
1334
+ }, Lr = "alert", Nr = "ds.alert", ri = `.${Nr}`, $r = `close${ri}`, Ir = `closed${ri}`, Mr = "fade", kr = "show";
1335
+ class te extends Q {
1336
+ // Getters
1337
+ static get NAME() {
1338
+ return Lr;
1339
+ }
1340
+ // Public
1341
+ close() {
1342
+ if (f.trigger(this._element, $r).defaultPrevented)
1343
+ return;
1344
+ this._element.classList.remove(kr);
1345
+ const e = this._element.classList.contains(Mr);
1346
+ this._queueCallback(() => this._destroyElement(), this._element, e);
1347
+ }
1348
+ // Private
1349
+ _destroyElement() {
1350
+ this._element.remove(), f.trigger(this._element, Ir), this.dispose();
1351
+ }
1352
+ // Static
1353
+ static jQueryInterface(t) {
1354
+ return this.each(function() {
1355
+ const e = te.getOrCreateInstance(this);
1356
+ if (typeof t == "string") {
1357
+ if (e[t] === void 0 || t.startsWith("_") || t === "constructor")
1358
+ throw new TypeError(`No method named "${t}"`);
1359
+ e[t](this);
1360
+ }
1361
+ });
1362
+ }
1363
+ }
1364
+ Ne(te, "close");
1365
+ U(te);
1366
+ const Pr = "button", xr = "ds.button", Rr = `.${xr}`, Vr = ".data-api", Hr = "active", js = '[data-ds-toggle="button"]', Wr = `click${Rr}${Vr}`;
1367
+ class ee extends Q {
1368
+ // Getters
1369
+ static get NAME() {
1370
+ return Pr;
1371
+ }
1372
+ // Public
1373
+ toggle() {
1374
+ this._element.setAttribute("aria-pressed", this._element.classList.toggle(Hr));
1375
+ }
1376
+ // Static
1377
+ static jQueryInterface(t) {
1378
+ return this.each(function() {
1379
+ const e = ee.getOrCreateInstance(this);
1380
+ t === "toggle" && e[t]();
1381
+ });
1382
+ }
1383
+ }
1384
+ f.on(document, Wr, js, (s) => {
1385
+ s.preventDefault();
1386
+ const t = s.target.closest(js);
1387
+ ee.getOrCreateInstance(t).toggle();
1388
+ });
1389
+ U(ee);
1390
+ const Yr = "swipe", Ft = ".ds.swipe", Fr = `touchstart${Ft}`, Br = `touchmove${Ft}`, jr = `touchend${Ft}`, Kr = `pointerdown${Ft}`, qr = `pointerup${Ft}`, Ur = "touch", zr = "pen", Gr = "pointer-event", Xr = 40, Qr = {
1391
+ endCallback: null,
1392
+ leftCallback: null,
1393
+ rightCallback: null
1394
+ }, Jr = {
1395
+ endCallback: "(function|null)",
1396
+ leftCallback: "(function|null)",
1397
+ rightCallback: "(function|null)"
1398
+ };
1399
+ class Ae extends Zt {
1400
+ constructor(t, e) {
1401
+ super(), this._element = t, !(!t || !Ae.isSupported()) && (this._config = this._getConfig(e), this._deltaX = 0, this._supportPointerEvents = !!window.PointerEvent, this._initEvents());
1402
+ }
1403
+ // Getters
1404
+ static get Default() {
1405
+ return Qr;
1406
+ }
1407
+ static get DefaultType() {
1408
+ return Jr;
1409
+ }
1410
+ static get NAME() {
1411
+ return Yr;
1412
+ }
1413
+ // Public
1414
+ dispose() {
1415
+ f.off(this._element, Ft);
1416
+ }
1417
+ // Private
1418
+ _start(t) {
1419
+ if (!this._supportPointerEvents) {
1420
+ this._deltaX = t.touches[0].clientX;
1421
+ return;
1422
+ }
1423
+ this._eventIsPointerPenTouch(t) && (this._deltaX = t.clientX);
1424
+ }
1425
+ _end(t) {
1426
+ this._eventIsPointerPenTouch(t) && (this._deltaX = t.clientX - this._deltaX), this._handleSwipe(), H(this._config.endCallback);
1427
+ }
1428
+ _move(t) {
1429
+ this._deltaX = t.touches && t.touches.length > 1 ? 0 : t.touches[0].clientX - this._deltaX;
1430
+ }
1431
+ _handleSwipe() {
1432
+ const t = Math.abs(this._deltaX);
1433
+ if (t <= Xr)
1434
+ return;
1435
+ const e = t / this._deltaX;
1436
+ this._deltaX = 0, e && H(e > 0 ? this._config.rightCallback : this._config.leftCallback);
1437
+ }
1438
+ _initEvents() {
1439
+ this._supportPointerEvents ? (f.on(this._element, Kr, (t) => this._start(t)), f.on(this._element, qr, (t) => this._end(t)), this._element.classList.add(Gr)) : (f.on(this._element, Fr, (t) => this._start(t)), f.on(this._element, Br, (t) => this._move(t)), f.on(this._element, jr, (t) => this._end(t)));
1440
+ }
1441
+ _eventIsPointerPenTouch(t) {
1442
+ return this._supportPointerEvents && (t.pointerType === zr || t.pointerType === Ur);
1443
+ }
1444
+ // Static
1445
+ static isSupported() {
1446
+ return "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0;
1447
+ }
1448
+ }
1449
+ const Zr = "carousel", to = "ds.carousel", dt = `.${to}`, oi = ".data-api", eo = "ArrowLeft", so = "ArrowRight", no = 500, qt = "next", Ot = "prev", Nt = "left", ve = "right", io = `slide${dt}`, Ye = `slid${dt}`, ro = `keydown${dt}`, oo = `mouseenter${dt}`, ao = `mouseleave${dt}`, lo = `dragstart${dt}`, co = `load${dt}${oi}`, uo = `click${dt}${oi}`, ai = "carousel", ue = "active", fo = "slide", ho = "carousel-item-end", po = "carousel-item-start", _o = "carousel-item-next", mo = "carousel-item-prev", li = ".active", ci = ".carousel-item", go = li + ci, vo = ".carousel-item img", Eo = ".carousel-indicators", bo = "[data-ds-slide], [data-ds-slide-to]", yo = '[data-ds-ride="carousel"]', Ao = {
1450
+ [eo]: ve,
1451
+ [so]: Nt
1452
+ }, To = {
1453
+ interval: 5e3,
1454
+ keyboard: !0,
1455
+ pause: "hover",
1456
+ ride: !1,
1457
+ touch: !0,
1458
+ wrap: !0
1459
+ }, wo = {
1460
+ interval: "(number|boolean)",
1461
+ // TODO:v6 remove boolean support
1462
+ keyboard: "boolean",
1463
+ pause: "(string|boolean)",
1464
+ ride: "(boolean|string)",
1465
+ touch: "boolean",
1466
+ wrap: "boolean"
1467
+ };
1468
+ class Bt extends Q {
1469
+ constructor(t, e) {
1470
+ super(t, e), this._interval = null, this._activeElement = null, this._isSliding = !1, this.touchTimeout = null, this._swipeHelper = null, this._indicatorsElement = b.findOne(Eo, this._element), this._addEventListeners(), this._config.ride === ai && this.cycle();
1471
+ }
1472
+ // Getters
1473
+ static get Default() {
1474
+ return To;
1475
+ }
1476
+ static get DefaultType() {
1477
+ return wo;
1478
+ }
1479
+ static get NAME() {
1480
+ return Zr;
1481
+ }
1482
+ // Public
1483
+ next() {
1484
+ this._slide(qt);
1485
+ }
1486
+ nextWhenVisible() {
1487
+ !document.hidden && Yt(this._element) && this.next();
1488
+ }
1489
+ prev() {
1490
+ this._slide(Ot);
1491
+ }
1492
+ pause() {
1493
+ this._isSliding && Gn(this._element), this._clearInterval();
1494
+ }
1495
+ cycle() {
1496
+ this._clearInterval(), this._updateInterval(), this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
1497
+ }
1498
+ _maybeEnableCycle() {
1499
+ if (this._config.ride) {
1500
+ if (this._isSliding) {
1501
+ f.one(this._element, Ye, () => this.cycle());
1502
+ return;
1503
+ }
1504
+ this.cycle();
1505
+ }
1506
+ }
1507
+ to(t) {
1508
+ const e = this._getItems();
1509
+ if (t > e.length - 1 || t < 0)
1510
+ return;
1511
+ if (this._isSliding) {
1512
+ f.one(this._element, Ye, () => this.to(t));
1513
+ return;
1514
+ }
1515
+ const n = this._getItemIndex(this._getActive());
1516
+ if (n === t)
1517
+ return;
1518
+ const i = t > n ? qt : Ot;
1519
+ this._slide(i, e[t]);
1520
+ }
1521
+ dispose() {
1522
+ this._swipeHelper && this._swipeHelper.dispose(), super.dispose();
1523
+ }
1524
+ // Private
1525
+ _configAfterMerge(t) {
1526
+ return t.defaultInterval = t.interval, t;
1527
+ }
1528
+ _addEventListeners() {
1529
+ this._config.keyboard && f.on(this._element, ro, (t) => this._keydown(t)), this._config.pause === "hover" && (f.on(this._element, oo, () => this.pause()), f.on(this._element, ao, () => this._maybeEnableCycle())), this._config.touch && Ae.isSupported() && this._addTouchEventListeners();
1530
+ }
1531
+ _addTouchEventListeners() {
1532
+ for (const n of b.find(vo, this._element))
1533
+ f.on(n, lo, (i) => i.preventDefault());
1534
+ const e = {
1535
+ leftCallback: () => this._slide(this._directionToOrder(Nt)),
1536
+ rightCallback: () => this._slide(this._directionToOrder(ve)),
1537
+ endCallback: () => {
1538
+ this._config.pause === "hover" && (this.pause(), this.touchTimeout && clearTimeout(this.touchTimeout), this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), no + this._config.interval));
1539
+ }
1540
+ };
1541
+ this._swipeHelper = new Ae(this._element, e);
1542
+ }
1543
+ _keydown(t) {
1544
+ if (/input|textarea/i.test(t.target.tagName))
1545
+ return;
1546
+ const e = Ao[t.key];
1547
+ e && (t.preventDefault(), this._slide(this._directionToOrder(e)));
1548
+ }
1549
+ _getItemIndex(t) {
1550
+ return this._getItems().indexOf(t);
1551
+ }
1552
+ _setActiveIndicatorElement(t) {
1553
+ if (!this._indicatorsElement)
1554
+ return;
1555
+ const e = b.findOne(li, this._indicatorsElement);
1556
+ e.classList.remove(ue), e.removeAttribute("aria-current");
1557
+ const n = b.findOne(`[data-ds-slide-to="${t}"]`, this._indicatorsElement);
1558
+ n && (n.classList.add(ue), n.setAttribute("aria-current", "true"));
1559
+ }
1560
+ _updateInterval() {
1561
+ const t = this._activeElement || this._getActive();
1562
+ if (!t)
1563
+ return;
1564
+ const e = Number.parseInt(t.getAttribute("data-ds-interval"), 10);
1565
+ this._config.interval = e || this._config.defaultInterval;
1566
+ }
1567
+ _slide(t, e = null) {
1568
+ if (this._isSliding)
1569
+ return;
1570
+ const n = this._getActive(), i = t === qt, r = e || bs(this._getItems(), n, i, this._config.wrap);
1571
+ if (r === n)
1572
+ return;
1573
+ const o = this._getItemIndex(r), l = (_) => f.trigger(this._element, _, {
1574
+ relatedTarget: r,
1575
+ direction: this._orderToDirection(t),
1576
+ from: this._getItemIndex(n),
1577
+ to: o
1578
+ });
1579
+ if (l(io).defaultPrevented || !n || !r)
1580
+ return;
1581
+ const u = !!this._interval;
1582
+ this.pause(), this._isSliding = !0, this._setActiveIndicatorElement(o), this._activeElement = r;
1583
+ const a = i ? po : ho, d = i ? _o : mo;
1584
+ r.classList.add(d), Jt(r), n.classList.add(a), r.classList.add(a);
1585
+ const h = () => {
1586
+ r.classList.remove(a, d), r.classList.add(ue), n.classList.remove(ue, d, a), this._isSliding = !1, l(Ye);
1587
+ };
1588
+ this._queueCallback(h, n, this._isAnimated()), u && this.cycle();
1589
+ }
1590
+ _isAnimated() {
1591
+ return this._element.classList.contains(fo);
1592
+ }
1593
+ _getActive() {
1594
+ return b.findOne(go, this._element);
1595
+ }
1596
+ _getItems() {
1597
+ return b.find(ci, this._element);
1598
+ }
1599
+ _clearInterval() {
1600
+ this._interval && (clearInterval(this._interval), this._interval = null);
1601
+ }
1602
+ _directionToOrder(t) {
1603
+ return K() ? t === Nt ? Ot : qt : t === Nt ? qt : Ot;
1604
+ }
1605
+ _orderToDirection(t) {
1606
+ return K() ? t === Ot ? Nt : ve : t === Ot ? ve : Nt;
1607
+ }
1608
+ // Static
1609
+ static jQueryInterface(t) {
1610
+ return this.each(function() {
1611
+ const e = Bt.getOrCreateInstance(this, t);
1612
+ if (typeof t == "number") {
1613
+ e.to(t);
1614
+ return;
1615
+ }
1616
+ if (typeof t == "string") {
1617
+ if (e[t] === void 0 || t.startsWith("_") || t === "constructor")
1618
+ throw new TypeError(`No method named "${t}"`);
1619
+ e[t]();
1620
+ }
1621
+ });
1622
+ }
1623
+ }
1624
+ f.on(document, uo, bo, function(s) {
1625
+ const t = b.getElementFromSelector(this);
1626
+ if (!t || !t.classList.contains(ai))
1627
+ return;
1628
+ s.preventDefault();
1629
+ const e = Bt.getOrCreateInstance(t), n = this.getAttribute("data-ds-slide-to");
1630
+ if (n) {
1631
+ e.to(n), e._maybeEnableCycle();
1632
+ return;
1633
+ }
1634
+ if (et.getDataAttribute(this, "slide") === "next") {
1635
+ e.next(), e._maybeEnableCycle();
1636
+ return;
1637
+ }
1638
+ e.prev(), e._maybeEnableCycle();
1639
+ });
1640
+ f.on(window, co, () => {
1641
+ const s = b.find(yo);
1642
+ for (const t of s)
1643
+ Bt.getOrCreateInstance(t);
1644
+ });
1645
+ U(Bt);
1646
+ const So = "collapse", Co = "ds.collapse", se = `.${Co}`, Oo = ".data-api", Do = `show${se}`, Lo = `shown${se}`, No = `hide${se}`, $o = `hidden${se}`, Io = `click${se}${Oo}`, Fe = "show", It = "collapse", fe = "collapsing", Mo = "collapsed", ko = `:scope .${It} .${It}`, Po = "collapse-horizontal", xo = "width", Ro = "height", Vo = ".collapse.show, .collapse.collapsing", ns = '[data-ds-toggle="collapse"]', Ho = {
1647
+ parent: null,
1648
+ toggle: !0
1649
+ }, Wo = {
1650
+ parent: "(null|element)",
1651
+ toggle: "boolean"
1652
+ };
1653
+ class Ht extends Q {
1654
+ constructor(t, e) {
1655
+ super(t, e), this._isTransitioning = !1, this._triggerArray = [];
1656
+ const n = b.find(ns);
1657
+ for (const i of n) {
1658
+ const r = b.getSelectorFromElement(i), o = b.find(r).filter((l) => l === this._element);
1659
+ r !== null && o.length && this._triggerArray.push(i);
1660
+ }
1661
+ this._initializeChildren(), this._config.parent || this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), this._config.toggle && this.toggle();
1662
+ }
1663
+ // Getters
1664
+ static get Default() {
1665
+ return Ho;
1666
+ }
1667
+ static get DefaultType() {
1668
+ return Wo;
1669
+ }
1670
+ static get NAME() {
1671
+ return So;
1672
+ }
1673
+ // Public
1674
+ toggle() {
1675
+ this._isShown() ? this.hide() : this.show();
1676
+ }
1677
+ show() {
1678
+ if (this._isTransitioning || this._isShown())
1679
+ return;
1680
+ let t = [];
1681
+ if (this._config.parent && (t = this._getFirstLevelChildren(Vo).filter((l) => l !== this._element).map((l) => Ht.getOrCreateInstance(l, {
1682
+ toggle: !1
1683
+ }))), t.length && t[0]._isTransitioning || f.trigger(this._element, Do).defaultPrevented)
1684
+ return;
1685
+ for (const l of t)
1686
+ l.hide();
1687
+ const n = this._getDimension();
1688
+ this._element.classList.remove(It), this._element.classList.add(fe), this._element.style[n] = 0, this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0;
1689
+ const i = () => {
1690
+ this._isTransitioning = !1, this._element.classList.remove(fe), this._element.classList.add(It, Fe), this._element.style[n] = "", f.trigger(this._element, Lo);
1691
+ }, o = `scroll${n[0].toUpperCase() + n.slice(1)}`;
1692
+ this._queueCallback(i, this._element, !0), this._element.style[n] = `${this._element[o]}px`;
1693
+ }
1694
+ hide() {
1695
+ if (this._isTransitioning || !this._isShown() || f.trigger(this._element, No).defaultPrevented)
1696
+ return;
1697
+ const e = this._getDimension();
1698
+ this._element.style[e] = `${this._element.getBoundingClientRect()[e]}px`, Jt(this._element), this._element.classList.add(fe), this._element.classList.remove(It, Fe);
1699
+ for (const i of this._triggerArray) {
1700
+ const r = b.getElementFromSelector(i);
1701
+ r && !this._isShown(r) && this._addAriaAndCollapsedClass([i], !1);
1702
+ }
1703
+ this._isTransitioning = !0;
1704
+ const n = () => {
1705
+ this._isTransitioning = !1, this._element.classList.remove(fe), this._element.classList.add(It), f.trigger(this._element, $o);
1706
+ };
1707
+ this._element.style[e] = "", this._queueCallback(n, this._element, !0);
1708
+ }
1709
+ // Private
1710
+ _isShown(t = this._element) {
1711
+ return t.classList.contains(Fe);
1712
+ }
1713
+ _configAfterMerge(t) {
1714
+ return t.toggle = !!t.toggle, t.parent = at(t.parent), t;
1715
+ }
1716
+ _getDimension() {
1717
+ return this._element.classList.contains(Po) ? xo : Ro;
1718
+ }
1719
+ _initializeChildren() {
1720
+ if (!this._config.parent)
1721
+ return;
1722
+ const t = this._getFirstLevelChildren(ns);
1723
+ for (const e of t) {
1724
+ const n = b.getElementFromSelector(e);
1725
+ n && this._addAriaAndCollapsedClass([e], this._isShown(n));
1726
+ }
1727
+ }
1728
+ _getFirstLevelChildren(t) {
1729
+ const e = b.find(ko, this._config.parent);
1730
+ return b.find(t, this._config.parent).filter((n) => !e.includes(n));
1731
+ }
1732
+ _addAriaAndCollapsedClass(t, e) {
1733
+ if (t.length)
1734
+ for (const n of t)
1735
+ n.classList.toggle(Mo, !e), n.setAttribute("aria-expanded", e);
1736
+ }
1737
+ // Static
1738
+ static jQueryInterface(t) {
1739
+ const e = {};
1740
+ return typeof t == "string" && /show|hide/.test(t) && (e.toggle = !1), this.each(function() {
1741
+ const n = Ht.getOrCreateInstance(this, e);
1742
+ if (typeof t == "string") {
1743
+ if (typeof n[t] > "u")
1744
+ throw new TypeError(`No method named "${t}"`);
1745
+ n[t]();
1746
+ }
1747
+ });
1748
+ }
1749
+ }
1750
+ f.on(document, Io, ns, function(s) {
1751
+ (s.target.tagName === "A" || s.delegateTarget && s.delegateTarget.tagName === "A") && s.preventDefault();
1752
+ for (const t of b.getMultipleElementsFromSelector(this))
1753
+ Ht.getOrCreateInstance(t, {
1754
+ toggle: !1
1755
+ }).toggle();
1756
+ });
1757
+ U(Ht);
1758
+ const Ks = "dropdown", Yo = "ds.dropdown", Tt = `.${Yo}`, As = ".data-api", Fo = "Escape", qs = "Tab", Bo = "ArrowUp", Us = "ArrowDown", jo = 2, Ko = `hide${Tt}`, qo = `hidden${Tt}`, Uo = `show${Tt}`, zo = `shown${Tt}`, di = `click${Tt}${As}`, ui = `keydown${Tt}${As}`, Go = `keyup${Tt}${As}`, $t = "show", Xo = "dropup", Qo = "dropend", Jo = "dropstart", Zo = "dropup-center", ta = "dropdown-center", _t = '[data-ds-toggle="dropdown"]:not(.disabled):not(:disabled)', ea = `${_t}.${$t}`, Ee = ".dropdown-menu", sa = ".navbar", na = ".navbar-nav", ia = ".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", ra = K() ? "top-end" : "top-start", oa = K() ? "top-start" : "top-end", aa = K() ? "bottom-end" : "bottom-start", la = K() ? "bottom-start" : "bottom-end", ca = K() ? "left-start" : "right-start", da = K() ? "right-start" : "left-start", ua = "top", fa = "bottom", ha = {
1759
+ autoClose: !0,
1760
+ boundary: "clippingParents",
1761
+ display: "dynamic",
1762
+ offset: [0, 2],
1763
+ popperConfig: null,
1764
+ reference: "toggle"
1765
+ }, pa = {
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
+ class X extends Q {
1774
+ constructor(t, e) {
1775
+ super(t, e), this._popper = null, this._parent = this._element.parentNode, this._menu = b.next(this._element, Ee)[0] || b.prev(this._element, Ee)[0] || b.findOne(Ee, this._parent), this._inNavbar = this._detectNavbar();
1776
+ }
1777
+ // Getters
1778
+ static get Default() {
1779
+ return ha;
1780
+ }
1781
+ static get DefaultType() {
1782
+ return pa;
1783
+ }
1784
+ static get NAME() {
1785
+ return Ks;
1786
+ }
1787
+ // Public
1788
+ toggle() {
1789
+ return this._isShown() ? this.hide() : this.show();
1790
+ }
1791
+ show() {
1792
+ if (lt(this._element) || this._isShown())
1793
+ return;
1794
+ const t = {
1795
+ relatedTarget: this._element
1796
+ };
1797
+ if (!f.trigger(this._element, Uo, t).defaultPrevented) {
1798
+ if (this._createPopper(), "ontouchstart" in document.documentElement && !this._parent.closest(na))
1799
+ for (const n of [].concat(...document.body.children))
1800
+ f.on(n, "mouseover", ye);
1801
+ this._element.focus(), this._element.setAttribute("aria-expanded", !0), this._menu.classList.add($t), this._element.classList.add($t), f.trigger(this._element, zo, t);
1802
+ }
1803
+ }
1804
+ hide() {
1805
+ if (lt(this._element) || !this._isShown())
1806
+ return;
1807
+ const t = {
1808
+ relatedTarget: this._element
1809
+ };
1810
+ this._completeHide(t);
1811
+ }
1812
+ dispose() {
1813
+ this._popper && this._popper.destroy(), super.dispose();
1814
+ }
1815
+ update() {
1816
+ this._inNavbar = this._detectNavbar(), this._popper && this._popper.update();
1817
+ }
1818
+ // Private
1819
+ _completeHide(t) {
1820
+ if (!f.trigger(this._element, Ko, t).defaultPrevented) {
1821
+ if ("ontouchstart" in document.documentElement)
1822
+ for (const n of [].concat(...document.body.children))
1823
+ f.off(n, "mouseover", ye);
1824
+ this._popper && this._popper.destroy(), this._menu.classList.remove($t), this._element.classList.remove($t), this._element.setAttribute("aria-expanded", "false"), et.removeDataAttribute(this._menu, "popper"), f.trigger(this._element, qo, t);
1825
+ }
1826
+ }
1827
+ _getConfig(t) {
1828
+ if (t = super._getConfig(t), typeof t.reference == "object" && !tt(t.reference) && typeof t.reference.getBoundingClientRect != "function")
1829
+ throw new TypeError(`${Ks.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
1830
+ return t;
1831
+ }
1832
+ _createPopper() {
1833
+ if (typeof Un > "u")
1834
+ throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");
1835
+ let t = this._element;
1836
+ this._config.reference === "parent" ? t = this._parent : tt(this._config.reference) ? t = at(this._config.reference) : typeof this._config.reference == "object" && (t = this._config.reference);
1837
+ const e = this._getPopperConfig();
1838
+ this._popper = Es(t, this._menu, e);
1839
+ }
1840
+ _isShown() {
1841
+ return this._menu.classList.contains($t);
1842
+ }
1843
+ _getPlacement() {
1844
+ const t = this._parent;
1845
+ if (t.classList.contains(Qo))
1846
+ return ca;
1847
+ if (t.classList.contains(Jo))
1848
+ return da;
1849
+ if (t.classList.contains(Zo))
1850
+ return ua;
1851
+ if (t.classList.contains(ta))
1852
+ return fa;
1853
+ const e = getComputedStyle(this._menu).getPropertyValue("--ds-position").trim() === "end";
1854
+ return t.classList.contains(Xo) ? e ? oa : ra : e ? la : aa;
1855
+ }
1856
+ _detectNavbar() {
1857
+ return this._element.closest(sa) !== null;
1858
+ }
1859
+ _getOffset() {
1860
+ const {
1861
+ offset: t
1862
+ } = this._config;
1863
+ return typeof t == "string" ? t.split(",").map((e) => Number.parseInt(e, 10)) : typeof t == "function" ? (e) => t(e, this._element) : t;
1864
+ }
1865
+ _getPopperConfig() {
1866
+ const t = {
1867
+ placement: this._getPlacement(),
1868
+ modifiers: [{
1869
+ name: "preventOverflow",
1870
+ options: {
1871
+ boundary: this._config.boundary
1872
+ }
1873
+ }, {
1874
+ name: "offset",
1875
+ options: {
1876
+ offset: this._getOffset()
1877
+ }
1878
+ }]
1879
+ };
1880
+ return (this._inNavbar || this._config.display === "static") && (et.setDataAttribute(this._menu, "popper", "static"), t.modifiers = [{
1881
+ name: "applyStyles",
1882
+ enabled: !1
1883
+ }]), {
1884
+ ...t,
1885
+ ...H(this._config.popperConfig, [void 0, t])
1886
+ };
1887
+ }
1888
+ _selectMenuItem({
1889
+ key: t,
1890
+ target: e
1891
+ }) {
1892
+ const n = b.find(ia, this._menu).filter((i) => Yt(i));
1893
+ n.length && bs(n, e, t === Us, !n.includes(e)).focus();
1894
+ }
1895
+ // Static
1896
+ static jQueryInterface(t) {
1897
+ return this.each(function() {
1898
+ const e = X.getOrCreateInstance(this, t);
1899
+ if (typeof t == "string") {
1900
+ if (typeof e[t] > "u")
1901
+ throw new TypeError(`No method named "${t}"`);
1902
+ e[t]();
1903
+ }
1904
+ });
1905
+ }
1906
+ static clearMenus(t) {
1907
+ if (t.button === jo || t.type === "keyup" && t.key !== qs)
1908
+ return;
1909
+ const e = b.find(ea);
1910
+ for (const n of e) {
1911
+ const i = X.getInstance(n);
1912
+ if (!i || i._config.autoClose === !1)
1913
+ continue;
1914
+ const r = t.composedPath(), o = r.includes(i._menu);
1915
+ if (r.includes(i._element) || i._config.autoClose === "inside" && !o || i._config.autoClose === "outside" && o || i._menu.contains(t.target) && (t.type === "keyup" && t.key === qs || /input|select|option|textarea|form/i.test(t.target.tagName)))
1916
+ continue;
1917
+ const l = {
1918
+ relatedTarget: i._element
1919
+ };
1920
+ t.type === "click" && (l.clickEvent = t), i._completeHide(l);
1921
+ }
1922
+ }
1923
+ static dataApiKeydownHandler(t) {
1924
+ const e = /input|textarea/i.test(t.target.tagName), n = t.key === Fo, i = [Bo, Us].includes(t.key);
1925
+ if (!i && !n || e && !n)
1926
+ return;
1927
+ t.preventDefault();
1928
+ const r = this.matches(_t) ? this : b.prev(this, _t)[0] || b.next(this, _t)[0] || b.findOne(_t, t.delegateTarget.parentNode), o = X.getOrCreateInstance(r);
1929
+ if (i) {
1930
+ t.stopPropagation(), o.show(), o._selectMenuItem(t);
1931
+ return;
1932
+ }
1933
+ o._isShown() && (t.stopPropagation(), o.hide(), r.focus());
1934
+ }
1935
+ }
1936
+ f.on(document, ui, _t, X.dataApiKeydownHandler);
1937
+ f.on(document, ui, Ee, X.dataApiKeydownHandler);
1938
+ f.on(document, di, X.clearMenus);
1939
+ f.on(document, Go, X.clearMenus);
1940
+ f.on(document, di, _t, function(s) {
1941
+ s.preventDefault(), X.getOrCreateInstance(this).toggle();
1942
+ });
1943
+ U(X);
1944
+ const fi = "backdrop", _a = "fade", zs = "show", Gs = `mousedown.ds.${fi}`, ma = {
1945
+ className: "modal-backdrop",
1946
+ clickCallback: null,
1947
+ isAnimated: !1,
1948
+ isVisible: !0,
1949
+ // if false, we use the backdrop helper without adding any element to the dom
1950
+ rootElement: "body"
1951
+ // give the choice to place backdrop under different elements
1952
+ }, ga = {
1953
+ className: "string",
1954
+ clickCallback: "(function|null)",
1955
+ isAnimated: "boolean",
1956
+ isVisible: "boolean",
1957
+ rootElement: "(element|string)"
1958
+ };
1959
+ class hi extends Zt {
1960
+ constructor(t) {
1961
+ super(), this._config = this._getConfig(t), this._isAppended = !1, this._element = null;
1962
+ }
1963
+ // Getters
1964
+ static get Default() {
1965
+ return ma;
1966
+ }
1967
+ static get DefaultType() {
1968
+ return ga;
1969
+ }
1970
+ static get NAME() {
1971
+ return fi;
1972
+ }
1973
+ // Public
1974
+ show(t) {
1975
+ if (!this._config.isVisible) {
1976
+ H(t);
1977
+ return;
1978
+ }
1979
+ this._append();
1980
+ const e = this._getElement();
1981
+ this._config.isAnimated && Jt(e), e.classList.add(zs), this._emulateAnimation(() => {
1982
+ H(t);
1983
+ });
1984
+ }
1985
+ hide(t) {
1986
+ if (!this._config.isVisible) {
1987
+ H(t);
1988
+ return;
1989
+ }
1990
+ this._getElement().classList.remove(zs), this._emulateAnimation(() => {
1991
+ this.dispose(), H(t);
1992
+ });
1993
+ }
1994
+ dispose() {
1995
+ this._isAppended && (f.off(this._element, Gs), this._element.remove(), this._isAppended = !1);
1996
+ }
1997
+ // Private
1998
+ _getElement() {
1999
+ if (!this._element) {
2000
+ const t = document.createElement("div");
2001
+ t.className = this._config.className, this._config.isAnimated && t.classList.add(_a), this._element = t;
2002
+ }
2003
+ return this._element;
2004
+ }
2005
+ _configAfterMerge(t) {
2006
+ return t.rootElement = at(t.rootElement), t;
2007
+ }
2008
+ _append() {
2009
+ if (this._isAppended)
2010
+ return;
2011
+ const t = this._getElement();
2012
+ this._config.rootElement.append(t), f.on(t, Gs, () => {
2013
+ H(this._config.clickCallback);
2014
+ }), this._isAppended = !0;
2015
+ }
2016
+ _emulateAnimation(t) {
2017
+ Jn(t, this._getElement(), this._config.isAnimated);
2018
+ }
2019
+ }
2020
+ const va = "focustrap", Ea = "ds.focustrap", Te = `.${Ea}`, ba = `focusin${Te}`, ya = `keydown.tab${Te}`, Aa = "Tab", Ta = "forward", Xs = "backward", wa = {
2021
+ autofocus: !0,
2022
+ trapElement: null
2023
+ // The element to trap focus inside of
2024
+ }, Sa = {
2025
+ autofocus: "boolean",
2026
+ trapElement: "element"
2027
+ };
2028
+ class pi extends Zt {
2029
+ constructor(t) {
2030
+ super(), this._config = this._getConfig(t), this._isActive = !1, this._lastTabNavDirection = null;
2031
+ }
2032
+ // Getters
2033
+ static get Default() {
2034
+ return wa;
2035
+ }
2036
+ static get DefaultType() {
2037
+ return Sa;
2038
+ }
2039
+ static get NAME() {
2040
+ return va;
2041
+ }
2042
+ // Public
2043
+ activate() {
2044
+ this._isActive || (this._config.autofocus && this._config.trapElement.focus(), f.off(document, Te), f.on(document, ba, (t) => this._handleFocusin(t)), f.on(document, ya, (t) => this._handleKeydown(t)), this._isActive = !0);
2045
+ }
2046
+ deactivate() {
2047
+ this._isActive && (this._isActive = !1, f.off(document, Te));
2048
+ }
2049
+ // Private
2050
+ _handleFocusin(t) {
2051
+ const {
2052
+ trapElement: e
2053
+ } = this._config;
2054
+ if (t.target === document || t.target === e || e.contains(t.target))
2055
+ return;
2056
+ const n = b.focusableChildren(e);
2057
+ n.length === 0 ? e.focus() : this._lastTabNavDirection === Xs ? n[n.length - 1].focus() : n[0].focus();
2058
+ }
2059
+ _handleKeydown(t) {
2060
+ t.key === Aa && (this._lastTabNavDirection = t.shiftKey ? Xs : Ta);
2061
+ }
2062
+ }
2063
+ const Qs = ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", Js = ".sticky-top", he = "padding-right", Zs = "margin-right";
2064
+ class is {
2065
+ constructor() {
2066
+ this._element = document.body;
2067
+ }
2068
+ // Public
2069
+ getWidth() {
2070
+ const t = document.documentElement.clientWidth;
2071
+ return Math.abs(window.innerWidth - t);
2072
+ }
2073
+ hide() {
2074
+ const t = this.getWidth();
2075
+ this._disableOverFlow(), this._setElementAttributes(this._element, he, (e) => e + t), this._setElementAttributes(Qs, he, (e) => e + t), this._setElementAttributes(Js, Zs, (e) => e - t);
2076
+ }
2077
+ reset() {
2078
+ this._resetElementAttributes(this._element, "overflow"), this._resetElementAttributes(this._element, he), this._resetElementAttributes(Qs, he), this._resetElementAttributes(Js, Zs);
2079
+ }
2080
+ isOverflowing() {
2081
+ return this.getWidth() > 0;
2082
+ }
2083
+ // Private
2084
+ _disableOverFlow() {
2085
+ this._saveInitialAttribute(this._element, "overflow"), this._element.style.overflow = "hidden";
2086
+ }
2087
+ _setElementAttributes(t, e, n) {
2088
+ const i = this.getWidth(), r = (o) => {
2089
+ if (o !== this._element && window.innerWidth > o.clientWidth + i)
2090
+ return;
2091
+ this._saveInitialAttribute(o, e);
2092
+ const l = window.getComputedStyle(o).getPropertyValue(e);
2093
+ o.style.setProperty(e, `${n(Number.parseFloat(l))}px`);
2094
+ };
2095
+ this._applyManipulationCallback(t, r);
2096
+ }
2097
+ _saveInitialAttribute(t, e) {
2098
+ const n = t.style.getPropertyValue(e);
2099
+ n && et.setDataAttribute(t, e, n);
2100
+ }
2101
+ _resetElementAttributes(t, e) {
2102
+ const n = (i) => {
2103
+ const r = et.getDataAttribute(i, e);
2104
+ if (r === null) {
2105
+ i.style.removeProperty(e);
2106
+ return;
2107
+ }
2108
+ et.removeDataAttribute(i, e), i.style.setProperty(e, r);
2109
+ };
2110
+ this._applyManipulationCallback(t, n);
2111
+ }
2112
+ _applyManipulationCallback(t, e) {
2113
+ if (tt(t)) {
2114
+ e(t);
2115
+ return;
2116
+ }
2117
+ for (const n of b.find(t, this._element))
2118
+ e(n);
2119
+ }
2120
+ }
2121
+ const Ca = "modal", Oa = "ds.modal", q = `.${Oa}`, Da = ".data-api", La = "Escape", Na = `hide${q}`, $a = `hidePrevented${q}`, _i = `hidden${q}`, mi = `show${q}`, Ia = `shown${q}`, Ma = `resize${q}`, ka = `click.dismiss${q}`, Pa = `mousedown.dismiss${q}`, xa = `keydown.dismiss${q}`, Ra = `click${q}${Da}`, tn = "modal-open", Va = "fade", en = "show", Be = "modal-static", Ha = ".modal.show", Wa = ".modal-dialog", Ya = ".modal-body", Fa = '[data-ds-toggle="modal"]', Ba = {
2122
+ backdrop: !0,
2123
+ focus: !0,
2124
+ keyboard: !0
2125
+ }, ja = {
2126
+ backdrop: "(boolean|string)",
2127
+ focus: "boolean",
2128
+ keyboard: "boolean"
2129
+ };
2130
+ class yt extends Q {
2131
+ constructor(t, e) {
2132
+ super(t, e), this._dialog = b.findOne(Wa, this._element), this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._isShown = !1, this._isTransitioning = !1, this._scrollBar = new is(), this._addEventListeners();
2133
+ }
2134
+ // Getters
2135
+ static get Default() {
2136
+ return Ba;
2137
+ }
2138
+ static get DefaultType() {
2139
+ return ja;
2140
+ }
2141
+ static get NAME() {
2142
+ return Ca;
2143
+ }
2144
+ // Public
2145
+ toggle(t) {
2146
+ return this._isShown ? this.hide() : this.show(t);
2147
+ }
2148
+ show(t) {
2149
+ this._isShown || this._isTransitioning || f.trigger(this._element, mi, {
2150
+ relatedTarget: t
2151
+ }).defaultPrevented || (this._isShown = !0, this._isTransitioning = !0, this._scrollBar.hide(), document.body.classList.add(tn), this._adjustDialog(), this._backdrop.show(() => this._showElement(t)));
2152
+ }
2153
+ hide() {
2154
+ !this._isShown || this._isTransitioning || f.trigger(this._element, Na).defaultPrevented || (this._isShown = !1, this._isTransitioning = !0, this._focustrap.deactivate(), this._element.classList.remove(en), this._queueCallback(() => this._hideModal(), this._element, this._isAnimated()));
2155
+ }
2156
+ dispose() {
2157
+ f.off(window, q), f.off(this._dialog, q), this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
2158
+ }
2159
+ handleUpdate() {
2160
+ this._adjustDialog();
2161
+ }
2162
+ // Private
2163
+ _initializeBackDrop() {
2164
+ return new hi({
2165
+ isVisible: !!this._config.backdrop,
2166
+ // 'static' option will be translated to true, and booleans will keep their value,
2167
+ isAnimated: this._isAnimated()
2168
+ });
2169
+ }
2170
+ _initializeFocusTrap() {
2171
+ return new pi({
2172
+ trapElement: this._element
2173
+ });
2174
+ }
2175
+ _showElement(t) {
2176
+ document.body.contains(this._element) || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0;
2177
+ const e = b.findOne(Ya, this._dialog);
2178
+ e && (e.scrollTop = 0), Jt(this._element), this._element.classList.add(en);
2179
+ const n = () => {
2180
+ this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, f.trigger(this._element, Ia, {
2181
+ relatedTarget: t
2182
+ });
2183
+ };
2184
+ this._queueCallback(n, this._dialog, this._isAnimated());
2185
+ }
2186
+ _addEventListeners() {
2187
+ f.on(this._element, xa, (t) => {
2188
+ if (t.key === La) {
2189
+ if (this._config.keyboard) {
2190
+ this.hide();
2191
+ return;
2192
+ }
2193
+ this._triggerBackdropTransition();
2194
+ }
2195
+ }), f.on(window, Ma, () => {
2196
+ this._isShown && !this._isTransitioning && this._adjustDialog();
2197
+ }), f.on(this._element, Pa, (t) => {
2198
+ f.one(this._element, ka, (e) => {
2199
+ if (!(this._element !== t.target || this._element !== e.target)) {
2200
+ if (this._config.backdrop === "static") {
2201
+ this._triggerBackdropTransition();
2202
+ return;
2203
+ }
2204
+ this._config.backdrop && this.hide();
2205
+ }
2206
+ });
2207
+ });
2208
+ }
2209
+ _hideModal() {
2210
+ this._element.style.display = "none", this._element.setAttribute("aria-hidden", !0), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide(() => {
2211
+ document.body.classList.remove(tn), this._resetAdjustments(), this._scrollBar.reset(), f.trigger(this._element, _i);
2212
+ });
2213
+ }
2214
+ _isAnimated() {
2215
+ return this._element.classList.contains(Va);
2216
+ }
2217
+ _triggerBackdropTransition() {
2218
+ if (f.trigger(this._element, $a).defaultPrevented)
2219
+ return;
2220
+ const e = this._element.scrollHeight > document.documentElement.clientHeight, n = this._element.style.overflowY;
2221
+ n === "hidden" || this._element.classList.contains(Be) || (e || (this._element.style.overflowY = "hidden"), this._element.classList.add(Be), this._queueCallback(() => {
2222
+ this._element.classList.remove(Be), this._queueCallback(() => {
2223
+ this._element.style.overflowY = n;
2224
+ }, this._dialog);
2225
+ }, this._dialog), this._element.focus());
2226
+ }
2227
+ /**
2228
+ * The following methods are used to handle overflowing modals
2229
+ */
2230
+ _adjustDialog() {
2231
+ const t = this._element.scrollHeight > document.documentElement.clientHeight, e = this._scrollBar.getWidth(), n = e > 0;
2232
+ if (n && !t) {
2233
+ const i = K() ? "paddingLeft" : "paddingRight";
2234
+ this._element.style[i] = `${e}px`;
2235
+ }
2236
+ if (!n && t) {
2237
+ const i = K() ? "paddingRight" : "paddingLeft";
2238
+ this._element.style[i] = `${e}px`;
2239
+ }
2240
+ }
2241
+ _resetAdjustments() {
2242
+ this._element.style.paddingLeft = "", this._element.style.paddingRight = "";
2243
+ }
2244
+ // Static
2245
+ static jQueryInterface(t, e) {
2246
+ return this.each(function() {
2247
+ const n = yt.getOrCreateInstance(this, t);
2248
+ if (typeof t == "string") {
2249
+ if (typeof n[t] > "u")
2250
+ throw new TypeError(`No method named "${t}"`);
2251
+ n[t](e);
2252
+ }
2253
+ });
2254
+ }
2255
+ }
2256
+ f.on(document, Ra, Fa, function(s) {
2257
+ const t = b.getElementFromSelector(this);
2258
+ ["A", "AREA"].includes(this.tagName) && s.preventDefault(), f.one(t, mi, (i) => {
2259
+ i.defaultPrevented || f.one(t, _i, () => {
2260
+ Yt(this) && this.focus();
2261
+ });
2262
+ });
2263
+ const e = b.findOne(Ha);
2264
+ e && yt.getInstance(e).hide(), yt.getOrCreateInstance(t).toggle(this);
2265
+ });
2266
+ Ne(yt);
2267
+ U(yt);
2268
+ const Ka = "offcanvas", qa = "ds.offcanvas", it = `.${qa}`, gi = ".data-api", Ua = `load${it}${gi}`, za = "Escape", sn = "show", nn = "showing", rn = "hiding", Ga = "offcanvas-backdrop", vi = ".offcanvas.show", Xa = `show${it}`, Qa = `shown${it}`, Ja = `hide${it}`, on = `hidePrevented${it}`, Ei = `hidden${it}`, Za = `resize${it}`, tl = `click${it}${gi}`, el = `keydown.dismiss${it}`, sl = '[data-ds-toggle="offcanvas"]', nl = {
2269
+ backdrop: !0,
2270
+ keyboard: !0,
2271
+ scroll: !1
2272
+ }, il = {
2273
+ backdrop: "(boolean|string)",
2274
+ keyboard: "boolean",
2275
+ scroll: "boolean"
2276
+ };
2277
+ class nt extends Q {
2278
+ constructor(t, e) {
2279
+ super(t, e), this._isShown = !1, this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._addEventListeners();
2280
+ }
2281
+ // Getters
2282
+ static get Default() {
2283
+ return nl;
2284
+ }
2285
+ static get DefaultType() {
2286
+ return il;
2287
+ }
2288
+ static get NAME() {
2289
+ return Ka;
2290
+ }
2291
+ // Public
2292
+ toggle(t) {
2293
+ return this._isShown ? this.hide() : this.show(t);
2294
+ }
2295
+ show(t) {
2296
+ if (this._isShown || f.trigger(this._element, Xa, {
2297
+ relatedTarget: t
2298
+ }).defaultPrevented)
2299
+ return;
2300
+ this._isShown = !0, this._backdrop.show(), this._config.scroll || new is().hide(), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.classList.add(nn);
2301
+ const n = () => {
2302
+ (!this._config.scroll || this._config.backdrop) && this._focustrap.activate(), this._element.classList.add(sn), this._element.classList.remove(nn), f.trigger(this._element, Qa, {
2303
+ relatedTarget: t
2304
+ });
2305
+ };
2306
+ this._queueCallback(n, this._element, !0);
2307
+ }
2308
+ hide() {
2309
+ if (!this._isShown || f.trigger(this._element, Ja).defaultPrevented)
2310
+ return;
2311
+ this._focustrap.deactivate(), this._element.blur(), this._isShown = !1, this._element.classList.add(rn), this._backdrop.hide();
2312
+ const e = () => {
2313
+ this._element.classList.remove(sn, rn), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._config.scroll || new is().reset(), f.trigger(this._element, Ei);
2314
+ };
2315
+ this._queueCallback(e, this._element, !0);
2316
+ }
2317
+ dispose() {
2318
+ this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
2319
+ }
2320
+ // Private
2321
+ _initializeBackDrop() {
2322
+ const t = () => {
2323
+ if (this._config.backdrop === "static") {
2324
+ f.trigger(this._element, on);
2325
+ return;
2326
+ }
2327
+ this.hide();
2328
+ }, e = !!this._config.backdrop;
2329
+ return new hi({
2330
+ className: Ga,
2331
+ isVisible: e,
2332
+ isAnimated: !0,
2333
+ rootElement: this._element.parentNode,
2334
+ clickCallback: e ? t : null
2335
+ });
2336
+ }
2337
+ _initializeFocusTrap() {
2338
+ return new pi({
2339
+ trapElement: this._element
2340
+ });
2341
+ }
2342
+ _addEventListeners() {
2343
+ f.on(this._element, el, (t) => {
2344
+ if (t.key === za) {
2345
+ if (this._config.keyboard) {
2346
+ this.hide();
2347
+ return;
2348
+ }
2349
+ f.trigger(this._element, on);
2350
+ }
2351
+ });
2352
+ }
2353
+ // Static
2354
+ static jQueryInterface(t) {
2355
+ return this.each(function() {
2356
+ const e = nt.getOrCreateInstance(this, t);
2357
+ if (typeof t == "string") {
2358
+ if (e[t] === void 0 || t.startsWith("_") || t === "constructor")
2359
+ throw new TypeError(`No method named "${t}"`);
2360
+ e[t](this);
2361
+ }
2362
+ });
2363
+ }
2364
+ }
2365
+ f.on(document, tl, sl, function(s) {
2366
+ const t = b.getElementFromSelector(this);
2367
+ if (["A", "AREA"].includes(this.tagName) && s.preventDefault(), lt(this))
2368
+ return;
2369
+ f.one(t, Ei, () => {
2370
+ Yt(this) && this.focus();
2371
+ });
2372
+ const e = b.findOne(vi);
2373
+ e && e !== t && nt.getInstance(e).hide(), nt.getOrCreateInstance(t).toggle(this);
2374
+ });
2375
+ f.on(window, Ua, () => {
2376
+ for (const s of b.find(vi))
2377
+ nt.getOrCreateInstance(s).show();
2378
+ });
2379
+ f.on(window, Za, () => {
2380
+ for (const s of b.find("[aria-modal][class*=show][class*=offcanvas-]"))
2381
+ getComputedStyle(s).position !== "fixed" && nt.getOrCreateInstance(s).hide();
2382
+ });
2383
+ Ne(nt);
2384
+ U(nt);
2385
+ const rl = /^aria-[\w-]*$/i, bi = {
2386
+ // Global attributes allowed on any supplied element below.
2387
+ "*": ["class", "dir", "id", "lang", "role", rl],
2388
+ a: ["target", "href", "title", "rel"],
2389
+ area: [],
2390
+ b: [],
2391
+ br: [],
2392
+ col: [],
2393
+ code: [],
2394
+ dd: [],
2395
+ div: [],
2396
+ dl: [],
2397
+ dt: [],
2398
+ em: [],
2399
+ hr: [],
2400
+ h1: [],
2401
+ h2: [],
2402
+ h3: [],
2403
+ h4: [],
2404
+ h5: [],
2405
+ h6: [],
2406
+ i: [],
2407
+ img: ["src", "srcset", "alt", "title", "width", "height"],
2408
+ li: [],
2409
+ ol: [],
2410
+ p: [],
2411
+ pre: [],
2412
+ s: [],
2413
+ small: [],
2414
+ span: [],
2415
+ sub: [],
2416
+ sup: [],
2417
+ strong: [],
2418
+ u: [],
2419
+ ul: []
2420
+ }, ol = /* @__PURE__ */ new Set(["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"]), al = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i, ll = (s, t) => {
2421
+ const e = s.nodeName.toLowerCase();
2422
+ return t.includes(e) ? ol.has(e) ? !!al.test(s.nodeValue) : !0 : t.filter((n) => n instanceof RegExp).some((n) => n.test(e));
2423
+ };
2424
+ function cl(s, t, e) {
2425
+ if (!s.length)
2426
+ return s;
2427
+ if (e && typeof e == "function")
2428
+ return e(s);
2429
+ const i = new window.DOMParser().parseFromString(s, "text/html"), r = [].concat(...i.body.querySelectorAll("*"));
2430
+ for (const o of r) {
2431
+ const l = o.nodeName.toLowerCase();
2432
+ if (!Object.keys(t).includes(l)) {
2433
+ o.remove();
2434
+ continue;
2435
+ }
2436
+ const c = [].concat(...o.attributes), u = [].concat(t["*"] || [], t[l] || []);
2437
+ for (const a of c)
2438
+ ll(a, u) || o.removeAttribute(a.nodeName);
2439
+ }
2440
+ return i.body.innerHTML;
2441
+ }
2442
+ const dl = "TemplateFactory", ul = {
2443
+ allowList: bi,
2444
+ content: {},
2445
+ // { selector : text , selector2 : text2 , }
2446
+ extraClass: "",
2447
+ html: !1,
2448
+ sanitize: !0,
2449
+ sanitizeFn: null,
2450
+ template: "<div></div>"
2451
+ }, fl = {
2452
+ allowList: "object",
2453
+ content: "object",
2454
+ extraClass: "(string|function)",
2455
+ html: "boolean",
2456
+ sanitize: "boolean",
2457
+ sanitizeFn: "(null|function)",
2458
+ template: "string"
2459
+ }, hl = {
2460
+ entry: "(string|element|function|null)",
2461
+ selector: "(string|element)"
2462
+ };
2463
+ class pl extends Zt {
2464
+ constructor(t) {
2465
+ super(), this._config = this._getConfig(t);
2466
+ }
2467
+ // Getters
2468
+ static get Default() {
2469
+ return ul;
2470
+ }
2471
+ static get DefaultType() {
2472
+ return fl;
2473
+ }
2474
+ static get NAME() {
2475
+ return dl;
2476
+ }
2477
+ // Public
2478
+ getContent() {
2479
+ return Object.values(this._config.content).map((t) => this._resolvePossibleFunction(t)).filter(Boolean);
2480
+ }
2481
+ hasContent() {
2482
+ return this.getContent().length > 0;
2483
+ }
2484
+ changeContent(t) {
2485
+ return this._checkContent(t), this._config.content = {
2486
+ ...this._config.content,
2487
+ ...t
2488
+ }, this;
2489
+ }
2490
+ toHtml() {
2491
+ const t = document.createElement("div");
2492
+ t.innerHTML = this._maybeSanitize(this._config.template);
2493
+ for (const [i, r] of Object.entries(this._config.content))
2494
+ this._setContent(t, r, i);
2495
+ const e = t.children[0], n = this._resolvePossibleFunction(this._config.extraClass);
2496
+ return n && e.classList.add(...n.split(" ")), e;
2497
+ }
2498
+ // Private
2499
+ _typeCheckConfig(t) {
2500
+ super._typeCheckConfig(t), this._checkContent(t.content);
2501
+ }
2502
+ _checkContent(t) {
2503
+ for (const [e, n] of Object.entries(t))
2504
+ super._typeCheckConfig({
2505
+ selector: e,
2506
+ entry: n
2507
+ }, hl);
2508
+ }
2509
+ _setContent(t, e, n) {
2510
+ const i = b.findOne(n, t);
2511
+ if (i) {
2512
+ if (e = this._resolvePossibleFunction(e), !e) {
2513
+ i.remove();
2514
+ return;
2515
+ }
2516
+ if (tt(e)) {
2517
+ this._putElementInTemplate(at(e), i);
2518
+ return;
2519
+ }
2520
+ if (this._config.html) {
2521
+ i.innerHTML = this._maybeSanitize(e);
2522
+ return;
2523
+ }
2524
+ i.textContent = e;
2525
+ }
2526
+ }
2527
+ _maybeSanitize(t) {
2528
+ return this._config.sanitize ? cl(t, this._config.allowList, this._config.sanitizeFn) : t;
2529
+ }
2530
+ _resolvePossibleFunction(t) {
2531
+ return H(t, [void 0, this]);
2532
+ }
2533
+ _putElementInTemplate(t, e) {
2534
+ if (this._config.html) {
2535
+ e.innerHTML = "", e.append(t);
2536
+ return;
2537
+ }
2538
+ e.textContent = t.textContent;
2539
+ }
2540
+ }
2541
+ const _l = "tooltip", ml = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]), je = "fade", gl = "modal", pe = "show", vl = ".tooltip-inner", an = `.${gl}`, ln = "hide.ds.modal", Ut = "hover", Ke = "focus", qe = "click", El = "manual", bl = "hide", yl = "hidden", Al = "show", Tl = "shown", wl = "inserted", Sl = "click", Cl = "focusin", Ol = "focusout", Dl = "mouseenter", Ll = "mouseleave", Nl = {
2542
+ AUTO: "auto",
2543
+ TOP: "top",
2544
+ RIGHT: K() ? "left" : "right",
2545
+ BOTTOM: "bottom",
2546
+ LEFT: K() ? "right" : "left"
2547
+ }, $l = {
2548
+ allowList: bi,
2549
+ animation: !0,
2550
+ boundary: "clippingParents",
2551
+ container: !1,
2552
+ customClass: "",
2553
+ delay: 0,
2554
+ fallbackPlacements: ["top", "right", "bottom", "left"],
2555
+ html: !1,
2556
+ offset: [0, 6],
2557
+ placement: "top",
2558
+ popperConfig: null,
2559
+ sanitize: !0,
2560
+ sanitizeFn: null,
2561
+ selector: !1,
2562
+ template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
2563
+ title: "",
2564
+ trigger: "hover focus"
2565
+ }, Il = {
2566
+ allowList: "object",
2567
+ animation: "boolean",
2568
+ boundary: "(string|element)",
2569
+ container: "(string|element|boolean)",
2570
+ customClass: "(string|function)",
2571
+ delay: "(number|object)",
2572
+ fallbackPlacements: "array",
2573
+ html: "boolean",
2574
+ offset: "(array|string|function)",
2575
+ placement: "(string|function)",
2576
+ popperConfig: "(null|object|function)",
2577
+ sanitize: "boolean",
2578
+ sanitizeFn: "(null|function)",
2579
+ selector: "(string|boolean)",
2580
+ template: "string",
2581
+ title: "(string|element|function)",
2582
+ trigger: "string"
2583
+ };
2584
+ class wt extends Q {
2585
+ constructor(t, e) {
2586
+ if (typeof Un > "u")
2587
+ throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");
2588
+ super(t, e), this._isEnabled = !0, this._timeout = 0, this._isHovered = null, this._activeTrigger = {}, this._popper = null, this._templateFactory = null, this._newContent = null, this.tip = null, this._setListeners(), this._config.selector || this._fixTitle();
2589
+ }
2590
+ // Getters
2591
+ static get Default() {
2592
+ return $l;
2593
+ }
2594
+ static get DefaultType() {
2595
+ return Il;
2596
+ }
2597
+ static get NAME() {
2598
+ return _l;
2599
+ }
2600
+ // Public
2601
+ enable() {
2602
+ this._isEnabled = !0;
2603
+ }
2604
+ disable() {
2605
+ this._isEnabled = !1;
2606
+ }
2607
+ toggleEnabled() {
2608
+ this._isEnabled = !this._isEnabled;
2609
+ }
2610
+ toggle() {
2611
+ if (this._isEnabled) {
2612
+ if (this._isShown()) {
2613
+ this._leave();
2614
+ return;
2615
+ }
2616
+ this._enter();
2617
+ }
2618
+ }
2619
+ dispose() {
2620
+ clearTimeout(this._timeout), f.off(this._element.closest(an), ln, this._hideModalHandler), this._element.getAttribute("data-ds-original-title") && this._element.setAttribute("title", this._element.getAttribute("data-ds-original-title")), this._disposePopper(), super.dispose();
2621
+ }
2622
+ show() {
2623
+ if (this._element.style.display === "none")
2624
+ throw new Error("Please use show on visible elements");
2625
+ if (!(this._isWithContent() && this._isEnabled))
2626
+ return;
2627
+ const t = f.trigger(this._element, this.constructor.eventName(Al)), n = (Xn(this._element) || this._element.ownerDocument.documentElement).contains(this._element);
2628
+ if (t.defaultPrevented || !n)
2629
+ return;
2630
+ this._disposePopper();
2631
+ const i = this._getTipElement();
2632
+ this._element.setAttribute("aria-describedby", i.getAttribute("id"));
2633
+ const {
2634
+ container: r
2635
+ } = this._config;
2636
+ if (this._element.ownerDocument.documentElement.contains(this.tip) || (r.append(i), f.trigger(this._element, this.constructor.eventName(wl))), this._popper = this._createPopper(i), i.classList.add(pe), "ontouchstart" in document.documentElement)
2637
+ for (const l of [].concat(...document.body.children))
2638
+ f.on(l, "mouseover", ye);
2639
+ const o = () => {
2640
+ f.trigger(this._element, this.constructor.eventName(Tl)), this._isHovered === !1 && this._leave(), this._isHovered = !1;
2641
+ };
2642
+ this._queueCallback(o, this.tip, this._isAnimated());
2643
+ }
2644
+ hide() {
2645
+ if (!this._isShown() || f.trigger(this._element, this.constructor.eventName(bl)).defaultPrevented)
2646
+ return;
2647
+ if (this._getTipElement().classList.remove(pe), "ontouchstart" in document.documentElement)
2648
+ for (const i of [].concat(...document.body.children))
2649
+ f.off(i, "mouseover", ye);
2650
+ this._activeTrigger[qe] = !1, this._activeTrigger[Ke] = !1, this._activeTrigger[Ut] = !1, this._isHovered = null;
2651
+ const n = () => {
2652
+ this._isWithActiveTrigger() || (this._isHovered || this._disposePopper(), this._element.removeAttribute("aria-describedby"), f.trigger(this._element, this.constructor.eventName(yl)));
2653
+ };
2654
+ this._queueCallback(n, this.tip, this._isAnimated());
2655
+ }
2656
+ update() {
2657
+ this._popper && this._popper.update();
2658
+ }
2659
+ // Protected
2660
+ _isWithContent() {
2661
+ return !!this._getTitle();
2662
+ }
2663
+ _getTipElement() {
2664
+ return this.tip || (this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())), this.tip;
2665
+ }
2666
+ _createTipElement(t) {
2667
+ const e = this._getTemplateFactory(t).toHtml();
2668
+ if (!e)
2669
+ return null;
2670
+ e.classList.remove(je, pe), e.classList.add(`ds-${this.constructor.NAME}-auto`);
2671
+ const n = vr(this.constructor.NAME).toString();
2672
+ return e.setAttribute("id", n), this._isAnimated() && e.classList.add(je), e;
2673
+ }
2674
+ setContent(t) {
2675
+ this._newContent = t, this._isShown() && (this._disposePopper(), this.show());
2676
+ }
2677
+ _getTemplateFactory(t) {
2678
+ return this._templateFactory ? this._templateFactory.changeContent(t) : this._templateFactory = new pl({
2679
+ ...this._config,
2680
+ // the `content` var has to be after `this._config`
2681
+ // to override config.content in case of popover
2682
+ content: t,
2683
+ extraClass: this._resolvePossibleFunction(this._config.customClass)
2684
+ }), this._templateFactory;
2685
+ }
2686
+ _getContentForTemplate() {
2687
+ return {
2688
+ [vl]: this._getTitle()
2689
+ };
2690
+ }
2691
+ _getTitle() {
2692
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-ds-original-title");
2693
+ }
2694
+ // Private
2695
+ _initializeOnDelegatedTarget(t) {
2696
+ return this.constructor.getOrCreateInstance(t.delegateTarget, this._getDelegateConfig());
2697
+ }
2698
+ _isAnimated() {
2699
+ return this._config.animation || this.tip && this.tip.classList.contains(je);
2700
+ }
2701
+ _isShown() {
2702
+ return this.tip && this.tip.classList.contains(pe);
2703
+ }
2704
+ _createPopper(t) {
2705
+ const e = H(this._config.placement, [this, t, this._element]), n = Nl[e.toUpperCase()];
2706
+ return Es(this._element, t, this._getPopperConfig(n));
2707
+ }
2708
+ _getOffset() {
2709
+ const {
2710
+ offset: t
2711
+ } = this._config;
2712
+ return typeof t == "string" ? t.split(",").map((e) => Number.parseInt(e, 10)) : typeof t == "function" ? (e) => t(e, this._element) : t;
2713
+ }
2714
+ _resolvePossibleFunction(t) {
2715
+ return H(t, [this._element, this._element]);
2716
+ }
2717
+ _getPopperConfig(t) {
2718
+ const e = {
2719
+ placement: t,
2720
+ modifiers: [{
2721
+ name: "flip",
2722
+ options: {
2723
+ fallbackPlacements: this._config.fallbackPlacements
2724
+ }
2725
+ }, {
2726
+ name: "offset",
2727
+ options: {
2728
+ offset: this._getOffset()
2729
+ }
2730
+ }, {
2731
+ name: "preventOverflow",
2732
+ options: {
2733
+ boundary: this._config.boundary
2734
+ }
2735
+ }, {
2736
+ name: "arrow",
2737
+ options: {
2738
+ element: `.${this.constructor.NAME}-arrow`
2739
+ }
2740
+ }, {
2741
+ name: "preSetPlacement",
2742
+ enabled: !0,
2743
+ phase: "beforeMain",
2744
+ fn: (n) => {
2745
+ this._getTipElement().setAttribute("data-popper-placement", n.state.placement);
2746
+ }
2747
+ }]
2748
+ };
2749
+ return {
2750
+ ...e,
2751
+ ...H(this._config.popperConfig, [void 0, e])
2752
+ };
2753
+ }
2754
+ _setListeners() {
2755
+ const t = this._config.trigger.split(" ");
2756
+ for (const e of t)
2757
+ if (e === "click")
2758
+ f.on(this._element, this.constructor.eventName(Sl), this._config.selector, (n) => {
2759
+ const i = this._initializeOnDelegatedTarget(n);
2760
+ i._activeTrigger[qe] = !(i._isShown() && i._activeTrigger[qe]), i.toggle();
2761
+ });
2762
+ else if (e !== El) {
2763
+ const n = e === Ut ? this.constructor.eventName(Dl) : this.constructor.eventName(Cl), i = e === Ut ? this.constructor.eventName(Ll) : this.constructor.eventName(Ol);
2764
+ f.on(this._element, n, this._config.selector, (r) => {
2765
+ const o = this._initializeOnDelegatedTarget(r);
2766
+ o._activeTrigger[r.type === "focusin" ? Ke : Ut] = !0, o._enter();
2767
+ }), f.on(this._element, i, this._config.selector, (r) => {
2768
+ const o = this._initializeOnDelegatedTarget(r);
2769
+ o._activeTrigger[r.type === "focusout" ? Ke : Ut] = o._element.contains(r.relatedTarget), o._leave();
2770
+ });
2771
+ }
2772
+ this._hideModalHandler = () => {
2773
+ this._element && this.hide();
2774
+ }, f.on(this._element.closest(an), ln, this._hideModalHandler);
2775
+ }
2776
+ _fixTitle() {
2777
+ const t = this._element.getAttribute("title");
2778
+ t && (!this._element.getAttribute("aria-label") && !this._element.textContent.trim() && this._element.setAttribute("aria-label", t), this._element.setAttribute("data-ds-original-title", t), this._element.removeAttribute("title"));
2779
+ }
2780
+ _enter() {
2781
+ if (this._isShown() || this._isHovered) {
2782
+ this._isHovered = !0;
2783
+ return;
2784
+ }
2785
+ this._isHovered = !0, this._setTimeout(() => {
2786
+ this._isHovered && this.show();
2787
+ }, this._config.delay.show);
2788
+ }
2789
+ _leave() {
2790
+ this._isWithActiveTrigger() || (this._isHovered = !1, this._setTimeout(() => {
2791
+ this._isHovered || this.hide();
2792
+ }, this._config.delay.hide));
2793
+ }
2794
+ _setTimeout(t, e) {
2795
+ clearTimeout(this._timeout), this._timeout = setTimeout(t, e);
2796
+ }
2797
+ _isWithActiveTrigger() {
2798
+ return Object.values(this._activeTrigger).includes(!0);
2799
+ }
2800
+ _getConfig(t) {
2801
+ const e = et.getDataAttributes(this._element);
2802
+ for (const n of Object.keys(e))
2803
+ ml.has(n) && delete e[n];
2804
+ return t = {
2805
+ ...e,
2806
+ ...typeof t == "object" && t ? t : {}
2807
+ }, t = this._mergeConfigObj(t), t = this._configAfterMerge(t), this._typeCheckConfig(t), t;
2808
+ }
2809
+ _configAfterMerge(t) {
2810
+ return t.container = t.container === !1 ? document.body : at(t.container), typeof t.delay == "number" && (t.delay = {
2811
+ show: t.delay,
2812
+ hide: t.delay
2813
+ }), typeof t.title == "number" && (t.title = t.title.toString()), typeof t.content == "number" && (t.content = t.content.toString()), t;
2814
+ }
2815
+ _getDelegateConfig() {
2816
+ const t = {};
2817
+ for (const [e, n] of Object.entries(this._config))
2818
+ this.constructor.Default[e] !== n && (t[e] = n);
2819
+ return t.selector = !1, t.trigger = "manual", t;
2820
+ }
2821
+ _disposePopper() {
2822
+ this._popper && (this._popper.destroy(), this._popper = null), this.tip && (this.tip.remove(), this.tip = null);
2823
+ }
2824
+ // Static
2825
+ static jQueryInterface(t) {
2826
+ return this.each(function() {
2827
+ const e = wt.getOrCreateInstance(this, t);
2828
+ if (typeof t == "string") {
2829
+ if (typeof e[t] > "u")
2830
+ throw new TypeError(`No method named "${t}"`);
2831
+ e[t]();
2832
+ }
2833
+ });
2834
+ }
2835
+ }
2836
+ U(wt);
2837
+ const Ml = "popover", kl = ".popover-header", Pl = ".popover-body", xl = {
2838
+ ...wt.Default,
2839
+ content: "",
2840
+ offset: [0, 8],
2841
+ placement: "right",
2842
+ template: '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',
2843
+ trigger: "click"
2844
+ }, Rl = {
2845
+ ...wt.DefaultType,
2846
+ content: "(null|string|element|function)"
2847
+ };
2848
+ class $e extends wt {
2849
+ // Getters
2850
+ static get Default() {
2851
+ return xl;
2852
+ }
2853
+ static get DefaultType() {
2854
+ return Rl;
2855
+ }
2856
+ static get NAME() {
2857
+ return Ml;
2858
+ }
2859
+ // Overrides
2860
+ _isWithContent() {
2861
+ return this._getTitle() || this._getContent();
2862
+ }
2863
+ // Private
2864
+ _getContentForTemplate() {
2865
+ return {
2866
+ [kl]: this._getTitle(),
2867
+ [Pl]: this._getContent()
2868
+ };
2869
+ }
2870
+ _getContent() {
2871
+ return this._resolvePossibleFunction(this._config.content);
2872
+ }
2873
+ // Static
2874
+ static jQueryInterface(t) {
2875
+ return this.each(function() {
2876
+ const e = $e.getOrCreateInstance(this, t);
2877
+ if (typeof t == "string") {
2878
+ if (typeof e[t] > "u")
2879
+ throw new TypeError(`No method named "${t}"`);
2880
+ e[t]();
2881
+ }
2882
+ });
2883
+ }
2884
+ }
2885
+ U($e);
2886
+ const Vl = "scrollspy", Hl = "ds.scrollspy", Ts = `.${Hl}`, Wl = ".data-api", Yl = `activate${Ts}`, cn = `click${Ts}`, Fl = `load${Ts}${Wl}`, Bl = "dropdown-item", Dt = "active", jl = '[data-ds-spy="scroll"]', Ue = "[href]", Kl = ".nav, .list-group", dn = ".nav-link", ql = ".nav-item", Ul = ".list-group-item", zl = `${dn}, ${ql} > ${dn}, ${Ul}`, Gl = ".dropdown", Xl = ".dropdown-toggle", Ql = {
2887
+ offset: null,
2888
+ // TODO: v6 @deprecated, keep it for backwards compatibility reasons
2889
+ rootMargin: "0px 0px -25%",
2890
+ smoothScroll: !1,
2891
+ target: null,
2892
+ threshold: [0.1, 0.5, 1]
2893
+ }, Jl = {
2894
+ offset: "(number|null)",
2895
+ // TODO v6 @deprecated, keep it for backwards compatibility reasons
2896
+ rootMargin: "string",
2897
+ smoothScroll: "boolean",
2898
+ target: "element",
2899
+ threshold: "array"
2900
+ };
2901
+ class ne extends Q {
2902
+ constructor(t, e) {
2903
+ super(t, e), this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map(), this._rootElement = getComputedStyle(this._element).overflowY === "visible" ? null : this._element, this._activeTarget = null, this._observer = null, this._previousScrollData = {
2904
+ visibleEntryTop: 0,
2905
+ parentScrollTop: 0
2906
+ }, this.refresh();
2907
+ }
2908
+ // Getters
2909
+ static get Default() {
2910
+ return Ql;
2911
+ }
2912
+ static get DefaultType() {
2913
+ return Jl;
2914
+ }
2915
+ static get NAME() {
2916
+ return Vl;
2917
+ }
2918
+ // Public
2919
+ refresh() {
2920
+ this._initializeTargetsAndObservables(), this._maybeEnableSmoothScroll(), this._observer ? this._observer.disconnect() : this._observer = this._getNewObserver();
2921
+ for (const t of this._observableSections.values())
2922
+ this._observer.observe(t);
2923
+ }
2924
+ dispose() {
2925
+ this._observer.disconnect(), super.dispose();
2926
+ }
2927
+ // Private
2928
+ _configAfterMerge(t) {
2929
+ return t.target = at(t.target) || document.body, t.rootMargin = t.offset ? `${t.offset}px 0px -30%` : t.rootMargin, typeof t.threshold == "string" && (t.threshold = t.threshold.split(",").map((e) => Number.parseFloat(e))), t;
2930
+ }
2931
+ _maybeEnableSmoothScroll() {
2932
+ this._config.smoothScroll && (f.off(this._config.target, cn), f.on(this._config.target, cn, Ue, (t) => {
2933
+ const e = this._observableSections.get(t.target.hash);
2934
+ if (e) {
2935
+ t.preventDefault();
2936
+ const n = this._rootElement || window, i = e.offsetTop - this._element.offsetTop;
2937
+ if (n.scrollTo) {
2938
+ n.scrollTo({
2939
+ top: i,
2940
+ behavior: "smooth"
2941
+ });
2942
+ return;
2943
+ }
2944
+ n.scrollTop = i;
2945
+ }
2946
+ }));
2947
+ }
2948
+ _getNewObserver() {
2949
+ const t = {
2950
+ root: this._rootElement,
2951
+ threshold: this._config.threshold,
2952
+ rootMargin: this._config.rootMargin
2953
+ };
2954
+ return new IntersectionObserver((e) => this._observerCallback(e), t);
2955
+ }
2956
+ // The logic of selection
2957
+ _observerCallback(t) {
2958
+ const e = (o) => this._targetLinks.get(`#${o.target.id}`), n = (o) => {
2959
+ this._previousScrollData.visibleEntryTop = o.target.offsetTop, this._process(e(o));
2960
+ }, i = (this._rootElement || document.documentElement).scrollTop, r = i >= this._previousScrollData.parentScrollTop;
2961
+ this._previousScrollData.parentScrollTop = i;
2962
+ for (const o of t) {
2963
+ if (!o.isIntersecting) {
2964
+ this._activeTarget = null, this._clearActiveClass(e(o));
2965
+ continue;
2966
+ }
2967
+ const l = o.target.offsetTop >= this._previousScrollData.visibleEntryTop;
2968
+ if (r && l) {
2969
+ if (n(o), !i)
2970
+ return;
2971
+ continue;
2972
+ }
2973
+ !r && !l && n(o);
2974
+ }
2975
+ }
2976
+ _initializeTargetsAndObservables() {
2977
+ this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map();
2978
+ const t = b.find(Ue, this._config.target);
2979
+ for (const e of t) {
2980
+ if (!e.hash || lt(e))
2981
+ continue;
2982
+ const n = b.findOne(decodeURI(e.hash), this._element);
2983
+ Yt(n) && (this._targetLinks.set(decodeURI(e.hash), e), this._observableSections.set(e.hash, n));
2984
+ }
2985
+ }
2986
+ _process(t) {
2987
+ this._activeTarget !== t && (this._clearActiveClass(this._config.target), this._activeTarget = t, t.classList.add(Dt), this._activateParents(t), f.trigger(this._element, Yl, {
2988
+ relatedTarget: t
2989
+ }));
2990
+ }
2991
+ _activateParents(t) {
2992
+ if (t.classList.contains(Bl)) {
2993
+ b.findOne(Xl, t.closest(Gl)).classList.add(Dt);
2994
+ return;
2995
+ }
2996
+ for (const e of b.parents(t, Kl))
2997
+ for (const n of b.prev(e, zl))
2998
+ n.classList.add(Dt);
2999
+ }
3000
+ _clearActiveClass(t) {
3001
+ t.classList.remove(Dt);
3002
+ const e = b.find(`${Ue}.${Dt}`, t);
3003
+ for (const n of e)
3004
+ n.classList.remove(Dt);
3005
+ }
3006
+ // Static
3007
+ static jQueryInterface(t) {
3008
+ return this.each(function() {
3009
+ const e = ne.getOrCreateInstance(this, t);
3010
+ if (typeof t == "string") {
3011
+ if (e[t] === void 0 || t.startsWith("_") || t === "constructor")
3012
+ throw new TypeError(`No method named "${t}"`);
3013
+ e[t]();
3014
+ }
3015
+ });
3016
+ }
3017
+ }
3018
+ f.on(window, Fl, () => {
3019
+ for (const s of b.find(jl))
3020
+ ne.getOrCreateInstance(s);
3021
+ });
3022
+ U(ne);
3023
+ const Zl = "tab", tc = "ds.tab", St = `.${tc}`, ec = `hide${St}`, sc = `hidden${St}`, nc = `show${St}`, ic = `shown${St}`, rc = `click${St}`, oc = `keydown${St}`, ac = `load${St}`, lc = "ArrowLeft", un = "ArrowRight", cc = "ArrowUp", fn = "ArrowDown", ze = "Home", hn = "End", mt = "active", pn = "fade", Ge = "show", dc = "dropdown", yi = ".dropdown-toggle", uc = ".dropdown-menu", Xe = `:not(${yi})`, fc = '.list-group, .nav, [role="tablist"]', hc = ".nav-item, .list-group-item", pc = `.nav-link${Xe}, .list-group-item${Xe}, [role="tab"]${Xe}`, Ai = '[data-ds-toggle="tab"], [data-ds-toggle="pill"], [data-ds-toggle="list"]', Qe = `${pc}, ${Ai}`, _c = `.${mt}[data-ds-toggle="tab"], .${mt}[data-ds-toggle="pill"], .${mt}[data-ds-toggle="list"]`;
3024
+ class At extends Q {
3025
+ constructor(t) {
3026
+ super(t), this._parent = this._element.closest(fc), this._parent && (this._setInitialAttributes(this._parent, this._getChildren()), f.on(this._element, oc, (e) => this._keydown(e)));
3027
+ }
3028
+ // Getters
3029
+ static get NAME() {
3030
+ return Zl;
3031
+ }
3032
+ // Public
3033
+ show() {
3034
+ const t = this._element;
3035
+ if (this._elemIsActive(t))
3036
+ return;
3037
+ const e = this._getActiveElem(), n = e ? f.trigger(e, ec, {
3038
+ relatedTarget: t
3039
+ }) : null;
3040
+ f.trigger(t, nc, {
3041
+ relatedTarget: e
3042
+ }).defaultPrevented || n && n.defaultPrevented || (this._deactivate(e, t), this._activate(t, e));
3043
+ }
3044
+ // Private
3045
+ _activate(t, e) {
3046
+ if (!t)
3047
+ return;
3048
+ t.classList.add(mt), this._activate(b.getElementFromSelector(t));
3049
+ const n = () => {
3050
+ if (t.getAttribute("role") !== "tab") {
3051
+ t.classList.add(Ge);
3052
+ return;
3053
+ }
3054
+ t.removeAttribute("tabindex"), t.setAttribute("aria-selected", !0), this._toggleDropDown(t, !0), f.trigger(t, ic, {
3055
+ relatedTarget: e
3056
+ });
3057
+ };
3058
+ this._queueCallback(n, t, t.classList.contains(pn));
3059
+ }
3060
+ _deactivate(t, e) {
3061
+ if (!t)
3062
+ return;
3063
+ t.classList.remove(mt), t.blur(), this._deactivate(b.getElementFromSelector(t));
3064
+ const n = () => {
3065
+ if (t.getAttribute("role") !== "tab") {
3066
+ t.classList.remove(Ge);
3067
+ return;
3068
+ }
3069
+ t.setAttribute("aria-selected", !1), t.setAttribute("tabindex", "-1"), this._toggleDropDown(t, !1), f.trigger(t, sc, {
3070
+ relatedTarget: e
3071
+ });
3072
+ };
3073
+ this._queueCallback(n, t, t.classList.contains(pn));
3074
+ }
3075
+ _keydown(t) {
3076
+ if (![lc, un, cc, fn, ze, hn].includes(t.key))
3077
+ return;
3078
+ t.stopPropagation(), t.preventDefault();
3079
+ const e = this._getChildren().filter((i) => !lt(i));
3080
+ let n;
3081
+ if ([ze, hn].includes(t.key))
3082
+ n = e[t.key === ze ? 0 : e.length - 1];
3083
+ else {
3084
+ const i = [un, fn].includes(t.key);
3085
+ n = bs(e, t.target, i, !0);
3086
+ }
3087
+ n && (n.focus({
3088
+ preventScroll: !0
3089
+ }), At.getOrCreateInstance(n).show());
3090
+ }
3091
+ _getChildren() {
3092
+ return b.find(Qe, this._parent);
3093
+ }
3094
+ _getActiveElem() {
3095
+ return this._getChildren().find((t) => this._elemIsActive(t)) || null;
3096
+ }
3097
+ _setInitialAttributes(t, e) {
3098
+ this._setAttributeIfNotExists(t, "role", "tablist");
3099
+ for (const n of e)
3100
+ this._setInitialAttributesOnChild(n);
3101
+ }
3102
+ _setInitialAttributesOnChild(t) {
3103
+ t = this._getInnerElement(t);
3104
+ const e = this._elemIsActive(t), n = this._getOuterElement(t);
3105
+ t.setAttribute("aria-selected", e), n !== t && this._setAttributeIfNotExists(n, "role", "presentation"), e || t.setAttribute("tabindex", "-1"), this._setAttributeIfNotExists(t, "role", "tab"), this._setInitialAttributesOnTargetPanel(t);
3106
+ }
3107
+ _setInitialAttributesOnTargetPanel(t) {
3108
+ const e = b.getElementFromSelector(t);
3109
+ e && (this._setAttributeIfNotExists(e, "role", "tabpanel"), t.id && this._setAttributeIfNotExists(e, "aria-labelledby", `${t.id}`));
3110
+ }
3111
+ _toggleDropDown(t, e) {
3112
+ const n = this._getOuterElement(t);
3113
+ if (!n.classList.contains(dc))
3114
+ return;
3115
+ const i = (r, o) => {
3116
+ const l = b.findOne(r, n);
3117
+ l && l.classList.toggle(o, e);
3118
+ };
3119
+ i(yi, mt), i(uc, Ge), n.setAttribute("aria-expanded", e);
3120
+ }
3121
+ _setAttributeIfNotExists(t, e, n) {
3122
+ t.hasAttribute(e) || t.setAttribute(e, n);
3123
+ }
3124
+ _elemIsActive(t) {
3125
+ return t.classList.contains(mt);
3126
+ }
3127
+ // Try to get the inner element (usually the .nav-link)
3128
+ _getInnerElement(t) {
3129
+ return t.matches(Qe) ? t : b.findOne(Qe, t);
3130
+ }
3131
+ // Try to get the outer element (usually the .nav-item)
3132
+ _getOuterElement(t) {
3133
+ return t.closest(hc) || t;
3134
+ }
3135
+ // Static
3136
+ static jQueryInterface(t) {
3137
+ return this.each(function() {
3138
+ const e = At.getOrCreateInstance(this);
3139
+ if (typeof t == "string") {
3140
+ if (e[t] === void 0 || t.startsWith("_") || t === "constructor")
3141
+ throw new TypeError(`No method named "${t}"`);
3142
+ e[t]();
3143
+ }
3144
+ });
3145
+ }
3146
+ }
3147
+ f.on(document, rc, Ai, function(s) {
3148
+ ["A", "AREA"].includes(this.tagName) && s.preventDefault(), !lt(this) && At.getOrCreateInstance(this).show();
3149
+ });
3150
+ f.on(window, ac, () => {
3151
+ for (const s of b.find(_c))
3152
+ At.getOrCreateInstance(s);
3153
+ });
3154
+ U(At);
3155
+ const mc = "toast", gc = "ds.toast", ut = `.${gc}`, vc = `mouseover${ut}`, Ec = `mouseout${ut}`, bc = `focusin${ut}`, yc = `focusout${ut}`, Ac = `hide${ut}`, Tc = `hidden${ut}`, wc = `show${ut}`, Sc = `shown${ut}`, Cc = "fade", _n = "hide", _e = "show", me = "showing", Oc = {
3156
+ animation: "boolean",
3157
+ autohide: "boolean",
3158
+ delay: "number"
3159
+ }, Dc = {
3160
+ animation: !0,
3161
+ autohide: !0,
3162
+ delay: 5e3
3163
+ };
3164
+ class ie extends Q {
3165
+ constructor(t, e) {
3166
+ super(t, e), this._timeout = null, this._hasMouseInteraction = !1, this._hasKeyboardInteraction = !1, this._setListeners();
3167
+ }
3168
+ // Getters
3169
+ static get Default() {
3170
+ return Dc;
3171
+ }
3172
+ static get DefaultType() {
3173
+ return Oc;
3174
+ }
3175
+ static get NAME() {
3176
+ return mc;
3177
+ }
3178
+ // Public
3179
+ show() {
3180
+ if (f.trigger(this._element, wc).defaultPrevented)
3181
+ return;
3182
+ this._clearTimeout(), this._config.animation && this._element.classList.add(Cc);
3183
+ const e = () => {
3184
+ this._element.classList.remove(me), f.trigger(this._element, Sc), this._maybeScheduleHide();
3185
+ };
3186
+ this._element.classList.remove(_n), Jt(this._element), this._element.classList.add(_e, me), this._queueCallback(e, this._element, this._config.animation);
3187
+ }
3188
+ hide() {
3189
+ if (!this.isShown() || f.trigger(this._element, Ac).defaultPrevented)
3190
+ return;
3191
+ const e = () => {
3192
+ this._element.classList.add(_n), this._element.classList.remove(me, _e), f.trigger(this._element, Tc);
3193
+ };
3194
+ this._element.classList.add(me), this._queueCallback(e, this._element, this._config.animation);
3195
+ }
3196
+ dispose() {
3197
+ this._clearTimeout(), this.isShown() && this._element.classList.remove(_e), super.dispose();
3198
+ }
3199
+ isShown() {
3200
+ return this._element.classList.contains(_e);
3201
+ }
3202
+ // Private
3203
+ _maybeScheduleHide() {
3204
+ this._config.autohide && (this._hasMouseInteraction || this._hasKeyboardInteraction || (this._timeout = setTimeout(() => {
3205
+ this.hide();
3206
+ }, this._config.delay)));
3207
+ }
3208
+ _onInteraction(t, e) {
3209
+ switch (t.type) {
3210
+ case "mouseover":
3211
+ case "mouseout": {
3212
+ this._hasMouseInteraction = e;
3213
+ break;
3214
+ }
3215
+ case "focusin":
3216
+ case "focusout": {
3217
+ this._hasKeyboardInteraction = e;
3218
+ break;
3219
+ }
3220
+ }
3221
+ if (e) {
3222
+ this._clearTimeout();
3223
+ return;
3224
+ }
3225
+ const n = t.relatedTarget;
3226
+ this._element === n || this._element.contains(n) || this._maybeScheduleHide();
3227
+ }
3228
+ _setListeners() {
3229
+ f.on(this._element, vc, (t) => this._onInteraction(t, !0)), f.on(this._element, Ec, (t) => this._onInteraction(t, !1)), f.on(this._element, bc, (t) => this._onInteraction(t, !0)), f.on(this._element, yc, (t) => this._onInteraction(t, !1));
3230
+ }
3231
+ _clearTimeout() {
3232
+ clearTimeout(this._timeout), this._timeout = null;
3233
+ }
3234
+ // Static
3235
+ static jQueryInterface(t) {
3236
+ return this.each(function() {
3237
+ const e = ie.getOrCreateInstance(this, t);
3238
+ if (typeof t == "string") {
3239
+ if (typeof e[t] > "u")
3240
+ throw new TypeError(`No method named "${t}"`);
3241
+ e[t](this);
3242
+ }
3243
+ });
3244
+ }
3245
+ }
3246
+ Ne(ie);
3247
+ U(ie);
3248
+ const Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3249
+ __proto__: null,
3250
+ Alert: te,
3251
+ Button: ee,
3252
+ Carousel: Bt,
3253
+ Collapse: Ht,
3254
+ Dropdown: X,
3255
+ Modal: yt,
3256
+ Offcanvas: nt,
3257
+ Popover: $e,
3258
+ ScrollSpy: ne,
3259
+ Tab: At,
3260
+ Toast: ie,
3261
+ Tooltip: wt
3262
+ }, Symbol.toStringTag, { value: "Module" })), x = { ...Lc };
3263
+ window.initIcons = () => {
3264
+ };
3265
+ const Nc = "#app .rebranding";
3266
+ function G() {
3267
+ return document.querySelector(Nc);
3268
+ }
3269
+ function mn(s) {
3270
+ const t = G();
3271
+ return t && s && t.contains(s);
3272
+ }
3273
+ function Ti() {
3274
+ const s = x.Tooltip;
3275
+ class t extends s {
3276
+ constructor(a, d = {}) {
3277
+ mn(a) && !d.container && (d = { ...d, container: G() }), super(a, d);
3278
+ }
3279
+ }
3280
+ x.Tooltip = t;
3281
+ const e = x.Popover;
3282
+ class n extends e {
3283
+ constructor(a, d = {}) {
3284
+ mn(a) && !d.container && (d = { ...d, container: G() }), super(a, d);
3285
+ }
3286
+ }
3287
+ x.Popover = n;
3288
+ const i = x.Toast;
3289
+ class r extends i {
3290
+ constructor(a, d) {
3291
+ const h = G();
3292
+ if (h && h.contains(a) && !a.closest(".toast-container")) {
3293
+ let _ = h.querySelector(".toast-container");
3294
+ _ || (_ = document.createElement("div"), _.className = "toast-container position-fixed top-0 end-0 p-3", h.appendChild(_)), _.appendChild(a);
3295
+ }
3296
+ super(a, d);
3297
+ }
3298
+ }
3299
+ x.Toast = r, new MutationObserver((u) => {
3300
+ for (const a of u)
3301
+ for (const d of a.addedNodes) {
3302
+ if (d.nodeType !== 1 || !d.classList.contains("modal-backdrop")) continue;
3303
+ const h = G();
3304
+ h && !h.contains(d) && h.appendChild(d);
3305
+ }
3306
+ }).observe(document.body, { childList: !0 });
3307
+ const l = x.Offcanvas;
3308
+ class c extends l {
3309
+ constructor(a, d) {
3310
+ const h = G();
3311
+ h && !h.contains(a) && h.appendChild(a), super(a, d);
3312
+ }
3313
+ }
3314
+ x.Offcanvas = c, window.initTooltipsAndPopovers = function(u) {
3315
+ const a = u ?? G();
3316
+ a && (a.querySelectorAll('[data-ds-toggle="tooltip"]').forEach((d) => {
3317
+ x.Tooltip.getInstance(d) || new x.Tooltip(d);
3318
+ }), a.querySelectorAll('[data-ds-toggle="popover"]').forEach((d) => {
3319
+ x.Popover.getInstance(d) || new x.Popover(d);
3320
+ }));
3321
+ }, window.designSystemBootstrap = x;
3322
+ }
3323
+ const $c = G();
3324
+ $c ? Ti() : window.bootstrap = x;
3325
+ document.readyState === "loading" && document.addEventListener("DOMContentLoaded", () => {
3326
+ !window.designSystemBootstrap && !window.bootstrap && (G() ? Ti() : window.bootstrap = x);
3327
+ });
3328
+ function rs(s) {
3329
+ if (s._dsMultiselectReady) return;
3330
+ s._dsMultiselectReady = !0;
3331
+ const t = s.nextElementSibling;
3332
+ if (!t) return;
3333
+ const e = s.getAttribute("data-ds-multiselect-placeholder") || "Selecione...", n = s.hasAttribute("data-ds-multiselect-search"), i = parseInt(s.getAttribute("data-ds-multiselect-max-chips") || "2", 10), r = s.getAttribute("data-ds-multiselect-name") || null, o = s.hasAttribute("disabled"), l = Array.from(t.querySelectorAll("li")).map((p) => ({
3334
+ label: p.textContent.trim(),
3335
+ selected: p.hasAttribute("data-selected"),
3336
+ disabled: p.hasAttribute("data-disabled")
3337
+ })).filter((p) => p.label), c = new Set(l.filter((p) => p.selected).map((p) => p.label));
3338
+ s.classList.add("ds-multiselect__toggle"), o && s.classList.add("ds-multiselect__toggle--disabled"), s.innerHTML = `
3339
+ <span class="ds-multiselect__chips"></span>
3340
+ <span class="material-symbols-outlined ds-multiselect__arrow">keyboard_arrow_down</span>
3341
+ `;
3342
+ const u = s.querySelector(".ds-multiselect__chips");
3343
+ let a = null;
3344
+ r && (a = document.createElement("select"), a.name = r, a.multiple = !0, a.hidden = !0, a.setAttribute("aria-hidden", "true"), s.closest(".dropdown")?.appendChild(a)), t.classList.add("ds-multiselect__menu"), t.innerHTML = "";
3345
+ let d = null;
3346
+ if (n) {
3347
+ const p = document.createElement("div");
3348
+ p.className = "ds-multiselect__search", p.innerHTML = '<input type="text" class="form-control form-control-sm" placeholder="Buscar..." autocomplete="off">', t.appendChild(p), d = p.querySelector("input"), d.addEventListener("input", () => {
3349
+ const m = d.value.toLowerCase().trim();
3350
+ h.querySelectorAll(".ds-multiselect__item").forEach((g) => {
3351
+ g.classList.toggle(
3352
+ "ds-multiselect__item--hidden",
3353
+ !!m && !g.textContent.toLowerCase().includes(m)
3354
+ );
3355
+ });
3356
+ }), s.addEventListener("shown.ds.dropdown", () => {
3357
+ d.value = "", d.dispatchEvent(new Event("input")), requestAnimationFrame(() => d.focus());
3358
+ });
3359
+ }
3360
+ const h = document.createElement("div");
3361
+ h.className = "ds-multiselect__list", t.appendChild(h), l.forEach(({ label: p, selected: m, disabled: g }) => {
3362
+ const v = document.createElement("button");
3363
+ v.type = "button", v.className = "ds-multiselect__item", v.textContent = p, g && (v.classList.add("ds-multiselect__item--disabled"), v.disabled = !0), m && v.classList.add("ds-multiselect__item--selected"), v.addEventListener("click", () => {
3364
+ o || g || (c.has(p) ? (c.delete(p), v.classList.remove("ds-multiselect__item--selected")) : (c.add(p), v.classList.add("ds-multiselect__item--selected")), S());
3365
+ }), h.appendChild(v);
3366
+ });
3367
+ const _ = document.createElement("button");
3368
+ _.type = "button", _.className = "ds-multiselect__footer", _.innerHTML = '<span class="material-symbols-outlined">close</span> Limpar seleção', _.addEventListener("click", () => {
3369
+ o || (c.clear(), h.querySelectorAll(".ds-multiselect__item--selected").forEach((p) => p.classList.remove("ds-multiselect__item--selected")), S());
3370
+ }), t.appendChild(_);
3371
+ function S() {
3372
+ if (c.size === 0)
3373
+ u.innerHTML = `<span class="ds-multiselect__placeholder">${e}</span>`;
3374
+ else {
3375
+ const p = Array.from(c), m = p.slice(0, i), g = p.length - m.length;
3376
+ u.innerHTML = m.map((v) => `<span class="ds-multiselect__chip">${v}</span>`).join("") + (g > 0 ? `<span class="ds-multiselect__overflow">+${g}</span>` : "");
3377
+ }
3378
+ a && (a.innerHTML = Array.from(c).map((p) => `<option value="${p}" selected></option>`).join("")), s.dispatchEvent(new CustomEvent("ds.multiselect.change", {
3379
+ bubbles: !0,
3380
+ detail: { values: Array.from(c) }
3381
+ }));
3382
+ }
3383
+ S();
3384
+ }
3385
+ function we(s) {
3386
+ (s || document).querySelectorAll("[data-ds-multiselect]").forEach(rs);
3387
+ }
3388
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => we()) : we();
3389
+ const Ic = new MutationObserver((s) => {
3390
+ for (const t of s)
3391
+ for (const e of t.addedNodes)
3392
+ e.nodeType === 1 && (e.matches("[data-ds-multiselect]") && rs(e), e.querySelectorAll?.("[data-ds-multiselect]").forEach(rs));
3393
+ });
3394
+ Ic.observe(document.body, { childList: !0, subtree: !0 });
3395
+ window.dsMultiselectInitAll = we;
3396
+ const gn = [
3397
+ "Janeiro",
3398
+ "Fevereiro",
3399
+ "Março",
3400
+ "Abril",
3401
+ "Maio",
3402
+ "Junho",
3403
+ "Julho",
3404
+ "Agosto",
3405
+ "Setembro",
3406
+ "Outubro",
3407
+ "Novembro",
3408
+ "Dezembro"
3409
+ ], Mc = ["D", "S", "T", "Q", "Q", "S", "S"];
3410
+ function Xt(s, t = "DD/MM/YYYY") {
3411
+ if (!s) return "";
3412
+ const e = String(s.getDate()).padStart(2, "0"), n = String(s.getMonth() + 1).padStart(2, "0"), i = s.getFullYear();
3413
+ return t.replace("DD", e).replace("MM", n).replace("YYYY", i);
3414
+ }
3415
+ function gt(s) {
3416
+ if (!s) return null;
3417
+ const t = s.split("/");
3418
+ if (t.length !== 3) return null;
3419
+ const e = parseInt(t[0], 10), n = parseInt(t[1], 10), i = parseInt(t[2], 10);
3420
+ if (isNaN(e) || isNaN(n) || isNaN(i) || e < 1 || e > 31 || n < 1 || n > 12 || i < 1e3) return null;
3421
+ const r = new Date(i, n - 1, e);
3422
+ return isNaN(r.getTime()) ? null : r;
3423
+ }
3424
+ function wi(s) {
3425
+ s.addEventListener("input", (t) => {
3426
+ let e = s.value.replace(/\D/g, "");
3427
+ e.length > 8 && (e = e.slice(0, 8));
3428
+ let n = "";
3429
+ e.length > 0 && (n = e.slice(0, 2), e.length > 2 && (n += "/" + e.slice(2, 4), e.length > 4 && (n += "/" + e.slice(4, 8)))), s.value = n;
3430
+ });
3431
+ }
3432
+ function W(s, t) {
3433
+ return s && t && s.getFullYear() === t.getFullYear() && s.getMonth() === t.getMonth() && s.getDate() === t.getDate();
3434
+ }
3435
+ function N(s) {
3436
+ const t = new Date(s);
3437
+ return t.setHours(0, 0, 0, 0), t;
3438
+ }
3439
+ function os(s, t, e = {}) {
3440
+ const { selected: n, rangeStart: i, rangeEnd: r, hoverDate: o, minDate: l, maxDate: c } = e, u = N(/* @__PURE__ */ new Date()), a = new Date(s, t, 1).getDay(), d = new Date(s, t + 1, 0).getDate(), h = new Date(s, t, 0).getDate();
3441
+ let _ = Mc.map(
3442
+ (m) => `<div class="ds-datepicker-dow">${m}</div>`
3443
+ ).join("");
3444
+ for (let m = a - 1; m >= 0; m--) {
3445
+ const g = h - m, v = N(new Date(s, t - 1, g));
3446
+ _ += `<div class="ds-datepicker-day ds-day-outside" data-ds-date="${v.toISOString()}">${g}</div>`;
3447
+ }
3448
+ for (let m = 1; m <= d; m++) {
3449
+ const g = N(new Date(s, t, m)), v = ["ds-datepicker-day"], D = [`data-ds-date="${g.toISOString()}"`];
3450
+ if (l && g < N(l) && v.push("ds-day-disabled"), c && g > N(c) && v.push("ds-day-disabled"), W(g, u) && v.push("ds-day-today"), i && r) {
3451
+ const y = N(i), T = N(r);
3452
+ W(g, y) ? v.push("ds-day-range-start") : W(g, T) ? v.push("ds-day-range-end") : g > y && g < T && v.push("ds-day-in-range");
3453
+ } else if (i && o) {
3454
+ const y = N(i), T = N(o), [C, E] = y < T ? [y, T] : [T, y];
3455
+ W(g, y) ? v.push("ds-day-range-start") : (W(g, T) || g > C && g < E) && v.push("ds-day-range-hover");
3456
+ } else i && !r && W(g, i) && v.push("ds-day-range-start");
3457
+ n && W(g, n) && v.push("ds-day-selected"), _ += `<div class="${v.join(" ")}" ${D.join(" ")}>${m}</div>`;
3458
+ }
3459
+ const S = a + d, p = S % 7 === 0 ? 0 : 7 - S % 7;
3460
+ for (let m = 1; m <= p; m++) {
3461
+ const g = N(new Date(s, t + 1, m));
3462
+ _ += `<div class="ds-datepicker-day ds-day-outside" data-ds-date="${g.toISOString()}">${m}</div>`;
3463
+ }
3464
+ return `<div class="ds-datepicker-grid">${_}</div>`;
3465
+ }
3466
+ function as(s, t, e, n) {
3467
+ const i = e ? '<button type="button" class="ds-datepicker-nav" data-ds-dp-prev><span class="material-symbols-outlined">chevron_left</span></button>' : '<div class="ds-datepicker-nav-placeholder"></div>', r = n ? '<button type="button" class="ds-datepicker-nav" data-ds-dp-next><span class="material-symbols-outlined">chevron_right</span></button>' : '<div class="ds-datepicker-nav-placeholder"></div>', o = gn.map(
3468
+ (c, u) => `<div class="ds-datepicker-select-item ${u === t ? "active" : ""}" data-ds-dp-month-val="${u}">${c}</div>`
3469
+ ).join("");
3470
+ (/* @__PURE__ */ new Date()).getFullYear();
3471
+ const l = [];
3472
+ for (let c = s - 10; c <= s + 10; c++)
3473
+ l.push(`<div class="ds-datepicker-select-item ${c === s ? "active" : ""}" data-ds-dp-year-val="${c}">${c}</div>`);
3474
+ return `<div class="ds-datepicker-header">
3475
+ ${i}
3476
+ <div class="ds-datepicker-title-group">
3477
+ <div class="position-relative">
3478
+ <span class="ds-datepicker-title" data-ds-dp-month-click>${gn[t]} <span class="material-symbols-outlined fs-6 align-middle">keyboard_arrow_down</span></span>
3479
+ <div class="ds-datepicker-select-list ds-datepicker-select-list--month" data-ds-dp-month-list>
3480
+ ${o}
3481
+ </div>
3482
+ </div>
3483
+ <div class="position-relative">
3484
+ <span class="ds-datepicker-title" data-ds-dp-year-click>${s} <span class="material-symbols-outlined fs-6 align-middle">keyboard_arrow_down</span></span>
3485
+ <div class="ds-datepicker-select-list ds-datepicker-select-list--year" data-ds-dp-year-list>
3486
+ ${l.join("")}
3487
+ </div>
3488
+ </div>
3489
+ </div>
3490
+ ${r}
3491
+ </div>`;
3492
+ }
3493
+ function Mt(s, t) {
3494
+ const e = t.getBoundingClientRect(), n = window.innerHeight - e.bottom, i = s.classList.contains("ds-datepicker-range-panel"), r = s.offsetHeight || (i ? 480 : 320), o = s.offsetWidth || (i ? 580 : 290);
3495
+ n < r && e.top > r ? s.style.setProperty("top", `${e.top - r - 4}px`, "important") : s.style.setProperty("top", `${e.bottom + 4}px`, "important");
3496
+ let l = e.left;
3497
+ const c = window.innerWidth;
3498
+ l + o > c - 12 && (l = c - o - 12), s.style.setProperty("left", `${Math.max(12, l)}px`, "important");
3499
+ }
3500
+ function ls(s) {
3501
+ if (s._dsDpReady) return;
3502
+ s._dsDpReady = !0, s.setAttribute("autocomplete", "off"), s.placeholder || (s.placeholder = "DD/MM/AAAA"), wi(s), s.addEventListener("input", () => {
3503
+ const d = gt(s.value);
3504
+ d && (o = d, i = o.getFullYear(), r = o.getMonth(), c && l());
3505
+ }), s.addEventListener("change", () => {
3506
+ const d = gt(s.value);
3507
+ d && (o = d, i = o.getFullYear(), r = o.getMonth(), c && l());
3508
+ });
3509
+ const t = document.createElement("div");
3510
+ t.className = "ds-datepicker-panel", t.style.setProperty("display", "none", "important"), t.style.setProperty("position", "fixed", "important"), t.style.setProperty("z-index", "9999", "important"), (G() || document.body).appendChild(t);
3511
+ const e = s.dataset.dsDpMin ? new Date(s.dataset.dsDpMin) : null, n = s.dataset.dsDpMax ? new Date(s.dataset.dsDpMax) : null;
3512
+ let i = (/* @__PURE__ */ new Date()).getFullYear(), r = (/* @__PURE__ */ new Date()).getMonth(), o = gt(s.value) || null;
3513
+ function l() {
3514
+ t.innerHTML = `
3515
+ ${as(i, r, !0, !0)}
3516
+ ${os(i, r, { selected: o, minDate: e, maxDate: n })}`;
3517
+ }
3518
+ let c = !1;
3519
+ function u() {
3520
+ o && (i = o.getFullYear(), r = o.getMonth()), l(), t.style.removeProperty("display"), c = !0, s.classList.add("ds-is-open"), Mt(t, s);
3521
+ }
3522
+ function a() {
3523
+ t.style.setProperty("display", "none", "important"), c = !1, s.classList.remove("ds-is-open");
3524
+ }
3525
+ s.addEventListener("mousemove", (d) => {
3526
+ s.style.cursor = d.offsetX < 68 ? "pointer" : "text";
3527
+ }), s.addEventListener("click", (d) => {
3528
+ d.stopPropagation(), c ? a() : u();
3529
+ }), s.addEventListener("dblclick", (d) => {
3530
+ d.offsetX < 68 && (d.stopPropagation(), o = N(/* @__PURE__ */ new Date()), s.value = Xt(o), s.dispatchEvent(new Event("input", { bubbles: !0 })), s.dispatchEvent(new Event("change", { bubbles: !0 })), i = o.getFullYear(), r = o.getMonth(), c && l());
3531
+ }), t.addEventListener("click", (d) => {
3532
+ d.stopPropagation();
3533
+ const h = d.target.closest("[data-ds-date]");
3534
+ if (h && !h.classList.contains("ds-day-disabled") && !h.classList.contains("ds-day-outside")) {
3535
+ o = N(new Date(h.dataset.dsDate)), s.value = Xt(o), s.dispatchEvent(new Event("change", { bubbles: !0 })), a();
3536
+ return;
3537
+ }
3538
+ if (d.target.closest("[data-ds-dp-prev]")) {
3539
+ r--, r < 0 && (r = 11, i--), l();
3540
+ return;
3541
+ }
3542
+ if (d.target.closest("[data-ds-dp-next]")) {
3543
+ r++, r > 11 && (r = 0, i++), l();
3544
+ return;
3545
+ }
3546
+ const _ = d.target.closest("[data-ds-dp-month-click]"), S = d.target.closest("[data-ds-dp-year-click]");
3547
+ if (_) {
3548
+ const g = _.nextElementSibling, v = g.classList.contains("show");
3549
+ t.querySelectorAll(".ds-datepicker-select-list").forEach((D) => D.classList.remove("show")), v || g.classList.add("show");
3550
+ return;
3551
+ }
3552
+ if (S) {
3553
+ const g = S.nextElementSibling, v = g.classList.contains("show");
3554
+ if (t.querySelectorAll(".ds-datepicker-select-list").forEach((D) => D.classList.remove("show")), !v) {
3555
+ g.classList.add("show");
3556
+ const D = g.querySelector(".active");
3557
+ D && D.scrollIntoView({ block: "center", behavior: "instant" });
3558
+ }
3559
+ return;
3560
+ }
3561
+ const p = d.target.closest("[data-ds-dp-month-val]"), m = d.target.closest("[data-ds-dp-year-val]");
3562
+ if (p) {
3563
+ r = parseInt(p.dataset.dsDpMonthVal, 10), l();
3564
+ return;
3565
+ }
3566
+ if (m) {
3567
+ i = parseInt(m.dataset.dsDpYearVal, 10), l();
3568
+ return;
3569
+ }
3570
+ if (d.target.closest("[data-ds-dp-close]")) {
3571
+ a();
3572
+ return;
3573
+ }
3574
+ if (d.target.closest("[data-ds-dp-select]")) {
3575
+ o && (s.value = Xt(o), s.dispatchEvent(new Event("change", { bubbles: !0 }))), a();
3576
+ return;
3577
+ }
3578
+ }), document.addEventListener("click", () => {
3579
+ c && a();
3580
+ }), window.addEventListener("scroll", () => {
3581
+ c && Mt(t, s);
3582
+ }, !0), window.addEventListener("resize", () => {
3583
+ c && Mt(t, s);
3584
+ });
3585
+ }
3586
+ function cs(s) {
3587
+ if (s._dsDpRangeReady) return;
3588
+ s._dsDpRangeReady = !0;
3589
+ const t = s.querySelectorAll('[data-ds-datepicker="range"]');
3590
+ if (t.length < 2) return;
3591
+ const [e, n] = t;
3592
+ [e, n].forEach((E) => {
3593
+ E.setAttribute("autocomplete", "off"), wi(E);
3594
+ const A = () => {
3595
+ const w = gt(e.value), O = gt(n.value);
3596
+ if (w && (a = w), O && (d = O), a && d && a > d) {
3597
+ const L = a;
3598
+ a = d, d = L, T();
3599
+ }
3600
+ v && (g(), m(), C());
3601
+ };
3602
+ E.addEventListener("input", A), E.addEventListener("change", A);
3603
+ }), e.placeholder || (e.placeholder = "DD/MM/AAAA"), n.placeholder || (n.placeholder = "DD/MM/AAAA");
3604
+ const i = document.createElement("div");
3605
+ i.className = "ds-datepicker-panel ds-datepicker-range-panel", i.style.setProperty("display", "none", "important"), i.style.setProperty("position", "fixed", "important"), i.style.setProperty("z-index", "9999", "important"), (G() || document.body).appendChild(i);
3606
+ const r = s.dataset.dsDpMin ? new Date(s.dataset.dsDpMin) : null, o = s.dataset.dsDpMax ? new Date(s.dataset.dsDpMax) : null, l = /* @__PURE__ */ new Date();
3607
+ let c = l.getFullYear(), u = l.getMonth(), a = gt(e.value) || null, d = gt(n.value) || null, h = null, _ = a && !d ? "end" : "start";
3608
+ function S() {
3609
+ return u === 11 ? c + 1 : c;
3610
+ }
3611
+ function p() {
3612
+ return u === 11 ? 0 : u + 1;
3613
+ }
3614
+ function m() {
3615
+ const E = S(), A = p();
3616
+ a && d || a && h ? i.classList.add("ds-has-range") : i.classList.remove("ds-has-range"), i.innerHTML = `
3617
+ <div class="ds-datepicker-range-body">
3618
+ <div class="ds-datepicker-month">
3619
+ ${as(c, u, !0, !1)}
3620
+ ${os(c, u, { rangeStart: a, rangeEnd: d, minDate: r, maxDate: o })}
3621
+ </div>
3622
+ <div class="ds-datepicker-month">
3623
+ ${as(E, A, !1, !0)}
3624
+ ${os(E, A, { rangeStart: a, rangeEnd: d, minDate: r, maxDate: o })}
3625
+ </div>
3626
+ </div>`;
3627
+ }
3628
+ function g() {
3629
+ if (a) {
3630
+ c = a.getFullYear(), u = a.getMonth();
3631
+ const E = d ? N(d) : null;
3632
+ !E || E.getFullYear() === c && E.getMonth();
3633
+ }
3634
+ }
3635
+ let v = !1;
3636
+ function D() {
3637
+ g(), m(), i.style.removeProperty("display"), v = !0, e.classList.add("ds-is-open"), n.classList.add("ds-is-open"), Mt(i, e);
3638
+ }
3639
+ function y() {
3640
+ h = null, i.style.setProperty("display", "none", "important"), v = !1, e.classList.remove("ds-is-open"), n.classList.remove("ds-is-open");
3641
+ }
3642
+ function T() {
3643
+ e.value = a ? Xt(a) : "", n.value = d ? Xt(d) : "", e.dispatchEvent(new Event("input", { bubbles: !0 })), n.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })), n.dispatchEvent(new Event("change", { bubbles: !0 }));
3644
+ }
3645
+ [e, n].forEach((E) => {
3646
+ E.addEventListener("mousemove", (A) => {
3647
+ E.style.cursor = A.offsetX < 68 ? "pointer" : "text";
3648
+ }), E.addEventListener("click", (A) => {
3649
+ A.stopPropagation(), v ? y() : (E === n && a && d && (a = null, d = null, _ = "start", T()), D());
3650
+ }), E.addEventListener("dblclick", (A) => {
3651
+ if (A.offsetX < 68) {
3652
+ A.stopPropagation();
3653
+ const w = N(/* @__PURE__ */ new Date());
3654
+ E === e ? a = w : d = w, T(), v && (g(), m(), C());
3655
+ }
3656
+ });
3657
+ });
3658
+ function C() {
3659
+ a && d || a && h ? i.classList.add("ds-has-range") : i.classList.remove("ds-has-range"), i.querySelectorAll("[data-ds-date]").forEach((A) => {
3660
+ if (A.classList.contains("ds-day-outside") || A.classList.contains("ds-day-disabled")) return;
3661
+ const w = N(new Date(A.dataset.dsDate));
3662
+ if (A.classList.remove("ds-day-range-hover", "ds-day-in-range", "ds-day-range-start", "ds-day-range-end"), a && !d && h) {
3663
+ const O = N(a), L = N(h), [M, $] = O <= L ? [O, L] : [L, O];
3664
+ W(w, O) ? A.classList.add(O <= L ? "ds-day-range-start" : "ds-day-range-end") : W(w, L) ? A.classList.add(O <= L ? "ds-day-range-end" : "ds-day-range-start") : w > M && w < $ && A.classList.add("ds-day-range-hover");
3665
+ } else if (a && d) {
3666
+ const O = N(a), L = N(d);
3667
+ W(w, O) ? A.classList.add("ds-day-range-start") : W(w, L) ? A.classList.add("ds-day-range-end") : w > O && w < L && A.classList.add("ds-day-in-range");
3668
+ } else a && W(w, a) && A.classList.add("ds-day-range-start");
3669
+ });
3670
+ }
3671
+ i.addEventListener("mousemove", (E) => {
3672
+ if (_ !== "end" || !a) return;
3673
+ const A = E.target.closest("[data-ds-date]");
3674
+ if (!A || A.classList.contains("ds-day-disabled") || A.classList.contains("ds-day-outside")) return;
3675
+ const w = N(new Date(A.dataset.dsDate));
3676
+ h && W(w, h) || (h = w, C());
3677
+ }), i.addEventListener("click", (E) => {
3678
+ if (E.stopPropagation(), E.target.closest("[data-ds-dp-prev]")) {
3679
+ u--, u < 0 && (u = 11, c--), m(), C();
3680
+ return;
3681
+ }
3682
+ if (E.target.closest("[data-ds-dp-next]")) {
3683
+ u++, u > 11 && (u = 0, c++), m(), C();
3684
+ return;
3685
+ }
3686
+ const A = E.target.closest("[data-ds-dp-month-click]"), w = E.target.closest("[data-ds-dp-year-click]");
3687
+ if (A) {
3688
+ const P = A.nextElementSibling, k = P.classList.contains("show");
3689
+ i.querySelectorAll(".ds-datepicker-select-list").forEach((I) => I.classList.remove("show")), k || P.classList.add("show");
3690
+ return;
3691
+ }
3692
+ if (w) {
3693
+ const P = w.nextElementSibling, k = P.classList.contains("show");
3694
+ if (i.querySelectorAll(".ds-datepicker-select-list").forEach((I) => I.classList.remove("show")), !k) {
3695
+ P.classList.add("show");
3696
+ const I = P.querySelector(".active");
3697
+ I && I.scrollIntoView({ block: "center", behavior: "instant" });
3698
+ }
3699
+ return;
3700
+ }
3701
+ const O = E.target.closest("[data-ds-dp-month-val]"), L = E.target.closest("[data-ds-dp-year-val]");
3702
+ if (O || L) {
3703
+ const P = E.target.closest(".ds-datepicker-month:last-child");
3704
+ if (O) {
3705
+ const k = parseInt(O.dataset.dsDpMonthVal, 10);
3706
+ P ? (u = k - 1, u < 0 && (u = 11, c--)) : u = k;
3707
+ } else if (L) {
3708
+ const k = parseInt(L.dataset.dsDpYearVal, 10);
3709
+ P && u === 11 ? c = k - 1 : c = k;
3710
+ }
3711
+ m(), C();
3712
+ return;
3713
+ }
3714
+ if (E.target.closest("[data-ds-dp-close]")) {
3715
+ y();
3716
+ return;
3717
+ }
3718
+ if (E.target.closest("[data-ds-dp-select]")) {
3719
+ T(), y();
3720
+ return;
3721
+ }
3722
+ const M = E.target.closest("[data-ds-date]");
3723
+ if (!M || M.classList.contains("ds-day-disabled") || M.classList.contains("ds-day-outside")) return;
3724
+ const $ = N(new Date(M.dataset.dsDate));
3725
+ _ === "start" ? (a = $, d = null, _ = "end", h = null, T(), m()) : ($ < N(a) ? (d = N(a), a = $) : d = $, _ = "start", h = null, T(), m(), setTimeout(() => y(), 150));
3726
+ }), document.addEventListener("click", () => {
3727
+ v && y();
3728
+ }), window.addEventListener("scroll", () => {
3729
+ v && Mt(i, e);
3730
+ }, !0), window.addEventListener("resize", () => {
3731
+ v && Mt(i, e);
3732
+ });
3733
+ }
3734
+ function Se(s) {
3735
+ const t = s || document;
3736
+ t.querySelectorAll('[data-ds-datepicker="single"]').forEach(ls), t.querySelectorAll("[data-ds-datepicker-range-group]").forEach(cs);
3737
+ }
3738
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => Se()) : Se();
3739
+ const kc = new MutationObserver((s) => {
3740
+ for (const t of s)
3741
+ for (const e of t.addedNodes)
3742
+ e.nodeType === 1 && (e.matches('[data-ds-datepicker="single"]') && ls(e), e.matches("[data-ds-datepicker-range-group]") && cs(e), e.querySelectorAll?.('[data-ds-datepicker="single"]').forEach(ls), e.querySelectorAll?.("[data-ds-datepicker-range-group]").forEach(cs));
3743
+ });
3744
+ kc.observe(document.body, { childList: !0, subtree: !0 });
3745
+ window.dsDatepickerInitAll = Se;
3746
+ function Si(s) {
3747
+ const t = Array.from(s.querySelectorAll(".ds-stepper-item")), e = parseInt(s.dataset.dsCurrentStep ?? "0", 10);
3748
+ t.forEach((i, r) => {
3749
+ i.classList.remove("ds-step-active", "ds-step-done"), r < e ? i.classList.add("ds-step-done") : r === e && i.classList.add("ds-step-active");
3750
+ const o = i.querySelector(".ds-stepper-indicator");
3751
+ o && (o.dataset.dsStepNum || (o.dataset.dsStepNum = o.textContent.trim() || String(r + 1)), o.innerHTML = r < e ? '<span class="material-symbols-outlined">check</span>' : o.dataset.dsStepNum);
3752
+ });
3753
+ const n = s.id;
3754
+ n && (document.querySelectorAll(`[data-ds-stepper-next="#${n}"]`).forEach((i) => {
3755
+ i.disabled = e >= t.length - 1;
3756
+ }), document.querySelectorAll(`[data-ds-stepper-prev="#${n}"]`).forEach((i) => {
3757
+ i.disabled = e <= 0;
3758
+ }));
3759
+ }
3760
+ function ds(s, t) {
3761
+ const e = s.querySelectorAll(".ds-stepper-item").length;
3762
+ s.dataset.dsCurrentStep = Math.max(0, Math.min(t, e - 1)), Si(s), s.dispatchEvent(new CustomEvent("ds:stepper:change", {
3763
+ bubbles: !0,
3764
+ detail: { current: parseInt(s.dataset.dsCurrentStep, 10), total: e }
3765
+ }));
3766
+ }
3767
+ function Pc(s) {
3768
+ s._dsStepperInit || (s._dsStepperInit = !0, Si(s));
3769
+ }
3770
+ function Ce(s) {
3771
+ (s || document).querySelectorAll("[data-ds-stepper]").forEach(Pc);
3772
+ }
3773
+ document.addEventListener("click", (s) => {
3774
+ const t = s.target.closest("[data-ds-stepper-next]"), e = s.target.closest("[data-ds-stepper-prev]");
3775
+ if (t) {
3776
+ const n = document.querySelector(t.dataset.dsStepperNext);
3777
+ n && ds(n, parseInt(n.dataset.dsCurrentStep ?? "0", 10) + 1);
3778
+ } else if (e) {
3779
+ const n = document.querySelector(e.dataset.dsStepperPrev);
3780
+ n && ds(n, parseInt(n.dataset.dsCurrentStep ?? "0", 10) - 1);
3781
+ }
3782
+ });
3783
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => Ce()) : Ce();
3784
+ window.dsStepperInitAll = Ce;
3785
+ window.dsStepperGoTo = ds;
3786
+ function xc(s) {
3787
+ if (s._dsSelectCustomReady) return;
3788
+ s._dsSelectCustomReady = !0;
3789
+ const t = s.nextElementSibling;
3790
+ if (!t) return;
3791
+ const e = s.querySelector("[data-ds-select-label]") || s.querySelector("span:first-child") || s;
3792
+ t.addEventListener("click", function(n) {
3793
+ const i = n.target.closest(".dropdown-item");
3794
+ !i || i.disabled || (t.querySelectorAll(".dropdown-item").forEach((r) => r.classList.remove("active")), i.classList.add("active"), e.textContent = i.textContent.trim(), x.Dropdown.getInstance(s)?.hide());
3795
+ });
3796
+ }
3797
+ function Oe(s) {
3798
+ (s || document).querySelectorAll("[data-ds-select]").forEach(xc);
3799
+ }
3800
+ document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", () => Oe()) : Oe();
3801
+ window.dsSelectCustomInitAll = Oe;
3802
+ const Rc = new MutationObserver((s) => {
3803
+ for (const t of s)
3804
+ for (const e of t.addedNodes)
3805
+ e.nodeType === 1 && (we(e), Oe(e), typeof dsPaginationInitAll == "function" && dsPaginationInitAll(e), Se(e), Ce(e));
3806
+ });
3807
+ Rc.observe(document.body, { childList: !0, subtree: !0 });
3808
+ document.dispatchEvent(new CustomEvent("ds:ready"));
3809
+ export {
3810
+ x as default
3811
+ };
3812
+ //# sourceMappingURL=design-system.CTl4C3Ve.js.map