1(function () { 2 'use strict'; 3 (function () { 4 const env = { NODE_ENV: 'production' }; 5 try { 6 if (process) { 7 process.env = Object.assign({}, process.env); 8 Object.assign(process.env, env); 9 return; 10 } 11 } catch (e) { } // avoid ReferenceError: process is not defined 12 globalThis.process = { env: env }; 13 })(); 14 var top = 'top'; 15 var bottom = 'bottom'; 16 var right = 'right'; 17 var left = 'left'; 18 var auto = 'auto'; 19 var basePlacements = [top, bottom, right, left]; 20 var start = 'start'; 21 var end = 'end'; 22 var clippingParents = 'clippingParents'; 23 var viewport = 'viewport'; 24 var popper = 'popper'; 25 var reference = 'reference'; 26 var variationPlacements = basePlacements.reduce(function (e, r) { 27 return e.concat([r + '-' + start, r + '-' + end]); 28 }, []); 29 var placements = [].concat(basePlacements, [auto]).reduce(function (e, r) { 30 return e.concat([r, r + '-' + start, r + '-' + end]); 31 }, []); 32 var beforeRead = 'beforeRead'; 33 var read = 'read'; 34 var afterRead = 'afterRead'; 35 var beforeMain = 'beforeMain'; 36 var main$1 = 'main'; 37 var afterMain = 'afterMain'; 38 var beforeWrite = 'beforeWrite'; 39 var write = 'write'; 40 var afterWrite = 'afterWrite'; 41 var modifierPhases = [ 42 beforeRead, 43 read, 44 afterRead, 45 beforeMain, 46 main$1, 47 afterMain, 48 beforeWrite, 49 write, 50 afterWrite, 51 ]; 52 function getNodeName(e) { 53 return e ? (e.nodeName || '').toLowerCase() : null; 54 } 55 function getWindow(n) { 56 if (null == n) return window; 57 if ('[object Window]' !== n.toString()) { 58 var e = n.ownerDocument; 59 return (e && e.defaultView) || window; 60 } 61 return n; 62 } 63 function isElement$2(n) { 64 return n instanceof getWindow(n).Element || n instanceof Element; 65 } 66 function isHTMLElement$1(n) { 67 return ( 68 n instanceof getWindow(n).HTMLElement || n instanceof HTMLElement 69 ); 70 } 71 function isShadowRoot(n) { 72 return ( 73 'undefined' != typeof ShadowRoot && 74 (n instanceof getWindow(n).ShadowRoot || n instanceof ShadowRoot) 75 ); 76 } 77 function applyStyles(e) { 78 var t = e.state; 79 Object.keys(t.elements).forEach(function (e) { 80 var s = t.styles[e] || {}, 81 r = t.attributes[e] || {}, 82 n = t.elements[e]; 83 isHTMLElement$1(n) && 84 getNodeName(n) && 85 (Object.assign(n.style, s), 86 Object.keys(r).forEach(function (e) { 87 var t = r[e]; 88 !1 === t 89 ? n.removeAttribute(e) 90 : n.setAttribute(e, !0 === t ? '' : t); 91 })); 92 }); 93 } 94 function effect$2(e) { 95 var t = e.state, 96 s = { 97 popper: { 98 position: t.options.strategy, 99 left: '0', 100 top: '0', 101 margin: '0', 102 }, 103 arrow: { position: 'absolute' }, 104 reference: {}, 105 }; 106 return ( 107 Object.assign(t.elements.popper.style, s.popper), 108 (t.styles = s), 109 t.elements.arrow && Object.assign(t.elements.arrow.style, s.arrow), 110 function () { 111 Object.keys(t.elements).forEach(function (e) { 112 var r = t.elements[e], 113 n = t.attributes[e] || {}, 114 o = Object.keys( 115 t.styles.hasOwnProperty(e) ? t.styles[e] : s[e] 116 ).reduce(function (e, t) { 117 return (e[t] = ''), e; 118 }, {}); 119 isHTMLElement$1(r) && 120 getNodeName(r) && 121 (Object.assign(r.style, o),
122 Object.keys(n).forEach(function (e) { 123 r.removeAttribute(e); 124 })); 125 }); 126 } 127 ); 128 } 129 var applyStyles$1 = { 130 name: 'applyStyles', 131 enabled: !0, 132 phase: 'write', 133 fn: applyStyles, 134 effect: effect$2, 135 requires: ['computeStyles'], 136 }; 137 function getBasePlacement(e) { 138 return e.split('-')[0]; 139 } 140 var max$1 = Math.max; 141 var min$1 = Math.min; 142 var round = Math.round; 143 function getBoundingClientRect(t, e) { 144 void 0 === e && (e = !1); 145 var i = t.getBoundingClientRect(), 146 o = 1, 147 n = 1; 148 if (isHTMLElement$1(t) && e) { 149 var r = t.offsetHeight, 150 h = t.offsetWidth; 151 h > 0 && (o = round(i.width) / h || 1), 152 r > 0 && (n = round(i.height) / r || 1); 153 } 154 return { 155 width: i.width / o, 156 height: i.height / n, 157 top: i.top / n, 158 right: i.right / o, 159 bottom: i.bottom / n, 160 left: i.left / o, 161 x: i.left / o, 162 y: i.top / n, 163 }; 164 } 165 function getLayoutRect(t) { 166 var e = getBoundingClientRect(t), 167 i = t.offsetWidth, 168 o = t.offsetHeight; 169 return ( 170 Math.abs(e.width - i) <= 1 && (i = e.width), 171 Math.abs(e.height - o) <= 1 && (o = e.height), 172 { x: t.offsetLeft, y: t.offsetTop, width: i, height: o } 173 ); 174 } 175 function contains(o, t) { 176 var e = t.getRootNode && t.getRootNode(); 177 if (o.contains(t)) return !0; 178 if (e && isShadowRoot(e)) { 179 var i = t; 180 do { 181 if (i && o.isSameNode(i)) return !0; 182 i = i.parentNode || i.host; 183 } while (i); 184 } 185 return !1; 186 } 187 function getComputedStyle$1(t) { 188 return getWindow(t).getComputedStyle(t); 189 } 190 function isTableElement(e) { 191 return ['table', 'td', 'th'].indexOf(getNodeName(e)) >= 0; 192 } 193 function getDocumentElement(e) { 194 return ( 195 (isElement$2(e) ? e.ownerDocument : e.document) || window.document 196 ).documentElement; 197 } 198 function getParentNode(e) { 199 return 'html' === getNodeName(e) 200 ? e 201 : e.assignedSlot || 202 e.parentNode || 203 (isShadowRoot(e) ? e.host : null) || 204 getDocumentElement(e); 205 } 206 function getTrueOffsetParent(e) { 207 return isHTMLElement$1(e) && 'fixed' !== getComputedStyle$1(e).position 208 ? e.offsetParent 209 : null; 210 } 211 function getContainingBlock(e) { 212 var t = -1 !== navigator.userAgent.toLowerCase().indexOf('firefox'); 213 if ( 214 -1 !== navigator.userAgent.indexOf('Trident') && 215 isHTMLElement$1(e) && 216 'fixed' === getComputedStyle$1(e).position 217 ) 218 return null; 219 var o = getParentNode(e); 220 for ( 221 isShadowRoot(o) && (o = o.host); 222 isHTMLElement$1(o) && ['html', 'body'].indexOf(getNodeName(o)) < 0; 223 224 ) { 225 var n = getComputedStyle$1(o); 226 if ( 227 'none' !== n.transform || 228 'none' !== n.perspective || 229 'paint' === n.contain || 230 -1 !== ['transform', 'perspective'].indexOf(n.willChange) || 231 (t && 'filter' === n.willChange) || 232 (t && n.filter && 'none' !== n.filter) 233 ) 234 return o; 235 o = o.parentNode; 236 } 237 return null; 238 } 239 function getOffsetParent(e) { 240 for ( 241 var t = getWindow(e), o = getTrueOffsetParent(e); 242 o && 243 isTableElement(o) && 244 'static' === getComputedStyle$1(o).position; 245 246 ) 247 o = getTrueOffsetParent(o); 248 return o && 249 ('html' === getNodeName(o) || 250 ('body' === getNodeName(o) && 251 'static' === getComputedStyle$1(o).position)) 252 ? t 253 : o || getContainingBlock(e) || t; 254 } 255 function getMainAxisFromPlacement(t) { 256 return ['top', 'bottom'].indexOf(t) >= 0 ? 'x' : 'y'; 257 } 258 function within(t, i, n) { 259 return max$1(t, min$1(i, n)); 260 } 261 function withinMaxClamp(t, i, n) { 262 var a = within(t, i, n); 263 return a > n ? n : a; 264 } 265 function getFreshSideObject() { 266 return { top: 0, right: 0, bottom: 0, left: 0 }; 267 }
268 function mergePaddingObject(e) { 269 return Object.assign({}, getFreshSideObject(), e); 270 } 271 function expandToHashMap(e, n) { 272 return n.reduce(function (n, r) { 273 return (n[r] = e), n; 274 }, {}); 275 } 276 var toPaddingObject = function (e, t) { 277 return ( 278 (e = 279 'function' == typeof e 280 ? e(Object.assign({}, t.rects, { placement: t.placement })) 281 : e), 282 mergePaddingObject( 283 'number' != typeof e ? e : expandToHashMap(e, basePlacements) 284 ) 285 ); 286 }; 287 function arrow(e) { 288 var t, 289 r = e.state, 290 o = e.name, 291 n = e.options, 292 i = r.elements.arrow, 293 s = r.modifiersData.popperOffsets, 294 a = getBasePlacement(r.placement), 295 m = getMainAxisFromPlacement(a), 296 p = [left, right].indexOf(a) >= 0 ? 'height' : 'width'; 297 if (i && s) { 298 var c = toPaddingObject(n.padding, r), 299 f = getLayoutRect(i), 300 l = 'y' === m ? top : left, 301 d = 'y' === m ? bottom : right, 302 u = 303 r.rects.reference[p] + 304 r.rects.reference[m] - 305 s[m] - 306 r.rects.popper[p], 307 g = s[m] - r.rects.reference[m], 308 h = getOffsetParent(i), 309 j = h 310 ? 'y' === m 311 ? h.clientHeight || 0 312 : h.clientWidth || 0 313 : 0, 314 P = u / 2 - g / 2, 315 w = c[l], 316 O = j - f[p] - c[d], 317 b = j / 2 - f[p] / 2 + P, 318 v = within(w, b, O), 319 y = m; 320 r.modifiersData[o] = 321 (((t = {})[y] = v), (t.centerOffset = v - b), t); 322 } 323 } 324 function effect$1(e) { 325 var t = e.state, 326 r = e.options.element, 327 o = void 0 === r ? '[data-popper-arrow]' : r; 328 null != o && 329 ('string' != typeof o || 330 (o = t.elements.popper.querySelector(o))) && 331 ('production' !== process.env.NODE_ENV && 332 (isHTMLElement$1(o) || 333 console.error( 334 [ 335 'Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 336 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 337 'the arrow.', 338 ].join(' ') 339 )), 340 contains(t.elements.popper, o) 341 ? (t.elements.arrow = o) 342 : 'production' !== process.env.NODE_ENV && 343 console.error( 344 [ 345 'Popper: "arrow" modifier\'s `element` must be a child of the popper', 346 'element.', 347 ].join(' ') 348 )); 349 } 350 var arrow$1 = { 351 name: 'arrow', 352 enabled: !0, 353 phase: 'main', 354 fn: arrow, 355 effect: effect$1, 356 requires: ['popperOffsets'], 357 requiresIfExists: ['preventOverflow'], 358 }; 359 function getVariation(t) { 360 return t.split('-')[1]; 361 } 362 var unsetSides = { 363 top: 'auto', 364 right: 'auto', 365 bottom: 'auto', 366 left: 'auto', 367 }; 368 function roundOffsetsByDPR(t) { 369 var e = t.x, 370 o = t.y, 371 i = window.devicePixelRatio || 1; 372 return { x: round(e * i) / i || 0, y: round(o * i) / i || 0 }; 373 } 374 function mapToStyles(t) { 375 var e, 376 o = t.popper, 377 i = t.popperRect, 378 r = t.placement, 379 s = t.variation, 380 n = t.offsets, 381 a = t.position, 382 p = t.gpuAcceleration, 383 l = t.adaptive, 384 m = t.roundOffsets, 385 f = t.isFixed, 386 d = n.x, 387 u = void 0 === d ? 0 : d, 388 c = n.y, 389 g = void 0 === c ? 0 : c, 390 y = 'function' == typeof m ? m({ x: u, y: g }) : { x: u, y: g }; 391 (u = y.x), (g = y.y); 392 var v = n.hasOwnProperty('x'), 393 h = n.hasOwnProperty('y'), 394 x = left, 395 w = top, 396 O = window; 397 if (l) { 398 var b = getOffsetParent(o), 399 S = 'clientHeight', 400 j = 'clientWidth'; 401 if (
402 (b === getWindow(o) && 403 ((b = getDocumentElement(o)), 404 'static' !== getComputedStyle$1(b).position && 405 'absolute' === a && 406 ((S = 'scrollHeight'), (j = 'scrollWidth'))), 407 r === top || ((r === left || r === right) && s === end)) 408 ) 409 (w = bottom), 410 (g -= 411 (f && b === O && O.visualViewport 412 ? O.visualViewport.height 413 : b[S]) - i.height), 414 (g *= p ? 1 : -1); 415 if (r === left || ((r === top || r === bottom) && s === end)) 416 (x = right), 417 (u -= 418 (f && b === O && O.visualViewport 419 ? O.visualViewport.width 420 : b[j]) - i.width), 421 (u *= p ? 1 : -1); 422 } 423 var P, 424 D = Object.assign({ position: a }, l && unsetSides), 425 C = !0 === m ? roundOffsetsByDPR({ x: u, y: g }) : { x: u, y: g }; 426 return ( 427 (u = C.x), 428 (g = C.y), 429 p 430 ? Object.assign( 431 {}, 432 D, 433 (((P = {})[w] = h ? '0' : ''), 434 (P[x] = v ? '0' : ''), 435 (P.transform = 436 (O.devicePixelRatio || 1) <= 1 437 ? 'translate(' + u + 'px, ' + g + 'px)' 438 : 'translate3d(' + u + 'px, ' + g + 'px, 0)'), 439 P) 440 ) 441 : Object.assign( 442 {}, 443 D, 444 (((e = {})[w] = h ? g + 'px' : ''), 445 (e[x] = v ? u + 'px' : ''), 446 (e.transform = ''), 447 e) 448 ) 449 ); 450 } 451 function computeStyles(t) { 452 var e = t.state, 453 o = t.options, 454 i = o.gpuAcceleration, 455 r = void 0 === i || i, 456 s = o.adaptive, 457 n = void 0 === s || s, 458 a = o.roundOffsets, 459 p = void 0 === a || a; 460 if ('production' !== process.env.NODE_ENV) { 461 var l = 462 getComputedStyle$1(e.elements.popper).transitionProperty || ''; 463 n && 464 ['transform', 'top', 'right', 'bottom', 'left'].some(function ( 465 t 466 ) { 467 return l.indexOf(t) >= 0; 468 }) && 469 console.warn( 470 [ 471 'Popper: Detected CSS transitions on at least one of the following', 472 'CSS properties: "transform", "top", "right", "bottom", "left".', 473 '\n\n', 474 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 475 'for smooth transitions, or remove these properties from the CSS', 476 'transition declaration on the popper element if only transitioning', 477 'opacity or background-color for example.', 478 '\n\n', 479 'We recommend using the popper element as a wrapper around an inner', 480 'element that can have any CSS property transitioned for animations.', 481 ].join(' ') 482 ); 483 } 484 var m = { 485 placement: getBasePlacement(e.placement), 486 variation: getVariation(e.placement), 487 popper: e.elements.popper, 488 popperRect: e.rects.popper, 489 gpuAcceleration: r, 490 isFixed: 'fixed' === e.options.strategy, 491 }; 492 null != e.modifiersData.popperOffsets && 493 (e.styles.popper = Object.assign( 494 {}, 495 e.styles.popper, 496 mapToStyles( 497 Object.assign({}, m, { 498 offsets: e.modifiersData.popperOffsets, 499 position: e.options.strategy, 500 adaptive: n, 501 roundOffsets: p, 502 }) 503 ) 504 )), 505 null != e.modifiersData.arrow && 506 (e.styles.arrow = Object.assign( 507 {}, 508 e.styles.arrow, 509 mapToStyles( 510 Object.assign({}, m, { 511 offsets: e.modifiersData.arrow, 512 position: 'absolute', 513 adaptive: !1, 514 roundOffsets: p, 515 }) 516 ) 517 )), 518 (e.attributes.popper = Object.assign({}, e.attributes.popper, { 519 'data-popper-placement': e.placement, 520 })); 521 } 522 var computeStyles$1 = { 523 name: 'computeStyles', 524 enabled: !0, 525 phase: 'beforeWrite', 526 fn: computeStyles, 527 data: {}, 528 }; 529 var passive = { passive: !0 }; 530 function effect(e) { 531 var t = e.state, 532 n = e.instance, 533 s = e.options, 534 r = s.scroll, 535 i = void 0 === r || r, 536 o = s.resize, 537 a = void 0 === o || o, 538 p = getWindow(t.elements.popper), 539 c = [].concat(t.scrollParents.reference, t.scrollParents.popper); 540 return ( 541 i &&
542 c.forEach(function (e) { 543 e.addEventListener('scroll', n.update, passive); 544 }), 545 a && p.addEventListener('resize', n.update, passive), 546 function () { 547 i && 548 c.forEach(function (e) { 549 e.removeEventListener('scroll', n.update, passive); 550 }), 551 a && p.removeEventListener('resize', n.update, passive); 552 } 553 ); 554 } 555 var eventListeners = { 556 name: 'eventListeners', 557 enabled: !0, 558 phase: 'write', 559 fn: function () { }, 560 effect: effect, 561 data: {}, 562 }; 563 var hash$1 = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; 564 function getOppositePlacement(t) { 565 return t.replace(/left|right|bottom|top/g, function (t) { 566 return hash$1[t]; 567 }); 568 } 569 var hash = { start: 'end', end: 'start' }; 570 function getOppositeVariationPlacement(t) { 571 return t.replace(/start|end/g, function (t) { 572 return hash[t]; 573 }); 574 } 575 function getWindowScroll(e) { 576 var o = getWindow(e); 577 return { scrollLeft: o.pageXOffset, scrollTop: o.pageYOffset }; 578 } 579 function getWindowScrollBarX(e) { 580 return ( 581 getBoundingClientRect(getDocumentElement(e)).left + 582 getWindowScroll(e).scrollLeft 583 ); 584 } 585 function getViewportRect(t) { 586 var e = getWindow(t), 587 o = getDocumentElement(t), 588 i = e.visualViewport, 589 r = o.clientWidth, 590 n = o.clientHeight, 591 g = 0, 592 l = 0; 593 return (i && 594 ((r = i.width), 595 (n = i.height), 596 /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || 597 ((g = i.offsetLeft), (l = i.offsetTop))), { width: r, height: n, x: g + getWindowScrollBarX(t), y: l }); 598 } 599 function getDocumentRect(t) { 600 var e, 601 o = getDocumentElement(t), 602 l = getWindowScroll(t), 603 i = null == (e = t.ownerDocument) ? void 0 : e.body, 604 r = max$1( 605 o.scrollWidth, 606 o.clientWidth, 607 i ? i.scrollWidth : 0, 608 i ? i.clientWidth : 0 609 ), 610 n = max$1( 611 o.scrollHeight, 612 o.clientHeight, 613 i ? i.scrollHeight : 0, 614 i ? i.clientHeight : 0 615 ), 616 c = -l.scrollLeft + getWindowScrollBarX(t), 617 m = -l.scrollTop; 618 return ( 619 'rtl' === getComputedStyle$1(i || o).direction && 620 (c += max$1(o.clientWidth, i ? i.clientWidth : 0) - r), 621 { width: r, height: n, x: c, y: m } 622 ); 623 } 624 function isScrollParent(e) { 625 var o = getComputedStyle$1(e), 626 t = o.overflow, 627 r = o.overflowX, 628 l = o.overflowY; 629 return /auto|scroll|overlay|hidden/.test(t + l + r); 630 } 631 function getScrollParent(e) { 632 return ['html', 'body', '#document'].indexOf(getNodeName(e)) >= 0 633 ? e.ownerDocument.body 634 : isHTMLElement$1(e) && isScrollParent(e) 635 ? e 636 : getScrollParent(getParentNode(e)); 637 } 638 function listScrollParents(r, t) { 639 var o; 640 void 0 === t && (t = []); 641 var e = getScrollParent(r), 642 n = e === (null == (o = r.ownerDocument) ? void 0 : o.body), 643 l = getWindow(e), 644 i = n 645 ? [l].concat(l.visualViewport || [], isScrollParent(e) ? e : []) 646 : e, 647 a = t.concat(i); 648 return n ? a : a.concat(listScrollParents(getParentNode(i))); 649 } 650 function rectToClientRect(t) { 651 return Object.assign({}, t, { 652 left: t.x, 653 top: t.y, 654 right: t.x + t.width, 655 bottom: t.y + t.height, 656 }); 657 } 658 function getInnerBoundingClientRect(t) { 659 var e = getBoundingClientRect(t); 660 return ( 661 (e.top = e.top + t.clientTop), 662 (e.left = e.left + t.clientLeft), 663 (e.bottom = e.top + t.clientHeight), 664 (e.right = e.left + t.clientWidth), 665 (e.width = t.clientWidth), 666 (e.height = t.clientHeight), 667 (e.x = e.left), 668 (e.y = e.top), 669 e 670 ); 671 } 672 function getClientRectFromMixedType(t, e) { 673 return e === viewport 674 ? rectToClientRect(getViewportRect(t)) 675 : isElement$2(e) 676 ? getInnerBoundingClientRect(e) 677 : rectToClientRect(getDocumentRect(getDocumentElement(t))); 678 } 679 function getClippingParents(t) { 680 var e = listScrollParents(getParentNode(t)), 681 o = 682 ['absolute', 'fixed'].indexOf(getComputedStyle$1(t).position) >= 683 0 && isHTMLElement$1(t) 684 ? getOffsetParent(t) 685 : t; 686 return isElement$2(o) 687 ? e.filter(function (t) { 688 return ( 689 isElement$2(t) && 690 contains(t, o) && 691 'body' !== getNodeName(t) 692 ); 693 }) 694 : []; 695 }
696 function getClippingRect(t, e, o) { 697 var n = 'clippingParents' === e ? getClippingParents(t) : [].concat(e), 698 i = [].concat(n, [o]), 699 r = i[0], 700 m = i.reduce(function (e, o) { 701 var n = getClientRectFromMixedType(t, o); 702 return ( 703 (e.top = max$1(n.top, e.top)), 704 (e.right = min$1(n.right, e.right)), 705 (e.bottom = min$1(n.bottom, e.bottom)), 706 (e.left = max$1(n.left, e.left)), 707 e 708 ); 709 }, getClientRectFromMixedType(t, r)); 710 return ( 711 (m.width = m.right - m.left), 712 (m.height = m.bottom - m.top), 713 (m.x = m.left), 714 (m.y = m.top), 715 m 716 ); 717 } 718 function computeOffsets(e) { 719 var t, 720 a = e.reference, 721 i = e.element, 722 r = e.placement, 723 n = r ? getBasePlacement(r) : null, 724 o = r ? getVariation(r) : null, 725 s = a.x + a.width / 2 - i.width / 2, 726 m = a.y + a.height / 2 - i.height / 2; 727 switch (n) { 728 case top: 729 t = { x: s, y: a.y - i.height }; 730 break; 731 case bottom: 732 t = { x: s, y: a.y + a.height }; 733 break; 734 case right: 735 t = { x: a.x + a.width, y: m }; 736 break; 737 case left: 738 t = { x: a.x - i.width, y: m }; 739 break; 740 default: 741 t = { x: a.x, y: a.y }; 742 } 743 var l = n ? getMainAxisFromPlacement(n) : null; 744 if (null != l) { 745 var c = 'y' === l ? 'height' : 'width'; 746 switch (o) { 747 case start: 748 t[l] = t[l] - (a[c] / 2 - i[c] / 2); 749 break; 750 case end: 751 t[l] = t[l] + (a[c] / 2 - i[c] / 2); 752 } 753 } 754 return t; 755 } 756 function detectOverflow(e, t) { 757 void 0 === t && (t = {}); 758 var o = t, 759 p = o.placement, 760 n = void 0 === p ? e.placement : p, 761 r = o.boundary, 762 i = void 0 === r ? clippingParents : r, 763 m = o.rootBoundary, 764 s = void 0 === m ? viewport : m, 765 c = o.elementContext, 766 l = void 0 === c ? popper : c, 767 a = o.altBoundary, 768 f = void 0 !== a && a, 769 d = o.padding, 770 g = void 0 === d ? 0 : d, 771 u = mergePaddingObject( 772 'number' != typeof g ? g : expandToHashMap(g, basePlacements) 773 ), 774 b = l === popper ? reference : popper, 775 j = e.rects.popper, 776 v = e.elements[f ? b : l], 777 O = getClippingRect( 778 isElement$2(v) 779 ? v 780 : v.contextElement || getDocumentElement(e.elements.popper), 781 i, 782 s 783 ), 784 h = getBoundingClientRect(e.elements.reference), 785 C = computeOffsets({ 786 reference: h, 787 element: j, 788 strategy: 'absolute', 789 placement: n, 790 }), 791 x = rectToClientRect(Object.assign({}, j, C)), 792 R = l === popper ? x : h, 793 y = { 794 top: O.top - R.top + u.top, 795 bottom: R.bottom - O.bottom + u.bottom, 796 left: O.left - R.left + u.left, 797 right: R.right - O.right + u.right, 798 }, 799 E = e.modifiersData.offset; 800 if (l === popper && E) { 801 var P = E[n]; 802 Object.keys(y).forEach(function (e) { 803 var t = [right, bottom].indexOf(e) >= 0 ? 1 : -1, 804 o = [top, bottom].indexOf(e) >= 0 ? 'y' : 'x'; 805 y[e] += P[o] * t; 806 }); 807 } 808 return y; 809 } 810 function computeAutoPlacement(e, t) { 811 void 0 === t && (t = {}); 812 var o = t, 813 a = o.placement, 814 n = o.boundary, 815 r = o.rootBoundary, 816 l = o.padding, 817 i = o.flipVariations, 818 s = o.allowedAutoPlacements, 819 c = void 0 === s ? placements : s, 820 m = getVariation(a), 821 u = m 822 ? i 823 ? variationPlacements 824 : variationPlacements.filter(function (e) { 825 return getVariation(e) === m; 826 }) 827 : basePlacements, 828 p = u.filter(function (e) { 829 return c.indexOf(e) >= 0; 830 }); 831 0 === p.length && 832 ((p = u), 833 'production' !== process.env.NODE_ENV && 834 console.error( 835 [ 836 'Popper: The `allowedAutoPlacements` option did not allow any', 837 'placements. Ensure the `placement` option matches the variation', 838 'of the allowed placements.', 839 'For example, "auto" cannot be used to allow "bottom-start".', 840 'Use "auto-start" instead.', 841 ].join(' ') 842 )); 843 var d = p.reduce(function (t, o) { 844 return ( 845 (t[o] = detectOverflow(e, { 846 placement: o, 847 boundary: n, 848 rootBoundary: r, 849 padding: l, 850 })[getBasePlacement(o)]), 851 t 852 ); 853 }, {}); 854 return Object.keys(d).sort(function (e, t) { 855 return d[e] - d[t]; 856 }); 857 } 858 function getExpandedFallbackPlacements(e) { 859 if (getBasePlacement(e) === auto) return []; 860 var t = getOppositePlacement(e); 861 return [ 862 getOppositeVariationPlacement(e), 863 t, 864 getOppositeVariationPlacement(t), 865 ]; 866 } 867 function flip(e) { 868 var t = e.state, 869 a = e.options, 870 o = e.name; 871 if (!t.modifiersData[o]._skip) { 872 for ( 873 var i = a.mainAxis, 874 n = void 0 === i || i, 875 r = a.altAxis, 876 l = void 0 === r || r, 877 p = a.fallbackPlacements, 878 s = a.padding, 879 m = a.boundary, 880 c = a.rootBoundary, 881 u = a.altBoundary, 882 f = a.flipVariations, 883 d = void 0 === f || f, 884 g = a.allowedAutoPlacements, 885 P = t.options.placement, 886 v = getBasePlacement(P), 887 b = 888 p || 889 (v === P || !d 890 ? [getOppositePlacement(P)] 891 : getExpandedFallbackPlacements(P)), 892 O = [P].concat(b).reduce(function (e, a) { 893 return e.concat( 894 getBasePlacement(a) === auto 895 ? computeAutoPlacement(t, { 896 placement: a, 897 boundary: m, 898 rootBoundary: c, 899 padding: s, 900 flipVariations: d, 901 allowedAutoPlacements: g, 902 }) 903 : a 904 ); 905 }, []), 906 B = t.rects.reference, 907 k = t.rects.popper, 908 y = new Map(), 909 h = !0, 910 V = O[0], 911 j = 0; 912 j < O.length; 913 j++ 914 ) { 915 var w = O[j], 916 x = getBasePlacement(w), 917 A = getVariation(w) === start, 918 E = [top, bottom].indexOf(x) >= 0, 919 _ = E ? 'width' : 'height', 920 D = detectOverflow(t, { 921 placement: w, 922 boundary: m, 923 rootBoundary: c, 924 altBoundary: u, 925 padding: s, 926 }), 927 F = E ? (A ? right : left) : A ? bottom : top; 928 B[_] > k[_] && (F = getOppositePlacement(F)); 929 var q = getOppositePlacement(F), 930 I = []; 931 if ( 932 (n && I.push(D[x] <= 0), 933 l && I.push(D[F] <= 0, D[q] <= 0), 934 I.every(function (e) { 935 return e; 936 })) 937 ) {
938 (V = w), (h = !1); 939 break; 940 } 941 y.set(w, I); 942 } 943 if (h) 944 for ( 945 var M = function (e) { 946 var t = O.find(function (t) { 947 var a = y.get(t); 948 if (a) 949 return a.slice(0, e).every(function (e) { 950 return e; 951 }); 952 }); 953 if (t) return (V = t), 'break'; 954 }, 955 z = d ? 3 : 1; 956 z > 0; 957 z-- 958 ) { 959 if ('break' === M(z)) break; 960 } 961 t.placement !== V && 962 ((t.modifiersData[o]._skip = !0), 963 (t.placement = V), 964 (t.reset = !0)); 965 } 966 } 967 var flip$1 = { 968 name: 'flip', 969 enabled: !0, 970 phase: 'main', 971 fn: flip, 972 requiresIfExists: ['offset'], 973 data: { _skip: !1 }, 974 }; 975 function getSideOffsets(e, t, r) { 976 return ( 977 void 0 === r && (r = { x: 0, y: 0 }), 978 { 979 top: e.top - t.height - r.y, 980 right: e.right - t.width + r.x, 981 bottom: e.bottom - t.height + r.y, 982 left: e.left - t.width - r.x, 983 } 984 ); 985 } 986 function isAnySideFullyClipped(e) { 987 return [top, right, bottom, left].some(function (t) { 988 return e[t] >= 0; 989 }); 990 } 991 function hide(e) { 992 var t = e.state, 993 r = e.name, 994 i = t.rects.reference, 995 p = t.rects.popper, 996 o = t.modifiersData.preventOverflow, 997 s = detectOverflow(t, { elementContext: 'reference' }), 998 n = detectOverflow(t, { altBoundary: !0 }), 999 f = getSideOffsets(s, i), 1000 d = getSideOffsets(n, p, o), 1001 l = isAnySideFullyClipped(f), 1002 a = isAnySideFullyClipped(d); 1003 (t.modifiersData[r] = { 1004 referenceClippingOffsets: f, 1005 popperEscapeOffsets: d, 1006 isReferenceHidden: l, 1007 hasPopperEscaped: a, 1008 }), 1009 (t.attributes.popper = Object.assign({}, t.attributes.popper, { 1010 'data-popper-reference-hidden': l, 1011 'data-popper-escaped': a, 1012 })); 1013 } 1014 var hide$1 = { 1015 name: 'hide', 1016 enabled: !0, 1017 phase: 'main', 1018 requiresIfExists: ['preventOverflow'], 1019 fn: hide, 1020 }; 1021 function distanceAndSkiddingToXY(e, t, n) { 1022 var s = getBasePlacement(e), 1023 f = [left, top].indexOf(s) >= 0 ? -1 : 1, 1024 i = 1025 'function' == typeof n 1026 ? n(Object.assign({}, t, { placement: e })) 1027 : n, 1028 o = i[0], 1029 a = i[1]; 1030 return ( 1031 (o = o || 0), 1032 (a = (a || 0) * f), 1033 [left, right].indexOf(s) >= 0 ? { x: a, y: o } : { x: o, y: a } 1034 ); 1035 } 1036 function offset(e) { 1037 var t = e.state, 1038 n = e.options, 1039 s = e.name, 1040 f = n.offset, 1041 i = void 0 === f ? [0, 0] : f, 1042 o = placements.reduce(function (e, n) { 1043 return (e[n] = distanceAndSkiddingToXY(n, t.rects, i)), e; 1044 }, {}), 1045 a = o[t.placement], 1046 p = a.x, 1047 r = a.y; 1048 null != t.modifiersData.popperOffsets && 1049 ((t.modifiersData.popperOffsets.x += p), 1050 (t.modifiersData.popperOffsets.y += r)), 1051 (t.modifiersData[s] = o); 1052 } 1053 var offset$1 = { 1054 name: 'offset', 1055 enabled: !0, 1056 phase: 'main', 1057 requires: ['popperOffsets'], 1058 fn: offset, 1059 }; 1060 function popperOffsets(e) { 1061 var t = e.state, 1062 p = e.name; 1063 t.modifiersData[p] = computeOffsets({ 1064 reference: t.rects.reference, 1065 element: t.rects.popper, 1066 strategy: 'absolute', 1067 placement: t.placement, 1068 }); 1069 } 1070 var popperOffsets$1 = { 1071 name: 'popperOffsets', 1072 enabled: !0, 1073 phase: 'read', 1074 fn: popperOffsets, 1075 data: {}, 1076 }; 1077 function getAltAxis(t) { 1078 return 'x' === t ? 'y' : 'x'; 1079 } 1080 function preventOverflow(t) { 1081 var e = t.state, 1082 i = t.options, 1083 a = t.name, 1084 r = i.mainAxis, 1085 o = void 0 === r || r, 1086 s = i.altAxis, 1087 n = void 0 !== s && s, 1088 m = i.boundary, 1089 l = i.rootBoundary, 1090 f = i.altBoundary, 1091 p = i.padding, 1092 d = i.tether, 1093 g = void 0 === d || d, 1094 c = i.tetherOffset, 1095 u = void 0 === c ? 0 : c, 1096 h = detectOverflow(e, { 1097 boundary: m, 1098 rootBoundary: l, 1099 padding: p, 1100 altBoundary: f, 1101 }), 1102 x = getBasePlacement(e.placement), 1103 w = getVariation(e.placement), 1104 A = !w, 1105 v = getMainAxisFromPlacement(x), 1106 j = getAltAxis(v), 1107 y = e.modifiersData.popperOffsets,
1108 O = e.rects.reference, 1109 b = e.rects.popper, 1110 M = 1111 'function' == typeof u 1112 ? u(Object.assign({}, e.rects, { placement: e.placement })) 1113 : u, 1114 P = 1115 'number' == typeof M 1116 ? { mainAxis: M, altAxis: M } 1117 : Object.assign({ mainAxis: 0, altAxis: 0 }, M), 1118 B = e.modifiersData.offset 1119 ? e.modifiersData.offset[e.placement] 1120 : null, 1121 D = { x: 0, y: 0 }; 1122 if (y) { 1123 if (o) { 1124 var F, 1125 L = 'y' === v ? top : left, 1126 R = 'y' === v ? bottom : right, 1127 S = 'y' === v ? 'height' : 'width', 1128 V = y[v], 1129 C = V + h[L], 1130 q = V - h[R], 1131 E = g ? -b[S] / 2 : 0, 1132 I = w === start ? O[S] : b[S], 1133 T = w === start ? -b[S] : -O[S], 1134 k = e.elements.arrow, 1135 z = g && k ? getLayoutRect(k) : { width: 0, height: 0 }, 1136 G = e.modifiersData['arrow#persistent'] 1137 ? e.modifiersData['arrow#persistent'].padding 1138 : getFreshSideObject(), 1139 H = G[L], 1140 J = G[R], 1141 K = within(0, O[S], z[S]), 1142 N = A 1143 ? O[S] / 2 - E - K - H - P.mainAxis 1144 : I - K - H - P.mainAxis, 1145 Q = A 1146 ? -O[S] / 2 + E + K + J + P.mainAxis 1147 : T + K + J + P.mainAxis, 1148 U = e.elements.arrow && getOffsetParent(e.elements.arrow), 1149 W = U 1150 ? 'y' === v 1151 ? U.clientTop || 0 1152 : U.clientLeft || 0 1153 : 0, 1154 X = null != (F = null == B ? void 0 : B[v]) ? F : 0, 1155 Y = V + Q - X, 1156 Z = within( 1157 g ? min$1(C, V + N - X - W) : C, 1158 V, 1159 g ? max$1(q, Y) : q 1160 ); 1161 (y[v] = Z), (D[v] = Z - V); 1162 } 1163 if (n) { 1164 var $, 1165 _ = 'x' === v ? top : left, 1166 tt = 'x' === v ? bottom : right, 1167 et = y[j], 1168 it = 'y' === j ? 'height' : 'width', 1169 at = et + h[_], 1170 rt = et - h[tt], 1171 ot = -1 !== [top, left].indexOf(x), 1172 st = null != ($ = null == B ? void 0 : B[j]) ? $ : 0, 1173 nt = ot ? at : et - O[it] - b[it] - st + P.altAxis, 1174 mt = ot ? et + O[it] + b[it] - st - P.altAxis : rt, 1175 lt = 1176 g && ot 1177 ? withinMaxClamp(nt, et, mt) 1178 : within(g ? nt : at, et, g ? mt : rt); 1179 (y[j] = lt), (D[j] = lt - et); 1180 } 1181 e.modifiersData[a] = D; 1182 } 1183 } 1184 var preventOverflow$1 = { 1185 name: 'preventOverflow', 1186 enabled: !0, 1187 phase: 'main', 1188 fn: preventOverflow, 1189 requiresIfExists: ['offset'], 1190 }; 1191 function getHTMLElementScroll(l) { 1192 return { scrollLeft: l.scrollLeft, scrollTop: l.scrollTop }; 1193 } 1194 function getNodeScroll(e) { 1195 return e !== getWindow(e) && isHTMLElement$1(e) 1196 ? getHTMLElementScroll(e) 1197 : getWindowScroll(e); 1198 } 1199 function isElementScaled(e) { 1200 var t = e.getBoundingClientRect(), 1201 o = round(t.width) / e.offsetWidth || 1, 1202 l = round(t.height) / e.offsetHeight || 1; 1203 return 1 !== o || 1 !== l; 1204 } 1205 function getCompositeRect(e, t, o) { 1206 void 0 === o && (o = !1); 1207 var l = isHTMLElement$1(t), 1208 i = isHTMLElement$1(t) && isElementScaled(t), 1209 n = getDocumentElement(t), 1210 r = getBoundingClientRect(e, i), 1211 m = { scrollLeft: 0, scrollTop: 0 }, 1212 c = { x: 0, y: 0 }; 1213 return ( 1214 (l || (!l && !o)) && 1215 (('body' !== getNodeName(t) || isScrollParent(n)) && 1216 (m = getNodeScroll(t)), 1217 isHTMLElement$1(t) 1218 ? (((c = getBoundingClientRect(t, !0)).x += t.clientLeft), 1219 (c.y += t.clientTop)) 1220 : n && (c.x = getWindowScrollBarX(n))), 1221 { 1222 x: r.left + m.scrollLeft - c.x, 1223 y: r.top + m.scrollTop - c.y, 1224 width: r.width, 1225 height: r.height, 1226 } 1227 ); 1228 } 1229 function order(r) { 1230 var e = new Map(), 1231 n = new Set(), 1232 o = []; 1233 function t(r) { 1234 n.add(r.name), 1235 [] 1236 .concat(r.requires || [], r.requiresIfExists || []) 1237 .forEach(function (r) { 1238 if (!n.has(r)) { 1239 var o = e.get(r); 1240 o && t(o); 1241 } 1242 }), 1243 o.push(r); 1244 } 1245 return ( 1246 r.forEach(function (r) { 1247 e.set(r.name, r); 1248 }), 1249 r.forEach(function (r) { 1250 n.has(r.name) || t(r); 1251 }), 1252 o 1253 ); 1254 } 1255 function orderModifiers(r) { 1256 var e = order(r); 1257 return modifierPhases.reduce(function (r, n) { 1258 return r.concat( 1259 e.filter(function (r) { 1260 return r.phase === n; 1261 }) 1262 ); 1263 }, []); 1264 } 1265 function debounce(n) { 1266 var e; 1267 return function () { 1268 return ( 1269 e || 1270 (e = new Promise(function (o) { 1271 Promise.resolve().then(function () { 1272 (e = void 0), o(n()); 1273 }); 1274 })), 1275 e 1276 ); 1277 }; 1278 } 1279 function format$1(r) { 1280 for ( 1281 var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), t = 1; 1282 t < e; 1283 t++ 1284 ) 1285 n[t - 1] = arguments[t]; 1286 return [].concat(n).reduce(function (r, e) { 1287 return r.replace(/%s/, e); 1288 }, r); 1289 } 1290 var INVALID_MODIFIER_ERROR =
1291 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s', 1292 MISSING_DEPENDENCY_ERROR = 1293 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available', 1294 VALID_PROPERTIES = [ 1295 'name', 1296 'enabled', 1297 'phase', 1298 'fn', 1299 'effect', 1300 'requires', 1301 'options', 1302 ]; 1303 function validateModifiers(e) { 1304 e.forEach(function (r) { 1305 [] 1306 .concat(Object.keys(r), VALID_PROPERTIES) 1307 .filter(function (e, r, n) { 1308 return n.indexOf(e) === r; 1309 }) 1310 .forEach(function (n) { 1311 switch (n) { 1312 case 'name': 1313 'string' != typeof r.name && 1314 console.error( 1315 format$1( 1316 INVALID_MODIFIER_ERROR, 1317 String(r.name), 1318 '"name"', 1319 '"string"', 1320 '"' + String(r.name) + '"' 1321 ) 1322 ); 1323 break; 1324 case 'enabled': 1325 'boolean' != typeof r.enabled && 1326 console.error( 1327 format$1( 1328 INVALID_MODIFIER_ERROR, 1329 r.name, 1330 '"enabled"', 1331 '"boolean"', 1332 '"' + String(r.enabled) + '"' 1333 ) 1334 ); 1335 break; 1336 case 'phase': 1337 modifierPhases.indexOf(r.phase) < 0 && 1338 console.error( 1339 format$1( 1340 INVALID_MODIFIER_ERROR, 1341 r.name, 1342 '"phase"', 1343 'either ' + modifierPhases.join(', '), 1344 '"' + String(r.phase) + '"' 1345 ) 1346 ); 1347 break; 1348 case 'fn': 1349 'function' != typeof r.fn && 1350 console.error( 1351 format$1( 1352 INVALID_MODIFIER_ERROR, 1353 r.name, 1354 '"fn"', 1355 '"function"', 1356 '"' + String(r.fn) + '"' 1357 ) 1358 ); 1359 break; 1360 case 'effect': 1361 null != r.effect && 1362 'function' != typeof r.effect && 1363 console.error( 1364 format$1( 1365 INVALID_MODIFIER_ERROR, 1366 r.name, 1367 '"effect"', 1368 '"function"', 1369 '"' + String(r.fn) + '"' 1370 ) 1371 ); 1372 break; 1373 case 'requires': 1374 null == r.requires || 1375 Array.isArray(r.requires) || 1376 console.error( 1377 format$1( 1378 INVALID_MODIFIER_ERROR, 1379 r.name, 1380 '"requires"', 1381 '"array"', 1382 '"' + String(r.requires) + '"' 1383 ) 1384 ); 1385 break; 1386 case 'requiresIfExists': 1387 Array.isArray(r.requiresIfExists) || 1388 console.error( 1389 format$1( 1390 INVALID_MODIFIER_ERROR, 1391 r.name, 1392 '"requiresIfExists"', 1393 '"array"', 1394 '"' + String(r.requiresIfExists) + '"' 1395 ) 1396 ); 1397 break; 1398 case 'options': 1399 case 'data': 1400 break; 1401 default: 1402 console.error(
1403 'PopperJS: an invalid property has been provided to the "' + 1404 r.name + 1405 '" modifier, valid properties are ' + 1406 VALID_PROPERTIES.map(function (e) { 1407 return '"' + e + '"'; 1408 }).join(', ') + 1409 '; but "' + 1410 n + 1411 '" was provided.' 1412 ); 1413 } 1414 r.requires && 1415 r.requires.forEach(function (n) { 1416 null == 1417 e.find(function (e) { 1418 return e.name === n; 1419 }) && 1420 console.error( 1421 format$1( 1422 MISSING_DEPENDENCY_ERROR, 1423 String(r.name), 1424 n, 1425 n 1426 ) 1427 ); 1428 }); 1429 }); 1430 }); 1431 } 1432 function uniqueBy(e, n) { 1433 var r = new Set(); 1434 return e.filter(function (e) { 1435 var t = n(e); 1436 if (!r.has(t)) return r.add(t), !0; 1437 }); 1438 } 1439 function mergeByName(e) { 1440 var n = e.reduce(function (e, n) { 1441 var t = e[n.name]; 1442 return ( 1443 (e[n.name] = t 1444 ? Object.assign({}, t, n, { 1445 options: Object.assign({}, t.options, n.options), 1446 data: Object.assign({}, t.data, n.data), 1447 }) 1448 : n), 1449 e 1450 ); 1451 }, {}); 1452 return Object.keys(n).map(function (e) { 1453 return n[e]; 1454 }); 1455 } 1456 var INVALID_ELEMENT_ERROR = 1457 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.', 1458 INFINITE_LOOP_ERROR = 1459 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.', 1460 DEFAULT_OPTIONS = { 1461 placement: 'bottom', 1462 modifiers: [], 1463 strategy: 'absolute', 1464 }; 1465 function areValidElements() { 1466 for (var e = arguments.length, t = new Array(e), o = 0; o < e; o++) 1467 t[o] = arguments[o]; 1468 return !t.some(function (e) { 1469 return !(e && 'function' == typeof e.getBoundingClientRect); 1470 }); 1471 } 1472 function popperGenerator(e) { 1473 void 0 === e && (e = {}); 1474 var t = e, 1475 o = t.defaultModifiers, 1476 r = void 0 === o ? [] : o, 1477 n = t.defaultOptions, 1478 i = void 0 === n ? DEFAULT_OPTIONS : n; 1479 return function (e, t, o) { 1480 void 0 === o && (o = i); 1481 var n = { 1482 placement: 'bottom', 1483 orderedModifiers: [], 1484 options: Object.assign({}, DEFAULT_OPTIONS, i), 1485 modifiersData: {}, 1486 elements: { reference: e, popper: t }, 1487 attributes: {}, 1488 styles: {}, 1489 }, 1490 s = [], 1491 a = !1, 1492 p = { 1493 state: n, 1494 setOptions: function (o) { 1495 var a = 'function' == typeof o ? o(n.options) : o; 1496 f(), 1497 (n.options = Object.assign({}, i, n.options, a)), 1498 (n.scrollParents = { 1499 reference: isElement$2(e) 1500 ? listScrollParents(e) 1501 : e.contextElement 1502 ? listScrollParents(e.contextElement) 1503 : [], 1504 popper: listScrollParents(t), 1505 }); 1506 var d = orderModifiers( 1507 mergeByName([].concat(r, n.options.modifiers)) 1508 ); 1509 if ( 1510 ((n.orderedModifiers = d.filter(function (e) { 1511 return e.enabled; 1512 })), 1513 'production' !== process.env.NODE_ENV) 1514 ) { 1515 var c = uniqueBy( 1516 [].concat(d, n.options.modifiers), 1517 function (e) { 1518 return e.name; 1519 } 1520 ); 1521 if ( 1522 (validateModifiers(c), 1523 getBasePlacement(n.options.placement) === auto) 1524 ) 1525 n.orderedModifiers.find(function (e) {
1526 return 'flip' === e.name; 1527 }) || 1528 console.error( 1529 [ 1530 'Popper: "auto" placements require the "flip" modifier be', 1531 'present and enabled to work.', 1532 ].join(' ') 1533 ); 1534 var m = getComputedStyle$1(t); 1535 [ 1536 m.marginTop, 1537 m.marginRight, 1538 m.marginBottom, 1539 m.marginLeft, 1540 ].some(function (e) { 1541 return parseFloat(e); 1542 }) && 1543 console.warn( 1544 [ 1545 'Popper: CSS "margin" styles cannot be used to apply padding', 1546 'between the popper and its reference element or boundary.', 1547 'To replicate margin, use the `offset` modifier, as well as', 1548 'the `padding` option in the `preventOverflow` and `flip`', 1549 'modifiers.', 1550 ].join(' ') 1551 ); 1552 } 1553 return ( 1554 n.orderedModifiers.forEach(function (e) { 1555 var t = e.name, 1556 o = e.options, 1557 r = void 0 === o ? {} : o, 1558 i = e.effect; 1559 if ('function' == typeof i) { 1560 var a = i({ 1561 state: n, 1562 name: t, 1563 instance: p, 1564 options: r, 1565 }), 1566 f = function () { }; 1567 s.push(a || f); 1568 } 1569 }), 1570 p.update() 1571 ); 1572 }, 1573 forceUpdate: function () { 1574 if (!a) { 1575 var e = n.elements, 1576 t = e.reference, 1577 o = e.popper; 1578 if (areValidElements(t, o)) { 1579 (n.rects = { 1580 reference: getCompositeRect( 1581 t, 1582 getOffsetParent(o), 1583 'fixed' === n.options.strategy 1584 ), 1585 popper: getLayoutRect(o), 1586 }), 1587 (n.reset = !1), 1588 (n.placement = n.options.placement), 1589 n.orderedModifiers.forEach(function (e) { 1590 return (n.modifiersData[ 1591 e.name 1592 ] = Object.assign({}, e.data)); 1593 }); 1594 for ( 1595 var r = 0, i = 0; 1596 i < n.orderedModifiers.length; 1597 i++ 1598 ) { 1599 if ( 1600 'production' !== process.env.NODE_ENV && 1601 (r += 1) > 100 1602 ) { 1603 console.error(INFINITE_LOOP_ERROR); 1604 break; 1605 } 1606 if (!0 !== n.reset) { 1607 var s = n.orderedModifiers[i], 1608 f = s.fn, 1609 d = s.options, 1610 c = void 0 === d ? {} : d, 1611 m = s.name; 1612 'function' == typeof f && 1613 (n = 1614 f({ 1615 state: n, 1616 options: c, 1617 name: m, 1618 instance: p, 1619 }) || n); 1620 } else (n.reset = !1), (i = -1); 1621 } 1622 } else 1623 'production' !== process.env.NODE_ENV && 1624 console.error(INVALID_ELEMENT_ERROR); 1625 } 1626 }, 1627 update: debounce(function () { 1628 return new Promise(function (e) { 1629 p.forceUpdate(), e(n); 1630 }); 1631 }), 1632 destroy: function () { 1633 f(), (a = !0); 1634 }, 1635 }; 1636 if (!areValidElements(e, t)) 1637 return ( 1638 'production' !== process.env.NODE_ENV && 1639 console.error(INVALID_ELEMENT_ERROR), 1640 p 1641 ); 1642 function f() {
1643 s.forEach(function (e) { 1644 return e(); 1645 }), 1646 (s = []); 1647 } 1648 return ( 1649 p.setOptions(o).then(function (e) { 1650 !a && o.onFirstUpdate && o.onFirstUpdate(e); 1651 }), 1652 p 1653 ); 1654 }; 1655 } 1656 var createPopper$2 = popperGenerator(); 1657 var defaultModifiers$1 = [ 1658 eventListeners, 1659 popperOffsets$1, 1660 computeStyles$1, 1661 applyStyles$1, 1662 ], 1663 createPopper$1 = popperGenerator({ 1664 defaultModifiers: defaultModifiers$1, 1665 }); 1666 var defaultModifiers = [ 1667 eventListeners, 1668 popperOffsets$1, 1669 computeStyles$1, 1670 applyStyles$1, 1671 offset$1, 1672 flip$1, 1673 preventOverflow$1, 1674 arrow$1, 1675 hide$1, 1676 ], 1677 createPopper = popperGenerator({ defaultModifiers: defaultModifiers }); 1678 var Popper = /*#__PURE__*/ Object.freeze({ 1679 __proto__: null, 1680 popperGenerator: popperGenerator, 1681 detectOverflow: detectOverflow, 1682 createPopperBase: createPopper$2, 1683 createPopper: createPopper, 1684 createPopperLite: createPopper$1, 1685 top: top, 1686 bottom: bottom, 1687 right: right, 1688 left: left, 1689 auto: auto, 1690 basePlacements: basePlacements, 1691 start: start, 1692 end: end, 1693 clippingParents: clippingParents, 1694 viewport: viewport, 1695 popper: popper, 1696 reference: reference, 1697 variationPlacements: variationPlacements, 1698 placements: placements, 1699 beforeRead: beforeRead, 1700 read: read, 1701 afterRead: afterRead, 1702 beforeMain: beforeMain, 1703 main: main$1, 1704 afterMain: afterMain, 1705 beforeWrite: beforeWrite, 1706 write: write, 1707 afterWrite: afterWrite, 1708 modifierPhases: modifierPhases, 1709 applyStyles: applyStyles$1, 1710 arrow: arrow$1, 1711 computeStyles: computeStyles$1, 1712 eventListeners: eventListeners, 1713 flip: flip$1, 1714 hide: hide$1, 1715 offset: offset$1, 1716 popperOffsets: popperOffsets$1, 1717 preventOverflow: preventOverflow$1, 1718 }); 1719 const TRANSITION_END$1 = 'transitionend', 1720 getUID = (e) => { 1721 do { 1722 e += Math.floor(1e6 * Math.random()); 1723 } while (document.getElementById(e)); 1724 return e; 1725 }, 1726 getSelector$1 = (e) => { 1727 let t = e.getAttribute('data-bs-target'); 1728 if (!t || '#' === t) { 1729 let i = e.getAttribute('href'); 1730 if (!i || (!i.includes('#') && !i.startsWith('.'))) return null; 1731 i.includes('#') && 1732 !i.startsWith('#') && 1733 (i = `#${i.split('#')[1]}`), 1734 (t = i && '#' !== i ? i.trim() : null); 1735 } 1736 return t; 1737 }, 1738 getSelectorFromElement$1 = (e) => { 1739 const t = getSelector$1(e); 1740 return t && document.querySelector(t) ? t : null; 1741 }, 1742 getElementFromSelector$1 = (e) => { 1743 const t = getSelector$1(e); 1744 return t ? document.querySelector(t) : null; 1745 }, 1746 getTransitionDurationFromElement$1 = (e) => { 1747 if (!e) return 0; 1748 let { 1749 transitionDuration: t, 1750 transitionDelay: i, 1751 } = window.getComputedStyle(e); 1752 const n = Number.parseFloat(t), 1753 s = Number.parseFloat(i); 1754 return n || s 1755 ? ((t = t.split(',')[0]), 1756 (i = i.split(',')[0]), 1757 1e3 * (Number.parseFloat(t) + Number.parseFloat(i))) 1758 : 0; 1759 }, 1760 triggerTransitionEnd$1 = (e) => { 1761 e.dispatchEvent(new Event(TRANSITION_END$1)); 1762 }, 1763 isElement$1 = (e) => 1764 !(!e || 'object' != typeof e) && 1765 (void 0 !== e.jquery && (e = e[0]), void 0 !== e.nodeType), 1766 getElement$1 = (e) => 1767 isElement$1(e) 1768 ? e.jquery 1769 ? e[0] 1770 : e 1771 : 'string' == typeof e && e.length > 0 1772 ? document.querySelector(e) 1773 : null, 1774 typeCheckConfig$1 = (e, t, i) => {
vendor: 8,634 bytes, lines 1775-2017
1775 Object.keys(i).forEach((n) => { 1776 const s = i[n], 1777 o = t[n], 1778 r = 1779 o && isElement$1(o) 1780 ? 'element' 1781 : null == (a = o) 1782 ? `${a}` 1783 : {}.toString 1784 .call(a) 1785 .match(/\s([a-z]+)/i)[1] 1786 .toLowerCase(); 1787 var a; 1788 if (!new RegExp(s).test(r)) 1789 throw new TypeError( 1790 `${e.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".` 1791 ); 1792 }); 1793 }, 1794 isVisible$1 = (e) => 1795 !(!isElement$1(e) || 0 === e.getClientRects().length) && 1796 'visible' === getComputedStyle(e).getPropertyValue('visibility'), 1797 isDisabled$1 = (e) => 1798 !e || 1799 e.nodeType !== Node.ELEMENT_NODE || 1800 !!e.classList.contains('disabled') || 1801 (void 0 !== e.disabled 1802 ? e.disabled 1803 : e.hasAttribute('disabled') && 1804 'false' !== e.getAttribute('disabled')), 1805 findShadowRoot = (e) => { 1806 if (!document.documentElement.attachShadow) return null; 1807 if ('function' == typeof e.getRootNode) { 1808 const t = e.getRootNode(); 1809 return t instanceof ShadowRoot ? t : null; 1810 } 1811 return e instanceof ShadowRoot 1812 ? e 1813 : e.parentNode 1814 ? findShadowRoot(e.parentNode) 1815 : null; 1816 }, 1817 noop$1 = () => { }, 1818 reflow$1 = (e) => { 1819 e.offsetHeight; 1820 }, 1821 getjQuery$1 = () => { 1822 const { jQuery: e } = window; 1823 return e && !document.body.hasAttribute('data-bs-no-jquery') 1824 ? e 1825 : null; 1826 }, 1827 DOMContentLoadedCallbacks = [], 1828 isRTL = () => 'rtl' === document.documentElement.dir, 1829 defineJQueryPlugin = (e) => { 1830 var t; 1831 (t = () => { 1832 const t = getjQuery$1(); 1833 if (t) { 1834 const i = e.NAME, 1835 n = t.fn[i]; 1836 (t.fn[i] = e.jQueryInterface), 1837 (t.fn[i].Constructor = e), 1838 (t.fn[i].noConflict = () => ( 1839 (t.fn[i] = n), e.jQueryInterface 1840 )); 1841 } 1842 }), 1843 'loading' === document.readyState 1844 ? (DOMContentLoadedCallbacks.length || 1845 document.addEventListener('DOMContentLoaded', () => { 1846 DOMContentLoadedCallbacks.forEach((e) => e()); 1847 }), 1848 DOMContentLoadedCallbacks.push(t)) 1849 : t(); 1850 }, 1851 execute$1 = (e) => { 1852 'function' == typeof e && e(); 1853 }, 1854 executeAfterTransition$1 = (e, t, i = !0) => { 1855 if (!i) return void execute$1(e); 1856 const n = getTransitionDurationFromElement$1(t) + 5; 1857 let s = !1; 1858 const o = ({ target: i }) => { 1859 i === t && 1860 ((s = !0), 1861 t.removeEventListener(TRANSITION_END$1, o), 1862 execute$1(e)); 1863 }; 1864 t.addEventListener(TRANSITION_END$1, o), 1865 setTimeout(() => { 1866 s || triggerTransitionEnd$1(t); 1867 }, n); 1868 }, 1869 getNextActiveElement = (e, t, i, n) => { 1870 let s = e.indexOf(t); 1871 if (-1 === s) return e[!i && n ? e.length - 1 : 0]; 1872 const o = e.length; 1873 return ( 1874 (s += i ? 1 : -1), 1875 n && (s = (s + o) % o), 1876 e[Math.max(0, Math.min(s, o - 1))] 1877 ); 1878 }, 1879 namespaceRegex$1 = /[^.]*(?=\..*)\.|.*/, 1880 stripNameRegex$1 = /\..*/, 1881 stripUidRegex$1 = /::\d+$/, 1882 eventRegistry$1 = {}; 1883 let uidEvent$1 = 1; 1884 const customEvents$1 = { mouseenter: 'mouseover', mouseleave: 'mouseout' }, 1885 customEventsRegex$1 = /^(mouseenter|mouseleave)/i, 1886 nativeEvents$1 = new Set([ 1887 'click', 1888 'dblclick', 1889 'mouseup', 1890 'mousedown', 1891 'contextmenu', 1892 'mousewheel', 1893 'DOMMouseScroll', 1894 'mouseover', 1895 'mouseout', 1896 'mousemove', 1897 'selectstart', 1898 'selectend', 1899 'keydown', 1900 'keypress', 1901 'keyup', 1902 'orientationchange', 1903 'touchstart', 1904 'touchmove', 1905 'touchend', 1906 'touchcancel', 1907 'pointerdown', 1908 'pointermove', 1909 'pointerup', 1910 'pointerleave', 1911 'pointercancel', 1912 'gesturestart', 1913 'gesturechange', 1914 'gestureend', 1915 'focus', 1916 'blur', 1917 'change', 1918 'reset', 1919 'select', 1920 'submit', 1921 'focusin', 1922 'focusout', 1923 'load', 1924 'unload', 1925 'beforeunload', 1926 'resize', 1927 'move', 1928 'DOMContentLoaded', 1929 'readystatechange', 1930 'error', 1931 'abort', 1932 'scroll', 1933 ]); 1934 function getUidEvent$1(e, t) { 1935 return (t && `${t}::${uidEvent$1++}`) || e.uidEvent || uidEvent$1++; 1936 } 1937 function getEvent$1(e) { 1938 const t = getUidEvent$1(e); 1939 return ( 1940 (e.uidEvent = t), 1941 (eventRegistry$1[t] = eventRegistry$1[t] || {}), 1942 eventRegistry$1[t] 1943 ); 1944 } 1945 function bootstrapHandler$1(e, t) { 1946 return function i(n) { 1947 return ( 1948 (n.delegateTarget = e), 1949 i.oneOff && EventHandler$2.off(e, n.type, t), 1950 t.apply(e, [n]) 1951 ); 1952 }; 1953 } 1954 function bootstrapDelegationHandler$1(e, t, i) { 1955 return function n(s) { 1956 const o = e.querySelectorAll(t); 1957 for (let { target: r } = s; r && r !== this; r = r.parentNode) 1958 for (let a = o.length; a--;) 1959 if (o[a] === r) 1960 return ( 1961 (s.delegateTarget = r), 1962 n.oneOff && EventHandler$2.off(e, s.type, t, i), 1963 i.apply(r, [s]) 1964 ); 1965 return null; 1966 }; 1967 } 1968 function findHandler$1(e, t, i = null) { 1969 const n = Object.keys(e); 1970 for (let s = 0, o = n.length; s < o; s++) { 1971 const o = e[n[s]]; 1972 if (o.originalHandler === t && o.delegationSelector === i) return o; 1973 } 1974 return null; 1975 } 1976 function normalizeParams$1(e, t, i) { 1977 const n = 'string' == typeof t, 1978 s = n ? i : t; 1979 let o = getTypeEvent$1(e); 1980 return nativeEvents$1.has(o) || (o = e), [n, s, o]; 1981 } 1982 function addHandler$1(e, t, i, n, s) { 1983 if ('string' != typeof t || !e) return; 1984 if ((i || ((i = n), (n = null)), customEventsRegex$1.test(t))) { 1985 const e = (e) => 1986 (function(t) { 1987 if ( 1988 !t.relatedTarget || 1989 (t.relatedTarget !== t.delegateTarget && 1990 !t.delegateTarget.contains(t.relatedTarget)) 1991 ) 1992 return e.call(this, t); 1993 }); 1994 n ? (n = e(n)) : (i = e(i)); 1995 } 1996 const [o, r, a] = normalizeParams$1(t, i, n), 1997 l = getEvent$1(e), 1998 c = l[a] || (l[a] = {}), 1999 E = findHandler$1(c, r, o ? i : null); 2000 if (E) return void (E.oneOff = E.oneOff && s); 2001 const _ = getUidEvent$1(r, t.replace(namespaceRegex$1, '')), 2002 h = o 2003 ? bootstrapDelegationHandler$1(e, i, n) 2004 : bootstrapHandler$1(e, i); 2005 (h.delegationSelector = o ? i : null), 2006 (h.originalHandler = r), 2007 (h.oneOff = s), 2008 (h.uidEvent = _), 2009 (c[_] = h), 2010 e.addEventListener(a, h, o); 2011 } 2012 function removeHandler$1(e, t, i, n, s) { 2013 const o = findHandler$1(t[i], n, s); 2014 o && (e.removeEventListener(i, o, Boolean(s)), delete t[i][o.uidEvent]); 2015 } 2016 function removeNamespacedHandlers$1(e, t, i, n) { 2017 const s = t[i] || {};
2018 Object.keys(s).forEach((o) => { 2019 if (o.includes(n)) { 2020 const n = s[o]; 2021 removeHandler$1( 2022 e, 2023 t, 2024 i, 2025 n.originalHandler, 2026 n.delegationSelector 2027 ); 2028 } 2029 }); 2030 } 2031 function getTypeEvent$1(e) { 2032 return (e = e.replace(stripNameRegex$1, '')), customEvents$1[e] || e; 2033 } 2034 const EventHandler$2 = { 2035 on(e, t, i, n) { 2036 addHandler$1(e, t, i, n, !1); 2037 }, 2038 one(e, t, i, n) { 2039 addHandler$1(e, t, i, n, !0); 2040 }, 2041 off(e, t, i, n) { 2042 if ('string' != typeof t || !e) return; 2043 const [s, o, r] = normalizeParams$1(t, i, n), 2044 a = r !== t, 2045 l = getEvent$1(e), 2046 c = t.startsWith('.'); 2047 if (void 0 !== o) { 2048 if (!l || !l[r]) return; 2049 return void removeHandler$1(e, l, r, o, s ? i : null); 2050 } 2051 c && 2052 Object.keys(l).forEach((i) => { 2053 removeNamespacedHandlers$1(e, l, i, t.slice(1)); 2054 }); 2055 const E = l[r] || {};
vendor: 1,419 bytes, lines 2056-2096
2056 Object.keys(E).forEach((i) => { 2057 const n = i.replace(stripUidRegex$1, ''); 2058 if (!a || t.includes(n)) { 2059 const t = E[i]; 2060 removeHandler$1( 2061 e, 2062 l, 2063 r, 2064 t.originalHandler, 2065 t.delegationSelector 2066 ); 2067 } 2068 }); 2069 }, 2070 trigger(e, t, i) { 2071 if ('string' != typeof t || !e) return null; 2072 const n = getjQuery$1(), 2073 s = getTypeEvent$1(t), 2074 o = t !== s, 2075 r = nativeEvents$1.has(s); 2076 let a, 2077 l = !0, 2078 c = !0, 2079 E = !1, 2080 _ = null; 2081 return ( 2082 o && 2083 n && 2084 ((a = n.Event(t, i)), 2085 n(e).trigger(a), 2086 (l = !a.isPropagationStopped()), 2087 (c = !a.isImmediatePropagationStopped()), 2088 (E = a.isDefaultPrevented())), 2089 r 2090 ? ((_ = document.createEvent('HTMLEvents')), 2091 _.initEvent(s, l, !0)) 2092 : (_ = new CustomEvent(t, { 2093 bubbles: l, 2094 cancelable: !0, 2095 })), 2096 void 0 !== i &&
2097 Object.keys(i).forEach((e) => { 2098 Object.defineProperty(_, e, { get: () => i[e] }); 2099 }), 2100 E && _.preventDefault(), 2101 c && e.dispatchEvent(_), 2102 _.defaultPrevented && void 0 !== a && a.preventDefault(), 2103 _ 2104 ); 2105 }, 2106 }, 2107 elementMap$1 = new Map(), 2108 Data$1 = { 2109 set(e, t, i) { 2110 elementMap$1.has(e) || elementMap$1.set(e, new Map()); 2111 const n = elementMap$1.get(e); 2112 n.has(t) || 0 === n.size 2113 ? n.set(t, i) 2114 : console.error( 2115 `Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0] 2116 }.` 2117 ); 2118 }, 2119 get: (e, t) => 2120 (elementMap$1.has(e) && elementMap$1.get(e).get(t)) || null, 2121 remove(e, t) { 2122 if (!elementMap$1.has(e)) return; 2123 const i = elementMap$1.get(e); 2124 i.delete(t), 0 === i.size && elementMap$1.delete(e); 2125 }, 2126 }; 2127 class BaseComponent$1 { 2128 constructor(e) { 2129 (e = getElement$1(e)) && 2130 ((this._element = e), 2131 Data$1.set(this._element, this.constructor.DATA_KEY, this)); 2132 } 2133 dispose() { 2134 Data$1.remove(this._element, this.constructor.DATA_KEY), 2135 EventHandler$2.off(this._element, this.constructor.EVENT_KEY), 2136 Object.getOwnPropertyNames(this).forEach((e) => { 2137 this[e] = null; 2138 }); 2139 } 2140 _queueCallback(e, t, i = !0) { 2141 executeAfterTransition$1(e, t, i); 2142 } 2143 static getInstance(e) { 2144 return Data$1.get(getElement$1(e), this.DATA_KEY); 2145 } 2146 static getOrCreateInstance(e, t = {}) { 2147 return ( 2148 this.getInstance(e) || 2149 new this(e, 'object' == typeof t ? t : null) 2150 ); 2151 } 2152 static get VERSION() { 2153 return '5.1.3'; 2154 } 2155 static get NAME() { 2156 throw new Error( 2157 'You have to implement the static method "NAME", for each component!' 2158 ); 2159 } 2160 static get DATA_KEY() { 2161 return `bs.${this.NAME}`; 2162 } 2163 static get EVENT_KEY() { 2164 return `.${this.DATA_KEY}`; 2165 } 2166 } 2167 const enableDismissTrigger$1 = (e, t = 'hide') => { 2168 const i = `click.dismiss${e.EVENT_KEY}`, 2169 n = e.NAME; 2170 EventHandler$2.on( 2171 document, 2172 i, 2173 `[data-bs-dismiss="${n}"]`, 2174 function (i) { 2175 if ( 2176 (['A', 'AREA'].includes(this.tagName) && 2177 i.preventDefault(), 2178 isDisabled$1(this)) 2179 ) 2180 return; 2181 const s = 2182 getElementFromSelector$1(this) || this.closest(`.${n}`); 2183 e.getOrCreateInstance(s)[t](); 2184 } 2185 ); 2186 }, 2187 NAME$d$1 = 'alert', 2188 EVENT_CLOSE$1 = 'close.bs.alert', 2189 EVENT_CLOSED$1 = 'closed.bs.alert'; 2190 class Alert extends BaseComponent$1 { 2191 static get NAME() { 2192 return NAME$d$1; 2193 } 2194 close() { 2195 if ( 2196 EventHandler$2.trigger(this._element, EVENT_CLOSE$1) 2197 .defaultPrevented 2198 ) 2199 return; 2200 this._element.classList.remove('show'); 2201 const e = this._element.classList.contains('fade'); 2202 this._queueCallback(() => this._destroyElement(), this._element, e); 2203 } 2204 _destroyElement() { 2205 this._element.remove(), 2206 EventHandler$2.trigger(this._element, EVENT_CLOSED$1), 2207 this.dispose(); 2208 } 2209 static jQueryInterface(e) { 2210 return this.each(function () { 2211 const t = Alert.getOrCreateInstance(this); 2212 if ('string' == typeof e) { 2213 if ( 2214 void 0 === t[e] || 2215 e.startsWith('_') || 2216 'constructor' === e 2217 )
2218 throw new TypeError(`No method named "${e}"`); 2219 t[e](this); 2220 } 2221 }); 2222 } 2223 } 2224 enableDismissTrigger$1(Alert, 'close'), defineJQueryPlugin(Alert); 2225 const NAME$c$1 = 'button', 2226 SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]', 2227 EVENT_CLICK_DATA_API$6$1 = 'click.bs.button.data-api'; 2228 class Button extends BaseComponent$1 { 2229 static get NAME() { 2230 return NAME$c$1; 2231 } 2232 toggle() { 2233 this._element.setAttribute( 2234 'aria-pressed', 2235 this._element.classList.toggle('active') 2236 ); 2237 } 2238 static jQueryInterface(e) { 2239 return this.each(function () { 2240 const t = Button.getOrCreateInstance(this); 2241 'toggle' === e && t[e](); 2242 }); 2243 } 2244 } 2245 function normalizeData$1(e) { 2246 return ( 2247 'true' === e || 2248 ('false' !== e && 2249 (e === Number(e).toString() 2250 ? Number(e) 2251 : '' === e || 'null' === e 2252 ? null 2253 : e)) 2254 ); 2255 } 2256 function normalizeDataKey$1(e) { 2257 return e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`); 2258 } 2259 EventHandler$2.on( 2260 document, 2261 EVENT_CLICK_DATA_API$6$1, 2262 SELECTOR_DATA_TOGGLE$5, 2263 (e) => { 2264 e.preventDefault(); 2265 const t = e.target.closest(SELECTOR_DATA_TOGGLE$5); 2266 Button.getOrCreateInstance(t).toggle(); 2267 } 2268 ), 2269 defineJQueryPlugin(Button); 2270 const Manipulator$1 = { 2271 setDataAttribute(e, t, i) { 2272 e.setAttribute(`data-bs-${normalizeDataKey$1(t)}`, i); 2273 }, 2274 removeDataAttribute(e, t) { 2275 e.removeAttribute(`data-bs-${normalizeDataKey$1(t)}`); 2276 }, 2277 getDataAttributes(e) { 2278 if (!e) return {}; 2279 const t = {}; 2280 return (Object.keys(e.dataset) 2281 .filter((e) => e.startsWith('bs')) 2282 .forEach((i) => { 2283 let n = i.replace(/^bs/, ''); 2284 (n = 2285 n.charAt(0).toLowerCase() + 2286 n.slice(1, n.length)), 2287 (t[n] = normalizeData$1(e.dataset[i])); 2288 }), t); 2289 }, 2290 getDataAttribute: (e, t) => 2291 normalizeData$1( 2292 e.getAttribute(`data-bs-${normalizeDataKey$1(t)}`) 2293 ), 2294 offset(e) { 2295 const t = e.getBoundingClientRect(); 2296 return { 2297 top: t.top + window.pageYOffset, 2298 left: t.left + window.pageXOffset, 2299 }; 2300 }, 2301 position: (e) => ({ top: e.offsetTop, left: e.offsetLeft }), 2302 }, 2303 SelectorEngine$2 = { 2304 find: (e, t = document.documentElement) => 2305 [].concat(...Element.prototype.querySelectorAll.call(t, e)), 2306 findOne: (e, t = document.documentElement) => 2307 Element.prototype.querySelector.call(t, e), 2308 children: (e, t) => 2309 [].concat(...e.children).filter((e) => e.matches(t)), 2310 parents(e, t) { 2311 const i = []; 2312 let n = e.parentNode; 2313 for ( 2314 ; 2315 n && n.nodeType === Node.ELEMENT_NODE && 3 !== n.nodeType; 2316 2317 ) 2318 n.matches(t) && i.push(n), (n = n.parentNode); 2319 return i; 2320 }, 2321 prev(e, t) { 2322 let i = e.previousElementSibling; 2323 for (; i;) { 2324 if (i.matches(t)) return [i]; 2325 i = i.previousElementSibling; 2326 } 2327 return []; 2328 }, 2329 next(e, t) { 2330 let i = e.nextElementSibling; 2331 for (; i;) { 2332 if (i.matches(t)) return [i]; 2333 i = i.nextElementSibling; 2334 } 2335 return []; 2336 }, 2337 focusableChildren(e) { 2338 const t = [ 2339 'a', 2340 'button', 2341 'input', 2342 'textarea', 2343 'select', 2344 'details', 2345 '[tabindex]', 2346 '[contenteditable="true"]', 2347 ] 2348 .map((e) => `${e}:not([tabindex^="-"])`) 2349 .join(', '); 2350 return this.find(t, e).filter( 2351 (e) => !isDisabled$1(e) && isVisible$1(e) 2352 ); 2353 }, 2354 }, 2355 NAME$b$1 = 'carousel', 2356 Default$a = { 2357 interval: 5e3, 2358 keyboard: !0, 2359 slide: !1, 2360 pause: 'hover', 2361 wrap: !0, 2362 touch: !0, 2363 }, 2364 DefaultType$a = { 2365 interval: '(number|boolean)', 2366 keyboard: 'boolean', 2367 slide: '(boolean|string)', 2368 pause: '(string|boolean)', 2369 wrap: 'boolean', 2370 touch: 'boolean', 2371 }, 2372 ORDER_NEXT = 'next', 2373 ORDER_PREV = 'prev', 2374 DIRECTION_LEFT = 'left', 2375 DIRECTION_RIGHT = 'right', 2376 KEY_TO_DIRECTION = { 2377 ArrowLeft: DIRECTION_RIGHT, 2378 ArrowRight: DIRECTION_LEFT, 2379 }, 2380 EVENT_SLIDE = 'slide.bs.carousel', 2381 EVENT_SLID = 'slid.bs.carousel', 2382 EVENT_KEYDOWN$3 = 'keydown.bs.carousel', 2383 EVENT_MOUSEENTER = 'mouseenter.bs.carousel', 2384 EVENT_MOUSELEAVE = 'mouseleave.bs.carousel',
vendor: 4,655 bytes, lines 2385-2499
2385 EVENT_TOUCHSTART = 'touchstart.bs.carousel', 2386 EVENT_TOUCHMOVE = 'touchmove.bs.carousel', 2387 EVENT_TOUCHEND = 'touchend.bs.carousel', 2388 EVENT_POINTERDOWN = 'pointerdown.bs.carousel', 2389 EVENT_POINTERUP = 'pointerup.bs.carousel', 2390 EVENT_DRAG_START = 'dragstart.bs.carousel', 2391 EVENT_LOAD_DATA_API$2 = 'load.bs.carousel.data-api', 2392 EVENT_CLICK_DATA_API$5$1 = 'click.bs.carousel.data-api', 2393 CLASS_NAME_END = 'carousel-item-end', 2394 CLASS_NAME_START = 'carousel-item-start', 2395 CLASS_NAME_NEXT = 'carousel-item-next', 2396 CLASS_NAME_PREV = 'carousel-item-prev', 2397 SELECTOR_ACTIVE_ITEM = '.active.carousel-item', 2398 SELECTOR_ITEM = '.carousel-item', 2399 SELECTOR_ITEM_IMG = '.carousel-item img', 2400 SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev', 2401 SELECTOR_INDICATORS = '.carousel-indicators', 2402 SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]', 2403 SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; 2404 class Carousel extends BaseComponent$1 { 2405 constructor(e, t) { 2406 super(e), 2407 (this._items = null), 2408 (this._interval = null), 2409 (this._activeElement = null), 2410 (this._isPaused = !1), 2411 (this._isSliding = !1), 2412 (this.touchTimeout = null), 2413 (this.touchStartX = 0), 2414 (this.touchDeltaX = 0), 2415 (this._config = this._getConfig(t)), 2416 (this._indicatorsElement = SelectorEngine$2.findOne( 2417 SELECTOR_INDICATORS, 2418 this._element 2419 )), 2420 (this._touchSupported = 2421 'ontouchstart' in document.documentElement || 2422 navigator.maxTouchPoints > 0), 2423 (this._pointerEvent = Boolean(window.PointerEvent)), 2424 this._addEventListeners(); 2425 } 2426 static get Default() { 2427 return Default$a; 2428 } 2429 static get NAME() { 2430 return NAME$b$1; 2431 } 2432 next() { 2433 this._slide(ORDER_NEXT); 2434 } 2435 nextWhenVisible() { 2436 !document.hidden && isVisible$1(this._element) && this.next(); 2437 } 2438 prev() { 2439 this._slide(ORDER_PREV); 2440 } 2441 pause(e) { 2442 e || (this._isPaused = !0), 2443 SelectorEngine$2.findOne(SELECTOR_NEXT_PREV, this._element) && 2444 (triggerTransitionEnd$1(this._element), this.cycle(!0)), 2445 clearInterval(this._interval), 2446 (this._interval = null); 2447 } 2448 cycle(e) { 2449 e || (this._isPaused = !1), 2450 this._interval && 2451 (clearInterval(this._interval), (this._interval = null)), 2452 this._config && 2453 this._config.interval && 2454 !this._isPaused && 2455 (this._updateInterval(), 2456 (this._interval = setInterval( 2457 (document.visibilityState 2458 ? this.nextWhenVisible 2459 : this.next 2460 ).bind(this), 2461 this._config.interval 2462 ))); 2463 } 2464 to(e) { 2465 this._activeElement = SelectorEngine$2.findOne( 2466 SELECTOR_ACTIVE_ITEM, 2467 this._element 2468 ); 2469 const t = this._getItemIndex(this._activeElement); 2470 if (e > this._items.length - 1 || e < 0) return; 2471 if (this._isSliding) 2472 return void EventHandler$2.one(this._element, EVENT_SLID, () => 2473 this.to(e) 2474 ); 2475 if (t === e) return this.pause(), void this.cycle(); 2476 const i = e > t ? ORDER_NEXT : ORDER_PREV; 2477 this._slide(i, this._items[e]); 2478 } 2479 _getConfig(e) { 2480 return ( 2481 (e = { 2482 ...Default$a, 2483 ...Manipulator$1.getDataAttributes(this._element), 2484 ...('object' == typeof e ? e : {}), 2485 }), 2486 typeCheckConfig$1(NAME$b$1, e, DefaultType$a), 2487 e 2488 ); 2489 } 2490 _handleSwipe() { 2491 const e = Math.abs(this.touchDeltaX); 2492 if (e <= 40) return; 2493 const t = e / this.touchDeltaX; 2494 (this.touchDeltaX = 0), 2495 t && this._slide(t > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT); 2496 } 2497 _addEventListeners() { 2498 this._config.keyboard && 2499 EventHandler$2.on(this._element, EVENT_KEYDOWN$3, (e) =>
2500 this._keydown(e) 2501 ), 2502 'hover' === this._config.pause && 2503 (EventHandler$2.on(this._element, EVENT_MOUSEENTER, (e) => 2504 this.pause(e) 2505 ), 2506 EventHandler$2.on(this._element, EVENT_MOUSELEAVE, (e) => 2507 this.cycle(e) 2508 )), 2509 this._config.touch && 2510 this._touchSupported && 2511 this._addTouchEventListeners(); 2512 } 2513 _addTouchEventListeners() { 2514 const e = (e) => 2515 this._pointerEvent && 2516 ('pen' === e.pointerType || 'touch' === e.pointerType), 2517 t = (t) => { 2518 e(t) 2519 ? (this.touchStartX = t.clientX) 2520 : this._pointerEvent || 2521 (this.touchStartX = t.touches[0].clientX); 2522 }, 2523 i = (e) => { 2524 this.touchDeltaX = 2525 e.touches && e.touches.length > 1 2526 ? 0 2527 : e.touches[0].clientX - this.touchStartX; 2528 }, 2529 n = (t) => { 2530 e(t) && (this.touchDeltaX = t.clientX - this.touchStartX), 2531 this._handleSwipe(), 2532 'hover' === this._config.pause && 2533 (this.pause(), 2534 this.touchTimeout && 2535 clearTimeout(this.touchTimeout), 2536 (this.touchTimeout = setTimeout( 2537 (e) => this.cycle(e), 2538 500 + this._config.interval 2539 ))); 2540 }; 2541 SelectorEngine$2.find(SELECTOR_ITEM_IMG, this._element).forEach( 2542 (e) => { 2543 EventHandler$2.on(e, EVENT_DRAG_START, (e) => 2544 e.preventDefault() 2545 ); 2546 } 2547 ), 2548 this._pointerEvent 2549 ? (EventHandler$2.on( 2550 this._element, 2551 EVENT_POINTERDOWN, 2552 (e) => t(e) 2553 ), 2554 EventHandler$2.on(this._element, EVENT_POINTERUP, (e) => 2555 n(e) 2556 ), 2557 this._element.classList.add('pointer-event')) 2558 : (EventHandler$2.on(this._element, EVENT_TOUCHSTART, (e) => 2559 t(e) 2560 ), 2561 EventHandler$2.on(this._element, EVENT_TOUCHMOVE, (e) => 2562 i(e) 2563 ), 2564 EventHandler$2.on(this._element, EVENT_TOUCHEND, (e) => 2565 n(e) 2566 )); 2567 } 2568 _keydown(e) { 2569 if (/input|textarea/i.test(e.target.tagName)) return; 2570 const t = KEY_TO_DIRECTION[e.key]; 2571 t && (e.preventDefault(), this._slide(t)); 2572 } 2573 _getItemIndex(e) { 2574 return ( 2575 (this._items = 2576 e && e.parentNode 2577 ? SelectorEngine$2.find(SELECTOR_ITEM, e.parentNode) 2578 : []), 2579 this._items.indexOf(e) 2580 ); 2581 } 2582 _getItemByOrder(e, t) { 2583 const i = e === ORDER_NEXT; 2584 return getNextActiveElement(this._items, t, i, this._config.wrap); 2585 } 2586 _triggerSlideEvent(e, t) { 2587 const i = this._getItemIndex(e), 2588 n = this._getItemIndex( 2589 SelectorEngine$2.findOne( 2590 SELECTOR_ACTIVE_ITEM, 2591 this._element 2592 ) 2593 ); 2594 return EventHandler$2.trigger(this._element, EVENT_SLIDE, { 2595 relatedTarget: e, 2596 direction: t, 2597 from: n, 2598 to: i, 2599 }); 2600 } 2601 _setActiveIndicatorElement(e) { 2602 if (this._indicatorsElement) { 2603 const t = SelectorEngine$2.findOne( 2604 '.active', 2605 this._indicatorsElement 2606 ); 2607 t.classList.remove('active'), t.removeAttribute('aria-current'); 2608 const i = SelectorEngine$2.find( 2609 '[data-bs-target]', 2610 this._indicatorsElement 2611 ); 2612 for (let t = 0; t < i.length; t++) 2613 if ( 2614 Number.parseInt( 2615 i[t].getAttribute('data-bs-slide-to'), 2616 10 2617 ) === this._getItemIndex(e) 2618 ) { 2619 i[t].classList.add('active'), 2620 i[t].setAttribute('aria-current', 'true'); 2621 break; 2622 } 2623 } 2624 } 2625 _updateInterval() { 2626 const e = 2627 this._activeElement || 2628 SelectorEngine$2.findOne(SELECTOR_ACTIVE_ITEM, this._element); 2629 if (!e) return; 2630 const t = Number.parseInt(e.getAttribute('data-bs-interval'), 10); 2631 t 2632 ? ((this._config.defaultInterval = 2633 this._config.defaultInterval || this._config.interval), 2634 (this._config.interval = t)) 2635 : (this._config.interval = 2636 this._config.defaultInterval || this._config.interval); 2637 } 2638 _slide(e, t) { 2639 const i = this._directionToOrder(e), 2640 n = SelectorEngine$2.findOne( 2641 SELECTOR_ACTIVE_ITEM, 2642 this._element 2643 ), 2644 s = this._getItemIndex(n), 2645 o = t || this._getItemByOrder(i, n), 2646 r = this._getItemIndex(o), 2647 a = Boolean(this._interval), 2648 l = i === ORDER_NEXT, 2649 c = l ? CLASS_NAME_START : CLASS_NAME_END, 2650 E = l ? CLASS_NAME_NEXT : CLASS_NAME_PREV,
vendor: 3,224 bytes, lines 2651-2732
2651 _ = this._orderToDirection(i); 2652 if (o && o.classList.contains('active')) 2653 return void (this._isSliding = !1); 2654 if (this._isSliding) return; 2655 if (this._triggerSlideEvent(o, _).defaultPrevented) return; 2656 if (!n || !o) return; 2657 (this._isSliding = !0), 2658 a && this.pause(), 2659 this._setActiveIndicatorElement(o), 2660 (this._activeElement = o); 2661 const h = () => { 2662 EventHandler$2.trigger(this._element, EVENT_SLID, { 2663 relatedTarget: o, 2664 direction: _, 2665 from: s, 2666 to: r, 2667 }); 2668 }; 2669 if (this._element.classList.contains('slide')) { 2670 o.classList.add(E), 2671 reflow$1(o), 2672 n.classList.add(c), 2673 o.classList.add(c); 2674 const e = () => { 2675 o.classList.remove(c, E), 2676 o.classList.add('active'), 2677 n.classList.remove('active', E, c), 2678 (this._isSliding = !1), 2679 setTimeout(h, 0); 2680 }; 2681 this._queueCallback(e, n, !0); 2682 } else 2683 n.classList.remove('active'), 2684 o.classList.add('active'), 2685 (this._isSliding = !1), 2686 h(); 2687 a && this.cycle(); 2688 } 2689 _directionToOrder(e) { 2690 return [DIRECTION_RIGHT, DIRECTION_LEFT].includes(e) 2691 ? isRTL() 2692 ? e === DIRECTION_LEFT 2693 ? ORDER_PREV 2694 : ORDER_NEXT 2695 : e === DIRECTION_LEFT 2696 ? ORDER_NEXT 2697 : ORDER_PREV 2698 : e; 2699 } 2700 _orderToDirection(e) { 2701 return [ORDER_NEXT, ORDER_PREV].includes(e) 2702 ? isRTL() 2703 ? e === ORDER_PREV 2704 ? DIRECTION_LEFT 2705 : DIRECTION_RIGHT 2706 : e === ORDER_PREV 2707 ? DIRECTION_RIGHT 2708 : DIRECTION_LEFT 2709 : e; 2710 } 2711 static carouselInterface(e, t) { 2712 const i = Carousel.getOrCreateInstance(e, t); 2713 let { _config: n } = i; 2714 'object' == typeof t && (n = { ...n, ...t }); 2715 const s = 'string' == typeof t ? t : n.slide; 2716 if ('number' == typeof t) i.to(t); 2717 else if ('string' == typeof s) { 2718 if (void 0 === i[s]) 2719 throw new TypeError(`No method named "${s}"`); 2720 i[s](); 2721 } else n.interval && n.ride && (i.pause(), i.cycle()); 2722 } 2723 static jQueryInterface(e) { 2724 return this.each(function () { 2725 Carousel.carouselInterface(this, e); 2726 }); 2727 } 2728 static dataApiClickHandler(e) { 2729 const t = getElementFromSelector$1(this); 2730 if (!t || !t.classList.contains('carousel')) return; 2731 const i = { 2732 ...Manipulator$1.getDataAttributes(t),
2733 ...Manipulator$1.getDataAttributes(this), 2734 }, 2735 n = this.getAttribute('data-bs-slide-to'); 2736 n && (i.interval = !1), 2737 Carousel.carouselInterface(t, i), 2738 n && Carousel.getInstance(t).to(n), 2739 e.preventDefault(); 2740 } 2741 } 2742 EventHandler$2.on( 2743 document, 2744 EVENT_CLICK_DATA_API$5$1, 2745 SELECTOR_DATA_SLIDE, 2746 Carousel.dataApiClickHandler 2747 ), 2748 EventHandler$2.on(window, EVENT_LOAD_DATA_API$2, () => { 2749 const e = SelectorEngine$2.find(SELECTOR_DATA_RIDE); 2750 for (let t = 0, i = e.length; t < i; t++) 2751 Carousel.carouselInterface(e[t], Carousel.getInstance(e[t])); 2752 }), 2753 defineJQueryPlugin(Carousel); 2754 const NAME$a$1 = 'collapse', 2755 DATA_KEY$9$1 = 'bs.collapse', 2756 Default$9 = { toggle: !0, parent: null }, 2757 DefaultType$9 = { toggle: 'boolean', parent: '(null|element)' }, 2758 EVENT_SHOW$5 = 'show.bs.collapse', 2759 EVENT_SHOWN$5 = 'shown.bs.collapse', 2760 EVENT_HIDE$5 = 'hide.bs.collapse', 2761 EVENT_HIDDEN$5 = 'hidden.bs.collapse', 2762 EVENT_CLICK_DATA_API$4$1 = 'click.bs.collapse.data-api', 2763 CLASS_NAME_DEEPER_CHILDREN = ':scope .collapse .collapse', 2764 WIDTH = 'width', 2765 HEIGHT = 'height', 2766 SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing', 2767 SELECTOR_DATA_TOGGLE$4$1 = '[data-bs-toggle="collapse"]'; 2768 class Collapse extends BaseComponent$1 { 2769 constructor(e, t) { 2770 super(e), 2771 (this._isTransitioning = !1), 2772 (this._config = this._getConfig(t)), 2773 (this._triggerArray = []); 2774 const i = SelectorEngine$2.find(SELECTOR_DATA_TOGGLE$4$1); 2775 for (let e = 0, t = i.length; e < t; e++) { 2776 const t = i[e], 2777 n = getSelectorFromElement$1(t), 2778 s = SelectorEngine$2.find(n).filter( 2779 (e) => e === this._element 2780 ); 2781 null !== n && 2782 s.length && 2783 ((this._selector = n), this._triggerArray.push(t)); 2784 } 2785 this._initializeChildren(), 2786 this._config.parent || 2787 this._addAriaAndCollapsedClass( 2788 this._triggerArray, 2789 this._isShown() 2790 ), 2791 this._config.toggle && this.toggle(); 2792 } 2793 static get Default() { 2794 return Default$9; 2795 } 2796 static get NAME() { 2797 return NAME$a$1; 2798 } 2799 toggle() { 2800 this._isShown() ? this.hide() : this.show(); 2801 } 2802 show() { 2803 if (this._isTransitioning || this._isShown()) return; 2804 let e, 2805 t = []; 2806 if (this._config.parent) { 2807 const e = SelectorEngine$2.find( 2808 CLASS_NAME_DEEPER_CHILDREN, 2809 this._config.parent 2810 ); 2811 t = SelectorEngine$2.find( 2812 SELECTOR_ACTIVES, 2813 this._config.parent 2814 ).filter((t) => !e.includes(t)); 2815 } 2816 const i = SelectorEngine$2.findOne(this._selector); 2817 if (t.length) { 2818 const n = t.find((e) => i !== e); 2819 if ( 2820 ((e = n ? Collapse.getInstance(n) : null), 2821 e && e._isTransitioning) 2822 ) 2823 return; 2824 } 2825 if ( 2826 EventHandler$2.trigger(this._element, EVENT_SHOW$5) 2827 .defaultPrevented 2828 ) 2829 return; 2830 t.forEach((t) => { 2831 i !== t && 2832 Collapse.getOrCreateInstance(t, { toggle: !1 }).hide(), 2833 e || Data$1.set(t, DATA_KEY$9$1, null); 2834 }); 2835 const n = this._getDimension(); 2836 this._element.classList.remove('collapse'), 2837 this._element.classList.add('collapsing'), 2838 (this._element.style[n] = 0), 2839 this._addAriaAndCollapsedClass(this._triggerArray, !0), 2840 (this._isTransitioning = !0); 2841 const s = `scroll${n[0].toUpperCase() + n.slice(1)}`; 2842 this._queueCallback( 2843 () => { 2844 (this._isTransitioning = !1), 2845 this._element.classList.remove('collapsing'), 2846 this._element.classList.add('collapse', 'show'), 2847 (this._element.style[n] = ''), 2848 EventHandler$2.trigger(this._element, EVENT_SHOWN$5); 2849 }, 2850 this._element, 2851 !0 2852 ), 2853 (this._element.style[n] = `${this._element[s]}px`); 2854 } 2855 hide() { 2856 if (this._isTransitioning || !this._isShown()) return; 2857 if ( 2858 EventHandler$2.trigger(this._element, EVENT_HIDE$5) 2859 .defaultPrevented 2860 ) 2861 return; 2862 const e = this._getDimension(); 2863 (this._element.style[e] = `${this._element.getBoundingClientRect()[e] 2864 }px`), 2865 reflow$1(this._element), 2866 this._element.classList.add('collapsing'), 2867 this._element.classList.remove('collapse', 'show'); 2868 const t = this._triggerArray.length; 2869 for (let e = 0; e < t; e++) { 2870 const t = this._triggerArray[e], 2871 i = getElementFromSelector$1(t); 2872 i && 2873 !this._isShown(i) && 2874 this._addAriaAndCollapsedClass([t], !1); 2875 } 2876 this._isTransitioning = !0; 2877 (this._element.style[e] = ''), 2878 this._queueCallback( 2879 () => { 2880 (this._isTransitioning = !1), 2881 this._element.classList.remove('collapsing'), 2882 this._element.classList.add('collapse'), 2883 EventHandler$2.trigger( 2884 this._element, 2885 EVENT_HIDDEN$5 2886 ); 2887 }, 2888 this._element, 2889 !0 2890 ); 2891 } 2892 _isShown(e = this._element) { 2893 return e.classList.contains('show'); 2894 } 2895 _getConfig(e) { 2896 return ( 2897 ((e = { 2898 ...Default$9, 2899 ...Manipulator$1.getDataAttributes(this._element), 2900 ...e, 2901 }).toggle = Boolean(e.toggle)), 2902 (e.parent = getElement$1(e.parent)), 2903 typeCheckConfig$1(NAME$a$1, e, DefaultType$9), 2904 e 2905 ); 2906 } 2907 _getDimension() { 2908 return this._element.classList.contains('collapse-horizontal') 2909 ? WIDTH 2910 : HEIGHT; 2911 } 2912 _initializeChildren() { 2913 if (!this._config.parent) return; 2914 const e = SelectorEngine$2.find( 2915 CLASS_NAME_DEEPER_CHILDREN, 2916 this._config.parent 2917 ); 2918 SelectorEngine$2.find(SELECTOR_DATA_TOGGLE$4$1, this._config.parent) 2919 .filter((t) => !e.includes(t)) 2920 .forEach((e) => { 2921 const t = getElementFromSelector$1(e); 2922 t && this._addAriaAndCollapsedClass([e], this._isShown(t)); 2923 }); 2924 } 2925 _addAriaAndCollapsedClass(e, t) { 2926 e.length && 2927 e.forEach((e) => { 2928 t 2929 ? e.classList.remove('collapsed') 2930 : e.classList.add('collapsed'), 2931 e.setAttribute('aria-expanded', t); 2932 }); 2933 } 2934 static jQueryInterface(e) { 2935 return this.each(function () { 2936 const t = {}; 2937 'string' == typeof e && /show|hide/.test(e) && (t.toggle = !1); 2938 const i = Collapse.getOrCreateInstance(this, t); 2939 if ('string' == typeof e) { 2940 if (void 0 === i[e])
2941 throw new TypeError(`No method named "${e}"`); 2942 i[e](); 2943 } 2944 }); 2945 } 2946 } 2947 EventHandler$2.on( 2948 document, 2949 EVENT_CLICK_DATA_API$4$1, 2950 SELECTOR_DATA_TOGGLE$4$1, 2951 function (e) { 2952 ('A' === e.target.tagName || 2953 (e.delegateTarget && 'A' === e.delegateTarget.tagName)) && 2954 e.preventDefault(); 2955 const t = getSelectorFromElement$1(this); 2956 SelectorEngine$2.find(t).forEach((e) => { 2957 Collapse.getOrCreateInstance(e, { toggle: !1 }).toggle(); 2958 }); 2959 } 2960 ), 2961 defineJQueryPlugin(Collapse); 2962 const NAME$9$1 = 'dropdown', 2963 REGEXP_KEYDOWN = new RegExp('ArrowUp|ArrowDown|Escape'), 2964 EVENT_HIDE$4 = 'hide.bs.dropdown', 2965 EVENT_HIDDEN$4 = 'hidden.bs.dropdown', 2966 EVENT_SHOW$4 = 'show.bs.dropdown', 2967 EVENT_SHOWN$4 = 'shown.bs.dropdown', 2968 EVENT_CLICK_DATA_API$3$1 = 'click.bs.dropdown.data-api', 2969 EVENT_KEYDOWN_DATA_API$1 = 'keydown.bs.dropdown.data-api', 2970 EVENT_KEYUP_DATA_API$1 = 'keyup.bs.dropdown.data-api', 2971 SELECTOR_DATA_TOGGLE$3$1 = '[data-bs-toggle="dropdown"]', 2972 SELECTOR_MENU = '.dropdown-menu', 2973 SELECTOR_VISIBLE_ITEMS = 2974 '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)', 2975 PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start', 2976 PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end', 2977 PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start', 2978 PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end', 2979 PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start', 2980 PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start', 2981 Default$8$1 = { 2982 offset: [0, 2], 2983 boundary: 'clippingParents', 2984 reference: 'toggle', 2985 display: 'dynamic', 2986 popperConfig: null, 2987 autoClose: !0, 2988 }, 2989 DefaultType$8 = { 2990 offset: '(array|string|function)', 2991 boundary: '(string|element)', 2992 reference: '(string|element|object)', 2993 display: 'string', 2994 popperConfig: '(null|object|function)', 2995 autoClose: '(boolean|string)', 2996 }; 2997 class Dropdown extends BaseComponent$1 { 2998 constructor(e, t) { 2999 super(e), 3000 (this._popper = null), 3001 (this._config = this._getConfig(t)), 3002 (this._menu = this._getMenuElement()), 3003 (this._inNavbar = this._detectNavbar()); 3004 } 3005 static get Default() { 3006 return Default$8$1; 3007 } 3008 static get DefaultType() { 3009 return DefaultType$8; 3010 } 3011 static get NAME() { 3012 return NAME$9$1; 3013 } 3014 toggle() { 3015 return this._isShown() ? this.hide() : this.show(); 3016 } 3017 show() { 3018 if (isDisabled$1(this._element) || this._isShown(this._menu)) 3019 return; 3020 const e = { relatedTarget: this._element }; 3021 if ( 3022 EventHandler$2.trigger(this._element, EVENT_SHOW$4, e) 3023 .defaultPrevented 3024 ) 3025 return; 3026 const t = Dropdown.getParentFromElement(this._element); 3027 this._inNavbar 3028 ? Manipulator$1.setDataAttribute(this._menu, 'popper', 'none') 3029 : this._createPopper(t), 3030 'ontouchstart' in document.documentElement && 3031 !t.closest('.navbar-nav') && 3032 [] 3033 .concat(...document.body.children) 3034 .forEach((e) => 3035 EventHandler$2.on(e, 'mouseover', noop$1) 3036 ), 3037 this._element.focus(), 3038 this._element.setAttribute('aria-expanded', !0), 3039 this._menu.classList.add('show'), 3040 this._element.classList.add('show'), 3041 EventHandler$2.trigger(this._element, EVENT_SHOWN$4, e); 3042 } 3043 hide() { 3044 if (isDisabled$1(this._element) || !this._isShown(this._menu)) 3045 return; 3046 const e = { relatedTarget: this._element }; 3047 this._completeHide(e); 3048 } 3049 dispose() { 3050 this._popper && this._popper.destroy(), super.dispose(); 3051 } 3052 update() { 3053 (this._inNavbar = this._detectNavbar()),
3054 this._popper && this._popper.update(); 3055 } 3056 _completeHide(e) { 3057 EventHandler$2.trigger(this._element, EVENT_HIDE$4, e) 3058 .defaultPrevented || 3059 ('ontouchstart' in document.documentElement && 3060 [] 3061 .concat(...document.body.children) 3062 .forEach((e) => 3063 EventHandler$2.off(e, 'mouseover', noop$1) 3064 ), 3065 this._popper && this._popper.destroy(), 3066 this._menu.classList.remove('show'), 3067 this._element.classList.remove('show'), 3068 this._element.setAttribute('aria-expanded', 'false'), 3069 Manipulator$1.removeDataAttribute(this._menu, 'popper'), 3070 EventHandler$2.trigger(this._element, EVENT_HIDDEN$4, e)); 3071 } 3072 _getConfig(e) { 3073 if ( 3074 ((e = { 3075 ...this.constructor.Default, 3076 ...Manipulator$1.getDataAttributes(this._element), 3077 ...e, 3078 }), 3079 typeCheckConfig$1(NAME$9$1, e, this.constructor.DefaultType), 3080 'object' == typeof e.reference && 3081 !isElement$1(e.reference) && 3082 'function' != typeof e.reference.getBoundingClientRect) 3083 ) 3084 throw new TypeError( 3085 `${NAME$9$1.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.` 3086 ); 3087 return e; 3088 } 3089 _createPopper(e) { 3090 if (void 0 === Popper) 3091 throw new TypeError( 3092 "Bootstrap's dropdowns require Popper (https://popper.js.org)" 3093 ); 3094 let t = this._element; 3095 'parent' === this._config.reference 3096 ? (t = e) 3097 : isElement$1(this._config.reference) 3098 ? (t = getElement$1(this._config.reference)) 3099 : 'object' == typeof this._config.reference && 3100 (t = this._config.reference); 3101 const i = this._getPopperConfig(), 3102 n = i.modifiers.find( 3103 (e) => 'applyStyles' === e.name && !1 === e.enabled 3104 ); 3105 (this._popper = createPopper(t, this._menu, i)), 3106 n && 3107 Manipulator$1.setDataAttribute( 3108 this._menu, 3109 'popper', 3110 'static' 3111 ); 3112 } 3113 _isShown(e = this._element) { 3114 return e.classList.contains('show'); 3115 } 3116 _getMenuElement() { 3117 return SelectorEngine$2.next(this._element, SELECTOR_MENU)[0]; 3118 } 3119 _getPlacement() { 3120 const e = this._element.parentNode; 3121 if (e.classList.contains('dropend')) return PLACEMENT_RIGHT; 3122 if (e.classList.contains('dropstart')) return PLACEMENT_LEFT; 3123 const t = 3124 'end' === 3125 getComputedStyle(this._menu) 3126 .getPropertyValue('--bs-position') 3127 .trim(); 3128 return e.classList.contains('dropup') 3129 ? t 3130 ? PLACEMENT_TOPEND 3131 : PLACEMENT_TOP 3132 : t 3133 ? PLACEMENT_BOTTOMEND 3134 : PLACEMENT_BOTTOM; 3135 } 3136 _detectNavbar() { 3137 return null !== this._element.closest('.navbar'); 3138 } 3139 _getOffset() { 3140 const { offset: e } = this._config; 3141 return 'string' == typeof e 3142 ? e.split(',').map((e) => Number.parseInt(e, 10)) 3143 : 'function' == typeof e 3144 ? (t) => e(t, this._element) 3145 : e; 3146 } 3147 _getPopperConfig() { 3148 const e = { 3149 placement: this._getPlacement(), 3150 modifiers: [ 3151 { 3152 name: 'preventOverflow',
3153 options: { boundary: this._config.boundary }, 3154 }, 3155 { name: 'offset', options: { offset: this._getOffset() } }, 3156 ], 3157 }; 3158 return ( 3159 'static' === this._config.display && 3160 (e.modifiers = [{ name: 'applyStyles', enabled: !1 }]), 3161 { 3162 ...e, 3163 ...('function' == typeof this._config.popperConfig 3164 ? this._config.popperConfig(e) 3165 : this._config.popperConfig), 3166 } 3167 ); 3168 } 3169 _selectMenuItem({ key: e, target: t }) { 3170 const i = SelectorEngine$2.find( 3171 SELECTOR_VISIBLE_ITEMS, 3172 this._menu 3173 ).filter(isVisible$1); 3174 i.length && 3175 getNextActiveElement( 3176 i, 3177 t, 3178 'ArrowDown' === e, 3179 !i.includes(t) 3180 ).focus(); 3181 } 3182 static jQueryInterface(e) { 3183 return this.each(function () { 3184 const t = Dropdown.getOrCreateInstance(this, e); 3185 if ('string' == typeof e) { 3186 if (void 0 === t[e]) 3187 throw new TypeError(`No method named "${e}"`); 3188 t[e](); 3189 } 3190 }); 3191 } 3192 static clearMenus(e) { 3193 if ( 3194 e && 3195 (2 === e.button || ('keyup' === e.type && 'Tab' !== e.key)) 3196 ) 3197 return; 3198 const t = SelectorEngine$2.find(SELECTOR_DATA_TOGGLE$3$1); 3199 for (let i = 0, n = t.length; i < n; i++) { 3200 const n = Dropdown.getInstance(t[i]); 3201 if (!n || !1 === n._config.autoClose) continue; 3202 if (!n._isShown()) continue; 3203 const s = { relatedTarget: n._element }; 3204 if (e) { 3205 const t = e.composedPath(), 3206 i = t.includes(n._menu); 3207 if ( 3208 t.includes(n._element) || 3209 ('inside' === n._config.autoClose && !i) || 3210 ('outside' === n._config.autoClose && i) 3211 ) 3212 continue; 3213 if ( 3214 n._menu.contains(e.target) && 3215 (('keyup' === e.type && 'Tab' === e.key) || 3216 /input|select|option|textarea|form/i.test( 3217 e.target.tagName 3218 )) 3219 ) 3220 continue; 3221 'click' === e.type && (s.clickEvent = e); 3222 } 3223 n._completeHide(s); 3224 } 3225 } 3226 static getParentFromElement(e) { 3227 return getElementFromSelector$1(e) || e.parentNode; 3228 } 3229 static dataApiKeydownHandler(e) { 3230 if ( 3231 /input|textarea/i.test(e.target.tagName) 3232 ? 'Space' === e.key || 3233 ('Escape' !== e.key && 3234 (('ArrowDown' !== e.key && 'ArrowUp' !== e.key) || 3235 e.target.closest(SELECTOR_MENU))) 3236 : !REGEXP_KEYDOWN.test(e.key) 3237 ) 3238 return; 3239 const t = this.classList.contains('show'); 3240 if (!t && 'Escape' === e.key) return; 3241 if ((e.preventDefault(), e.stopPropagation(), isDisabled$1(this))) 3242 return; 3243 const i = this.matches(SELECTOR_DATA_TOGGLE$3$1) 3244 ? this 3245 : SelectorEngine$2.prev(this, SELECTOR_DATA_TOGGLE$3$1)[0], 3246 n = Dropdown.getOrCreateInstance(i); 3247 if ('Escape' !== e.key) 3248 return 'ArrowUp' === e.key || 'ArrowDown' === e.key 3249 ? (t || n.show(), void n._selectMenuItem(e)) 3250 : void ((t && 'Space' !== e.key) || Dropdown.clearMenus()); 3251 n.hide(); 3252 } 3253 } 3254 EventHandler$2.on( 3255 document, 3256 EVENT_KEYDOWN_DATA_API$1, 3257 SELECTOR_DATA_TOGGLE$3$1, 3258 Dropdown.dataApiKeydownHandler 3259 ), 3260 EventHandler$2.on( 3261 document, 3262 EVENT_KEYDOWN_DATA_API$1, 3263 SELECTOR_MENU, 3264 Dropdown.dataApiKeydownHandler 3265 ), 3266 EventHandler$2.on( 3267 document, 3268 EVENT_CLICK_DATA_API$3$1, 3269 Dropdown.clearMenus 3270 ), 3271 EventHandler$2.on( 3272 document, 3273 EVENT_KEYUP_DATA_API$1, 3274 Dropdown.clearMenus 3275 ), 3276 EventHandler$2.on( 3277 document, 3278 EVENT_CLICK_DATA_API$3$1, 3279 SELECTOR_DATA_TOGGLE$3$1, 3280 function (e) { 3281 e.preventDefault(), Dropdown.getOrCreateInstance(this).toggle(); 3282 } 3283 ), 3284 defineJQueryPlugin(Dropdown); 3285 const SELECTOR_FIXED_CONTENT = 3286 '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; 3287 class ScrollBarHelper { 3288 constructor() { 3289 this._element = document.body; 3290 } 3291 getWidth() { 3292 const e = document.documentElement.clientWidth; 3293 return Math.abs(window.innerWidth - e); 3294 } 3295 hide() { 3296 const e = this.getWidth(); 3297 this._disableOverFlow(), 3298 this._setElementAttributes( 3299 this._element, 3300 'paddingRight', 3301 (t) => t + e 3302 ), 3303 this._setElementAttributes( 3304 SELECTOR_FIXED_CONTENT, 3305 'paddingRight', 3306 (t) => t + e 3307 ), 3308 this._setElementAttributes( 3309 '.sticky-top', 3310 'marginRight', 3311 (t) => t - e 3312 ); 3313 } 3314 _disableOverFlow() { 3315 this._saveInitialAttribute(this._element, 'overflow'), 3316 (this._element.style.overflow = 'hidden'); 3317 } 3318 _setElementAttributes(e, t, i) { 3319 const n = this.getWidth(); 3320 this._applyManipulationCallback(e, (e) => { 3321 if ( 3322 e !== this._element && 3323 window.innerWidth > e.clientWidth + n 3324 ) 3325 return; 3326 this._saveInitialAttribute(e, t); 3327 const s = window.getComputedStyle(e)[t]; 3328 e.style[t] = `${i(Number.parseFloat(s))}px`; 3329 }); 3330 } 3331 reset() { 3332 this._resetElementAttributes(this._element, 'overflow'), 3333 this._resetElementAttributes(this._element, 'paddingRight'), 3334 this._resetElementAttributes( 3335 SELECTOR_FIXED_CONTENT, 3336 'paddingRight' 3337 ), 3338 this._resetElementAttributes('.sticky-top', 'marginRight'); 3339 } 3340 _saveInitialAttribute(e, t) { 3341 const i = e.style[t]; 3342 i && Manipulator$1.setDataAttribute(e, t, i); 3343 } 3344 _resetElementAttributes(e, t) { 3345 this._applyManipulationCallback(e, (e) => { 3346 const i = Manipulator$1.getDataAttribute(e, t); 3347 void 0 === i 3348 ? e.style.removeProperty(t) 3349 : (Manipulator$1.removeDataAttribute(e, t), 3350 (e.style[t] = i)); 3351 }); 3352 } 3353 _applyManipulationCallback(e, t) { 3354 isElement$1(e) 3355 ? t(e) 3356 : SelectorEngine$2.find(e, this._element).forEach(t); 3357 } 3358 isOverflowing() { 3359 return this.getWidth() > 0; 3360 } 3361 } 3362 const Default$7$1 = { 3363 className: 'modal-backdrop', 3364 isVisible: !0, 3365 isAnimated: !1, 3366 rootElement: 'body', 3367 clickCallback: null, 3368 }, 3369 DefaultType$7 = { 3370 className: 'string', 3371 isVisible: 'boolean', 3372 isAnimated: 'boolean', 3373 rootElement: '(element|string)', 3374 clickCallback: '(function|null)', 3375 }, 3376 NAME$8$1 = 'backdrop', 3377 EVENT_MOUSEDOWN = 'mousedown.bs.backdrop'; 3378 class Backdrop { 3379 constructor(e) { 3380 (this._config = this._getConfig(e)), 3381 (this._isAppended = !1), 3382 (this._element = null); 3383 } 3384 show(e) { 3385 this._config.isVisible 3386 ? (this._append(), 3387 this._config.isAnimated && reflow$1(this._getElement()), 3388 this._getElement().classList.add('show'), 3389 this._emulateAnimation(() => { 3390 execute$1(e); 3391 })) 3392 : execute$1(e); 3393 } 3394 hide(e) { 3395 this._config.isVisible 3396 ? (this._getElement().classList.remove('show'), 3397 this._emulateAnimation(() => { 3398 this.dispose(), execute$1(e); 3399 })) 3400 : execute$1(e); 3401 } 3402 _getElement() { 3403 if (!this._element) { 3404 const e = document.createElement('div'); 3405 (e.className = this._config.className), 3406 this._config.isAnimated && e.classList.add('fade'), 3407 (this._element = e); 3408 } 3409 return this._element; 3410 } 3411 _getConfig(e) { 3412 return ( 3413 ((e = { 3414 ...Default$7$1, 3415 ...('object' == typeof e ? e : {}), 3416 }).rootElement = getElement$1(e.rootElement)), 3417 typeCheckConfig$1(NAME$8$1, e, DefaultType$7), 3418 e 3419 ); 3420 } 3421 _append() { 3422 this._isAppended || 3423 (this._config.rootElement.append(this._getElement()), 3424 EventHandler$2.on(this._getElement(), EVENT_MOUSEDOWN, () => { 3425 execute$1(this._config.clickCallback); 3426 }), 3427 (this._isAppended = !0)); 3428 } 3429 dispose() { 3430 this._isAppended && 3431 (EventHandler$2.off(this._element, EVENT_MOUSEDOWN), 3432 this._element.remove(), 3433 (this._isAppended = !1)); 3434 } 3435 _emulateAnimation(e) { 3436 executeAfterTransition$1( 3437 e, 3438 this._getElement(), 3439 this._config.isAnimated 3440 ); 3441 } 3442 } 3443 const Default$6$1 = { trapElement: null, autofocus: !0 }, 3444 DefaultType$6 = { trapElement: 'element', autofocus: 'boolean' }, 3445 NAME$7$1 = 'focustrap', 3446 EVENT_KEY$7$1 = '.bs.focustrap', 3447 EVENT_FOCUSIN$1 = 'focusin.bs.focustrap', 3448 EVENT_KEYDOWN_TAB = 'keydown.tab.bs.focustrap'; 3449 class FocusTrap { 3450 constructor(e) { 3451 (this._config = this._getConfig(e)), 3452 (this._isActive = !1), 3453 (this._lastTabNavDirection = null); 3454 } 3455 activate() { 3456 const { trapElement: e, autofocus: t } = this._config; 3457 this._isActive || 3458 (t && e.focus(), 3459 EventHandler$2.off(document, EVENT_KEY$7$1), 3460 EventHandler$2.on(document, EVENT_FOCUSIN$1, (e) => 3461 this._handleFocusin(e) 3462 ), 3463 EventHandler$2.on(document, EVENT_KEYDOWN_TAB, (e) => 3464 this._handleKeydown(e) 3465 ), 3466 (this._isActive = !0)); 3467 } 3468 deactivate() { 3469 this._isActive && 3470 ((this._isActive = !1), 3471 EventHandler$2.off(document, EVENT_KEY$7$1)); 3472 } 3473 _handleFocusin(e) { 3474 const { target: t } = e, 3475 { trapElement: i } = this._config; 3476 if (t === document || t === i || i.contains(t)) return; 3477 const n = SelectorEngine$2.focusableChildren(i); 3478 0 === n.length 3479 ? i.focus() 3480 : 'backward' === this._lastTabNavDirection 3481 ? n[n.length - 1].focus() 3482 : n[0].focus(); 3483 } 3484 _handleKeydown(e) { 3485 'Tab' === e.key && 3486 (this._lastTabNavDirection = e.shiftKey 3487 ? 'backward' 3488 : 'forward'); 3489 } 3490 _getConfig(e) { 3491 return ( 3492 (e = { ...Default$6$1, ...('object' == typeof e ? e : {}) }), 3493 typeCheckConfig$1(NAME$7$1, e, DefaultType$6), 3494 e 3495 ); 3496 } 3497 } 3498 const NAME$6$1 = 'modal', 3499 Default$5$1 = { backdrop: !0, keyboard: !0, focus: !0 }, 3500 DefaultType$5 = { 3501 backdrop: '(boolean|string)', 3502 keyboard: 'boolean', 3503 focus: 'boolean', 3504 }, 3505 EVENT_HIDE$3 = 'hide.bs.modal', 3506 EVENT_HIDE_PREVENTED = 'hidePrevented.bs.modal', 3507 EVENT_HIDDEN$3 = 'hidden.bs.modal', 3508 EVENT_SHOW$3 = 'show.bs.modal', 3509 EVENT_SHOWN$3 = 'shown.bs.modal', 3510 EVENT_RESIZE$2 = 'resize.bs.modal', 3511 EVENT_CLICK_DISMISS = 'click.dismiss.bs.modal', 3512 EVENT_KEYDOWN_DISMISS$1 = 'keydown.dismiss.bs.modal', 3513 EVENT_MOUSEUP_DISMISS = 'mouseup.dismiss.bs.modal', 3514 EVENT_MOUSEDOWN_DISMISS = 'mousedown.dismiss.bs.modal', 3515 EVENT_CLICK_DATA_API$2$1 = 'click.bs.modal.data-api', 3516 SELECTOR_DATA_TOGGLE$2$1 = '[data-bs-toggle="modal"]'; 3517 class Modal extends BaseComponent$1 { 3518 constructor(e, t) { 3519 super(e), 3520 (this._config = this._getConfig(t)), 3521 (this._dialog = SelectorEngine$2.findOne( 3522 '.modal-dialog', 3523 this._element 3524 )), 3525 (this._backdrop = this._initializeBackDrop()), 3526 (this._focustrap = this._initializeFocusTrap()), 3527 (this._isShown = !1), 3528 (this._ignoreBackdropClick = !1), 3529 (this._isTransitioning = !1), 3530 (this._scrollBar = new ScrollBarHelper()); 3531 } 3532 static get Default() { 3533 return Default$5$1; 3534 } 3535 static get NAME() { 3536 return NAME$6$1; 3537 } 3538 toggle(e) { 3539 return this._isShown ? this.hide() : this.show(e); 3540 } 3541 show(e) { 3542 if (this._isShown || this._isTransitioning) return; 3543 EventHandler$2.trigger(this._element, EVENT_SHOW$3, { 3544 relatedTarget: e, 3545 }).defaultPrevented || 3546 ((this._isShown = !0), 3547 this._isAnimated() && (this._isTransitioning = !0), 3548 this._scrollBar.hide(), 3549 document.body.classList.add('modal-open'), 3550 this._adjustDialog(), 3551 this._setEscapeEvent(), 3552 this._setResizeEvent(), 3553 EventHandler$2.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { 3554 EventHandler$2.one( 3555 this._element, 3556 EVENT_MOUSEUP_DISMISS, 3557 (e) => { 3558 e.target === this._element && 3559 (this._ignoreBackdropClick = !0); 3560 } 3561 ); 3562 }), 3563 this._showBackdrop(() => this._showElement(e))); 3564 } 3565 hide() { 3566 if (!this._isShown || this._isTransitioning) return; 3567 if ( 3568 EventHandler$2.trigger(this._element, EVENT_HIDE$3) 3569 .defaultPrevented 3570 ) 3571 return; 3572 this._isShown = !1; 3573 const e = this._isAnimated(); 3574 e && (this._isTransitioning = !0), 3575 this._setEscapeEvent(), 3576 this._setResizeEvent(), 3577 this._focustrap.deactivate(), 3578 this._element.classList.remove('show'), 3579 EventHandler$2.off(this._element, EVENT_CLICK_DISMISS), 3580 EventHandler$2.off(this._dialog, EVENT_MOUSEDOWN_DISMISS), 3581 this._queueCallback(() => this._hideModal(), this._element, e); 3582 } 3583 dispose() { 3584 [window, this._dialog].forEach((e) => 3585 EventHandler$2.off(e, '.bs.modal') 3586 ), 3587
vendor: 5,929 bytes, lines 3587-3730
3587 this._backdrop.dispose(), 3588 this._focustrap.deactivate(), 3589 super.dispose(); 3590 } 3591 handleUpdate() { 3592 this._adjustDialog(); 3593 } 3594 _initializeBackDrop() { 3595 return new Backdrop({ 3596 isVisible: Boolean(this._config.backdrop), 3597 isAnimated: this._isAnimated(), 3598 }); 3599 } 3600 _initializeFocusTrap() { 3601 return new FocusTrap({ trapElement: this._element }); 3602 } 3603 _getConfig(e) { 3604 return ( 3605 (e = { 3606 ...Default$5$1, 3607 ...Manipulator$1.getDataAttributes(this._element), 3608 ...('object' == typeof e ? e : {}), 3609 }), 3610 typeCheckConfig$1(NAME$6$1, e, DefaultType$5), 3611 e 3612 ); 3613 } 3614 _showElement(e) { 3615 const t = this._isAnimated(), 3616 i = SelectorEngine$2.findOne('.modal-body', this._dialog); 3617 (this._element.parentNode && 3618 this._element.parentNode.nodeType === Node.ELEMENT_NODE) || 3619 document.body.append(this._element), 3620 (this._element.style.display = 'block'), 3621 this._element.removeAttribute('aria-hidden'), 3622 this._element.setAttribute('aria-modal', !0), 3623 this._element.setAttribute('role', 'dialog'), 3624 (this._element.scrollTop = 0), 3625 i && (i.scrollTop = 0), 3626 t && reflow$1(this._element), 3627 this._element.classList.add('show'); 3628 this._queueCallback( 3629 () => { 3630 this._config.focus && this._focustrap.activate(), 3631 (this._isTransitioning = !1), 3632 EventHandler$2.trigger(this._element, EVENT_SHOWN$3, { 3633 relatedTarget: e, 3634 }); 3635 }, 3636 this._dialog, 3637 t 3638 ); 3639 } 3640 _setEscapeEvent() { 3641 this._isShown 3642 ? EventHandler$2.on( 3643 this._element, 3644 EVENT_KEYDOWN_DISMISS$1, 3645 (e) => { 3646 this._config.keyboard && 'Escape' === e.key 3647 ? (e.preventDefault(), this.hide()) 3648 : this._config.keyboard || 3649 'Escape' !== e.key || 3650 this._triggerBackdropTransition(); 3651 } 3652 ) 3653 : EventHandler$2.off(this._element, EVENT_KEYDOWN_DISMISS$1); 3654 } 3655 _setResizeEvent() { 3656 this._isShown 3657 ? EventHandler$2.on(window, EVENT_RESIZE$2, () => 3658 this._adjustDialog() 3659 ) 3660 : EventHandler$2.off(window, EVENT_RESIZE$2); 3661 } 3662 _hideModal() { 3663 (this._element.style.display = 'none'), 3664 this._element.setAttribute('aria-hidden', !0), 3665 this._element.removeAttribute('aria-modal'), 3666 this._element.removeAttribute('role'), 3667 (this._isTransitioning = !1), 3668 this._backdrop.hide(() => { 3669 document.body.classList.remove('modal-open'), 3670 this._resetAdjustments(), 3671 this._scrollBar.reset(), 3672 EventHandler$2.trigger(this._element, EVENT_HIDDEN$3); 3673 }); 3674 } 3675 _showBackdrop(e) { 3676 EventHandler$2.on(this._element, EVENT_CLICK_DISMISS, (e) => { 3677 this._ignoreBackdropClick 3678 ? (this._ignoreBackdropClick = !1) 3679 : e.target === e.currentTarget && 3680 (!0 === this._config.backdrop 3681 ? this.hide() 3682 : 'static' === this._config.backdrop && 3683 this._triggerBackdropTransition()); 3684 }), 3685 this._backdrop.show(e); 3686 } 3687 _isAnimated() { 3688 return this._element.classList.contains('fade'); 3689 } 3690 _triggerBackdropTransition() { 3691 if ( 3692 EventHandler$2.trigger(this._element, EVENT_HIDE_PREVENTED) 3693 .defaultPrevented 3694 ) 3695 return; 3696 const { classList: e, scrollHeight: t, style: i } = this._element, 3697 n = t > document.documentElement.clientHeight; 3698 (!n && 'hidden' === i.overflowY) || 3699 e.contains('modal-static') || 3700 (n || (i.overflowY = 'hidden'), 3701 e.add('modal-static'), 3702 this._queueCallback(() => { 3703 e.remove('modal-static'), 3704 n || 3705 this._queueCallback(() => { 3706 i.overflowY = ''; 3707 }, this._dialog); 3708 }, this._dialog), 3709 this._element.focus()); 3710 } 3711 _adjustDialog() { 3712 const e = 3713 this._element.scrollHeight > 3714 document.documentElement.clientHeight, 3715 t = this._scrollBar.getWidth(), 3716 i = t > 0; 3717 ((!i && e && !isRTL()) || (i && !e && isRTL())) && 3718 (this._element.style.paddingLeft = `${t}px`), 3719 ((i && !e && !isRTL()) || (!i && e && isRTL())) && 3720 (this._element.style.paddingRight = `${t}px`); 3721 } 3722 _resetAdjustments() { 3723 (this._element.style.paddingLeft = ''), 3724 (this._element.style.paddingRight = ''); 3725 } 3726 static jQueryInterface(e, t) { 3727 return this.each(function () { 3728 const i = Modal.getOrCreateInstance(this, e); 3729 if ('string' == typeof e) { 3730 if (void 0 === i[e])
3731 throw new TypeError(`No method named "${e}"`); 3732 i[e](t); 3733 } 3734 }); 3735 } 3736 } 3737 EventHandler$2.on( 3738 document, 3739 EVENT_CLICK_DATA_API$2$1, 3740 SELECTOR_DATA_TOGGLE$2$1, 3741 function (e) { 3742 const t = getElementFromSelector$1(this); 3743 ['A', 'AREA'].includes(this.tagName) && e.preventDefault(), 3744 EventHandler$2.one(t, EVENT_SHOW$3, (e) => { 3745 e.defaultPrevented || 3746 EventHandler$2.one(t, EVENT_HIDDEN$3, () => { 3747 isVisible$1(this) && this.focus(); 3748 }); 3749 }); 3750 const i = SelectorEngine$2.findOne('.modal.show'); 3751 i && Modal.getInstance(i).hide(); 3752 Modal.getOrCreateInstance(t).toggle(this); 3753 } 3754 ), 3755 enableDismissTrigger$1(Modal), 3756 defineJQueryPlugin(Modal); 3757 const NAME$5$1 = 'offcanvas', 3758 EVENT_LOAD_DATA_API$1$1 = 'load.bs.offcanvas.data-api', 3759 Default$4$1 = { backdrop: !0, keyboard: !0, scroll: !1 }, 3760 DefaultType$4 = { 3761 backdrop: 'boolean', 3762 keyboard: 'boolean', 3763 scroll: 'boolean', 3764 }, 3765 CLASS_NAME_BACKDROP = 'offcanvas-backdrop', 3766 OPEN_SELECTOR = '.offcanvas.show', 3767 EVENT_SHOW$2 = 'show.bs.offcanvas', 3768 EVENT_SHOWN$2 = 'shown.bs.offcanvas', 3769 EVENT_HIDE$2 = 'hide.bs.offcanvas', 3770 EVENT_HIDDEN$2 = 'hidden.bs.offcanvas', 3771 EVENT_CLICK_DATA_API$1$1 = 'click.bs.offcanvas.data-api', 3772 EVENT_KEYDOWN_DISMISS = 'keydown.dismiss.bs.offcanvas', 3773 SELECTOR_DATA_TOGGLE$1$1 = '[data-bs-toggle="offcanvas"]'; 3774 class Offcanvas extends BaseComponent$1 { 3775 constructor(e, t) { 3776 super(e), 3777 (this._config = this._getConfig(t)), 3778 (this._isShown = !1), 3779 (this._backdrop = this._initializeBackDrop()), 3780 (this._focustrap = this._initializeFocusTrap()), 3781 this._addEventListeners(); 3782 } 3783 static get NAME() { 3784 return NAME$5$1; 3785 } 3786 static get Default() { 3787 return Default$4$1; 3788 } 3789 toggle(e) { 3790 return this._isShown ? this.hide() : this.show(e); 3791 } 3792 show(e) { 3793 if (this._isShown) return; 3794 if ( 3795 EventHandler$2.trigger(this._element, EVENT_SHOW$2, { 3796 relatedTarget: e, 3797 }).defaultPrevented 3798 ) 3799 return; 3800 (this._isShown = !0), 3801 (this._element.style.visibility = 'visible'), 3802 this._backdrop.show(), 3803 this._config.scroll || new ScrollBarHelper().hide(), 3804 this._element.removeAttribute('aria-hidden'), 3805 this._element.setAttribute('aria-modal', !0), 3806 this._element.setAttribute('role', 'dialog'), 3807 this._element.classList.add('show'); 3808 this._queueCallback( 3809 () => { 3810 this._config.scroll || this._focustrap.activate(), 3811 EventHandler$2.trigger(this._element, EVENT_SHOWN$2, { 3812 relatedTarget: e, 3813 }); 3814 }, 3815 this._element, 3816 !0 3817 ); 3818 } 3819 hide() { 3820 if (!this._isShown) return; 3821 if ( 3822 EventHandler$2.trigger(this._element, EVENT_HIDE$2) 3823 .defaultPrevented 3824 ) 3825 return; 3826 this._focustrap.deactivate(), 3827 this._element.blur(), 3828 (this._isShown = !1), 3829 this._element.classList.remove('show'), 3830 this._backdrop.hide(); 3831 this._queueCallback( 3832 () => { 3833 this._element.setAttribute('aria-hidden', !0), 3834 this._element.removeAttribute('aria-modal'), 3835 this._element.removeAttribute('role'), 3836 (this._element.style.visibility = 'hidden'), 3837 this._config.scroll || new ScrollBarHelper().reset(), 3838 EventHandler$2.trigger(this._element, EVENT_HIDDEN$2); 3839 }, 3840 this._element, 3841 !0 3842 ); 3843 } 3844 dispose() { 3845 this._backdrop.dispose(), 3846 this._focustrap.deactivate(), 3847 super.dispose(); 3848 } 3849 _getConfig(e) { 3850 return ( 3851 (e = { 3852 ...Default$4$1, 3853 ...Manipulator$1.getDataAttributes(this._element), 3854 ...('object' == typeof e ? e : {}), 3855 }), 3856 typeCheckConfig$1(NAME$5$1, e, DefaultType$4), 3857 e 3858 ); 3859 } 3860 _initializeBackDrop() { 3861 return new Backdrop({ 3862 className: CLASS_NAME_BACKDROP, 3863 isVisible: this._config.backdrop, 3864 isAnimated: !0, 3865 rootElement: this._element.parentNode, 3866 clickCallback: () => this.hide(), 3867 }); 3868 } 3869 _initializeFocusTrap() { 3870 return new FocusTrap({ trapElement: this._element }); 3871 } 3872 _addEventListeners() { 3873 EventHandler$2.on(this._element, EVENT_KEYDOWN_DISMISS, (e) => { 3874 this._config.keyboard && 'Escape' === e.key && this.hide(); 3875 }); 3876 } 3877 static jQueryInterface(e) { 3878 return this.each(function () { 3879 const t = Offcanvas.getOrCreateInstance(this, e); 3880 if ('string' == typeof e) { 3881 if ( 3882 void 0 === t[e] || 3883 e.startsWith('_') || 3884 'constructor' === e 3885 )
3886 throw new TypeError(`No method named "${e}"`); 3887 t[e](this); 3888 } 3889 }); 3890 } 3891 } 3892 EventHandler$2.on( 3893 document, 3894 EVENT_CLICK_DATA_API$1$1, 3895 SELECTOR_DATA_TOGGLE$1$1, 3896 function (e) { 3897 const t = getElementFromSelector$1(this); 3898 if ( 3899 (['A', 'AREA'].includes(this.tagName) && e.preventDefault(), 3900 isDisabled$1(this)) 3901 ) 3902 return; 3903 EventHandler$2.one(t, EVENT_HIDDEN$2, () => { 3904 isVisible$1(this) && this.focus(); 3905 }); 3906 const i = SelectorEngine$2.findOne(OPEN_SELECTOR); 3907 i && i !== t && Offcanvas.getInstance(i).hide(); 3908 Offcanvas.getOrCreateInstance(t).toggle(this); 3909 } 3910 ), 3911 EventHandler$2.on(window, EVENT_LOAD_DATA_API$1$1, () => 3912 SelectorEngine$2.find(OPEN_SELECTOR).forEach((e) => 3913 Offcanvas.getOrCreateInstance(e).show() 3914 ) 3915 ), 3916 enableDismissTrigger$1(Offcanvas), 3917 defineJQueryPlugin(Offcanvas); 3918 const uriAttributes = new Set([ 3919 'background', 3920 'cite', 3921 'href', 3922 'itemtype', 3923 'longdesc', 3924 'poster', 3925 'src', 3926 'xlink:href', 3927 ]), 3928 ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i, 3929 SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i, 3930 DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i, 3931 allowedAttribute = (e, t) => { 3932 const i = e.nodeName.toLowerCase(); 3933 if (t.includes(i)) 3934 return ( 3935 !uriAttributes.has(i) || 3936 Boolean( 3937 SAFE_URL_PATTERN.test(e.nodeValue) || 3938 DATA_URL_PATTERN.test(e.nodeValue) 3939 ) 3940 ); 3941 const n = t.filter((e) => e instanceof RegExp); 3942 for (let e = 0, t = n.length; e < t; e++) 3943 if (n[e].test(i)) return !0; 3944 return !1; 3945 }, 3946 DefaultAllowlist = { 3947 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 3948 a: ['target', 'href', 'title', 'rel'], 3949 area: [], 3950 b: [], 3951 br: [], 3952 col: [], 3953 code: [], 3954 div: [], 3955 em: [], 3956 hr: [], 3957 h1: [], 3958 h2: [], 3959 h3: [], 3960 h4: [], 3961 h5: [], 3962 h6: [], 3963 i: [], 3964 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], 3965 li: [], 3966 ol: [], 3967 p: [], 3968 pre: [], 3969 s: [], 3970 small: [], 3971 span: [], 3972 sub: [], 3973 sup: [], 3974 strong: [], 3975 u: [], 3976 ul: [], 3977 }; 3978 function sanitizeHtml(e, t, i) { 3979 if (!e.length) return e; 3980 if (i && 'function' == typeof i) return i(e); 3981 const n = new window.DOMParser().parseFromString(e, 'text/html'), 3982 s = [].concat(...n.body.querySelectorAll('*')); 3983 for (let e = 0, i = s.length; e < i; e++) { 3984 const i = s[e], 3985 n = i.nodeName.toLowerCase(); 3986 if (!Object.keys(t).includes(n)) { 3987 i.remove(); 3988 continue; 3989 } 3990 const o = [].concat(...i.attributes), 3991 r = [].concat(t['*'] || [], t[n] || []); 3992 o.forEach((e) => { 3993 allowedAttribute(e, r) || i.removeAttribute(e.nodeName); 3994 }); 3995 } 3996 return n.body.innerHTML; 3997 } 3998 const NAME$4$1 = 'tooltip', 3999 DISALLOWED_ATTRIBUTES = new Set([ 4000 'sanitize', 4001 'allowList', 4002 'sanitizeFn', 4003 ]), 4004 DefaultType$3 = { 4005 animation: 'boolean', 4006 template: 'string', 4007 title: '(string|element|function)', 4008 trigger: 'string', 4009 delay: '(number|object)', 4010 html: 'boolean', 4011 selector: '(string|boolean)', 4012 placement: '(string|function)', 4013 offset: '(array|string|function)', 4014 container: '(string|element|boolean)', 4015 fallbackPlacements: 'array', 4016 boundary: '(string|element)', 4017 customClass: '(string|function)', 4018 sanitize: 'boolean', 4019 sanitizeFn: '(null|function)', 4020 allowList: 'object', 4021 popperConfig: '(null|object|function)', 4022 }, 4023 AttachmentMap = { 4024 AUTO: 'auto', 4025 TOP: 'top', 4026 RIGHT: isRTL() ? 'left' : 'right', 4027 BOTTOM: 'bottom', 4028 LEFT: isRTL() ? 'right' : 'left', 4029 }, 4030 Default$3$1 = { 4031 animation: !0, 4032 template: 4033 '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', 4034 trigger: 'hover focus', 4035 title: '', 4036 delay: 0, 4037 html: !1, 4038 selector: !1, 4039 placement: 'top', 4040 offset: [0, 0], 4041 container: !1, 4042 fallbackPlacements: ['top', 'right', 'bottom', 'left'], 4043 boundary: 'clippingParents', 4044 customClass: '', 4045 sanitize: !0, 4046 sanitizeFn: null, 4047 allowList: DefaultAllowlist, 4048 popperConfig: null, 4049 }, 4050 Event$2 = { 4051 HIDE: 'hide.bs.tooltip', 4052 HIDDEN: 'hidden.bs.tooltip', 4053 SHOW: 'show.bs.tooltip', 4054 SHOWN: 'shown.bs.tooltip', 4055 INSERTED: 'inserted.bs.tooltip', 4056 CLICK: 'click.bs.tooltip', 4057 FOCUSIN: 'focusin.bs.tooltip', 4058 FOCUSOUT: 'focusout.bs.tooltip', 4059 MOUSEENTER: 'mouseenter.bs.tooltip', 4060 MOUSELEAVE: 'mouseleave.bs.tooltip', 4061 }; 4062 class Tooltip extends BaseComponent$1 { 4063 constructor(e, t) { 4064 if (void 0 === Popper) 4065 throw new TypeError( 4066 "Bootstrap's tooltips require Popper (https://popper.js.org)" 4067 ); 4068 super(e), 4069 (this._isEnabled = !0), 4070 (this._timeout = 0), 4071 (this._hoverState = ''), 4072 (this._activeTrigger = {}), 4073 (this._popper = null),
vendor: 4,046 bytes, lines 4074-4176
4074 (this._config = this._getConfig(t)), 4075 (this.tip = null), 4076 this._setListeners(); 4077 } 4078 static get Default() { 4079 return Default$3$1; 4080 } 4081 static get NAME() { 4082 return NAME$4$1; 4083 } 4084 static get Event() { 4085 return Event$2; 4086 } 4087 static get DefaultType() { 4088 return DefaultType$3; 4089 } 4090 enable() { 4091 this._isEnabled = !0; 4092 } 4093 disable() { 4094 this._isEnabled = !1; 4095 } 4096 toggleEnabled() { 4097 this._isEnabled = !this._isEnabled; 4098 } 4099 toggle(e) { 4100 if (this._isEnabled) 4101 if (e) { 4102 const t = this._initializeOnDelegatedTarget(e); 4103 (t._activeTrigger.click = !t._activeTrigger.click), 4104 t._isWithActiveTrigger() 4105 ? t._enter(null, t) 4106 : t._leave(null, t); 4107 } else { 4108 if (this.getTipElement().classList.contains('show')) 4109 return void this._leave(null, this); 4110 this._enter(null, this); 4111 } 4112 } 4113 dispose() { 4114 clearTimeout(this._timeout), 4115 EventHandler$2.off( 4116 this._element.closest('.modal'), 4117 'hide.bs.modal', 4118 this._hideModalHandler 4119 ), 4120 this.tip && this.tip.remove(), 4121 this._disposePopper(), 4122 super.dispose(); 4123 } 4124 show() { 4125 if ('none' === this._element.style.display) 4126 throw new Error('Please use show on visible elements'); 4127 if (!this.isWithContent() || !this._isEnabled) return; 4128 const e = EventHandler$2.trigger( 4129 this._element, 4130 this.constructor.Event.SHOW 4131 ), 4132 t = findShadowRoot(this._element), 4133 i = 4134 null === t 4135 ? this._element.ownerDocument.documentElement.contains( 4136 this._element 4137 ) 4138 : t.contains(this._element); 4139 if (e.defaultPrevented || !i) return; 4140 'tooltip' === this.constructor.NAME && 4141 this.tip && 4142 this.getTitle() !== 4143 this.tip.querySelector('.tooltip-inner').innerHTML && 4144 (this._disposePopper(), this.tip.remove(), (this.tip = null)); 4145 const n = this.getTipElement(), 4146 s = getUID(this.constructor.NAME); 4147 n.setAttribute('id', s), 4148 this._element.setAttribute('aria-describedby', s), 4149 this._config.animation && n.classList.add('fade'); 4150 const o = 4151 'function' == typeof this._config.placement 4152 ? this._config.placement.call(this, n, this._element) 4153 : this._config.placement, 4154 r = this._getAttachment(o); 4155 this._addAttachmentClass(r); 4156 const { container: a } = this._config; 4157 Data$1.set(n, this.constructor.DATA_KEY, this), 4158 this._element.ownerDocument.documentElement.contains( 4159 this.tip 4160 ) || 4161 (a.append(n), 4162 EventHandler$2.trigger( 4163 this._element, 4164 this.constructor.Event.INSERTED 4165 )), 4166 this._popper 4167 ? this._popper.update() 4168 : (this._popper = createPopper( 4169 this._element, 4170 n, 4171 this._getPopperConfig(r) 4172 )), 4173 n.classList.add('show'); 4174 const l = this._resolvePossibleFunction(this._config.customClass); 4175 l && n.classList.add(...l.split(' ')), 4176 'ontouchstart' in document.documentElement &&
4177 [].concat(...document.body.children).forEach((e) => { 4178 EventHandler$2.on(e, 'mouseover', noop$1); 4179 }); 4180 const c = this.tip.classList.contains('fade'); 4181 this._queueCallback( 4182 () => { 4183 const e = this._hoverState; 4184 (this._hoverState = null), 4185 EventHandler$2.trigger( 4186 this._element, 4187 this.constructor.Event.SHOWN 4188 ), 4189 'out' === e && this._leave(null, this); 4190 }, 4191 this.tip, 4192 c 4193 ); 4194 } 4195 hide() { 4196 if (!this._popper) return; 4197 const e = this.getTipElement(); 4198 if ( 4199 EventHandler$2.trigger( 4200 this._element, 4201 this.constructor.Event.HIDE 4202 ).defaultPrevented 4203 ) 4204 return; 4205 e.classList.remove('show'), 4206 'ontouchstart' in document.documentElement && 4207 [] 4208 .concat(...document.body.children) 4209 .forEach((e) => 4210 EventHandler$2.off(e, 'mouseover', noop$1) 4211 ), 4212 (this._activeTrigger.click = !1), 4213 (this._activeTrigger.focus = !1), 4214 (this._activeTrigger.hover = !1); 4215 const t = this.tip.classList.contains('fade'); 4216 this._queueCallback( 4217 () => { 4218 this._isWithActiveTrigger() || 4219 ('show' !== this._hoverState && e.remove(), 4220 this._cleanTipClass(), 4221 this._element.removeAttribute('aria-describedby'), 4222 EventHandler$2.trigger( 4223 this._element, 4224 this.constructor.Event.HIDDEN 4225 ), 4226 this._disposePopper()); 4227 }, 4228 this.tip, 4229 t 4230 ), 4231 (this._hoverState = ''); 4232 } 4233 update() { 4234 null !== this._popper && this._popper.update(); 4235 } 4236 isWithContent() { 4237 return Boolean(this.getTitle()); 4238 } 4239 getTipElement() { 4240 if (this.tip) return this.tip; 4241 const e = document.createElement('div'); 4242 e.innerHTML = this._config.template; 4243 const t = e.children[0]; 4244 return ( 4245 this.setContent(t), 4246 t.classList.remove('fade', 'show'), 4247 (this.tip = t), 4248 this.tip 4249 ); 4250 } 4251 setContent(e) { 4252 this._sanitizeAndSetContent(e, this.getTitle(), '.tooltip-inner'); 4253 } 4254 _sanitizeAndSetContent(e, t, i) { 4255 const n = SelectorEngine$2.findOne(i, e); 4256 t || !n ? this.setElementContent(n, t) : n.remove(); 4257 } 4258 setElementContent(e, t) { 4259 if (null !== e) 4260 return isElement$1(t) 4261 ? ((t = getElement$1(t)), 4262 void (this._config.html 4263 ? t.parentNode !== e && 4264 ((e.innerHTML = ''), e.append(t)) 4265 : (e.textContent = t.textContent))) 4266 : void (this._config.html 4267 ? (this._config.sanitize && 4268 (t = sanitizeHtml( 4269 t, 4270 this._config.allowList, 4271 this._config.sanitizeFn 4272 )), 4273 (e.innerHTML = t)) 4274 : (e.textContent = t)); 4275 } 4276 getTitle() { 4277 const e = 4278 this._element.getAttribute('data-bs-original-title') || 4279 this._config.title; 4280 return this._resolvePossibleFunction(e); 4281 } 4282 updateAttachment(e) { 4283 return 'right' === e ? 'end' : 'left' === e ? 'start' : e; 4284 } 4285 _initializeOnDelegatedTarget(e, t) { 4286 return ( 4287 t || 4288 this.constructor.getOrCreateInstance( 4289 e.delegateTarget, 4290 this._getDelegateConfig() 4291 ) 4292 ); 4293 } 4294 _getOffset() { 4295 const { offset: e } = this._config; 4296 return 'string' == typeof e 4297 ? e.split(',').map((e) => Number.parseInt(e, 10)) 4298 : 'function' == typeof e 4299 ? (t) => e(t, this._element) 4300 : e; 4301 } 4302 _resolvePossibleFunction(e) { 4303 return 'function' == typeof e ? e.call(this._element) : e; 4304 } 4305 _getPopperConfig(e) { 4306 const t = { 4307 placement: e, 4308 modifiers: [ 4309 { 4310 name: 'flip', 4311 options: { 4312 fallbackPlacements: this._config.fallbackPlacements, 4313 }, 4314 }, 4315 { name: 'offset', options: { offset: this._getOffset() } }, 4316 { 4317 name: 'preventOverflow',
vendor: 17,195 bytes, lines 4318-4750
4318 options: { boundary: this._config.boundary }, 4319 }, 4320 { 4321 name: 'arrow', 4322 options: { element: `.${this.constructor.NAME}-arrow` }, 4323 }, 4324 { 4325 name: 'onChange', 4326 enabled: !0, 4327 phase: 'afterWrite', 4328 fn: (e) => this._handlePopperPlacementChange(e), 4329 }, 4330 ], 4331 onFirstUpdate: (e) => { 4332 e.options.placement !== e.placement && 4333 this._handlePopperPlacementChange(e); 4334 }, 4335 }; 4336 return { 4337 ...t, 4338 ...('function' == typeof this._config.popperConfig 4339 ? this._config.popperConfig(t) 4340 : this._config.popperConfig), 4341 }; 4342 } 4343 _addAttachmentClass(e) { 4344 this.getTipElement().classList.add( 4345 `${this._getBasicClassPrefix()}-${this.updateAttachment(e)}` 4346 ); 4347 } 4348 _getAttachment(e) { 4349 return AttachmentMap[e.toUpperCase()]; 4350 } 4351 _setListeners() { 4352 this._config.trigger.split(' ').forEach((e) => { 4353 if ('click' === e) 4354 EventHandler$2.on( 4355 this._element, 4356 this.constructor.Event.CLICK, 4357 this._config.selector, 4358 (e) => this.toggle(e) 4359 ); 4360 else if ('manual' !== e) { 4361 const t = 4362 'hover' === e 4363 ? this.constructor.Event.MOUSEENTER 4364 : this.constructor.Event.FOCUSIN, 4365 i = 4366 'hover' === e 4367 ? this.constructor.Event.MOUSELEAVE 4368 : this.constructor.Event.FOCUSOUT; 4369 EventHandler$2.on( 4370 this._element, 4371 t, 4372 this._config.selector, 4373 (e) => this._enter(e) 4374 ), 4375 EventHandler$2.on( 4376 this._element, 4377 i, 4378 this._config.selector, 4379 (e) => this._leave(e) 4380 ); 4381 } 4382 }), 4383 (this._hideModalHandler = () => { 4384 this._element && this.hide(); 4385 }), 4386 EventHandler$2.on( 4387 this._element.closest('.modal'), 4388 'hide.bs.modal', 4389 this._hideModalHandler 4390 ), 4391 this._config.selector 4392 ? (this._config = { 4393 ...this._config, 4394 trigger: 'manual', 4395 selector: '', 4396 }) 4397 : this._fixTitle(); 4398 } 4399 _fixTitle() { 4400 const e = this._element.getAttribute('title'), 4401 t = typeof this._element.getAttribute('data-bs-original-title'); 4402 (e || 'string' !== t) && 4403 (this._element.setAttribute('data-bs-original-title', e || ''), 4404 !e || 4405 this._element.getAttribute('aria-label') || 4406 this._element.textContent || 4407 this._element.setAttribute('aria-label', e), 4408 this._element.setAttribute('title', '')); 4409 } 4410 _enter(e, t) { 4411 (t = this._initializeOnDelegatedTarget(e, t)), 4412 e && 4413 (t._activeTrigger[ 4414 'focusin' === e.type ? 'focus' : 'hover' 4415 ] = !0), 4416 t.getTipElement().classList.contains('show') || 4417 'show' === t._hoverState 4418 ? (t._hoverState = 'show') 4419 : (clearTimeout(t._timeout), 4420 (t._hoverState = 'show'), 4421 t._config.delay && t._config.delay.show 4422 ? (t._timeout = setTimeout(() => { 4423 'show' === t._hoverState && t.show(); 4424 }, t._config.delay.show)) 4425 : t.show()); 4426 } 4427 _leave(e, t) { 4428 (t = this._initializeOnDelegatedTarget(e, t)), 4429 e && 4430 (t._activeTrigger[ 4431 'focusout' === e.type ? 'focus' : 'hover' 4432 ] = t._element.contains(e.relatedTarget)), 4433 t._isWithActiveTrigger() || 4434 (clearTimeout(t._timeout), 4435 (t._hoverState = 'out'), 4436 t._config.delay && t._config.delay.hide 4437 ? (t._timeout = setTimeout(() => { 4438 'out' === t._hoverState && t.hide(); 4439 }, t._config.delay.hide)) 4440 : t.hide()); 4441 } 4442 _isWithActiveTrigger() { 4443 for (const e in this._activeTrigger) 4444 if (this._activeTrigger[e]) return !0; 4445 return !1; 4446 } 4447 _getConfig(e) { 4448 const t = Manipulator$1.getDataAttributes(this._element); 4449 return ( 4450 Object.keys(t).forEach((e) => { 4451 DISALLOWED_ATTRIBUTES.has(e) && delete t[e]; 4452 }), 4453 ((e = { 4454 ...this.constructor.Default, 4455 ...t, 4456 ...('object' == typeof e && e ? e : {}), 4457 }).container = 4458 !1 === e.container 4459 ? document.body 4460 : getElement$1(e.container)), 4461 'number' == typeof e.delay && 4462 (e.delay = { show: e.delay, hide: e.delay }), 4463 'number' == typeof e.title && (e.title = e.title.toString()), 4464 'number' == typeof e.content && 4465 (e.content = e.content.toString()), 4466 typeCheckConfig$1(NAME$4$1, e, this.constructor.DefaultType), 4467 e.sanitize && 4468 (e.template = sanitizeHtml( 4469 e.template, 4470 e.allowList, 4471 e.sanitizeFn 4472 )), 4473 e 4474 ); 4475 } 4476 _getDelegateConfig() { 4477 const e = {}; 4478 for (const t in this._config) 4479 this.constructor.Default[t] !== this._config[t] && 4480 (e[t] = this._config[t]); 4481 return e; 4482 } 4483 _cleanTipClass() { 4484 const e = this.getTipElement(), 4485 t = new RegExp( 4486 `(^|\\s)${this._getBasicClassPrefix()}\\S+`, 4487 'g' 4488 ), 4489 i = e.getAttribute('class').match(t); 4490 null !== i && 4491 i.length > 0 && 4492 i.map((e) => e.trim()).forEach((t) => e.classList.remove(t)); 4493 } 4494 _getBasicClassPrefix() { 4495 return 'bs-tooltip'; 4496 } 4497 _handlePopperPlacementChange(e) { 4498 const { state: t } = e; 4499 t && 4500 ((this.tip = t.elements.popper), 4501 this._cleanTipClass(), 4502 this._addAttachmentClass(this._getAttachment(t.placement))); 4503 } 4504 _disposePopper() { 4505 this._popper && (this._popper.destroy(), (this._popper = null)); 4506 } 4507 static jQueryInterface(e) { 4508 return this.each(function () { 4509 const t = Tooltip.getOrCreateInstance(this, e); 4510 if ('string' == typeof e) { 4511 if (void 0 === t[e]) 4512 throw new TypeError(`No method named "${e}"`); 4513 t[e](); 4514 } 4515 }); 4516 } 4517 } 4518 defineJQueryPlugin(Tooltip); 4519 const NAME$3$1 = 'popover', 4520 Default$2$1 = { 4521 ...Tooltip.Default, 4522 placement: 'right', 4523 offset: [0, 8], 4524 trigger: 'click', 4525 content: '', 4526 template: 4527 '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>', 4528 }, 4529 DefaultType$2 = { 4530 ...Tooltip.DefaultType, 4531 content: '(string|element|function)', 4532 }, 4533 Event$1 = { 4534 HIDE: 'hide.bs.popover', 4535 HIDDEN: 'hidden.bs.popover', 4536 SHOW: 'show.bs.popover', 4537 SHOWN: 'shown.bs.popover', 4538 INSERTED: 'inserted.bs.popover', 4539 CLICK: 'click.bs.popover', 4540 FOCUSIN: 'focusin.bs.popover', 4541 FOCUSOUT: 'focusout.bs.popover', 4542 MOUSEENTER: 'mouseenter.bs.popover', 4543 MOUSELEAVE: 'mouseleave.bs.popover', 4544 }, 4545 SELECTOR_TITLE = '.popover-header'; 4546 class Popover extends Tooltip { 4547 static get Default() { 4548 return Default$2$1; 4549 } 4550 static get NAME() { 4551 return NAME$3$1; 4552 } 4553 static get Event() { 4554 return Event$1; 4555 } 4556 static get DefaultType() { 4557 return DefaultType$2; 4558 } 4559 isWithContent() { 4560 return this.getTitle() || this._getContent(); 4561 } 4562 setContent(e) { 4563 this._sanitizeAndSetContent(e, this.getTitle(), SELECTOR_TITLE), 4564 this._sanitizeAndSetContent( 4565 e, 4566 this._getContent(), 4567 '.popover-body' 4568 ); 4569 } 4570 _getContent() { 4571 return this._resolvePossibleFunction(this._config.content); 4572 } 4573 _getBasicClassPrefix() { 4574 return 'bs-popover'; 4575 } 4576 static jQueryInterface(e) { 4577 return this.each(function () { 4578 const t = Popover.getOrCreateInstance(this, e); 4579 if ('string' == typeof e) { 4580 if (void 0 === t[e]) 4581 throw new TypeError(`No method named "${e}"`); 4582 t[e](); 4583 } 4584 }); 4585 } 4586 } 4587 defineJQueryPlugin(Popover); 4588 const NAME$2$1 = 'scrollspy', 4589 EVENT_KEY$2$1 = '.bs.scrollspy', 4590 Default$1$1 = { offset: 10, method: 'auto', target: '' }, 4591 DefaultType$1 = { 4592 offset: 'number', 4593 method: 'string', 4594 target: '(string|element)', 4595 }, 4596 EVENT_ACTIVATE = 'activate.bs.scrollspy', 4597 EVENT_SCROLL = 'scroll.bs.scrollspy', 4598 EVENT_LOAD_DATA_API$3 = 'load.bs.scrollspy.data-api', 4599 SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]', 4600 SELECTOR_LINK_ITEMS = '.nav-link, .list-group-item, .dropdown-item'; 4601 class ScrollSpy extends BaseComponent$1 { 4602 constructor(e, t) { 4603 super(e), 4604 (this._scrollElement = 4605 'BODY' === this._element.tagName ? window : this._element), 4606 (this._config = this._getConfig(t)), 4607 (this._offsets = []), 4608 (this._targets = []), 4609 (this._activeTarget = null), 4610 (this._scrollHeight = 0), 4611 EventHandler$2.on(this._scrollElement, EVENT_SCROLL, () => 4612 this._process() 4613 ), 4614 this.refresh(), 4615 this._process(); 4616 } 4617 static get Default() { 4618 return Default$1$1; 4619 } 4620 static get NAME() { 4621 return NAME$2$1; 4622 } 4623 refresh() { 4624 const e = 4625 this._scrollElement === this._scrollElement.window 4626 ? 'offset' 4627 : 'position', 4628 t = 'auto' === this._config.method ? e : this._config.method, 4629 i = 'position' === t ? this._getScrollTop() : 0; 4630 (this._offsets = []), 4631 (this._targets = []), 4632 (this._scrollHeight = this._getScrollHeight()); 4633 SelectorEngine$2.find(SELECTOR_LINK_ITEMS, this._config.target) 4634 .map((e) => { 4635 const n = getSelectorFromElement$1(e), 4636 s = n ? SelectorEngine$2.findOne(n) : null; 4637 if (s) { 4638 const e = s.getBoundingClientRect(); 4639 if (e.width || e.height) 4640 return [Manipulator$1[t](s).top + i, n]; 4641 } 4642 return null; 4643 }) 4644 .filter((e) => e) 4645 .sort((e, t) => e[0] - t[0]) 4646 .forEach((e) => { 4647 this._offsets.push(e[0]), this._targets.push(e[1]); 4648 }); 4649 } 4650 dispose() { 4651 EventHandler$2.off(this._scrollElement, EVENT_KEY$2$1), 4652 super.dispose(); 4653 } 4654 _getConfig(e) { 4655 return ( 4656 ((e = { 4657 ...Default$1$1, 4658 ...Manipulator$1.getDataAttributes(this._element), 4659 ...('object' == typeof e && e ? e : {}), 4660 }).target = getElement$1(e.target) || document.documentElement), 4661 typeCheckConfig$1(NAME$2$1, e, DefaultType$1), 4662 e 4663 ); 4664 } 4665 _getScrollTop() { 4666 return this._scrollElement === window 4667 ? this._scrollElement.pageYOffset 4668 : this._scrollElement.scrollTop; 4669 } 4670 _getScrollHeight() { 4671 return ( 4672 this._scrollElement.scrollHeight || 4673 Math.max( 4674 document.body.scrollHeight, 4675 document.documentElement.scrollHeight 4676 ) 4677 ); 4678 } 4679 _getOffsetHeight() { 4680 return this._scrollElement === window 4681 ? window.innerHeight 4682 : this._scrollElement.getBoundingClientRect().height; 4683 } 4684 _process() { 4685 const e = this._getScrollTop() + this._config.offset, 4686 t = this._getScrollHeight(), 4687 i = this._config.offset + t - this._getOffsetHeight(); 4688 if ((this._scrollHeight !== t && this.refresh(), e >= i)) { 4689 const e = this._targets[this._targets.length - 1]; 4690 this._activeTarget !== e && this._activate(e); 4691 } else { 4692 if ( 4693 this._activeTarget && 4694 e < this._offsets[0] && 4695 this._offsets[0] > 0 4696 ) 4697 return (this._activeTarget = null), void this._clear(); 4698 for (let t = this._offsets.length; t--;) { 4699 this._activeTarget !== this._targets[t] && 4700 e >= this._offsets[t] && 4701 (void 0 === this._offsets[t + 1] || 4702 e < this._offsets[t + 1]) && 4703 this._activate(this._targets[t]); 4704 } 4705 } 4706 } 4707 _activate(e) { 4708 (this._activeTarget = e), this._clear(); 4709 const t = SELECTOR_LINK_ITEMS.split(',').map( 4710 (t) => `${t}[data-bs-target="${e}"],${t}[href="${e}"]` 4711 ), 4712 i = SelectorEngine$2.findOne(t.join(','), this._config.target); 4713 i.classList.add('active'), 4714 i.classList.contains('dropdown-item') 4715 ? SelectorEngine$2.findOne( 4716 '.dropdown-toggle', 4717 i.closest('.dropdown') 4718 ).classList.add('active') 4719 : SelectorEngine$2.parents(i, '.nav, .list-group').forEach( 4720 (e) => { 4721 SelectorEngine$2.prev( 4722 e, 4723 '.nav-link, .list-group-item' 4724 ).forEach((e) => e.classList.add('active')), 4725 SelectorEngine$2.prev(e, '.nav-item').forEach( 4726 (e) => { 4727 SelectorEngine$2.children( 4728 e, 4729 '.nav-link' 4730 ).forEach((e) => 4731 e.classList.add('active') 4732 ); 4733 } 4734 ); 4735 } 4736 ), 4737 EventHandler$2.trigger(this._scrollElement, EVENT_ACTIVATE, { 4738 relatedTarget: e, 4739 }); 4740 } 4741 _clear() { 4742 SelectorEngine$2.find(SELECTOR_LINK_ITEMS, this._config.target) 4743 .filter((e) => e.classList.contains('active')) 4744 .forEach((e) => e.classList.remove('active')); 4745 } 4746 static jQueryInterface(e) { 4747 return this.each(function () { 4748 const t = ScrollSpy.getOrCreateInstance(this, e); 4749 if ('string' == typeof e) { 4750 if (void 0 === t[e])
4751 throw new TypeError(`No method named "${e}"`); 4752 t[e](); 4753 } 4754 }); 4755 } 4756 } 4757 EventHandler$2.on(window, EVENT_LOAD_DATA_API$3, () => { 4758 SelectorEngine$2.find(SELECTOR_DATA_SPY).forEach( 4759 (e) => new ScrollSpy(e) 4760 ); 4761 }), 4762 defineJQueryPlugin(ScrollSpy); 4763 const EVENT_HIDE$1 = 'hide.bs.tab', 4764 EVENT_HIDDEN$1$1 = 'hidden.bs.tab', 4765 EVENT_SHOW$1$1 = 'show.bs.tab', 4766 EVENT_SHOWN$1 = 'shown.bs.tab', 4767 EVENT_CLICK_DATA_API$7 = 'click.bs.tab.data-api', 4768 SELECTOR_ACTIVE_UL = ':scope > li > .active', 4769 SELECTOR_DATA_TOGGLE$6 = 4770 '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', 4771 SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'; 4772 class Tab extends BaseComponent$1 { 4773 static get NAME() { 4774 return 'tab'; 4775 } 4776 show() { 4777 if ( 4778 this._element.parentNode && 4779 this._element.parentNode.nodeType === Node.ELEMENT_NODE && 4780 this._element.classList.contains('active') 4781 ) 4782 return; 4783 let e; 4784 const t = getElementFromSelector$1(this._element), 4785 i = this._element.closest('.nav, .list-group'); 4786 if (i) { 4787 const t = 4788 'UL' === i.nodeName || 'OL' === i.nodeName 4789 ? SELECTOR_ACTIVE_UL 4790 : '.active'; 4791 (e = SelectorEngine$2.find(t, i)), (e = e[e.length - 1]); 4792 } 4793 const n = e 4794 ? EventHandler$2.trigger(e, EVENT_HIDE$1, { 4795 relatedTarget: this._element, 4796 }) 4797 : null; 4798 if ( 4799 EventHandler$2.trigger(this._element, EVENT_SHOW$1$1, { 4800 relatedTarget: e, 4801 }).defaultPrevented || 4802 (null !== n && n.defaultPrevented) 4803 ) 4804 return; 4805 this._activate(this._element, i); 4806 const s = () => { 4807 EventHandler$2.trigger(e, EVENT_HIDDEN$1$1, { 4808 relatedTarget: this._element, 4809 }), 4810 EventHandler$2.trigger(this._element, EVENT_SHOWN$1, { 4811 relatedTarget: e, 4812 }); 4813 }; 4814 t ? this._activate(t, t.parentNode, s) : s(); 4815 } 4816 _activate(e, t, i) { 4817 const n = (!t || ('UL' !== t.nodeName && 'OL' !== t.nodeName) 4818 ? SelectorEngine$2.children(t, '.active') 4819 : SelectorEngine$2.find(SELECTOR_ACTIVE_UL, t))[0], 4820 s = i && n && n.classList.contains('fade'), 4821 o = () => this._transitionComplete(e, n, i); 4822 n && s 4823 ? (n.classList.remove('show'), this._queueCallback(o, e, !0)) 4824 : o(); 4825 } 4826 _transitionComplete(e, t, i) { 4827 if (t) { 4828 t.classList.remove('active'); 4829 const e = SelectorEngine$2.findOne( 4830 SELECTOR_DROPDOWN_ACTIVE_CHILD, 4831 t.parentNode 4832 ); 4833 e && e.classList.remove('active'), 4834 'tab' === t.getAttribute('role') && 4835 t.setAttribute('aria-selected', !1); 4836 } 4837 e.classList.add('active'), 4838 'tab' === e.getAttribute('role') && 4839 e.setAttribute('aria-selected', !0), 4840 reflow$1(e), 4841 e.classList.contains('fade') && e.classList.add('show'); 4842 let n = e.parentNode; 4843 if ( 4844 (n && 'LI' === n.nodeName && (n = n.parentNode), 4845 n && n.classList.contains('dropdown-menu')) 4846 ) { 4847 const t = e.closest('.dropdown'); 4848 t && 4849 SelectorEngine$2.find('.dropdown-toggle', t).forEach((e) => 4850 e.classList.add('active') 4851 ), 4852 e.setAttribute('aria-expanded', !0); 4853 } 4854 i && i(); 4855 } 4856 static jQueryInterface(e) { 4857 return this.each(function () { 4858 const t = Tab.getOrCreateInstance(this); 4859 if ('string' == typeof e) { 4860 if (void 0 === t[e])
4861 throw new TypeError(`No method named "${e}"`); 4862 t[e](); 4863 } 4864 }); 4865 } 4866 } 4867 EventHandler$2.on( 4868 document, 4869 EVENT_CLICK_DATA_API$7, 4870 SELECTOR_DATA_TOGGLE$6, 4871 function (e) { 4872 if ( 4873 (['A', 'AREA'].includes(this.tagName) && e.preventDefault(), 4874 isDisabled$1(this)) 4875 ) 4876 return; 4877 Tab.getOrCreateInstance(this).show(); 4878 } 4879 ), 4880 defineJQueryPlugin(Tab); 4881 const NAME$n = 'toast', 4882 EVENT_MOUSEOVER = 'mouseover.bs.toast', 4883 EVENT_MOUSEOUT = 'mouseout.bs.toast', 4884 EVENT_FOCUSIN = 'focusin.bs.toast', 4885 EVENT_FOCUSOUT = 'focusout.bs.toast', 4886 EVENT_HIDE$6 = 'hide.bs.toast', 4887 EVENT_HIDDEN$6 = 'hidden.bs.toast', 4888 EVENT_SHOW$6 = 'show.bs.toast', 4889 EVENT_SHOWN$6 = 'shown.bs.toast', 4890 DefaultType$b = { 4891 animation: 'boolean', 4892 autohide: 'boolean', 4893 delay: 'number', 4894 }, 4895 Default$b = { animation: !0, autohide: !0, delay: 5e3 }; 4896 class Toast extends BaseComponent$1 { 4897 constructor(e, t) { 4898 super(e), 4899 (this._config = this._getConfig(t)), 4900 (this._timeout = null), 4901 (this._hasMouseInteraction = !1), 4902 (this._hasKeyboardInteraction = !1), 4903 this._setListeners(); 4904 } 4905 static get DefaultType() { 4906 return DefaultType$b; 4907 } 4908 static get Default() { 4909 return Default$b; 4910 } 4911 static get NAME() { 4912 return NAME$n; 4913 } 4914 show() { 4915 if ( 4916 EventHandler$2.trigger(this._element, EVENT_SHOW$6) 4917 .defaultPrevented 4918 ) 4919 return; 4920 this._clearTimeout(), 4921 this._config.animation && this._element.classList.add('fade'); 4922 this._element.classList.remove('hide'), 4923 reflow$1(this._element), 4924 this._element.classList.add('show'), 4925 this._element.classList.add('showing'), 4926 this._queueCallback( 4927 () => { 4928 this._element.classList.remove('showing'), 4929 EventHandler$2.trigger( 4930 this._element, 4931 EVENT_SHOWN$6 4932 ), 4933 this._maybeScheduleHide(); 4934 }, 4935 this._element, 4936 this._config.animation 4937 ); 4938 } 4939 hide() { 4940 if (!this._element.classList.contains('show')) return; 4941 if ( 4942 EventHandler$2.trigger(this._element, EVENT_HIDE$6) 4943 .defaultPrevented 4944 ) 4945 return; 4946 this._element.classList.add('showing'), 4947 this._queueCallback( 4948 () => { 4949 this._element.classList.add('hide'), 4950 this._element.classList.remove('showing'), 4951 this._element.classList.remove('show'), 4952 EventHandler$2.trigger( 4953 this._element, 4954 EVENT_HIDDEN$6 4955 ); 4956 }, 4957 this._element, 4958 this._config.animation 4959 ); 4960 } 4961 dispose() { 4962 this._clearTimeout(), 4963 this._element.classList.contains('show') && 4964 this._element.classList.remove('show'), 4965 super.dispose(); 4966 } 4967 _getConfig(e) { 4968 return ( 4969 (e = { 4970 ...Default$b, 4971 ...Manipulator$1.getDataAttributes(this._element), 4972 ...('object' == typeof e && e ? e : {}), 4973 }), 4974 typeCheckConfig$1(NAME$n, e, this.constructor.DefaultType), 4975 e 4976 ); 4977 } 4978 _maybeScheduleHide() { 4979 this._config.autohide && 4980 (this._hasMouseInteraction || 4981 this._hasKeyboardInteraction || 4982 (this._timeout = setTimeout(() => { 4983 this.hide(); 4984 }, this._config.delay))); 4985 } 4986 _onInteraction(e, t) { 4987 switch (e.type) { 4988 case 'mouseover': 4989 case 'mouseout': 4990 this._hasMouseInteraction = t; 4991 break; 4992 case 'focusin': 4993 case 'focusout': 4994 this._hasKeyboardInteraction = t; 4995 } 4996 if (t) return void this._clearTimeout(); 4997 const i = e.relatedTarget; 4998 this._element === i || 4999 this._element.contains(i) || 5000 this._maybeScheduleHide(); 5001 } 5002 _setListeners() { 5003 EventHandler$2.on(this._element, EVENT_MOUSEOVER, (e) => 5004 this._onInteraction(e, !0) 5005 ), 5006 EventHandler$2.on(this._element, EVENT_MOUSEOUT, (e) => 5007 this._onInteraction(e, !1) 5008 ), 5009 EventHandler$2.on(this._element, EVENT_FOCUSIN, (e) => 5010 this._onInteraction(e, !0) 5011 ), 5012 EventHandler$2.on(this._element, EVENT_FOCUSOUT, (e) => 5013 this._onInteraction(e, !1) 5014 ); 5015 } 5016 _clearTimeout() { 5017 clearTimeout(this._timeout), (this._timeout = null); 5018 } 5019 static jQueryInterface(e) { 5020 return this.each(function () { 5021 const t = Toast.getOrCreateInstance(this, e); 5022 if ('string' == typeof e) { 5023 if (void 0 === t[e])
5024 throw new TypeError(`No method named "${e}"`); 5025 t[e](this); 5026 } 5027 }); 5028 } 5029 } 5030 enableDismissTrigger$1(Toast), defineJQueryPlugin(Toast); 5031 const loadPlugin = (o) => { }; 5032 var styleNode = document.createElement('style'); 5033 const __PUBLIC_PATH__ = window.__PUBLIC_PATH__ 5034 ? window.__PUBLIC_PATH__ 5035 : '/fonts'; 5036 (styleNode.innerHTML = `\n/* Titillium+Web:300,400,600,700 */\n\n/* titillium-web-300 - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: normal;\n font-weight: 300;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-300italic - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: italic;\n font-weight: 300;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-300italic.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-regular - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: normal;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-regular.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-italic - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: italic;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-italic.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-700 - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: normal;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-700italic - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: italic;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-700italic.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n/* titillium-web-600 - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: normal;\n font-weight: 600;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* titillium-web-600italic - latin-ext_latin */\n@font-face {\n font-family: 'Titillium Web';\n font-style: italic;\n font-weight: 600;\n src: url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Titillium/titillium-web-v10-latin-ext_latin-600italic.svg#TitilliumWeb') format('svg'); /* Legacy iOS */\n}\n\n/* Lora:400,700 */\n\n/* lora-regular - latin-ext_latin */\n@font-face {\n font-family: 'Lora';\n font-style: normal;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-regular.svg#Lora') format('svg'); /* Legacy iOS */\n}\n\n/* lora-700 - latin-ext_latin */\n@font-face {\n font-family: 'Lora';\n font-style: normal;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700.svg#Lora') format('svg'); /* Legacy iOS */\n}\n\n/* lora-italic - latin-ext_latin */\n@font-face {\n font-family: 'Lora';\n font-style: italic;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-italic.svg#Lora') format('svg'); /* Legacy iOS */\n}\n\n/* lora-700italic - latin-ext_latin */\n@font-face {\n font-family: 'Lora';\n font-style: italic;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Lora/lora-v20-latin-ext_latin-700italic.svg#Lora') format('svg'); /* Legacy iOS */\n}\n\n/* Roboto+Mono:400,700 */\n\n/* roboto-mono-regular - latin-ext_latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-regular.svg#RobotoMono') format('svg'); /* Legacy iOS */\n}\n\n/* roboto-mono-700 - latin-ext_latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: normal;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700.svg#RobotoMono') format('svg'); /* Legacy iOS */\n}\n\n/* roboto-mono-italic - latin-ext_latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: italic;\n font-weight: 400;\n src: url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-italic.svg#RobotoMono') format('svg'); /* Legacy iOS */\n}\n\n/* roboto-mono-700italic - latin-ext_latin */\n@font-face {\n font-family: 'Roboto Mono';\n font-style: italic;\n font-weight: 700;\n src: url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.eot'); /* IE9 Compat Modes */\n src: local(''),\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.woff2') format('woff2'), /* Super Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.woff') format('woff'), /* Modern Browsers */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.ttf') format('truetype'), /* Safari, Android, iOS */\n url('${__PUBLIC_PATH__}/Roboto_Mono/roboto-mono-v13-latin-ext_latin-700italic.svg#RobotoMono') format('svg'); /* Legacy iOS */\n}\n`), 5037 document.getElementsByTagName('head')[0].appendChild(styleNode); 5038 var fontsLoader = /*#__PURE__*/ Object.freeze({ __proto__: null }); 5039 var icons = /*#__PURE__*/ Object.freeze({ __proto__: null }); 5040 const TRANSITION_END = 'transitionend', 5041 getSelector = (e) => { 5042 let t = e.getAttribute('data-bs-target'); 5043 if (!t || '#' === t) { 5044 let n = e.getAttribute('href'); 5045 if (!n || (!n.includes('#') && !n.startsWith('.'))) return null; 5046 n.includes('#') && 5047 !n.startsWith('#') && 5048 (n = `#${n.split('#')[1]}`), 5049 (t = n && '#' !== n ? n.trim() : null); 5050 } 5051 return t; 5052 }, 5053 getSelectorFromElement = (e) => { 5054 const t = getSelector(e); 5055 return t && document.querySelector(t) ? t : null; 5056 }, 5057 getElementFromSelector = (e) => { 5058 const t = getSelector(e); 5059 return t ? document.querySelector(t) : null; 5060 }, 5061 getTransitionDurationFromElement = (e) => { 5062 if (!e) return 0; 5063 let { 5064
5064 transitionDuration: t, 5065 transitionDelay: n, 5066 } = window.getComputedStyle(e); 5067 const o = Number.parseFloat(t), 5068 r = Number.parseFloat(n); 5069 return o || r 5070 ? ((t = t.split(',')[0]), 5071 (n = n.split(',')[0]), 5072 1e3 * (Number.parseFloat(t) + Number.parseFloat(n))) 5073 : 0; 5074 }, 5075 triggerTransitionEnd = (e) => { 5076 e.dispatchEvent(new Event(TRANSITION_END)); 5077 }, 5078 isElement = (e) => 5079 !(!e || 'object' != typeof e) && 5080 (void 0 !== e.jquery && (e = e[0]), void 0 !== e.nodeType), 5081 getElement = (e) => 5082 isElement(e) 5083 ? e.jquery 5084 ? e[0] 5085 : e 5086 : 'string' == typeof e && e.length > 0 5087 ? document.querySelector(e) 5088 : null, 5089 typeCheckConfig = (e, t, n) => { 5090 Object.keys(n).forEach((o) => { 5091 const r = n[o], 5092 i = t[o], 5093 l = 5094 i && isElement(i) 5095 ? 'element' 5096 : null == (a = i) 5097 ? `${a}` 5098 : {}.toString 5099 .call(a) 5100 .match(/\s([a-z]+)/i)[1] 5101 .toLowerCase(); 5102 var a; 5103 if (!new RegExp(r).test(l)) 5104 throw new TypeError( 5105 `${e.toUpperCase()}: Option "${o}" provided type "${l}" but expected type "${r}".` 5106 ); 5107 }); 5108 }, 5109 isVisible = (e) => 5110 !(!isElement(e) || 0 === e.getClientRects().length) && 5111 'visible' === getComputedStyle(e).getPropertyValue('visibility'), 5112 isDisabled = (e) => 5113 !e || 5114 e.nodeType !== Node.ELEMENT_NODE || 5115 !!e.classList.contains('disabled') || 5116 (void 0 !== e.disabled 5117 ? e.disabled 5118 : e.hasAttribute('disabled') && 5119 'false' !== e.getAttribute('disabled')), 5120 reflow = (e) => { 5121 e.offsetHeight; 5122 }, 5123 getjQuery = () => { 5124 const { jQuery: e } = window; 5125 return e && !document.body.hasAttribute('data-bs-no-jquery') 5126 ? e 5127 : null; 5128 }, 5129 execute = (e) => { 5130 'function' == typeof e && e(); 5131 }, 5132 executeAfterTransition = (e, t, n = !0) => { 5133 if (!n) return void execute(e); 5134 const o = getTransitionDurationFromElement(t) + 5; 5135 let r = !1; 5136 const i = ({ target: n }) => { 5137 n === t && 5138 ((r = !0), 5139 t.removeEventListener(TRANSITION_END, i), 5140 execute(e)); 5141 }; 5142 t.addEventListener(TRANSITION_END, i), 5143 setTimeout(() => { 5144 r || triggerTransitionEnd(t); 5145 }, o); 5146 }; 5147 const SelectorEngine = { 5148 find: (e, t = document.documentElement) => 5149 [].concat(...Element.prototype.querySelectorAll.call(t, e)), 5150 findOne: (e, t = document.documentElement) => 5151 Element.prototype.querySelector.call(t, e), 5152 children: (e, t) => 5153 [].concat(...e.children).filter((e) => e.matches(t)), 5154 parents(e, t) { 5155 const n = []; 5156 let i = e.parentNode; 5157 for (; i && i.nodeType === Node.ELEMENT_NODE && 3 !== i.nodeType;) 5158 i.matches(t) && n.push(i), (i = i.parentNode); 5159 return n; 5160 }, 5161 prev(e, t) { 5162 let n = e.previousElementSibling; 5163 for (; n;) { 5164 if (n.matches(t)) return [n]; 5165 n = n.previousElementSibling; 5166 } 5167 return []; 5168 }, 5169 next(e, t) { 5170 let n = e.nextElementSibling; 5171 for (; n;) { 5172 if (n.matches(t)) return [n]; 5173 n = n.nextElementSibling; 5174 } 5175 return []; 5176 }, 5177 focusableChildren(e) { 5178 const t = [ 5179 'a', 5180 'button', 5181 'input', 5182 'textarea', 5183 'select', 5184 'details', 5185 '[tabindex]', 5186 '[contenteditable="true"]', 5187 ] 5188 .map((e) => `${e}:not([tabindex^="-"])`) 5189 .join(', '); 5190 return this.find(t, e).filter( 5191 (e) => !isDisabled(e) && isVisible(e) 5192 ); 5193 }, 5194 }; 5195 var SelectorEngine$1 = SelectorEngine; 5196 const SELECTOR_HEADER = '.it-header-sticky', 5197 SELECTOR_TOGGLER$1 = '.custom-navbar-toggler', 5198 SELECTOR_CLONED = '.cloned-element', 5199 toggleClonedElement = (e, n = !0) => { 5200 if (!isVisible(SelectorEngine$1.findOne(SELECTOR_TOGGLER$1, e))) { 5201 const t = SelectorEngine$1.findOne('.menu-wrapper', e); 5202 if (n) { 5203 const n = SelectorEngine$1.findOne('.it-brand-wrapper', e), 5204 l = SelectorEngine$1.findOne('.it-search-wrapper', e), 5205 E = SelectorEngine$1.findOne('.it-user-wrapper', e), 5206 o = n ? n.cloneNode(!0) : null, 5207 i = l ? l.cloneNode(!0) : null, 5208 r = E ? E.cloneNode(!0) : null; 5209 o && 5210 t 5211 .insertBefore(o, t.childNodes[0]) 5212 .classList.add('cloned-element'), 5213 i && t.appendChild(i).classList.add('cloned-element'), 5214 r && 5215 (t.appendChild(r).classList.add('cloned-element'), 5216 t.appendChild(r).classList.remove('show')); 5217 } else 5218 SelectorEngine$1.find(SELECTOR_CLONED, e).forEach((e) => { 5219 e.parentElement.removeChild(e); 5220 }); 5221 } 5222 };
5223 SelectorEngine$1.find(SELECTOR_HEADER).forEach((e) => { 5224 var n; 5225 (n = e).addEventListener('on.bs.sticky', () => 5226 toggleClonedElement(n, !0) 5227 ), 5228 n.addEventListener('off.bs.sticky', () => 5229 toggleClonedElement(n, !1) 5230 ); 5231 }); 5232 var headerSticky = /*#__PURE__*/ Object.freeze({ __proto__: null }); 5233 var BOOTSTRAP_ITALIA_VERSION = '2.0.6'; 5234 /*! 5235 * Splide.js 5236 * Version : 3.6.12 5237 * License : MIT 5238 * Copyright: 2022 Naotoshi Fujita 5239 */ const STATES = { 5240 CREATED: 1, 5241 MOUNTED: 2, 5242 IDLE: 3, 5243 MOVING: 4, 5244 DESTROYED: 5, 5245 }; 5246 function empty(t) { 5247 t.length = 0; 5248 } 5249 function isObject$1(t) { 5250 return !isNull(t) && 'object' == typeof t; 5251 } 5252 function isArray$1(t) { 5253 return Array.isArray(t); 5254 } 5255 function isFunction$1(t) { 5256 return 'function' == typeof t; 5257 } 5258 function isString$1(t) { 5259 return 'string' == typeof t; 5260 } 5261 function isUndefined(t) { 5262 return void 0 === t; 5263 } 5264 function isNull(t) { 5265 return null === t; 5266 } 5267 function isHTMLElement(t) { 5268 return t instanceof HTMLElement; 5269 } 5270 function toArray$1(t) { 5271 return isArray$1(t) ? t : [t]; 5272 } 5273 function forEach(t, e) { 5274 toArray$1(t).forEach(e); 5275 } 5276 function includes(t, e) { 5277 return t.indexOf(e) > -1; 5278 } 5279 function push(t, e) { 5280 return t.push(...toArray$1(e)), t; 5281 } 5282 const arrayProto = Array.prototype; 5283 function slice(t, e, n) { 5284 return arrayProto.slice.call(t, e, n); 5285 } 5286 function find(t, e) { 5287 return slice(t).filter(e)[0]; 5288 } 5289 function toggleClass(t, e, n) { 5290 t && 5291 forEach(e, (e) => { 5292 e && t.classList[n ? 'add' : 'remove'](e); 5293 }); 5294 } 5295 function addClass(t, e) { 5296 toggleClass(t, isString$1(e) ? e.split(' ') : e, !0); 5297 } 5298 function append(t, e) { 5299 forEach(e, t.appendChild.bind(t)); 5300 } 5301 function before(t, e) { 5302 forEach(t, (t) => { 5303 const n = e.parentNode; 5304 n && n.insertBefore(t, e); 5305 }); 5306 } 5307 function matches(t, e) { 5308 return ( 5309 isHTMLElement(t) && (t.msMatchesSelector || t.matches).call(t, e) 5310 ); 5311 } 5312 function children(t, e) { 5313 return t ? slice(t.children).filter((t) => matches(t, e)) : []; 5314 } 5315 function child(t, e) { 5316 return e ? children(t, e)[0] : t.firstElementChild; 5317 } 5318 function forOwn(t, e, n) { 5319 if (t) { 5320 let i = Object.keys(t); 5321 i = n ? i.reverse() : i; 5322 for (let n = 0; n < i.length; n++) { 5323 const s = i[n]; 5324 if ('__proto__' !== s && !1 === e(t[s], s)) break; 5325 } 5326 } 5327 return t; 5328 } 5329 function assign(t) { 5330 return ( 5331 slice(arguments, 1).forEach((e) => { 5332 forOwn(e, (n, i) => { 5333 t[i] = e[i]; 5334 }); 5335 }), 5336 t 5337 ); 5338 } 5339 function merge(t, e) { 5340 return ( 5341 forOwn(e, (e, n) => { 5342 isArray$1(e) 5343 ? (t[n] = e.slice()) 5344 : isObject$1(e) 5345 ? (t[n] = merge(isObject$1(t[n]) ? t[n] : {}, e)) 5346 : (t[n] = e); 5347 }), 5348 t 5349 ); 5350 } 5351 function removeAttribute(t, e) { 5352 t && 5353 forEach(e, (e) => { 5354 t.removeAttribute(e); 5355 }); 5356 } 5357 function setAttribute(t, e, n) { 5358 isObject$1(e) 5359 ? forOwn(e, (e, n) => { 5360 setAttribute(t, n, e); 5361 }) 5362 : isNull(n) 5363 ? removeAttribute(t, e) 5364 : t.setAttribute(e, String(n)); 5365 } 5366 function create(t, e, n) { 5367 const i = document.createElement(t); 5368 return ( 5369 e && (isString$1(e) ? addClass(i, e) : setAttribute(i, e)), 5370 n && append(n, i), 5371 i 5372 ); 5373 } 5374 function style(t, e, n) { 5375 if (isUndefined(n)) return getComputedStyle(t)[e]; 5376 if (!isNull(n)) { 5377 const { style: i } = t; 5378 (n = `${n}`), i[e] !== n && (i[e] = n); 5379 } 5380 } 5381 function display(t, e) { 5382 style(t, 'display', e); 5383 } 5384 function focus(t) { 5385 (t.setActive && t.setActive()) || t.focus({ preventScroll: !0 }); 5386 } 5387 function getAttribute$1(t, e) { 5388 return t.getAttribute(e); 5389 } 5390 function hasClass(t, e) { 5391 return t && t.classList.contains(e); 5392 } 5393 function rect(t) { 5394 return t.getBoundingClientRect(); 5395 } 5396 function remove(t) {
5397 forEach(t, (t) => { 5398 t && t.parentNode && t.parentNode.removeChild(t); 5399 }); 5400 } 5401 function measure(t, e) { 5402 if (isString$1(e)) { 5403 const n = create( 5404 'div', 5405 { style: `width: ${e}; position: absolute;` }, 5406 t 5407 ); 5408 (e = rect(n).width), remove(n); 5409 } 5410 return e; 5411 } 5412 function parseHtml(t) { 5413 return child(new DOMParser().parseFromString(t, 'text/html').body); 5414 } 5415 function prevent(t, e) { 5416 t.preventDefault(), 5417 e && (t.stopPropagation(), t.stopImmediatePropagation()); 5418 } 5419 function query(t, e) { 5420 return t && t.querySelector(e); 5421 } 5422 function queryAll(t, e) { 5423 return slice(t.querySelectorAll(e)); 5424 } 5425 function removeClass(t, e) { 5426 toggleClass(t, e, !1); 5427 } 5428 function unit(t) { 5429 return isString$1(t) ? t : t ? `${t}px` : ''; 5430 } 5431 function assert(t, e = '') { 5432 if (!t) throw new Error(`[splide] ${e}`); 5433 } 5434 function nextTick(t) { 5435 setTimeout(t); 5436 } 5437 const noop = () => { }; 5438 function raf(t) { 5439 return requestAnimationFrame(t); 5440 } 5441 const { min: min, max: max, floor: floor, ceil: ceil, abs: abs } = Math; 5442 function approximatelyEqual(t, e, n) { 5443 return abs(t - e) < n; 5444 } 5445 function between(t, e, n, i) { 5446 const s = min(e, n), 5447 o = max(e, n); 5448 return i ? s < t && t < o : s <= t && t <= o; 5449 } 5450 function clamp(t, e, n) { 5451 const i = min(e, n), 5452 s = max(e, n); 5453 return min(max(i, t), s); 5454 } 5455 function sign(t) { 5456 return +(t > 0) - +(t < 0); 5457 } 5458 function format(t, e) { 5459 return ( 5460 forEach(e, (e) => { 5461 t = t.replace('%s', `${e}`); 5462 }), 5463 t 5464 ); 5465 } 5466 function pad(t) { 5467 return t < 10 ? `0${t}` : `${t}`; 5468 } 5469 const ids = {}; 5470 function uniqueId(t) { 5471 return `${t}${pad((ids[t] = (ids[t] || 0) + 1))}`; 5472 } 5473 function EventBus() { 5474 let t = {}; 5475 function e(e, i) { 5476 n(e, (e, n) => { 5477 const s = t[e]; 5478 t[e] = 5479 s && 5480 s.filter((t) => 5481 t._key ? t._key !== i : i || t._namespace !== n 5482 ); 5483 }); 5484 } 5485 function n(t, e) { 5486 toArray$1(t) 5487 .join(' ') 5488 .split(' ') 5489 .forEach((t) => { 5490 const n = t.split('.'); 5491 e(n[0], n[1]); 5492 }); 5493 } 5494 return { 5495 on: function (e, i, s, o = 10) { 5496 n(e, (e, n) => { 5497 (t[e] = t[e] || []), 5498 push(t[e], { 5499 _event: e, 5500 _callback: i, 5501 _namespace: n, 5502 _priority: o, 5503 _key: s, 5504 }).sort((t, e) => t._priority - e._priority); 5505 }); 5506 }, 5507 off: e, 5508 offBy: function (n) { 5509 forOwn(t, (t, i) => { 5510 e(i, n); 5511 }); 5512 }, 5513 emit: function (e) { 5514 (t[e] || []).forEach((t) => { 5515 t._callback.apply(t, slice(arguments, 1)); 5516 }); 5517 }, 5518 destroy: function () { 5519 t = {}; 5520 }, 5521 }; 5522 } 5523 function EventInterface(t) { 5524 const { event: e } = t, 5525 n = {}; 5526 let i = []; 5527 function s(t, e, n) { 5528 o(t, e, (t, e) => { 5529 i = i.filter( 5530 (i) => 5531 !!(i[0] !== t || i[1] !== e || (n && i[2] !== n)) || 5532 (t.removeEventListener(e, i[2], i[3]), !1) 5533 ); 5534 }); 5535 } 5536 function o(t, e, n) { 5537 forEach(t, (t) => { 5538 t && e.split(' ').forEach(n.bind(null, t)); 5539 }); 5540 } 5541 function r() { 5542 (i = i.filter((t) => s(t[0], t[1]))), e.offBy(n); 5543 } 5544 return ( 5545 e.on('destroy', r, n), 5546 { 5547 on: function (t, i, s) { 5548 e.on(t, i, n, s); 5549 }, 5550 off: function (t) { 5551 e.off(t, n); 5552 }, 5553 emit: e.emit, 5554 bind: function (t, e, n, s) { 5555 o(t, e, (t, e) => { 5556 i.push([t, e, n, s]), t.addEventListener(e, n, s); 5557 }); 5558 }, 5559 unbind: s, 5560 destroy: r, 5561 } 5562 ); 5563 } 5564 function RequestInterval(t, e, n, i) { 5565 const { now: s } = Date; 5566 let o, 5567 r, 5568 c = 0, 5569 l = !0, 5570 a = 0; 5571 function u() { 5572 if (!l) { 5573 const r = s() - o; 5574 if ( 5575 (r >= t ? ((c = 1), (o = s())) : (c = r / t), 5576 n && n(c), 5577 1 === c && (e(), i && ++a >= i)) 5578 ) 5579 return d(); 5580 raf(u); 5581 } 5582 } 5583 function d() { 5584 l = !0; 5585 } 5586 function f() { 5587 cancelAnimationFrame(r), (c = 0), (r = 0), (l = !0); 5588 } 5589 return { 5590 start: function (e) { 5591 !e && f(), (o = s() - (e ? c * t : 0)), (l = !1), raf(u); 5592 }, 5593 rewind: function () { 5594 (o = s()), (c = 0), n && n(c); 5595 }, 5596 pause: d, 5597 cancel: f, 5598 set: function (e) { 5599 t = e; 5600 }, 5601 isPaused: function () { 5602 return l; 5603 }, 5604 }; 5605 } 5606 function State(t) { 5607 let e = t; 5608 return { 5609 set: function (t) { 5610 e = t; 5611 }, 5612 is: function (t) { 5613 return includes(toArray$1(t), e); 5614 }, 5615 }; 5616 } 5617 function Throttle(t, e) { 5618 let n; 5619 return function () { 5620 n || 5621 ((n = RequestInterval( 5622 e || 0, 5623 () => { 5624 t.apply(this, arguments), (n = null); 5625 }, 5626 null, 5627 1 5628 )), 5629 n.start()); 5630 }; 5631 } 5632 function Options(t, e, n) { 5633 const i = Throttle(l); 5634 let s, o, r; 5635 function c(t) { 5636 t && removeEventListener('resize', i); 5637 } 5638 function l() { 5639 const e = find(o, (t) => t[1].matches) || []; 5640 e[0] !== r && 5641 (function (e) { 5642 const i = n.breakpoints[e] || s; 5643 i.destroy 5644 ? ((t.options = s), 5645 t.destroy('completely' === i.destroy)) 5646 : (t.state.is(5) && (c(!0), t.mount()), 5647 (t.options = i)); 5648 }
5648)((r = e[0])); 5649 } 5650 return { 5651 setup: function () { 5652 try { 5653 merge(n, JSON.parse(getAttribute$1(t.root, 'data-splide'))); 5654 } catch (t) { 5655 assert(!1, t.message); 5656 } 5657 s = merge({}, n); 5658 const { breakpoints: e } = n; 5659 if (e) { 5660 const t = 'min' === n.mediaQuery; 5661 (o = Object.keys(e) 5662 .sort((e, n) => (t ? +n - +e : +e - +n)) 5663 .map((e) => [ 5664 e, 5665 matchMedia(`(${t ? 'min' : 'max'}-width:${e}px)`), 5666 ])), 5667 l(); 5668 } 5669 }, 5670 mount: function () { 5671 o && addEventListener('resize', i); 5672 }, 5673 destroy: c, 5674 }; 5675 } 5676 const RTL = 'rtl', 5677 TTB = 'ttb', 5678 ORIENTATION_MAP = { 5679 marginRight: ['marginBottom', 'marginLeft'], 5680 autoWidth: ['autoHeight'], 5681 fixedWidth: ['fixedHeight'], 5682 paddingLeft: ['paddingTop', 'paddingRight'], 5683 paddingRight: ['paddingBottom', 'paddingLeft'], 5684 width: ['height'], 5685 left: ['top', 'right'], 5686 right: ['bottom', 'left'], 5687 x: ['y'], 5688 X: ['Y'], 5689 Y: ['X'], 5690 ArrowLeft: ['ArrowUp', 'ArrowRight'], 5691 ArrowRight: ['ArrowDown', 'ArrowLeft'], 5692 }; 5693 function Direction(t, e, n) { 5694 return { 5695 resolve: function (t, e) { 5696 const { direction: i } = n; 5697 return ( 5698 ORIENTATION_MAP[t][ 5699 i !== RTL || e ? (i === TTB ? 0 : -1) : 1 5700 ] || t 5701 ); 5702 }, 5703 orient: function (t) { 5704 return t * (n.direction === RTL ? 1 : -1); 5705 }, 5706 }; 5707 } 5708 const CLASS_ROOT = 'splide', 5709 CLASS_SLIDE = 'splide__slide', 5710 CLASS_CLONE = 'splide__slide--clone', 5711 CLASS_CONTAINER = 'splide__slide__container', 5712 CLASS_ARROWS = 'splide__arrows', 5713 CLASS_ARROW = 'splide__arrow', 5714 CLASS_ARROW_PREV = 'splide__arrow--prev', 5715 CLASS_ARROW_NEXT = 'splide__arrow--next', 5716 CLASS_PAGINATION = 'splide__pagination', 5717 CLASS_PAGINATION_PAGE = 'splide__pagination__page', 5718 CLASS_SPINNER = 'splide__spinner', 5719 CLASS_ACTIVE = 'is-active', 5720 STATUS_CLASSES = [ 5721 CLASS_ACTIVE, 5722 'is-visible', 5723 'is-prev', 5724 'is-next', 5725 'is-loading', 5726 ], 5727 CLASSES = { 5728 slide: CLASS_SLIDE, 5729 clone: CLASS_CLONE, 5730 arrows: CLASS_ARROWS, 5731 arrow: CLASS_ARROW, 5732 prev: CLASS_ARROW_PREV, 5733 next: CLASS_ARROW_NEXT, 5734 pagination: CLASS_PAGINATION, 5735 page: CLASS_PAGINATION_PAGE, 5736 spinner: CLASS_SPINNER, 5737 }; 5738 function Elements(t, e, n) { 5739 const { on: i } = EventInterface(t), 5740 { root: s } = t, 5741 o = {}, 5742 r = []; 5743 let c, l, a, u; 5744 function d() { 5745 !(function () { 5746 (l = child(s, '.splide__slider')), 5747 (a = query(s, '.splide__track')), 5748 (u = child(a, '.splide__list')), 5749 assert(a && u, 'A track/list element is missing.'), 5750 push(r, children(u, `.splide__slide:not(.${CLASS_CLONE})`)); 5751 const t = h('.splide__autoplay'), 5752 e = h('.splide__arrows'); 5753 assign(o, { 5754 root: s, 5755 slider: l, 5756 track: a, 5757 list: u, 5758 slides: r, 5759 arrows: e, 5760 autoplay: t, 5761 prev: query(e, '.splide__arrow--prev'), 5762 next: query(e, '.splide__arrow--next'), 5763 bar: query( 5764 h('.splide__progress'), 5765 '.splide__progress__bar' 5766 ), 5767 play: query(t, '.splide__play'), 5768 pause: query(t, '.splide__pause'), 5769 }); 5770 })(), 5771 (function () { 5772 const t = s.id || uniqueId('splide'); 5773 (s.id = t), 5774 (a.id = a.id || `${t}-track`), 5775 (u.id = u.id || `${t}-list`); 5776 })(), 5777 addClass(s, (c = S())); 5778 } 5779 function f() { 5780 [s, a, u].forEach((t) => { 5781 removeAttribute(t, 'style'); 5782 }), 5783 empty(r), 5784 removeClass(s, c); 5785 } 5786 function E() { 5787 f(), d(); 5788 } 5789 function p() { 5790 removeClass(s, c), addClass(s, (c = S())); 5791 } 5792 function h(t) { 5793 return child(s, t) || child(l, t); 5794 } 5795 function S() { 5796 return [ 5797 `${CLASS_ROOT}--${n.type}`, 5798 `${CLASS_ROOT}--${n.direction}`, 5799 n.drag && `${CLASS_ROOT}--draggable`, 5800 n.isNavigation && `${CLASS_ROOT}--nav`, 5801 CLASS_ACTIVE, 5802 ]; 5803 } 5804 return assign(o, { 5805 setup: d, 5806 mount: function () { 5807 i('refresh', E, 8), i('updated', p); 5808 }, 5809 destroy: f, 5810 }); 5811 } 5812 const ROLE = 'role', 5813 ARIA_CONTROLS = 'aria-controls', 5814 ARIA_CURRENT = 'aria-current', 5815 ARIA_LABEL = 'aria-label', 5816 ARIA_HIDDEN = 'aria-hidden', 5817 TAB_INDEX = 'tabindex', 5818 DISABLED = 'disabled', 5819 ARIA_ORIENTATION = 'aria-orientation', 5820 ALL_ATTRIBUTES = [ 5821 ROLE,
5822 ARIA_CONTROLS, 5823 ARIA_CURRENT, 5824 ARIA_LABEL, 5825 ARIA_HIDDEN, 5826 ARIA_ORIENTATION, 5827 TAB_INDEX, 5828 DISABLED, 5829 ], 5830 SLIDE = 'slide', 5831 LOOP = 'loop', 5832 FADE = 'fade'; 5833 function Slide$1(t, e, n, i) { 5834 const { on: s, emit: o, bind: r, destroy: c } = EventInterface(t), 5835 { Components: l, root: a, options: u } = t, 5836 { isNavigation: d, updateOnMove: f } = u, 5837 { resolve: E } = l.Direction, 5838 p = getAttribute$1(i, 'style'), 5839 h = n > -1, 5840 S = child(i, `.${CLASS_CONTAINER}`), 5841 A = u.focusableNodes && queryAll(i, u.focusableNodes); 5842 let _; 5843 function g() { 5844 const s = h ? n : e, 5845 o = format(u.i18n.slideX, s + 1), 5846 r = t.splides.map((t) => t.splide.root.id).join(' '); 5847 setAttribute(i, ARIA_LABEL, o), 5848 setAttribute(i, ARIA_CONTROLS, r), 5849 setAttribute(i, ROLE, 'menuitem'), 5850 L(C()); 5851 } 5852 function T() { 5853 _ || m(); 5854 } 5855 function m() { 5856 if (!_) { 5857 const { index: n } = t; 5858 L(C()), 5859 (function (t) { 5860 const e = !t && (!C() || h); 5861 setAttribute(i, ARIA_HIDDEN, e || null), 5862 setAttribute( 5863 i, 5864 TAB_INDEX, 5865 !e && u.slideFocus ? 0 : null 5866 ), 5867 A && 5868 A.forEach((t) => { 5869 setAttribute(t, TAB_INDEX, e ? -1 : null); 5870 }); 5871 t !== hasClass(i, 'is-visible') && 5872 (toggleClass(i, 'is-visible', t), 5873 o(t ? 'visible' : 'hidden', I)); 5874 })( 5875 (function () { 5876 if (t.is(FADE)) return C(); 5877 const e = rect(l.Elements.track), 5878 n = rect(i), 5879 s = E('left'), 5880 o = E('right'); 5881 return ( 5882 floor(e[s]) <= ceil(n[s]) && 5883 floor(n[o]) <= ceil(e[o]) 5884 ); 5885 })() 5886 ), 5887 toggleClass(i, 'is-prev', e === n - 1), 5888 toggleClass(i, 'is-next', e === n + 1); 5889 } 5890 } 5891 function L(t) { 5892 t !== hasClass(i, CLASS_ACTIVE) && 5893 (toggleClass(i, CLASS_ACTIVE, t), 5894 d && setAttribute(i, ARIA_CURRENT, t || null), 5895 o(t ? 'active' : 'inactive', I)); 5896 } 5897 function C() { 5898 const { index: i } = t; 5899 return i === e || (u.cloneStatus && i === n); 5900 } 5901 const I = { 5902 index: e, 5903 slideIndex: n, 5904 slide: i, 5905 container: S, 5906 isClone: h, 5907 mount: function () { 5908 h || (i.id = `${a.id}-slide${pad(e + 1)}`), 5909 r(i, 'click keydown', (t) => { 5910 o('click' === t.type ? 'click' : 'slide:keydown', I, t); 5911 }), 5912 s( 5913 [ 5914 'refresh', 5915 'repositioned', 5916 'shifted', 5917 'moved', 5918 'scrolled', 5919 ], 5920 m 5921 ), 5922 s('navigation:mounted', g), 5923 f && s('move', T); 5924 }, 5925 destroy: function () { 5926 (_ = !0), 5927 c(), 5928 removeClass(i, STATUS_CLASSES), 5929 removeAttribute(i, ALL_ATTRIBUTES), 5930 setAttribute(i, 'style', p); 5931 }, 5932 update: m, 5933 style: function (t, e, n) { 5934 style((n && S) || i, t, e); 5935 }, 5936 isWithin: function (n, i) { 5937 let s = abs(n - e); 5938 return ( 5939 h || 5940 (!u.rewind && !t.is(LOOP)) || 5941 (s = min(s, t.length - s)), 5942 s <= i 5943 ); 5944 }, 5945 }; 5946 return I; 5947 } 5948 function Slides(t, e, n) { 5949 const { on: i, emit: s, bind: o } = EventInterface(t), 5950 { slides: r, list: c } = e.Elements, 5951 l = []; 5952 function a() { 5953 r.forEach((t, e) => { 5954 f(t, e, -1); 5955 }); 5956 } 5957 function u() { 5958 p((t) => { 5959 t.destroy(); 5960 }), 5961 empty(l); 5962 } 5963 function d() { 5964 u(), a(); 5965 } 5966 function f(e, n, i) { 5967 const s = Slide$1(t, n, i, e); 5968 s.mount(), l.push(s); 5969 } 5970 function E(t) { 5971 return t ? h((t) => !t.isClone) : l; 5972 } 5973 function p(t, e) { 5974 E(e).forEach(t); 5975 } 5976 function h(t) { 5977 return l.filter( 5978 isFunction$1(t) 5979 ? t 5980 : (e) => 5981 isString$1(t) 5982 ? matches(e.slide, t) 5983 : includes(toArray$1(t), e.index) 5984 ); 5985 } 5986 return { 5987 mount: function () { 5988 a(), 5989 i('refresh', d), 5990 i(['mounted', 'refresh'], () => { 5991 l.sort((t, e) => t.index - e.index); 5992 }); 5993 }, 5994 destroy: u, 5995 update: function () { 5996 p((t) => {
5997 t.update(); 5998 }); 5999 }, 6000 register: f, 6001 get: E, 6002 getIn: function (t) { 6003 const { Controller: i } = e, 6004 s = i.toIndex(t), 6005 o = i.hasFocus() ? 1 : n.perPage; 6006 return h((t) => between(t.index, s, s + o - 1)); 6007 }, 6008 getAt: function (t) { 6009 return h(t)[0]; 6010 }, 6011 add: function (t, e) { 6012 forEach(t, (t) => { 6013 if ( 6014 (isString$1(t) && (t = parseHtml(t)), isHTMLElement(t)) 6015 ) { 6016 const i = r[e]; 6017 i ? before(t, i) : append(c, t), 6018 addClass(t, n.classes.slide), 6019 (function (t, e) { 6020 const n = queryAll(t, 'img'); 6021 let { length: i } = n; 6022 i 6023 ? n.forEach((t) => { 6024 o(t, 'load error', () => { 6025 --i || e(); 6026 }); 6027 }) 6028 : e(); 6029 })(t, s.bind(null, 'resize')); 6030 } 6031 }), 6032 s('refresh'); 6033 }, 6034 remove: function (t) { 6035 remove(h(t).map((t) => t.slide)), s('refresh'); 6036 }, 6037 forEach: p, 6038 filter: h, 6039 style: function (t, e, n) { 6040 p((i) => { 6041 i.style(t, e, n); 6042 }); 6043 }, 6044 getLength: function (t) { 6045 return t ? r.length : l.length; 6046 }, 6047 isEnough: function () { 6048 return l.length > n.perPage; 6049 }, 6050 }; 6051 } 6052 function Layout(t, e, n) { 6053 const { on: i, bind: s, emit: o } = EventInterface(t), 6054 { Slides: r } = e, 6055 { resolve: c } = e.Direction, 6056 { root: l, track: a, list: u } = e.Elements, 6057 { getAt: d } = r; 6058 let f, E; 6059 function p() { 6060 (E = null), 6061 (f = n.direction === TTB), 6062 style(l, 'maxWidth', unit(n.width)), 6063 style(a, c('paddingLeft'), S(!1)), 6064 style(a, c('paddingRight'), S(!0)), 6065 h(); 6066 } 6067 function h() { 6068 const t = rect(l); 6069 (E && E.width === t.width && E.height === t.height) || 6070 (style( 6071 a, 6072 'height', 6073 (function () { 6074 let t = ''; 6075 f && 6076 ((t = A()), 6077 assert(t, 'height or heightRatio is missing.'), 6078 (t = `calc(${t} - ${S(!1)} - ${S(!0)})`)); 6079 return t; 6080 })() 6081 ), 6082 r.style(c('marginRight'), unit(n.gap)), 6083 r.style( 6084 'width', 6085 (n.autoWidth ? '' : unit(n.fixedWidth) || (f ? '' : _())) || 6086 null 6087 ), 6088 r.style( 6089 'height', 6090 unit(n.fixedHeight) || 6091 (f ? (n.autoHeight ? '' : _()) : A()) || 6092 null, 6093 !0 6094 ), 6095 (E = t), 6096 o('resized')); 6097 } 6098 function S(t) { 6099 const { padding: e } = n, 6100 i = c(t ? 'right' : 'left'); 6101 return (e && unit(e[i] || (isObject$1(e) ? 0 : e))) || '0px'; 6102 } 6103 function A() { 6104 return unit(n.height || rect(u).width * n.heightRatio); 6105 } 6106 function _() { 6107 const t = unit(n.gap); 6108 return `calc((100%${t && ` + ${t}`})/${n.perPage || 1}${t && ` - ${t}` 6109 })`; 6110 } 6111 function g(t, e) { 6112 const n = d(t); 6113 if (n) { 6114 const t = rect(n.slide)[c('right')], 6115 i = rect(u)[c('left')]; 6116 return abs(t - i) + (e ? 0 : T()); 6117 } 6118 return 0; 6119 } 6120 function T() { 6121 const t = d(0); 6122 return (t && parseFloat(style(t.slide, c('marginRight')))) || 0; 6123 } 6124 return { 6125 mount: function () { 6126 p(), 6127 s(window, 'resize load', Throttle(o.bind(this, 'resize'))), 6128 i(['updated', 'refresh'], p), 6129 i('resize', h); 6130 }, 6131 listSize: function () { 6132 return rect(u)[c('width')]; 6133 }, 6134 slideSize: function (t, e) { 6135 const n = d(t || 0); 6136 return n ? rect(n.slide)[c('width')] + (e ? 0 : T()) : 0; 6137 }, 6138 sliderSize: function () { 6139 return g(t.length - 1, !0) - g(-1, !0); 6140 }, 6141 totalSize: g, 6142 getPadding: function (t) { 6143 return ( 6144 parseFloat( 6145 style(a, c('padding' + (t ? 'Right' : 'Left'))) 6146 ) || 0 6147 ); 6148 }, 6149 }; 6150 } 6151 function Clones(t, e, n) { 6152 const { on: i, emit: s } = EventInterface(t), 6153 { Elements: o, Slides: r } = e, 6154 { resolve: c } = e.Direction, 6155 l = []; 6156 let a; 6157 function u() { 6158 (a = p()) && 6159 (!(function (e) { 6160 const i = r.get().slice(), 6161 { length: s } = i; 6162 if (s) { 6163 for (; i.length < e;) push(i, i);
6164 push(i.slice(-e), i.slice(0, e)).forEach((c, a) => { 6165 const u = a < e, 6166 d = (function (e, i) { 6167 const s = e.cloneNode(!0); 6168 return ( 6169 addClass(s, n.classes.clone), 6170 (s.id = `${t.root.id}-clone${pad( 6171 i + 1 6172 )}`), 6173 s 6174 ); 6175 })(c.slide, a); 6176 u ? before(d, i[0].slide) : append(o.list, d), 6177 push(l, d), 6178 r.register(d, a - e + (u ? 0 : s), c.index); 6179 }); 6180 } 6181 })(a), 6182 s('resize')); 6183 } 6184 function d() { 6185 remove(l), empty(l); 6186 } 6187 function f() { 6188 d(), u(); 6189 } 6190 function E() { 6191 a < p() && s('refresh'); 6192 } 6193 function p() { 6194 let { clones: e } = n; 6195 if (t.is(LOOP)) { 6196 if (!e) { 6197 const i = measure(o.list, n[c('fixedWidth')]); 6198 e = 6199 ((i && ceil(rect(o.track)[c('width')] / i)) || 6200 (n[c('autoWidth')] && t.length) || 6201 n.perPage) * 6202 (n.drag ? (n.flickMaxPages || 1) + 1 : 2); 6203 } 6204 } else e = 0; 6205 return e; 6206 } 6207 return { 6208 mount: function () { 6209 u(), i('refresh', f), i(['updated', 'resize'], E); 6210 }, 6211 destroy: d, 6212 }; 6213 } 6214 function Move(t, e, n) { 6215 const { on: i, emit: s } = EventInterface(t), 6216 { 6217 slideSize: o, 6218 getPadding: r, 6219 totalSize: c, 6220 listSize: l, 6221 sliderSize: a, 6222 } = e.Layout, 6223 { resolve: u, orient: d } = e.Direction, 6224 { list: f, track: E } = e.Elements; 6225 let p; 6226 function h() { 6227 L() || (e.Scroll.cancel(), S(t.index), s('repositioned')); 6228 } 6229 function S(t) { 6230 A(g(t, !0)); 6231 } 6232 function A(e, n) { 6233 if (!t.is(FADE)) { 6234 const i = n 6235 ? e 6236 : (function (e) { 6237 if (t.is(LOOP)) { 6238 const t = d(e - T()), 6239 n = C(!1, e) && t < 0, 6240 i = C(!0, e) && t > 0; 6241 (n || i) && (e = _(e, i)); 6242 } 6243 return e; 6244 })(e); 6245 (f.style.transform = `translate${u('X')}(${i}px)`), 6246 e !== i && s('shifted'); 6247 } 6248 } 6249 function _(t, e) { 6250 const n = t - m(e), 6251 i = a(); 6252 return (t -= d(i * (ceil(abs(n) / i) || 1)) * (e ? 1 : -1)); 6253 } 6254 function g(e, i) { 6255 const s = d( 6256 c(e - 1) - 6257 (function (t) { 6258 const { focus: e } = n; 6259 return 'center' === e 6260 ? (l() - o(t, !0)) / 2 6261 : +e * o(t) || 0; 6262 })(e) 6263 ); 6264 return i 6265 ? (function (e) { 6266 n.trimSpace && 6267 t.is(SLIDE) && 6268 (e = clamp(e, 0, d(a() - l()))); 6269 return e; 6270 })(s) 6271 : s; 6272 } 6273 function T() { 6274 const t = u('left'); 6275 return rect(f)[t] - rect(E)[t] + d(r(!1)); 6276 } 6277 function m(t) { 6278 return g(t ? e.Controller.getEnd() : 0, !!n.trimSpace); 6279 } 6280 function L() { 6281 return t.state.is(4) && n.waitForTransition; 6282 } 6283 function C(t, e) { 6284 e = isUndefined(e) ? T() : e; 6285 const n = !0 !== t && d(e) < d(m(!1)), 6286 i = !1 !== t && d(e) > d(m(!0)); 6287 return n || i; 6288 } 6289 return { 6290 mount: function () { 6291 (p = e.Transition), 6292 i(['mounted', 'resized', 'updated', 'refresh'], h); 6293 }, 6294 destroy: function () { 6295 removeAttribute(f, 'style'); 6296 }, 6297 move: function (i, o, r, c) { 6298 if (!L()) { 6299 const { set: l } = t.state, 6300 a = T(); 6301 i !== o && (p.cancel(), A(_(a, i > o), !0)), 6302 l(4), 6303 s('move', o, r, i), 6304 p.start(o, () => { 6305 l(3), 6306 s('moved', o, r, i), 6307 'move' === n.trimSpace && i !== r && a === T() 6308 ? e.Controller.go(i > r ? '>' : '<', !1, c) 6309 : c && c(); 6310 }); 6311 } 6312 }, 6313 jump: S, 6314 translate: A, 6315 shift: _, 6316 cancel: function () { 6317 A(T()), p.cancel(); 6318 }, 6319 toIndex: function (t) { 6320 const n = e.Slides.get(); 6321 let i = 0, 6322 s = 1 / 0; 6323 for (let e = 0; e < n.length; e++) { 6324 const o = n[e].index, 6325 r = abs(g(o, !0) - t); 6326 if (!(r <= s)) break; 6327 (s = r), (i = o); 6328 } 6329 return i; 6330 }, 6331 toPosition: g, 6332 getPosition: T, 6333 getLimit: m, 6334 isBusy: L, 6335 exceededLimit: C, 6336 }; 6337 } 6338 function Controller(t, e, n) { 6339 const { on: i } = EventInterface(t), 6340 { Move: s } = e, 6341 { getPosition: o, getLimit: r }
6341 = s, 6342 { isEnough: c, getLength: l } = e.Slides, 6343 a = t.is(LOOP), 6344 u = t.is(SLIDE); 6345 let d, 6346 f, 6347 E, 6348 p = n.start || 0, 6349 h = p; 6350 function S() { 6351 (d = l(!0)), 6352 (f = n.perMove), 6353 (E = n.perPage), 6354 (p = clamp(p, 0, d - 1)); 6355 } 6356 function A(t, n, i, o, r) { 6357 const c = n ? t : O(t); 6358 e.Scroll.scroll(n || i ? s.toPosition(c, !0) : t, o, () => { 6359 y(s.toIndex(s.getPosition())), r && r(); 6360 }); 6361 } 6362 function _(t) { 6363 return T(!1, t); 6364 } 6365 function g(t) { 6366 return T(!0, t); 6367 } 6368 function T(t, e) { 6369 const n = f || (N() ? 1 : E), 6370 i = m(p + n * (t ? -1 : 1), p); 6371 return -1 === i && u && !approximatelyEqual(o(), r(!t), 1) 6372 ? t 6373 ? 0 6374 : L() 6375 : e 6376 ? i 6377 : C(i); 6378 } 6379 function m(t, e, i) { 6380 if (c()) { 6381 const s = L(); 6382 t < 0 || t > s 6383 ? (t = 6384 between(0, t, e, !0) || between(s, e, t, !0) 6385 ? I(R(t)) 6386 : a 6387 ? f || N() 6388 ? t 6389 : t < 0 6390 ? -(d % E || E) 6391 : d 6392 : n.rewind 6393 ? t < 0 6394 ? s 6395 : 0 6396 : -1) 6397 : i || t === e || (t = f ? t : I(R(e) + (t < e ? -1 : 1))); 6398 } else t = -1; 6399 return t; 6400 } 6401 function L() { 6402 let t = d - E; 6403 return (N() || (a && f)) && (t = d - 1), max(t, 0); 6404 } 6405 function C(t) { 6406 return a ? (c() ? (t % d) + (t < 0 ? d : 0) : -1) : t; 6407 } 6408 function I(t) { 6409 return clamp(N() ? t : E * t, 0, L()); 6410 } 6411 function R(t) { 6412 return ( 6413 N() || 6414 ((t = between(t, d - E, d - 1) ? d - 1 : t), 6415 (t = floor(t / E))), 6416 t 6417 ); 6418 } 6419 function O(t) { 6420 const e = s.toIndex(t); 6421 return u ? clamp(e, 0, L()) : e; 6422 } 6423 function y(t) { 6424 t !== p && ((h = p), (p = t)); 6425 } 6426 function N() { 6427 return !isUndefined(n.focus) || n.isNavigation; 6428 } 6429 return { 6430 mount: function () { 6431 S(), i(['updated', 'refresh'], S, 9); 6432 }, 6433 go: function (t, e, i) { 6434 const o = (function (t) { 6435 let e = p; 6436 if (isString$1(t)) { 6437 const [, n, i] = t.match(/([+\-<>])(\d+)?/) || []; 6438 '+' === n || '-' === n 6439 ? (e = m(p + +`${n}${+i || 1}`, p, !0)) 6440 : '>' === n 6441 ? (e = i ? I(+i) : _(!0)) 6442 : '<' === n && (e = g(!0)); 6443 } else e = a ? t : clamp(t, 0, L()); 6444 return e; 6445 })(t); 6446 if (n.useScroll) A(o, !0, !0, n.speed, i); 6447 else { 6448 const t = C(o); 6449 t > -1 && 6450 !s.isBusy() && 6451 (e || t !== p) && 6452 (y(t), s.move(o, t, h, i)); 6453 } 6454 }, 6455 scroll: A, 6456 getNext: _, 6457 getPrev: g, 6458 getAdjacent: T, 6459 getEnd: L, 6460 setIndex: y, 6461 getIndex: function (t) { 6462 return t ? h : p; 6463 }, 6464 toIndex: I, 6465 toPage: R, 6466 toDest: O, 6467 hasFocus: N, 6468 }; 6469 } 6470 const XML_NAME_SPACE = 'http://www.w3.org/2000/svg', 6471 PATH = 6472 'm15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z'; 6473 function Arrows(t, e, n) { 6474 const { on: i, bind: s, emit: o } = EventInterface(t), 6475 { classes: r, i18n: c } = n, 6476 { Elements: l, Controller: a } = e; 6477 let u, 6478 d = l.arrows, 6479 f = l.prev, 6480 E = l.next; 6481 const p = {}; 6482 function h() { 6483 if ( 6484 (n.arrows && 6485 ((f && E) || 6486 ((d = create('div', r.arrows)), 6487 (f = S(!0)), 6488 (E = S(!1)), 6489 (u = !0), 6490 append(d, [f, E]), 6491 before( 6492 d, 6493 child(('slider' === n.arrows && l.slider) || t.root) 6494 ))), 6495 f && E) 6496 ) 6497 if (p.prev) display(d, !1 === n.arrows ? 'none' : ''); 6498 else { 6499 const { id: t } = l.track; 6500 setAttribute(f, ARIA_CONTROLS, t), 6501 setAttribute(E, ARIA_CONTROLS, t), 6502 (p.prev = f), 6503 (p.next = E), 6504 (function () { 6505 const { go: t } = a; 6506 i( 6507 [ 6508 'mounted', 6509 'moved', 6510 'updated', 6511 'refresh', 6512 'scrolled', 6513 ], 6514 A 6515 ), 6516 s(E, 'click', () => { 6517 t('>', !0); 6518 }), 6519 s(f, 'click', () => { 6520 t('<', !0); 6521 }); 6522 })(), 6523 o('arrows:mounted', f, E); 6524 } 6525 } 6526 function S(t) { 6527 return parseHtml( 6528 `<button class="${r.arrow} ${t ? r.prev : r.next 6529 }" type="button"><svg xmlns="${XML_NAME_SPACE}" viewBox="0 0 40 40" width="40" height="40"><path d="${n.arrowPath || PATH 6530 }" />` 6531 ); 6532 } 6533 function A() { 6534 const e = t.index, 6535 n = a.getPrev(), 6536 i = a.getNext(), 6537 s = n > -1 && e < n ? c.last : c.prev, 6538 r = i > -1 && e > i ? c.first : c.next; 6539 (f.disabled = n < 0), 6540 (E.disabled = i < 0), 6541 setAttribute(f, ARIA_LABEL, s), 6542 setAttribute(E, ARIA_LABEL, r), 6543 o('arrows:updated', f, E, n, i); 6544 } 6545 return { 6546 arrows: p, 6547 mount: function () { 6548 h(), i('updated', h); 6549 }, 6550 destroy: function () { 6551 u 6552 ? remove(d) 6553 : (removeAttribute(f, ALL_ATTRIBUTES), 6554 removeAttribute(E, ALL_ATTRIBUTES)); 6555 }, 6556 }; 6557 } 6558 function Autoplay(t, e, n) { 6559 const { on: i, bind: s, emit: o } = EventInterface(t), 6560 r = RequestInterval(n.interval, t.go.bind(t, '>'), function (t) { 6561 const { bar: e } = l; 6562 e && style(e, 'width', 100 * t + '%'), o('autoplay:playing', t); 6563 }), 6564 { isPaused: c } = r, 6565 { Elements: l } = e; 6566 let a, u, d; 6567 function f(t) { 6568 const e = t ? 'pause' : 'play', 6569 i = l[e]; 6570 i && 6571 (setAttribute(i, ARIA_CONTROLS, l.track.id), 6572 setAttribute(i, ARIA_LABEL, n.i18n[e]), 6573 s(i, 'click', t ? p : E)); 6574 } 6575 function E() { 6576 c() && 6577 e.Slides.isEnough() && 6578 (r.start(!n.resetProgress), 6579 (u = a = d = !1), 6580 o('autoplay:play')); 6581 } 6582 function p(t = !0) { 6583 c() || (r.pause(), o('autoplay:pause')), (d = t); 6584 } 6585 function h() { 6586 d || (a || u ? p(!1) : E()); 6587 } 6588 function S() { 6589 const i = e.Slides.getAt(t.index); 6590 r.set( 6591 (i && +getAttribute$1(i.slide, 'data-splide-interval')) || 6592 n.interval 6593 ); 6594 } 6595 return { 6596 mount: function () { 6597 const { autoplay: t } = n; 6598 t && 6599 (f(!0), 6600 f(!1), 6601 (function () { 6602 const { root: t } = l; 6603 n.pauseOnHover && 6604 s(t, 'mouseenter mouseleave', (t) => { 6605 (a = 'mouseenter' === t.type), h(); 6606 }); 6607 n.pauseOnFocus && 6608 s(t, 'focusin focusout', (t) => { 6609 (u = 'focusin' === t.type), h(); 6610 }); 6611 i(['move', 'scroll', 'refresh'], r.rewind), 6612 i('move', S); 6613 })(), 6614 'pause' !== t && E()); 6615 }, 6616 destroy: r.cancel, 6617 play: E, 6618 pause: p, 6619 isPaused: c, 6620 }; 6621 } 6622 function Cover(t, e, n) { 6623 const { on: i } = EventInterface(t); 6624 function s(t) {
6625 e.Slides.forEach((e) => { 6626 const n = child(e.container || e.slide, 'img'); 6627 n && n.src && o(t, n, e); 6628 }); 6629 } 6630 function o(t, e, n) { 6631 n.style( 6632 'background', 6633 t ? `center/cover no-repeat url("${e.src}")` : '', 6634 !0 6635 ), 6636 display(e, t ? 'none' : ''); 6637 } 6638 return { 6639 mount: function () { 6640 n.cover && 6641 (i('lazyload:loaded', (t, e) => { 6642 o(!0, t, e); 6643 }), 6644 i(['mounted', 'updated', 'refresh'], s.bind(null, !0))); 6645 }, 6646 destroy: function () { 6647 s(!1); 6648 }, 6649 }; 6650 } 6651 function Scroll(t, e, n) { 6652 const { on: i, emit: s } = EventInterface(t), 6653 { Move: o } = e, 6654 { getPosition: r, getLimit: c, exceededLimit: l } = o; 6655 let a, u; 6656 function d(e, i, p, h) { 6657 const S = r(); 6658 let A = 1; 6659 var _; 6660 (i = i || ((_ = abs(e - S)), max(_ / 1.5, 800))), 6661 (u = p), 6662 E(), 6663 (a = RequestInterval( 6664 i, 6665 f, 6666 (i) => { 6667 const s = r(), 6668 a = 6669 (S + 6670 (e - S) * 6671 (function (t) { 6672 const { easingFunc: e } = n; 6673 return e 6674 ? e(t) 6675 : 1 - Math.pow(1 - t, 4); 6676 })(i) - 6677 r()) * 6678 A; 6679 var u; 6680 o.translate(s + a), 6681 t.is(SLIDE) && 6682 !h && 6683 l() && 6684 ((A *= 0.6), 6685 abs(a) < 10 && 6686 ((u = l(!1)), d(c(!u), 600, null, !0))); 6687 }, 6688 1 6689 )), 6690 s('scroll'), 6691 a.start(); 6692 } 6693 function f() { 6694 const e = r(), 6695 n = o.toIndex(e); 6696 between(n, 0, t.length - 1) || o.translate(o.shift(e, n > 0), !0), 6697 u && u(), 6698 s('scrolled'); 6699 } 6700 function E() { 6701 a && a.cancel(); 6702 } 6703 function p() { 6704 a && !a.isPaused() && (E(), f()); 6705 } 6706 return { 6707 mount: function () { 6708 i('move', E), i(['updated', 'refresh'], p); 6709 }, 6710 destroy: E, 6711 scroll: d, 6712 cancel: p, 6713 }; 6714 } 6715 const SCROLL_LISTENER_OPTIONS = { passive: !1, capture: !0 },
6716 POINTER_DOWN_EVENTS = 'touchstart mousedown', 6717 POINTER_MOVE_EVENTS = 'touchmove mousemove', 6718 POINTER_UP_EVENTS = 'touchend touchcancel mouseup'; 6719 function Drag(t, e, n) { 6720 const { on: i, emit: s, bind: o, unbind: r } = EventInterface(t), 6721 { Move: c, Scroll: l, Controller: a } = e, 6722 { track: u } = e.Elements, 6723 { resolve: d, orient: f } = e.Direction, 6724 { getPosition: E, exceededLimit: p } = c; 6725 let h, 6726 S, 6727 A, 6728 _, 6729 g, 6730 T, 6731 m, 6732 L, 6733 C, 6734 I = !1; 6735 function R() { 6736 const { drag: t } = n; 6737 $(!t), (g = 'free' === t); 6738 } 6739 function O(t) { 6740 if (!L) { 6741 const { noDrag: e } = n, 6742 i = w(t), 6743 s = !e || !matches(t.target, e); 6744 (m = !1), 6745 !s || 6746 (!i && t.button) || 6747 (c.isBusy() 6748 ? prevent(t, !0) 6749 : ((C = i ? u : window), 6750 (A = null), 6751 (_ = null), 6752 o( 6753 C, 6754 POINTER_MOVE_EVENTS, 6755 y, 6756 SCROLL_LISTENER_OPTIONS 6757 ), 6758 o( 6759 C, 6760 POINTER_UP_EVENTS, 6761 N, 6762 SCROLL_LISTENER_OPTIONS 6763 ), 6764 c.cancel(), 6765 l.cancel(), 6766 v(t))); 6767 } 6768 } 6769 function y(e) { 6770 if ((_ || s('drag'), (_ = e), e.cancelable)) { 6771 const i = P(e) - P(S); 6772 if (T) { 6773 c.translate( 6774 h + 6775 (function (e) { 6776 return e / (I && t.is(SLIDE) ? 5 : 1); 6777 })(i) 6778 ); 6779 const n = V(e) - V(S) > 200, 6780 o = I !== (I = p()); 6781 (n || o) && v(e), s('dragging'), (m = !0), prevent(e); 6782 } else { 6783 let { dragMinThreshold: t } = n; 6784 (t = isObject$1(t) ? t : { mouse: 0, touch: +t || 10 }), 6785 (T = abs(i) > (w(e) ? t.touch : t.mouse)), 6786 D() && prevent(e); 6787 } 6788 } 6789 } 6790 function N(i) { 6791 r(C, POINTER_MOVE_EVENTS, y), r(C, POINTER_UP_EVENTS, N); 6792 const { index: o } = t; 6793 if (_) { 6794 if (T || (i.cancelable && D())) { 6795 const s = (function (e) { 6796 if (t.is(LOOP) || !I) { 6797 const t = (S === _ && A) || S, 6798 n = P(_) - P(t), 6799 i = V(e) - V(t), 6800 s = V(e) - V(_) < 200; 6801 if (i && s) return n / i; 6802 } 6803 return 0; 6804 })(i), 6805 r = (function (t) { 6806 return ( 6807 E() + 6808 sign(t) * 6809 min( 6810 abs(t) * (n.flickPower || 600), 6811 g 6812 ? 1 / 0 6813 : e.Layout.listSize() * 6814 (n.flickMaxPages || 1) 6815 ) 6816 ); 6817 })(s); 6818 g 6819 ? a.scroll(r) 6820 : t.is(FADE) 6821 ? a.go(o + f(sign(s))) 6822 : a.go(a.toDest(r), !0), 6823 prevent(i); 6824 } 6825 s('dragged'); 6826 } else g || E() === c.toPosition(o) || a.go(o, !0); 6827 T = !1; 6828 } 6829 function v(t) { 6830 (A = S), (S = t), (h = E()); 6831 } 6832 function b(t) { 6833 !L && m && prevent(t, !0); 6834 } 6835 function D() { 6836 return abs(P(_) - P(S)) > abs(P(_, !0) - P(S, !0)); 6837 } 6838 function P(t, e) { 6839 return (w(t) ? t.touches[0] : t)[`page${d(e ? 'Y' : 'X')}`]; 6840 } 6841 function V(t) { 6842 return t.timeStamp; 6843 } 6844 function w(t) { 6845 return 'undefined' != typeof TouchEvent && t instanceof TouchEvent; 6846 } 6847 function $(t) { 6848 L = t; 6849 } 6850 return { 6851 mount: function () {
6852 o(u, POINTER_MOVE_EVENTS, noop, SCROLL_LISTENER_OPTIONS), 6853 o(u, POINTER_UP_EVENTS, noop, SCROLL_LISTENER_OPTIONS), 6854 o(u, POINTER_DOWN_EVENTS, O, SCROLL_LISTENER_OPTIONS), 6855 o(u, 'click', b, { capture: !0 }), 6856 o(u, 'dragstart', prevent), 6857 i(['mounted', 'updated'], R); 6858 }, 6859 disable: $, 6860 isDragging: function () { 6861 return T; 6862 }, 6863 }; 6864 } 6865 const IE_ARROW_KEYS = ['Left', 'Right', 'Up', 'Down']; 6866 function Keyboard(t, e, n) { 6867 const { on: i, bind: s, unbind: o } = EventInterface(t), 6868 { root: r } = t, 6869 { resolve: c } = e.Direction; 6870 let l, a; 6871 function u() { 6872 const { keyboard: t } = n; 6873 t && 6874 ('focused' === t 6875 ? ((l = r), setAttribute(r, TAB_INDEX, 0)) 6876 : (l = window), 6877 s(l, 'keydown', p)); 6878 } 6879 function d() { 6880 o(l, 'keydown'), isHTMLElement(l) && removeAttribute(l, TAB_INDEX); 6881 } 6882 function f() { 6883 const t = a; 6884 (a = !0), 6885 nextTick(() => { 6886 a = t; 6887 }); 6888 } 6889 function E() { 6890 d(), u(); 6891 } 6892 function p(e) { 6893 if (!a) { 6894 const { key: n } = e, 6895 i = includes(IE_ARROW_KEYS, n) ? `Arrow${n}` : n; 6896 i === c('ArrowLeft') 6897 ? t.go('<') 6898 : i === c('ArrowRight') && t.go('>'); 6899 } 6900 } 6901 return { 6902 mount: function () { 6903 u(), i('updated', E), i('move', f); 6904 }, 6905 destroy: d, 6906 disable: function (t) { 6907 a = t; 6908 }, 6909 }; 6910 } 6911 const SRCSET_DATA_ATTRIBUTE = 'data-splide-lazy-srcset', 6912 IMAGE_SELECTOR = '[data-splide-lazy], [data-splide-lazy-srcset]'; 6913 function LazyLoad(t, e, n) { 6914 const { on: i, off: s, bind: o, emit: r } = EventInterface(t), 6915 c = 'sequential' === n.lazyLoad; 6916 let l = [], 6917 a = 0; 6918 function u() { 6919 f(), d(); 6920 } 6921 function d() { 6922 e.Slides.forEach((t) => { 6923 queryAll(t.slide, IMAGE_SELECTOR).forEach((e) => { 6924 const i = getAttribute$1(e, 'data-splide-lazy'), 6925 s = getAttribute$1(e, SRCSET_DATA_ATTRIBUTE); 6926 if (i !== e.src || s !== e.srcset) { 6927 const o = n.classes.spinner, 6928 r = e.parentElement, 6929 c = child(r, `.${o}`) || create('span', o, r); 6930 setAttribute(c, ROLE, 'presentation'), 6931 l.push({ 6932 _img: e, 6933 _Slide: t, 6934 src: i, 6935 srcset: s, 6936 _spinner: c, 6937 }), 6938 !e.src && display(e, 'none'); 6939 } 6940 }); 6941 }), 6942 c && h(); 6943 } 6944 function f() { 6945 (a = 0), (l = []); 6946 } 6947 function E() { 6948 (l = l.filter((e) => { 6949 const i = n.perPage * ((n.preloadPages || 1) + 1) - 1; 6950 return !e._Slide.isWithin(t.index, i) || p(e); 6951 })), 6952 l.length || s('moved'); 6953 } 6954 function p(t) { 6955 const { _img: e } = t; 6956 addClass(t._Slide.slide, 'is-loading'), 6957 o(e, 'load error', (e) => { 6958 !(function (t, e) { 6959 const { _Slide: n } = t; 6960 removeClass(n.slide, 'is-loading'), 6961 e || 6962 (remove(t._spinner), 6963 display(t._img, ''), 6964 r('lazyload:loaded', t._img, n), 6965 r('resize')); 6966 c && h(); 6967 })(t, 'error' === e.type); 6968 }), 6969 ['srcset', 'src'].forEach((n) => { 6970 t[n] && 6971 (setAttribute(e, n, t[n]), 6972 removeAttribute( 6973 e, 6974 'src' === n 6975 ? 'data-splide-lazy' 6976 : SRCSET_DATA_ATTRIBUTE 6977 )); 6978 }); 6979 } 6980 function h() { 6981 a < l.length && p(l[a++]); 6982 } 6983 return { 6984 mount: function () { 6985 n.lazyLoad && 6986 (d(), 6987 i('refresh', u), 6988 c || i(['mounted', 'refresh', 'moved', 'scrolled'], E)); 6989 }, 6990 destroy: f, 6991 }; 6992 } 6993 function Pagination(t, e, n) { 6994 const { on: i, emit: s, bind: o, unbind: r } = EventInterface(t), 6995 { Slides: c, Elements: l, Controller: a } = e, 6996 { hasFocus: u, getIndex: d } = a, 6997 f = []; 6998 let E; 6999 function p() { 7000 h(), 7001 n.pagination && 7002 c.isEnough() && 7003 (!(function () { 7004 const { length: e } = t, 7005 { classes: i, i18n: s, perPage: r } = n, 7006 a = 7007 ('slider' === n.pagination && l.slider) || 7008 l.root, 7009 d = u() ? e : ceil(e / r); 7010 E = create('ul', i.pagination, a); 7011 for (let t = 0; t < d; t++) { 7012 const e = create('li', null, E), 7013 n = create( 7014 'button', 7015 { class: i.page, type: 'button' }, 7016 e 7017 ), 7018 l = c.getIn(t).map((t) => t.slide.id), 7019 a = !u() && r > 1 ? s.pageX : s.slideX; 7020 o(n, 'click', S.bind(null, t)), 7021 setAttribute(n, ARIA_CONTROLS, l.join(' ')), 7022 setAttribute(n, ARIA_LABEL, format(a, t + 1)), 7023 f.push({ li: e, button: n, page: t }); 7024 } 7025 })(), 7026 s('pagination:mounted', { list: E, items: f }, A(t.index)), 7027 _()); 7028 } 7029 function h() { 7030 E && 7031 (remove(E), 7032 f.forEach((t) => { 7033 r(t.button, 'click'); 7034 }), 7035 empty(f), 7036 (E = null)); 7037 } 7038 function S(t) { 7039 a.go(`>${t}`, !0, () => { 7040 const e = c.getAt(a.toIndex(t)); 7041 e && focus(e.slide); 7042 }); 7043 } 7044 function A(t) { 7045 return f[a.toPage(t)]; 7046 } 7047 function _() {
7048 const t = A(d(!0)), 7049 e = A(d()); 7050 t && 7051 (removeClass(t.button, CLASS_ACTIVE), 7052 removeAttribute(t.button, ARIA_CURRENT)), 7053 e && 7054 (addClass(e.button, CLASS_ACTIVE), 7055 setAttribute(e.button, ARIA_CURRENT, !0)), 7056 s('pagination:updated', { list: E, items: f }, t, e); 7057 } 7058 return { 7059 items: f, 7060 mount: function () { 7061 p(), i(['updated', 'refresh'], p), i(['move', 'scrolled'], _); 7062 }, 7063 destroy: h, 7064 getAt: A, 7065 update: _, 7066 }; 7067 } 7068 const TRIGGER_KEYS = [' ', 'Enter', 'Spacebar']; 7069 function Sync(t, e, n) { 7070 const { list: i } = e.Elements, 7071 s = []; 7072 function o() { 7073 t.splides.forEach((e) => { 7074 var n; 7075 !e.isParent && 7076 ((n = e.splide), 7077 [t, n].forEach((e) => { 7078 const i = EventInterface(e), 7079 o = e === t ? n : t; 7080 i.on('move', (t, e, n) => { 7081 o.go(o.is(LOOP) ? n : t); 7082 }), 7083 s.push(i); 7084 })); 7085 }), 7086 n.isNavigation && 7087 (function () { 7088 const e = EventInterface(t), 7089 { on: n } = e; 7090 n('click', l), 7091 n('slide:keydown', a), 7092 n(['mounted', 'updated'], c), 7093 setAttribute(i, ROLE, 'menu'), 7094 s.push(e), 7095 e.emit('navigation:mounted', t.splides); 7096 })(); 7097 } 7098 function r() { 7099 removeAttribute(i, ALL_ATTRIBUTES), 7100 s.forEach((t) => { 7101 t.destroy(); 7102 }), 7103 empty(s); 7104 } 7105 function c() { 7106 setAttribute( 7107 i, 7108 ARIA_ORIENTATION, 7109 n.direction !== TTB ? 'horizontal' : null 7110 ); 7111 } 7112 function l(e) { 7113 t.go(e.index); 7114 } 7115 function a(t, e) { 7116 includes(TRIGGER_KEYS, e.key) && (l(t), prevent(e)); 7117 } 7118 return { 7119 mount: o, 7120 destroy: r, 7121 remount: function () { 7122 r(), o(); 7123 }, 7124 }; 7125 } 7126 function Wheel(t, e, n) { 7127 const { bind: i } = EventInterface(t); 7128 function s(i) { 7129 if (i.cancelable) { 7130 const { deltaY: s } = i; 7131 if (s) { 7132 const o = s < 0; 7133 t.go(o ? '<' : '>'), 7134 (function (i) { 7135 return ( 7136 !n.releaseWheel || 7137 t.state.is(4) || 7138 -1 !== e.Controller.getAdjacent(i) 7139 ); 7140 })(o) && prevent(i); 7141 } 7142 } 7143 } 7144 return { 7145 mount: function () { 7146 n.wheel && 7147 i(e.Elements.track, 'wheel', s, SCROLL_LISTENER_OPTIONS); 7148 }, 7149 }; 7150 } 7151 var ComponentConstructors = Object.freeze({ 7152 __proto__: null, 7153 Options: Options, 7154 Direction: Direction, 7155 Elements: Elements, 7156 Slides: Slides, 7157 Layout: Layout, 7158 Clones: Clones, 7159 Move: Move, 7160 Controller: Controller, 7161 Arrows: Arrows, 7162 Autoplay: Autoplay, 7163 Cover: Cover, 7164 Scroll: Scroll, 7165 Drag: Drag, 7166 Keyboard: Keyboard, 7167 LazyLoad: LazyLoad, 7168 Pagination: Pagination, 7169 Sync: Sync, 7170 Wheel: Wheel, 7171 }); 7172 const I18N = { 7173 prev: 'Previous slide', 7174 next: 'Next slide', 7175 first: 'Go to first slide', 7176 last: 'Go to last slide', 7177 slideX: 'Go to slide %s', 7178 pageX: 'Go to page %s', 7179 play: 'Start autoplay', 7180 pause: 'Pause autoplay', 7181 }, 7182 DEFAULTS = { 7183 type: 'slide', 7184 speed: 400, 7185 waitForTransition: !0, 7186 perPage: 1, 7187 cloneStatus: !0, 7188 arrows: !0, 7189 pagination: !0, 7190 interval: 5e3, 7191 pauseOnHover: !0, 7192 pauseOnFocus: !0, 7193 resetProgress: !0, 7194 keyboard: !0, 7195 easing: 'cubic-bezier(0.25, 1, 0.5, 1)', 7196 drag: !0, 7197 direction: 'ltr', 7198 slideFocus: !0,
7199 trimSpace: !0, 7200 focusableNodes: 'a, button, textarea, input, select, iframe', 7201 classes: CLASSES, 7202 i18n: I18N, 7203 }; 7204 function Fade(t, e, n) { 7205 const { on: i } = EventInterface(t); 7206 return { 7207 mount: function () { 7208 i(['mounted', 'refresh'], () => { 7209 nextTick(() => { 7210 e.Slides.style( 7211 'transition', 7212 `opacity ${n.speed}ms ${n.easing}` 7213 ); 7214 }); 7215 }); 7216 }, 7217 start: function (t, n) { 7218 const { track: i } = e.Elements; 7219 style(i, 'height', unit(rect(i).height)), 7220 nextTick(() => { 7221 n(), style(i, 'height', ''); 7222 }); 7223 }, 7224 cancel: noop, 7225 }; 7226 } 7227 function Slide(t, e, n) { 7228 const { bind: i } = EventInterface(t), 7229 { Move: s, Controller: o } = e, 7230 { list: r } = e.Elements; 7231 let c; 7232 function l() { 7233 a(''); 7234 } 7235 function a(t) { 7236 style(r, 'transition', t); 7237 } 7238 return { 7239 mount: function () { 7240 i(r, 'transitionend', (t) => { 7241 t.target === r && c && (l(), c()); 7242 }); 7243 }, 7244 start: function (e, i) { 7245 const r = s.toPosition(e, !0), 7246 l = s.getPosition(), 7247 u = (function (e) { 7248 const { rewindSpeed: i } = n; 7249 if (t.is(SLIDE) && i) { 7250 const t = o.getIndex(!0), 7251 n = o.getEnd(); 7252 if ((0 === t && e >= n) || (t >= n && 0 === e)) 7253 return i; 7254 } 7255 return n.speed; 7256 })(e); 7257 abs(r - l) >= 1 && u >= 1 7258 ? (a(`transform ${u}ms ${n.easing}`), 7259 s.translate(r, !0), 7260 (c = i)) 7261 : (s.jump(e), i()); 7262 }, 7263 cancel: l, 7264 }; 7265 } 7266 const _Splide = class { 7267 constructor(t, e) { 7268 (this.event = EventBus()), 7269 (this.Components = {}), 7270 (this.state = State(1)), 7271 (this.splides = []), 7272 (this._options = {}), 7273 (this._Extensions = {}); 7274 const n = isString$1(t) ? query(document, t) : t; 7275 assert(n, `${n}
7275 is invalid.`), 7276 (this.root = n), 7277 merge(DEFAULTS, _Splide.defaults), 7278 merge(merge(this._options, DEFAULTS), e || {}); 7279 } 7280 mount(t, e) { 7281 const { state: n, Components: i } = this; 7282 assert(n.is([1, 5]), 'Already mounted!'), 7283 n.set(1), 7284 (this._Components = i), 7285 (this._Transition = 7286 e || this._Transition || (this.is(FADE) ? Fade : Slide)), 7287 (this._Extensions = t || this._Extensions); 7288 return ( 7289 forOwn( 7290 assign({}, ComponentConstructors, this._Extensions, { 7291 Transition: this._Transition, 7292 }), 7293 (t, e) => { 7294 const n = t(this, i, this._options); 7295 (i[e] = n), n.setup && n.setup(); 7296 } 7297 ), 7298 forOwn(i, (t) => { 7299 t.mount && t.mount(); 7300 }), 7301 this.emit('mounted'), 7302 addClass(this.root, 'is-initialized'), 7303 n.set(3), 7304 this.emit('ready'), 7305 this 7306 ); 7307 } 7308 sync(t) { 7309 return ( 7310 this.splides.push({ splide: t }), 7311 t.splides.push({ splide: this, isParent: !0 }), 7312 this.state.is(3) && 7313 (this._Components.Sync.remount(), 7314 t.Components.Sync.remount()), 7315 this 7316 ); 7317 } 7318 go(t) { 7319 return this._Components.Controller.go(t), this; 7320 } 7321 on(t, e) { 7322 return this.event.on(t, e, null, 20), this; 7323 } 7324 off(t) { 7325 return this.event.off(t), this; 7326 } 7327 emit(t) { 7328 return this.event.emit(t, ...slice(arguments, 1)), this; 7329 } 7330 add(t, e) { 7331 return this._Components.Slides.add(t, e), this; 7332 } 7333 remove(t) { 7334 return this._Components.Slides.remove(t), this; 7335 } 7336 is(t) { 7337 return this._options.type === t; 7338 } 7339 refresh() { 7340 return this.emit('refresh'), this; 7341 } 7342 destroy(t = !0) { 7343 const { event: e, state: n } = this; 7344 return ( 7345 n.is(1) 7346 ? e.on('ready', this.destroy.bind(this, t), this) 7347 : (forOwn( 7348 this._Components, 7349 (e) => { 7350 e.destroy && e.destroy(t); 7351 }, 7352 !0 7353 ), 7354 e.emit('destroy'), 7355 e.destroy(), 7356 t && empty(this.splides), 7357 n.set(5)), 7358 this 7359 ); 7360 } 7361 get options() { 7362 return this._options; 7363 } 7364 set options(t) { 7365 const { _options: e } = this; 7366 merge(e, t), this.state.is(1) || this.emit('updated', e); 7367 } 7368 get length() { 7369 return this._Components.Slides.getLength(!0); 7370 } 7371 get index() { 7372 return this._Components.Controller.getIndex(); 7373 } 7374 }; 7375 let Splide = _Splide; 7376 (Splide.defaults = {}), (Splide.STATES = STATES); 7377 const elementMap = new Map(); 7378 var Data = { 7379 set(e, t, n) { 7380 elementMap.has(e) || elementMap.set(e, new Map()); 7381 const a = elementMap.get(e); 7382 a.has(t) || 0 === a.size 7383 ? a.set(t, n) 7384 : console.error( 7385 `Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(a.keys())[0] 7386 }.` 7387 ); 7388 }, 7389 get: (e, t) => (elementMap.has(e) && elementMap.get(e).get(t)) || null, 7390 remove(e, t) { 7391 if (!elementMap.has(e)) return; 7392 const n = elementMap.get(e); 7393 n.delete(t), 0 === n.size && elementMap.delete(e); 7394 }, 7395 }; 7396 const namespaceRegex = /[^.]*(?=\..*)\.|.*/,
vendor: 9,097 bytes, lines 7397-7667
7397 stripNameRegex = /\..*/, 7398 stripUidRegex = /::\d+$/, 7399 eventRegistry = {}; 7400 let uidEvent = 1; 7401 const customEvents = { mouseenter: 'mouseover', mouseleave: 'mouseout' }, 7402 customEventsRegex = /^(mouseenter|mouseleave)/i, 7403 nativeEvents = new Set([ 7404 'click', 7405 'dblclick', 7406 'mouseup', 7407 'mousedown', 7408 'contextmenu', 7409 'mousewheel', 7410 'DOMMouseScroll', 7411 'mouseover', 7412 'mouseout', 7413 'mousemove', 7414 'selectstart', 7415 'selectend', 7416 'keydown', 7417 'keypress', 7418 'keyup', 7419 'orientationchange', 7420 'touchstart', 7421 'touchmove', 7422 'touchend', 7423 'touchcancel', 7424 'pointerdown', 7425 'pointermove', 7426 'pointerup', 7427 'pointerleave', 7428 'pointercancel', 7429 'gesturestart', 7430 'gesturechange', 7431 'gestureend', 7432 'focus', 7433 'blur', 7434 'change', 7435 'reset', 7436 'select', 7437 'submit', 7438 'focusin', 7439 'focusout', 7440 'load', 7441 'unload', 7442 'beforeunload', 7443 'resize', 7444 'move', 7445 'DOMContentLoaded', 7446 'readystatechange', 7447 'error', 7448 'abort', 7449 'scroll', 7450 ]); 7451 function getUidEvent(e, t) { 7452 return (t && `${t}::${uidEvent++}`) || e.uidEvent || uidEvent++; 7453 } 7454 function getEvent(e) { 7455 const t = getUidEvent(e); 7456 return ( 7457 (e.uidEvent = t), 7458 (eventRegistry[t] = eventRegistry[t] || {}), 7459 eventRegistry[t] 7460 ); 7461 } 7462 function bootstrapHandler(e, t) { 7463 return function n(r) { 7464 return ( 7465 (r.delegateTarget = e), 7466 n.oneOff && EventHandler.off(e, r.type, t), 7467 t.apply(e, [r]) 7468 ); 7469 }; 7470 } 7471 function bootstrapDelegationHandler(e, t, n) { 7472 return function r(o) { 7473 const a = e.querySelectorAll(t); 7474 for (let { target: l } = o; l && l !== this; l = l.parentNode) 7475 for (let i = a.length; i--;) 7476 if (a[i] === l) 7477 return ( 7478 (o.delegateTarget = l), 7479 r.oneOff && EventHandler.off(e, o.type, t, n), 7480 n.apply(l, [o]) 7481 ); 7482 return null; 7483 }; 7484 } 7485 function findHandler(e, t, n = null) { 7486 const r = Object.keys(e); 7487 for (let o = 0, a = r.length; o < a; o++) { 7488 const a = e[r[o]]; 7489 if (a.originalHandler === t && a.delegationSelector === n) return a; 7490 } 7491 return null; 7492 } 7493 function normalizeParams(e, t, n) { 7494 const r = 'string' == typeof t, 7495 o = r ? n : t; 7496 let a = getTypeEvent(e); 7497 return nativeEvents.has(a) || (a = e), [r, o, a]; 7498 } 7499 function addHandler(e, t, n, r, o) { 7500 if ('string' != typeof t || !e) return; 7501 if ((n || ((n = r), (r = null)), customEventsRegex.test(t))) { 7502 const e = (e) => 7503 (function(t) { 7504 if ( 7505 !t.relatedTarget || 7506 (t.relatedTarget !== t.delegateTarget && 7507 !t.delegateTarget.contains(t.relatedTarget)) 7508 ) 7509 return e.call(this, t); 7510 }); 7511 r ? (r = e(r)) : (n = e(n)); 7512 } 7513 const [a, l, i] = normalizeParams(t, n, r), 7514 s = getEvent(e), 7515 u = s[i] || (s[i] = {}), 7516 c = findHandler(u, l, a ? n : null); 7517 if (c) return void (c.oneOff = c.oneOff && o); 7518 const d = getUidEvent(l, t.replace(namespaceRegex, '')), 7519 v = a 7520 ? bootstrapDelegationHandler(e, n, r) 7521 : bootstrapHandler(e, n); 7522 (v.delegationSelector = a ? n : null), 7523 (v.originalHandler = l), 7524 (v.oneOff = o), 7525 (v.uidEvent = d), 7526 (u[d] = v), 7527 e.addEventListener(i, v, a); 7528 } 7529 function removeHandler(e, t, n, r, o) { 7530 const a = findHandler(t[n], r, o); 7531 a && (e.removeEventListener(n, a, Boolean(o)), delete t[n][a.uidEvent]); 7532 } 7533 function removeNamespacedHandlers(e, t, n, r) { 7534 const o = t[n] || {}; 7535 Object.keys(o).forEach((a) => { 7536 if (a.includes(r)) { 7537 const r = o[a]; 7538 removeHandler(e, t, n, r.originalHandler, r.delegationSelector); 7539 } 7540 }); 7541 } 7542 function getTypeEvent(e) { 7543 return (e = e.replace(stripNameRegex, '')), customEvents[e] || e; 7544 } 7545 const EventHandler = { 7546 on(e, t, n, r) { 7547 addHandler(e, t, n, r, !1); 7548 }, 7549 one(e, t, n, r) { 7550 addHandler(e, t, n, r, !0); 7551 }, 7552 off(e, t, n, r) { 7553 if ('string' != typeof t || !e) return; 7554 const [o, a, l] = normalizeParams(t, n, r), 7555 i = l !== t, 7556 s = getEvent(e), 7557 u = t.startsWith('.'); 7558 if (void 0 !== a) { 7559 if (!s || !s[l]) return; 7560 return void removeHandler(e, s, l, a, o ? n : null); 7561 } 7562 u && 7563 Object.keys(s).forEach((n) => { 7564 removeNamespacedHandlers(e, s, n, t.slice(1)); 7565 }); 7566 const c = s[l] || {}; 7567 Object.keys(c).forEach((n) => { 7568 const r = n.replace(stripUidRegex, ''); 7569 if (!i || t.includes(r)) { 7570 const t = c[n]; 7571 removeHandler( 7572 e, 7573 s, 7574 l, 7575 t.originalHandler, 7576 t.delegationSelector 7577 ); 7578 } 7579 }); 7580 }, 7581 trigger(e, t, n) { 7582 if ('string' != typeof t || !e) return null; 7583 const r = getjQuery(), 7584 o = getTypeEvent(t), 7585 a = t !== o, 7586 l = nativeEvents.has(o); 7587 let i, 7588 s = !0, 7589 u = !0, 7590 c = !1, 7591 d = null; 7592 return ( 7593 a && 7594 r && 7595 ((i = r.Event(t, n)), 7596 r(e).trigger(i), 7597 (s = !i.isPropagationStopped()), 7598 (u = !i.isImmediatePropagationStopped()), 7599 (c = i.isDefaultPrevented())), 7600 l 7601 ? ((d = document.createEvent('HTMLEvents')), 7602 d.initEvent(o, s, !0)) 7603 : (d = new CustomEvent(t, { bubbles: s, cancelable: !0 })), 7604 void 0 !== n && 7605 Object.keys(n).forEach((e) => { 7606 Object.defineProperty(d, e, { get: () => n[e] }); 7607 }), 7608 c && d.preventDefault(), 7609 u && e.dispatchEvent(d), 7610 d.defaultPrevented && void 0 !== i && i.preventDefault(), 7611 d 7612 ); 7613 }, 7614 }; 7615 var EventHandler$1 = EventHandler; 7616 class BaseComponent { 7617 constructor(t) { 7618 (t = getElement(t)) && 7619 ((this._element = t), 7620 Data.set(this._element, this.constructor.DATA_KEY, this)); 7621 } 7622 dispose() { 7623 Data.remove(this._element, this.constructor.DATA_KEY), 7624 EventHandler$1.off(this._element, this.constructor.EVENT_KEY), 7625 Object.getOwnPropertyNames(this).forEach((t) => { 7626 this[t] = null; 7627 }); 7628 } 7629 _queueCallback(t, e, n = !0) { 7630 executeAfterTransition(t, e, n); 7631 } 7632 static getInstance(t) { 7633 return Data.get(getElement(t), this.DATA_KEY); 7634 } 7635 static getOrCreateInstance(t, e = {}) { 7636 return ( 7637 this.getInstance(t) || 7638 new this(t, 'object' == typeof e ? e : null) 7639 ); 7640 } 7641 static get VERSION() { 7642 return '5.1.3'; 7643 } 7644 static get NAME() { 7645 throw new Error( 7646 'You have to implement the static method "NAME", for each component!' 7647 ); 7648 } 7649 static get DATA_KEY() { 7650 return `bs.${this.NAME}`; 7651 } 7652 static get EVENT_KEY() { 7653 return `.${this.DATA_KEY}`; 7654 } 7655 } 7656 const NAME$m = 'carousel', 7657 EVENT_LOAD_DATA_API$1 = 'load.bs.carousel.data-api', 7658 SELECTOR_CAROUSEL = '[data-bs-carousel-splide]', 7659 CONFIG_DEFAULT$1 = { 7660 slideFocus: !0, 7661 i18n: { 7662 prev: 'Slide precedente', 7663 next: 'Slide successiva', 7664 first: 'Vai alla prima slide', 7665 last: 'Vai all’ultima slide', 7666 slideX: 'Vai alla slide %s', 7667 pageX: 'Vai a pagina %s',
7668 play: 'Attiva autoplay', 7669 pause: 'Pausa autoplay', 7670 }, 7671 }, 7672 CONFIGS = { 7673 'it-carousel-landscape-abstract-three-cols': { 7674 type: 'slide', 7675 perPage: 3, 7676 gap: 24, 7677 padding: { left: 0, right: 0 }, 7678 arrows: !1, 7679 breakpoints: { 7680 768: { 7681 perPage: 1, 7682 gap: 24, 7683 padding: { left: 40, right: 40 }, 7684 arrows: !1, 7685 }, 7686 992: { 7687 perPage: 2, 7688 gap: 24, 7689 padding: { left: 40, right: 40 }, 7690 arrows: !1, 7691 }, 7692 }, 7693 }, 7694 'it-carousel-landscape-abstract-three-cols-arrow-visible': { 7695 type: 'slide', 7696 perPage: 3, 7697 gap: 24, 7698 padding: { left: 0, right: 0 }, 7699 arrows: !0, 7700 breakpoints: { 7701 768: { 7702 perPage: 1, 7703 gap: 24, 7704 padding: { left: 40, right: 40 }, 7705 arrows: !0, 7706 }, 7707 992: { 7708 perPage: 2, 7709 gap: 24, 7710 padding: { left: 40, right: 40 }, 7711 arrows: !0, 7712 }, 7713 }, 7714 }, 7715 'it-big-img': { 7716 type: 'loop', 7717 perPage: 1, 7718 gap: 48, 7719 padding: { left: 320, right: 320 }, 7720 arrows: !1, 7721 breakpoints: { 7722 768: { 7723 perPage: 1, 7724 gap: 0, 7725 padding: { left: 0, right: 0 }, 7726 arrows: !1, 7727 }, 7728 992: { 7729 perPage: 1, 7730 gap: 24, 7731 padding: { left: 160, right: 160 }, 7732 arrows: !1, 7733 }, 7734 }, 7735 }, 7736 'it-standard-image': { 7737 type: 'loop', 7738 perPage: 3, 7739 gap: 24, 7740 padding: { left: 48, right: 48 }, 7741 arrows: !1, 7742 breakpoints: { 7743 768: { 7744 perPage: 1, 7745 gap: 24, 7746 padding: { left: 40, right: 40 }, 7747 arrows: !1, 7748 }, 7749 992: { 7750 perPage: 2, 7751 gap: 24, 7752 padding: { left: 48, right: 48 }, 7753 arrows: !1, 7754 }, 7755 }, 7756 }, 7757 'it-carousel-landscape-abstract': { 7758 type: 'slide', 7759 perPage: 1, 7760 gap: 24, 7761 padding: { left: 0, right: 0 }, 7762 arrows: !1, 7763 breakpoints: { 7764 768: { 7765 perPage: 1, 7766 gap: 24, 7767 padding: { left: 0, right: 0 }, 7768 arrows: !1, 7769 }, 7770 992: { 7771 perPage: 1, 7772 gap: 24, 7773 padding: { left: 24, right: 24 }, 7774 arrows: !1, 7775 }, 7776 }, 7777 }, 7778 'it-calendar-wrapper': { 7779 type: 'slide', 7780 perPage: 4, 7781 gap: 0, 7782 padding: { left: 0, right: 0 }, 7783 arrows: !1, 7784 breakpoints: { 7785 560: { 7786 perPage: 1, 7787 gap: 0, 7788 padding: { left: 24, right: 24 }, 7789 arrows: !1, 7790 }, 7791 768: { 7792 perPage: 2, 7793 gap: 0, 7794 padding: { left: 0, right: 0 }, 7795 arrows: !1, 7796 }, 7797 992: { 7798 perPage: 3, 7799 gap: 0, 7800 padding: { left: 0, right: 0 }, 7801 arrows: !1, 7802 }, 7803 }, 7804 }, 7805 }; 7806 class CarouselBI extends BaseComponent { 7807 constructor(e) { 7808 super(e), 7809 (this._config = this._getConfig()), 7810 (this._splide = new Splide(this._element, this._config)), 7811 this._init(); 7812 } 7813 dispose() { 7814 this._splide.destroy(), super.dispose(); 7815 } 7816 static get NAME() { 7817 return NAME$m; 7818 } 7819 _init() { 7820 this._splide.mount(); 7821 } 7822 _getConfig() { 7823 let e = Object.assign({}, CONFIG_DEFAULT$1); 7824 return (
7825 Object.keys(CONFIGS).forEach((a) => { 7826 this._element.classList.contains(a) && 7827 (e = Object.assign({}, e, CONFIGS[a])); 7828 }), 7829 e 7830 ); 7831 } 7832 } 7833 EventHandler$1.on(window, EVENT_LOAD_DATA_API$1, () => { 7834 SelectorEngine$1.find(SELECTOR_CAROUSEL).forEach((e) => { 7835 CarouselBI.getOrCreateInstance(e); 7836 }); 7837 }); 7838 var CarouselBI$1 = CarouselBI; 7839 const NAME$l = 'inputlabel', 7840 DATA_KEY$a = 'bs.inputlabel', 7841 EVENT_KEY$a = `.${DATA_KEY$a}`, 7842 EVENT_FOCUS = `focus${EVENT_KEY$a}`, 7843 EVENT_BLUR = `blur${EVENT_KEY$a}`, 7844 EVENT_CHANGE$2 = `change${EVENT_KEY$a}`; 7845 class InputLabel { 7846 constructor(e) { 7847 (this._element = e), this._init(); 7848 } 7849 static get NAME() { 7850 return NAME$l; 7851 } 7852 _init() { 7853 const e = this._getLabel(); 7854 e && 7855 !e.classList.contains('active') && 7856 (this._labelOut(), this._labelOver(), this._bindEvents()); 7857 } 7858 _bindEvents() { 7859 'file' === this._element.getAttribute('type') 7860 ? EventHandler$1.on(this._element, EVENT_BLUR, () => { 7861 this._labelOut(); 7862 }) 7863 : (EventHandler$1.on(this._element, EVENT_FOCUS, () => { 7864 this._labelOut(); 7865 }), 7866 EventHandler$1.on(this._element, EVENT_BLUR, () => { 7867 this._labelOver(); 7868 }), 7869 EventHandler$1.on(this._element, EVENT_CHANGE$2, () => { 7870 this._labelToggle(); 7871 })); 7872 } 7873 _getLabel() { 7874 return SelectorEngine$1.findOne( 7875 'label[for="' + this._element.getAttribute('id') + '"]' 7876 ); 7877 } 7878 _isEmpty() { 7879 return ( 7880 !this._element.value && 7881 !this._element.getAttribute('placeholder') 7882 ); 7883 } 7884 _labelOut() { 7885 const e = this._getLabel(); 7886 e && e.classList.add('active'); 7887 } 7888 _labelOver() { 7889 if (this._isEmpty()) { 7890 const e = this._getLabel(); 7891 e && e.classList.remove('active'); 7892 } 7893 } 7894 _labelToggle() { 7895 this._isEmpty() ? this._labelOver() : this._labelOut(); 7896 } 7897 } 7898 var InputLabel$1 = InputLabel; 7899 const NAME$k = 'inputnumber', 7900 DATA_KEY$9 = 'bs.inputnumber', 7901 EVENT_KEY$9 = `.${DATA_KEY$9}`, 7902 EVENT_CLICK$8 = `click${EVENT_KEY$9}`, 7903 EVENT_CHANGE$1 = `change${EVENT_KEY$9}`, 7904 EVENT_FOCUS_DATA_API = `focus${EVENT_KEY$9}.data-api`, 7905 EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$9}.data-api`, 7906 CLASS_NAME_ADAPTIVE = 'input-number-adaptive', 7907 CLASS_NAME_PERCENTAGE = 'input-number-percentage', 7908 CLASS_NAME_CURRENCY = 'input-number-currency', 7909 SELECTOR_INPUT = 'input[data-bs-input][type="number"]'; 7910 class InputNumber extends BaseComponent { 7911 constructor(e) { 7912 super(e), 7913 (this._wrapperElement = this._element.closest('.input-number')), 7914 (this._label = new InputLabel$1(e)), 7915 this._init(), 7916 this._bindEvents(); 7917 } 7918 static get NAME() { 7919 return NAME$k; 7920 } 7921 _init() { 7922 this._wrapperElement && this._inputResize(); 7923 } 7924 _bindEvents() { 7925 this._wrapperElement && 7926 (SelectorEngine$1.find('button', this._wrapperElement).forEach( 7927 (e) => { 7928 EventHandler$1.on(e, EVENT_CLICK$8, (t) => { 7929 t.preventDefault(), 7930 this._incrDecr( 7931 e.classList.contains('input-number-sub') 7932 ); 7933 }); 7934 } 7935 ), 7936 EventHandler$1.on(this._element, EVENT_CHANGE$1, () => 7937 this._checkLimit() 7938 )); 7939 } 7940 _inputResize() { 7941 if (this._wrapperElement.classList.contains(CLASS_NAME_ADAPTIVE)) { 7942 let e = null; 7943 this._wrapperElement.classList.contains( 7944 CLASS_NAME_PERCENTAGE 7945 ) || (e = 'calc(44px + ' + this._element.value.length + 'ch)'), 7946 this._wrapperElement.classList.contains( 7947 CLASS_NAME_CURRENCY 7948 ) && 7949 (e = 7950 'calc(40px + 44px + ' + 7951 this._element.value.length + 7952 'ch)'), 7953 e && (this._element.style.width = e); 7954 } 7955 } 7956 _incrDecr(e) { 7957 const t = parseFloat(this._element.value); 7958 if (!isNaN(t)) { 7959 let n = parseFloat(this._element.getAttribute('step')); 7960 n || (n = 1), 7961 (this._element.value = t + n * (e ? -1 : 1)), 7962 EventHandler$1.trigger(this._element, EVENT_CHANGE$1); 7963 } 7964 } 7965 _checkLimit() { 7966 const e = parseFloat(this._element.value); 7967 if (!isNaN(e)) { 7968 let t = e; 7969 const n = parseFloat(this._element.getAttribute('max')), 7970 i = parseFloat(this._element.getAttribute('min')); 7971 i && e < i && (t = i), 7972 n && e > n && (t = n), 7973 (this._element.value = t); 7974 } 7975 this._inputResize(); 7976 } 7977 } 7978 const inputs$3 = SelectorEngine$1.find(SELECTOR_INPUT); 7979 inputs$3.forEach((e) => { 7980 EventHandler$1.one(e, EVENT_FOCUS_DATA_API, (t) => { 7981 t.preventDefault(), 7982 InputNumber.getOrCreateInstance(e), 7983 EventHandler$1.trigger(e, 'focus'); 7984 }); 7985 }); 7986 const inputsButtons = SelectorEngine$1.find('.input-number button'); 7987 inputsButtons.forEach((e) => { 7988 EventHandler$1.one(e, EVENT_CLICK_DATA_API$6, (t) => { 7989 if ( 7990 e.classList.contains('input-number-add') || 7991 e.classList.contains('input-number-sub') 7992 ) { 7993 const n = e.closest('.input-number'); 7994 if (n) { 7995 const i = SelectorEngine$1.findOne(SELECTOR_INPUT, n); 7996 if (i) { 7997 InputNumber.getInstance(i) || 7998 (t.preventDefault(), 7999 InputNumber.getOrCreateInstance(i), 8000 EventHandler$1.trigger(e, 'click')); 8001 } 8002 } 8003 } 8004 }); 8005 }); 8006 var InputNumber$1 = InputNumber; 8007 const NAME$j = 'dimmer', 8008 EVENT_CLICK$7 = 'click.bs.dimmer', 8009 SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="dimmer"]'; 8010 class Dimmer extends BaseComponent { 8011 constructor(e) { 8012 super(e), 8013 (this._isShown = !1), 8014 (this._isTransitioning = !1), 8015 this._init(); 8016 } 8017 static get NAME() { 8018 return NAME$j; 8019 } 8020 show() { 8021 this._isShown || 8022 this._isTransitioning || 8023 ((this._isShown = !0), 8024 this._isAnimated() && (this._isTransitioning = !0), 8025 this._showElement()); 8026 } 8027 hide() { 8028 if (!this._isShown || this._isTransitioning) return; 8029 this._isShown = !1; 8030 const e = this._isAnimated(); 8031 e && (this._isTransitioning = !0), 8032 this._element.classList.remove('show'), 8033 this._queueCallback( 8034 () => this._hideElement(), 8035 this._element, 8036 e 8037 ); 8038 } 8039 _init() { 8040 this._element.classList.contains('show') && this.show(); 8041 }
8042 _isAnimated() { 8043 return this._element.classList.contains('fade'); 8044 } 8045 _showElement() { 8046 const e = this._isAnimated(); 8047 (this._element.style.display = 'flex'), 8048 this._element.removeAttribute('aria-hidden'), 8049 e && reflow(this._element), 8050 this._element.classList.add('show'); 8051 this._queueCallback( 8052 () => { 8053 this._isTransitioning = !1; 8054 }, 8055 this._element, 8056 e 8057 ); 8058 } 8059 _hideElement() { 8060 (this._element.style.display = 'none'), 8061 this._element.setAttribute('aria-hidden', !0), 8062 (this._isTransitioning = !1); 8063 } 8064 } 8065 SelectorEngine$1.find(SELECTOR_DATA_TOGGLE$4).forEach((e) => { 8066 const t = getElementFromSelector(e), 8067 i = Dimmer.getOrCreateInstance(t); 8068 EventHandler$1.on(e, EVENT_CLICK$7, () => { 8069 e.checked ? i.show() : i.hide(); 8070 }), 8071 e.checked && i.show(); 8072 }); 8073 var Dimmer$1 = Dimmer; 8074 function normalizeData(t) { 8075 return ( 8076 'true' === t || 8077 ('false' !== t && 8078 (t === Number(t).toString() 8079 ? Number(t) 8080 : '' === t || 'null' === t 8081 ? null 8082 : t)) 8083 ); 8084 } 8085 function normalizeDataKey(t) { 8086 return t.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`); 8087 } 8088 const Manipulator = { 8089 setDataAttribute(t, e, a) { 8090 t.setAttribute(`data-bs-${normalizeDataKey(e)}`, a); 8091 }, 8092 removeDataAttribute(t, e) { 8093 t.removeAttribute(`data-bs-${normalizeDataKey(e)}`); 8094 }, 8095 getDataAttributes(t) { 8096 if (!t) return {}; 8097 const e = {}; 8098 return (Object.keys(t.dataset) 8099 .filter((t) => t.startsWith('bs')) 8100 .forEach((a) => { 8101 let r = a.replace(/^bs/, ''); 8102 (r = r.charAt(0).toLowerCase() + r.slice(1, r.length)), 8103 (e[r] = normalizeData(t.dataset[a])); 8104 }), e); 8105 }, 8106 getDataAttribute: (t, e) => 8107 normalizeData(t.getAttribute(`data-bs-${normalizeDataKey(e)}`)), 8108 offset(t) { 8109 const e = t.getBoundingClientRect(); 8110 return { 8111 top: e.top + window.pageYOffset, 8112 left: e.left + window.pageXOffset, 8113 }; 8114 }, 8115 position: (t) => ({ top: t.offsetTop, left: t.offsetLeft }), 8116 }; 8117 const enableDismissTrigger = (e, t = 'hide') => { 8118 const s = `click.dismiss${e.EVENT_KEY}`, 8119 i = e.NAME; 8120 EventHandler$1.on(document, s, `[data-bs-dismiss="${i}"]`, function ( 8121 s 8122 ) { 8123 if ( 8124 (['A', 'AREA'].includes(this.tagName) && s.preventDefault(), 8125 isDisabled(this)) 8126 ) 8127 return; 8128 const n = getElementFromSelector(this) || this.closest(`.${i}`); 8129 e.getOrCreateInstance(n)[t](); 8130 }); 8131 }; 8132 const NAME$i = 'notification', 8133 DATA_KEY$8 = 'bs.notification', 8134 EVENT_KEY$8 = `.${DATA_KEY$8}`, 8135 EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}.data-api`, 8136 EVENT_HIDDEN$1 = `hidden${EVENT_KEY$8}`, 8137 EVENT_SHOW$1 = `show${EVENT_KEY$8}`, 8138 Default$8 = { timeout: 0 }, 8139 DefaultType = { timeout: 'number' }, 8140 SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="notification"]'; 8141 class Notification extends BaseComponent { 8142 constructor(t, e) { 8143 super(t), 8144 (this._config = this._getConfig(e)), 8145 (this._isShown = this._element.classList.contains('show')), 8146 (this._isTransitioning = !1), 8147 (this._toId = null); 8148 } 8149 static get NAME() { 8150 return NAME$i; 8151 } 8152 show(t, e) { 8153 if (this._isShown || this._isTransitioning) return; 8154 const i = t || this._getElementTimeout(e); 8155 (this._isShown = !0), 8156 this._isAnimated() && (this._isTransitioning = !0), 8157 this._showElement(i); 8158 } 8159 hide() { 8160 if (!this._isShown || this._isTransitioning) return; 8161 this._isShown = !1; 8162 const t = this._isAnimated(); 8163 t && (this._isTransitioning = !0), 8164 this._element.classList.remove('show'), 8165 this._queueCallback( 8166 () => this._hideElement(), 8167 this._element, 8168 t 8169 ); 8170 } 8171 toggle(t) { 8172 this._isShown ? this.hide() : this.show(null, t); 8173 }
8174 _isAnimated() { 8175 return this._element.classList.contains('fade'); 8176 } 8177 _showElement(t) { 8178 const e = this._isAnimated(); 8179 (this._element.style.display = 'block'), 8180 this._element.removeAttribute('aria-hidden'), 8181 e && reflow(this._element), 8182 this._element.classList.add('show'); 8183 this._queueCallback( 8184 () => { 8185 (this._isTransitioning = !1), 8186 t && this._setTimeout(t, () => this.hide()); 8187 }, 8188 this._element, 8189 e 8190 ); 8191 } 8192 _hideElement() { 8193 (this._element.style.display = 'none'), 8194 this._element.setAttribute('aria-hidden', !0), 8195 (this._isTransitioning = !1); 8196 } 8197 _getConfig(t) { 8198 return ( 8199 (t = { 8200 ...Default$8, 8201 ...Manipulator.getDataAttributes(this._element), 8202 ...('object' == typeof t ? t : {}), 8203 }), 8204 typeCheckConfig(NAME$i, t, DefaultType), 8205 t 8206 ); 8207 } 8208 _getElementTimeout(t) { 8209 const e = t ? parseInt(t.getAttribute('data-bs-timeout')) : null; 8210 return e > 0 ? e : this._config.timeout; 8211 } 8212 _setTimeout(t, e) { 8213 this._clearTimeout(), setTimeout(e, t); 8214 } 8215 _clearTimeout() { 8216 this._toId && (clearTimeout(this._toId), (this._toId = null)); 8217 } 8218 } 8219 EventHandler$1.on( 8220 document, 8221 EVENT_CLICK_DATA_API$5, 8222 SELECTOR_DATA_TOGGLE$3, 8223 function (t) { 8224 const e = getElementFromSelector(this); 8225 ['A', 'AREA'].includes(this.tagName) && t.preventDefault(), 8226 EventHandler$1.one(e, EVENT_SHOW$1, (t) => { 8227 t.defaultPrevented || 8228 EventHandler$1.one(e, EVENT_HIDDEN$1, () => { 8229 isVisible(this) && this.focus(); 8230 }); 8231 }); 8232 Notification.getOrCreateInstance(e).toggle(this); 8233 } 8234 ), 8235 enableDismissTrigger(Notification); 8236 var Notification$1 = Notification; 8237 const NAME$h = 'cookiebar', 8238 DATA_KEY$7 = 'bs.cookiebar', 8239 EVENT_KEY$7 = `.${DATA_KEY$7}`, 8240 COOKIE_NAME = 'cookies_consent', 8241 SELECTOR_ACCEPT = '[data-bs-accept="cookiebar"]', 8242 EVENT_CLOSE = `close${EVENT_KEY$7}`, 8243 EVENT_CLOSED = `closed${EVENT_KEY$7}`, 8244 EVENT_LOAD_DATA_API = `load${EVENT_KEY$7}.data-api`, 8245 EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}.data-api`; 8246 class Cookiebar extends BaseComponent { 8247 constructor(e) { 8248 super(e), 8249 (this._isShown = this._element.classList.contains('show')), 8250 (this._isTransitioning = !1); 8251 } 8252 static get NAME() { 8253 return NAME$h; 8254 } 8255 static get VERSION() { 8256 return '5.0.0'; 8257 } 8258 show() { 8259 this._isShown || 8260 this._isTransitioning || 8261 ((this._isShown = !0), 8262 this._isAnimated() && (this._isTransitioning = !0), 8263 this._showElement()); 8264 } 8265 hide() { 8266 if (!this._isShown || this._isTransitioning) return; 8267 this._isShown = !1; 8268 const e = this._isAnimated(); 8269 e && (this._isTransitioning = !0), 8270 this._element.classList.remove('show'), 8271 this._queueCallback( 8272 () => this._hideElement(), 8273 this._element, 8274 e 8275 ); 8276 } 8277 accept(e) { 8278 e = e || this._element; 8279 const t = this._getRootElement(e); 8280 this._triggerCloseEvent(t).defaultPrevented || 8281 (this._setCookieEU(), this.hide()); 8282 } 8283 static clearCookie() { 8284 document.cookie = 8285 COOKIE_NAME + 8286 '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'; 8287 }
8288 _isAnimated() { 8289 return this._element.classList.contains('fade'); 8290 } 8291 _showElement() { 8292 const e = this._isAnimated(); 8293 this._element.removeAttribute('aria-hidden'), 8294 this._element.setAttribute('aria-live', 'polite'), 8295 e && reflow(this._element), 8296 this._element.classList.add('show'); 8297 this._queueCallback( 8298 () => { 8299 this._isTransitioning = !1; 8300 }, 8301 this._element, 8302 e 8303 ); 8304 } 8305 _hideElement() { 8306 (this._element.style.display = 'none'), 8307 this._element.setAttribute('aria-hidden', !0), 8308 this._element.removeAttribute('aria-live'), 8309 (this._isTransitioning = !1); 8310 } 8311 _setCookieEU() { 8312 var e = new Date(); 8313 e.setDate(e.getDate() + 30); 8314 var t = escape('true') + '; expires=' + e.toUTCString(); 8315 document.cookie = COOKIE_NAME + '=' + t + '; path=/'; 8316 } 8317 _getRootElement(e) { 8318 const t = getElementFromSelector(e); 8319 let i = null; 8320 return t && (i = t), i || (i = e.closest('.cookiebar')), i; 8321 } 8322 _triggerCloseEvent(e) { 8323 return EventHandler$1.trigger(e, EVENT_CLOSE); 8324 } 8325 _removeElement(e) { 8326 e.classList.remove('show'), 8327 e.setAttribute('aria-hidden', 'true'), 8328 e.setAttribute('aria-live', 'off'), 8329 EventHandler$1.trigger(e, EVENT_CLOSED), 8330 this.dispose(); 8331 } 8332 static _handleAccept(e) { 8333 return function (t) { 8334 t && t.preventDefault(), e.close(this); 8335 }; 8336 } 8337 static _handleConsent(e) { 8338 return function (t) { 8339 t && t.preventDefault(), e.close(this); 8340 }; 8341 } 8342 static _getCookieEU() { 8343 var e, 8344 t, 8345 i, 8346 s = document.cookie.split(';'); 8347 for (e = 0; e < s.length; e++) 8348 if ( 8349 ((t = s[e].substring(0, s[e].indexOf('='))), 8350 (i = s[e].substring(s[e].indexOf('=') + 1)), 8351 (t = t.replace(/^\s+|\s+$/g, '')) == COOKIE_NAME) 8352 ) 8353 return unescape(i); 8354 } 8355 } 8356 EventHandler$1.on( 8357 document, 8358 EVENT_CLICK_DATA_API$4, 8359 SELECTOR_ACCEPT, 8360 function (e) { 8361 if ( 8362 (['A', 'AREA'].includes(this.tagName) && e.preventDefault(), 8363 isDisabled(this)) 8364 ) 8365 return; 8366 const t = 8367 getElementFromSelector(this) || this.closest(`.${NAME$h}`); 8368 Cookiebar.getOrCreateInstance(t).accept(); 8369 } 8370 ), 8371 EventHandler$1.on(window, EVENT_LOAD_DATA_API, function () { 8372 if (!Cookiebar._getCookieEU()) { 8373 document.querySelectorAll('.cookiebar').forEach((e) => { 8374 Cookiebar.getOrCreateInstance(e).show(); 8375 }); 8376 } 8377 }); 8378 var Cookiebar$1 = Cookiebar; 8379 const MEDIA_MOBILE = '(max-width: 991px)', 8380 isScreenMobile = () => window.matchMedia(MEDIA_MOBILE).matches; 8381 const getElementIndex = (e, t) => { 8382 let i = null; 8383 return ( 8384 t.forEach((t, o) => { 8385 t === e && (i = o); 8386 }), 8387 i 8388 ); 8389 }; 8390 const focusSimbling = (e, t, i) => { 8391 i = { 8392 isDirectionTop: !1, 8393 isLimit: !1, 8394 loop: !1, 8395 ...('object' == typeof i ? i : {}), 8396 }; 8397 const o = getElementIndex(e, t); 8398 let n = null; 8399 if (i.isLimit && i.isDirectionTop && o > 0) n = t[0]; 8400 else if (i.isLimit && o < t.length - 1) n = t[t.length - 1]; 8401 else if (i.isDirectionTop) { 8402 if (!i.loop && 0 === o) return; 8403 n = t[0 === o ? t.length - 1 : o - 1]; 8404 } else { 8405 if (!i.loop && o === t.length - 1) return; 8406 n = t[o === t.length - 1 ? 0 : o + 1]; 8407 } 8408 n && n.focus(); 8409 }; 8410 const NAME$g = 'navbarcollapsible', 8411 DATA_KEY$6 = 'bs.navbarcollapsible', 8412 EVENT_KEY$6 = `.${DATA_KEY$6}`, 8413 EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}.data-api`, 8414 EVENT_CLICK$6 = `click${EVENT_KEY$6}`, 8415 EVENT_KEYUP$2 = `keyup${EVENT_KEY$6}`, 8416 EVENT_KEYDOWN$2 = `keydown${EVENT_KEY$6}`, 8417 EVENT_HIDE = `hide${EVENT_KEY$6}`, 8418 EVENT_HIDDEN = `hidden${EVENT_KEY$6}`, 8419 EVENT_SHOW = `show${EVENT_KEY$6}`, 8420 EVENT_SHOWN = `shown${EVENT_KEY$6}`, 8421 EVENT_RESIZE$1 = `resize${EVENT_KEY$6}`, 8422 SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="navbarcollapsible"]', 8423 SELECTOR_BTN_CLOSE = '.close-div button', 8424 SELECTOR_BTN_MENU_CLOSE = '.close-menu', 8425 SELECTOR_NAVLINK = 'a.nav-link', 8426 SELECTOR_MEGAMENUNAVLINK = '.nav-item .list-item';
8427 class NavBarCollapsible extends BaseComponent { 8428 constructor(e) { 8429 super(e), 8430 (this._isShown = this._element.classList.contains('expanded')), 8431 (this._isTransitioning = !1), 8432 (this._isMobile = isScreenMobile()), 8433 (this._isKeyShift = !1), 8434 (this._currItemIdx = 0), 8435 (this._btnClose = SelectorEngine$1.findOne( 8436 SELECTOR_BTN_CLOSE, 8437 this._element 8438 )), 8439 (this._btnBack = SelectorEngine$1.findOne( 8440 '.it-back-button', 8441 this._element 8442 )), 8443 (this._menuWrapper = SelectorEngine$1.findOne( 8444 '.menu-wrapper', 8445 this._element 8446 )), 8447 (this._overlay = null), 8448 this._setOverlay(), 8449 (this._menuItems = SelectorEngine$1.find( 8450 [ 8451 SELECTOR_NAVLINK, 8452 SELECTOR_MEGAMENUNAVLINK, 8453 SELECTOR_BTN_MENU_CLOSE, 8454 ].join(','), 8455 this._element 8456 )), 8457 this._bindEvents(); 8458 } 8459 static get NAME() { 8460 return NAME$g; 8461 } 8462 show(e) { 8463 if (this._isShown || this._isTransitioning) return; 8464 EventHandler$1.trigger(this._element, EVENT_SHOW, { 8465 relatedTarget: e, 8466 }).defaultPrevented || 8467 (this._btnBack && this._btnBack.classList.add('show'), 8468 (this._isShown = !0), 8469 this._showElement()); 8470 } 8471 hide() { 8472 if (!this._isShown || this._isTransitioning) return; 8473 if ( 8474 EventHandler$1.trigger(this._element, EVENT_HIDE) 8475 .defaultPrevented 8476 ) 8477 return; 8478 this._isShown = !1; 8479 const e = this._isAnimated(); 8480 e && (this._isTransitioning = !0), 8481 this._btnBack && this._btnBack.classList.remove('show'), 8482 this._overlay && this._overlay.classList.remove('show'), 8483 this._element.classList.remove('expanded'), 8484 this._queueCallback( 8485 () => this._hideElement(), 8486 this._menuWrapper, 8487 e 8488 ); 8489 } 8490 toggle(e) { 8491 this._isShown ? this.hide() : this.show(e); 8492 } 8493 dispose() { 8494 EventHandler$1.off(window, EVENT_RESIZE$1), super.dispose(); 8495 } 8496 _bindEvents() { 8497 EventHandler$1.on(window, EVENT_RESIZE$1, () => this._onResize()), 8498 this._overlay && 8499 EventHandler$1.on(this._overlay, EVENT_CLICK$6, () => 8500 this.hide() 8501 ), 8502 EventHandler$1.on(this._btnClose, EVENT_CLICK$6, (e) => { 8503 e.preventDefault(), this.hide(); 8504 }), 8505 EventHandler$1.on(this._btnBack, EVENT_CLICK$6, (e) => { 8506 e.preventDefault(), this.hide(); 8507 }), 8508 this._menuItems.forEach((e) => { 8509 EventHandler$1.on( 8510 e, 8511 EVENT_KEYDOWN$2, 8512 (e) => this._isMobile && this._onMenuItemKeyDown(e) 8513 ), 8514 EventHandler$1.on( 8515 e, 8516 EVENT_KEYUP$2, 8517 (e) => this._isMobile && this._onMenuItemKeyUp(e) 8518 ), 8519 EventHandler$1.on( 8520 e, 8521 EVENT_CLICK$6, 8522 (e) => this._isMobile && this._onMenuItemClick(e) 8523 ); 8524 }); 8525 } 8526 _onResize() { 8527 this._isMobile = isScreenMobile(); 8528 } 8529 _onMenuItemKeyUp(e) { 8530 'Shift' === e.key && (this._isKeyShift = !1); 8531 } 8532 _onMenuItemKeyDown(e) { 8533 'Shift' === e.key && (this._isKeyShift = !0), 8534 'Tab' === e.key && (e.preventDefault(), this._focusNext()); 8535 } 8536 _onMenuItemClick(e) { 8537 this.currItemIdx = getElementIndex( 8538 e.currentTarget, 8539 this._menuItems 8540 ); 8541 }
8542 _isAnimated() { 8543 return !0; 8544 } 8545 _isElementHidden(e) { 8546 return null === e.offsetParent; 8547 } 8548 _showElement() { 8549 const e = this._isAnimated(); 8550 (this._element.style.display = 'block'), 8551 this._element.removeAttribute('aria-hidden'), 8552 this._element.setAttribute('aria-expanded', !0), 8553 this._overlay && (this._overlay.style.display = 'block'), 8554 e && reflow(this._element), 8555 this._element.classList.add('expanded'), 8556 this._overlay && this._overlay.classList.add('show'); 8557 this._queueCallback( 8558 () => { 8559 this._isTransitioning = !1; 8560 const e = this._getNextVisibleItem(1); 8561 e.item && (e.item.focus(), (this._currItemIdx = e.index)), 8562 EventHandler$1.trigger(this._element, EVENT_SHOWN); 8563 }, 8564 this._menuWrapper, 8565 e 8566 ); 8567 } 8568 _hideElement() { 8569 this._overlay && (this._overlay.style.display = 'none'), 8570 (this._element.style.display = 'none'), 8571 this._element.setAttribute('aria-hidden', !0), 8572 this._element.removeAttribute('aria-expanded'), 8573 (this._isTransitioning = !1), 8574 EventHandler$1.trigger(this._element, EVENT_HIDDEN); 8575 } 8576 _setOverlay() { 8577 (this._overlay = SelectorEngine$1.findOne( 8578 '.overlay', 8579 this._element 8580 )), 8581 this._isAnimated && this._overlay.classList.add('fade'); 8582 } 8583 _focusNext() { 8584 let e = this._currItemIdx + (this._isKeyShift ? -1 : 1); 8585 e < 0 8586 ? (e = this._menuItems.length - 1) 8587 : e >= this._menuItems.length && (e = 0); 8588 const t = this._getNextVisibleItem(e, this._isKeyShift); 8589 t.item && (t.item.focus(), (this._currItemIdx = t.index)); 8590 } 8591 _getNextVisibleItem(e, t) { 8592 let i = null, 8593 s = null, 8594 n = e, 8595 E = t ? -1 : 1, 8596 _ = !1; 8597 for (; !(i || (n == e && _));) 8598 n == e && (_ = !0), 8599 this._isElementHidden(this._menuItems[n]) || 8600 ((i = this._menuItems[n]), (s = n)), 8601 (n += E), 8602 n < 0 8603 ? (n = this._menuItems.length - 1) 8604 : n >= this._menuItems.length && (n = 0); 8605 return { item: i, index: s }; 8606 } 8607 } 8608 EventHandler$1.on( 8609 document, 8610 EVENT_CLICK_DATA_API$3, 8611 SELECTOR_DATA_TOGGLE$2, 8612 function (e) { 8613 const t = getElementFromSelector(this); 8614 ['A', 'AREA'].includes(this.tagName) && e.preventDefault(), 8615 EventHandler$1.one(t, EVENT_SHOW, (e) => { 8616 e.defaultPrevented || 8617 EventHandler$1.one(t, EVENT_HIDDEN, () => { 8618 isVisible(this) && this.focus(); 8619 }); 8620 }); 8621 NavBarCollapsible.getOrCreateInstance(t).toggle(this); 8622 } 8623 ); 8624 var NavBarCollapsible$1 = NavBarCollapsible; 8625 const NAME$f = 'accordion', 8626 DATA_KEY$5 = 'bs.accordion', 8627 EVENT_KEY$5 = `.${DATA_KEY$5}`, 8628 EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$5}`, 8629 EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$5}.data-api`, 8630 SELECTOR_HEADBTN = 8631 '.accordion-item > .accordion-header [data-bs-toggle="collapse"]'; 8632 class Accordion extends BaseComponent { 8633 constructor(o) { 8634 super(o), this._bindEvents(); 8635 } 8636 static get NAME() { 8637 return NAME$f; 8638 } 8639 handleKeyDown(o, e, t) { 8640 const n = { 8641 ArrowDown: (o) => this._focusNext(o), 8642 ArrowUp: (o) => this._focusPrev(o), 8643 Home: (o) => this._focusFirst(o), 8644 End: (o) =>
8644 this._focusLast(o), 8645 }; 8646 'function' == typeof n[o] && (t && t.preventDefault(), n[o](e)); 8647 } 8648 _bindEvents() { 8649 SelectorEngine$1.find(SELECTOR_HEADBTN, this._element).forEach( 8650 (o) => { 8651 EventHandler$1.on(o, EVENT_KEYDOWN$1, (o) => { 8652 this.handleKeyDown(o.key, o.currentTarget, o); 8653 }); 8654 } 8655 ); 8656 } 8657 _getHeadButtons() { 8658 return SelectorEngine$1.find( 8659 ':scope > ' + SELECTOR_HEADBTN, 8660 this._element 8661 ); 8662 } 8663 _focusNext(o) { 8664 focusSimbling(o, this._getHeadButtons(), { loop: !0 }); 8665 } 8666 _focusPrev(o) { 8667 focusSimbling(o, this._getHeadButtons(), { 8668 isDirectionTop: !0, 8669 loop: !0, 8670 }); 8671 } 8672 _focusFirst(o) { 8673 focusSimbling(o, this._getHeadButtons(), { 8674 isDirectionTop: !0, 8675 isLimit: !0, 8676 }); 8677 } 8678 _focusLast(o) { 8679 focusSimbling(o, this._getHeadButtons(), { isLimit: !0 }); 8680 } 8681 } 8682 const accordionToggles = SelectorEngine$1.find(SELECTOR_HEADBTN); 8683 accordionToggles.forEach((o) => { 8684 EventHandler$1.one(o, EVENT_KEYDOWN_DATA_API, (e) => { 8685 const t = o.closest('.accordion'); 8686 if (t) { 8687 Accordion.getOrCreateInstance(t).handleKeyDown(e.key, o, e); 8688 } 8689 }); 8690 }); 8691 var Accordion$1 = Accordion; 8692 var getRandomValues, 8693 rnds8 = new Uint8Array(16); 8694 function rng() { 8695 if ( 8696 !getRandomValues && 8697 !(getRandomValues = 8698 ('undefined' != typeof crypto && 8699 crypto.getRandomValues && 8700 crypto.getRandomValues.bind(crypto)) || 8701 ('undefined' != typeof msCrypto && 8702 'function' == typeof msCrypto.getRandomValues && 8703 msCrypto.getRandomValues.bind(msCrypto))) 8704 ) 8705 throw new Error( 8706 'crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported' 8707 ); 8708 return getRandomValues(rnds8); 8709 } 8710 var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; 8711 function validate(t) { 8712 return 'string' == typeof t && REGEX.test(t); 8713 } 8714 for (var byteToHex = [], i = 0; i < 256; ++i) 8715 byteToHex.push((i + 256).toString(16).substr(1)); 8716 function stringify(e) { 8717 var t = 8718 arguments.length > 1 && void 0 !== arguments[1] 8719 ? arguments[1] 8720 : 0, 8721 o = ( 8722 byteToHex[e[t + 0]] + 8723 byteToHex[e[t + 1]] + 8724 byteToHex[e[t + 2]] + 8725 byteToHex[e[t + 3]] + 8726 '-' + 8727 byteToHex[e[t + 4]] + 8728 byteToHex[e[t + 5]] + 8729 '-' + 8730 byteToHex[e[t + 6]] + 8731 byteToHex[e[t + 7]] + 8732 '-' + 8733 byteToHex[e[t + 8]] + 8734 byteToHex[e[t + 9]] + 8735 '-' + 8736 byteToHex[e[t + 10]] + 8737 byteToHex[e[t + 11]] + 8738 byteToHex[e[t + 12]] + 8739 byteToHex[e[t + 13]] + 8740 byteToHex[e[t + 14]] + 8741 byteToHex[e[t + 15]] 8742 ).toLowerCase(); 8743 if (!validate(o)) throw TypeError('Stringified UUID is invalid'); 8744 return o; 8745 } 8746 function v4(r, n, i) { 8747 var t = (r = r || {}).random || (r.rng || rng)(); 8748 if (((t[6] = (15 & t[6]) | 64), (t[8] = (63 & t[8]) | 128), n)) { 8749 i = i || 0; 8750 for (var o = 0; o < 16; ++o) n[i + o] = t[o]; 8751 return n; 8752 } 8753 return stringify(t); 8754 } 8755 let ticking = !1, 8756 callbacks = []; 8757 class ScrollCallback { 8758 constructor(c, l) { 8759 (this.id = c), (this._callback = l); 8760 } 8761 dispose() { 8762 removeCallBack(this.id); 8763 } 8764 _execute(c) { 8765 this._callback(c); 8766 } 8767 } 8768 const removeCallBack = (c) => { 8769 callbacks = callbacks.filter((l) => l.id !== c); 8770 }, 8771 onDocumentScroll = (c) => { 8772 if ( 8773 (callbacks.length || 8774 document.addEventListener('scroll', (c) => { 8775 ticking || 8776 (window.requestAnimationFrame(() => { 8777 callbacks.forEach((l) => l.cb._execute(c)), 8778 (ticking = !1); 8779 }), 8780 (ticking = !0)); 8781 }), 8782 'function' == typeof c) 8783 ) { 8784 const l = new ScrollCallback(v4(), c); 8785 return callbacks.push({ id: l.id, cb: l }), l; 8786 } 8787 return ( 8788 console.error( 8789 '[onDocumentScroll] the provided data has to be of type function' 8790 ), 8791 null 8792 ); 8793 }; 8794 var onDocumentScroll$1 = onDocumentScroll; 8795 var defaultInstanceSettings = { 8796 update: null, 8797 begin: null, 8798 loopBegin: null, 8799 changeBegin: null, 8800 change: null, 8801 changeComplete: null, 8802 loopComplete: null, 8803 complete: null, 8804 loop: 1, 8805 direction: 'normal', 8806 autoplay: !0, 8807 timelineOffset: 0, 8808 },
8809 defaultTweenSettings = { 8810 duration: 1e3, 8811 delay: 0, 8812 endDelay: 0, 8813 easing: 'easeOutElastic(1, .5)', 8814 round: 0, 8815 }, 8816 validTransforms = [ 8817 'translateX', 8818 'translateY', 8819 'translateZ', 8820 'rotate', 8821 'rotateX', 8822 'rotateY', 8823 'rotateZ', 8824 'scale', 8825 'scaleX', 8826 'scaleY', 8827 'scaleZ', 8828 'skew', 8829 'skewX', 8830 'skewY', 8831 'perspective', 8832 'matrix', 8833 'matrix3d', 8834 ], 8835 cache = { CSS: {}, springs: {} }; 8836 function minMax(e, t, n) { 8837 return Math.min(Math.max(e, t), n); 8838 } 8839 function stringContains(e, t) { 8840 return e.indexOf(t) > -1; 8841 } 8842 function applyArguments(e, t) { 8843 return e.apply(null, t); 8844 } 8845 var is = { 8846 arr: function (e) { 8847 return Array.isArray(e); 8848 }, 8849 obj: function (e) { 8850 return stringContains(Object.prototype.toString.call(e), 'Object'); 8851 }, 8852 pth: function (e) { 8853 return is.obj(e) && e.hasOwnProperty('totalLength'); 8854 }, 8855 svg: function (e) { 8856 return e instanceof SVGElement; 8857 }, 8858 inp: function (e) { 8859 return e instanceof HTMLInputElement; 8860 }, 8861 dom: function (e) { 8862 return e.nodeType || is.svg(e); 8863 }, 8864 str: function (e) { 8865 return 'string' == typeof e; 8866 }, 8867 fnc: function (e) { 8868 return 'function' == typeof e; 8869 }, 8870 und: function (e) { 8871 return void 0 === e; 8872 }, 8873 nil: function (e) { 8874 return is.und(e) || null === e; 8875 }, 8876 hex: function (e) { 8877 return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e); 8878 }, 8879 rgb: function (e) { 8880 return /^rgb/.test(e); 8881 }, 8882 hsl: function (e) { 8883 return /^hsl/.test(e); 8884 }, 8885 col: function (e) { 8886 return is.hex(e) || is.rgb(e) || is.hsl(e); 8887 }, 8888 key: function (e) { 8889 return ( 8890 !defaultInstanceSettings.hasOwnProperty(e) && 8891 !defaultTweenSettings.hasOwnProperty(e) && 8892 'targets' !== e && 8893 'keyframes' !== e 8894 ); 8895 }, 8896 }; 8897 function parseEasingParameters(e) { 8898 var t = /\(([^)]+)\)/.exec(e); 8899 return t 8900 ? t[1].split(',').map(function (e) { 8901 return parseFloat(e); 8902 }) 8903 : []; 8904 } 8905 function spring(e, t) { 8906 var n = parseEasingParameters(e), 8907 r = minMax(is.und(n[0]) ? 1 : n[0], 0.1, 100), 8908 a = minMax(is.und(n[1]) ? 100 : n[1], 0.1, 100), 8909 i = minMax(is.und(n[2]) ? 10 : n[2], 0.1, 100), 8910 o = minMax(is.und(n[3]) ? 0 : n[3], 0.1, 100), 8911 s = Math.sqrt(a / r), 8912 u = i / (2 * Math.sqrt(a * r)), 8913 c = u < 1 ? s * Math.sqrt(1 - u * u) : 0, 8914 l = u < 1 ? (u * s - o) / c : -o + s; 8915 function g(e) { 8916 var n = t ? (t * e) / 1e3 : e; 8917 return ( 8918 (n = 8919 u < 1 8920 ? Math.exp(-n * u * s) * 8921 (1 * Math.cos(c * n) + l * Math.sin(c * n)) 8922 : (1 + l * n) * Math.exp(-n * s)), 8923 0 === e || 1 === e ? e : 1 - n 8924 ); 8925 } 8926 return t 8927 ? g 8928 : function () { 8929 var t = cache.springs[e]; 8930 if (t) return t; 8931 for (var n = 1 / 6, r = 0, a = 0; ;) 8932 if (1 === g((r += n))) { 8933 if (++a >= 16) break; 8934 } else a = 0; 8935 var i = r * n * 1e3; 8936 return (cache.springs[e] = i), i; 8937 }; 8938 } 8939 function steps(e) { 8940 return ( 8941 void 0 === e && (e = 10), 8942 function (t) { 8943 return Math.ceil(minMax(t, 1e-6, 1) * e) * (1 / e); 8944 } 8945 ); 8946 } 8947 var bezier = (function () { 8948 var e = 0.1; 8949 function t(e, t) { 8950 return 1 - 3 * t + 3 * e; 8951 } 8952 function n(e, t) { 8953 return 3 * t - 6 * e; 8954 } 8955 function r(e) { 8956 return 3 * e; 8957 } 8958 function a(e, a, i) { 8959 return ((t(a, i) * e + n(a, i)) * e + r(a)) * e; 8960 } 8961 function i(e, a, i) { 8962 return 3 * t(a, i) * e * e + 2 * n(a, i) * e + r(a); 8963 } 8964 return function (t, n, r, o) { 8965 if (0 <= t && t <= 1 && 0 <= r && r <= 1) { 8966 var s = new Float32Array(11); 8967 if (t !== n || r !== o) 8968 for (var u = 0; u < 11; ++u) s[u] = a(u * e, t, r); 8969 return function (e) { 8970 return (t === n && r === o) || 0 === e || 1 === e 8971 ? e 8972 : a(c(e), n, o); 8973 }; 8974 } 8975 function c(n) { 8976 for (var o = 0, u = 1; 10 !== u && s[u] <= n; ++u) o += e; 8977 --u; 8978 var c = o + ((n - s[u]) / (s[u + 1] - s[u])) * e, 8979 l = i(c, t, r); 8980 return l >= 0.001 8981 ? (function (e, t, n, r) { 8982 for (var o = 0; o < 4; ++o) { 8983 var s = i(t, n, r); 8984 if (0 === s) return t; 8985 t -= (a(t, n, r) - e) / s; 8986 } 8987 return t; 8988 })(n, c, t, r) 8989 : 0 === l 8990 ? c 8991 : (function (e, t, n, r, i) { 8992 var o, 8993 s, 8994 u = 0; 8995 do { 8996 (o = a((s = t + (n - t) / 2), r, i) - e) > 0 8997 ? (n = s) 8998 : (t = s); 8999 } while (Math.abs(o) > 1e-7 && ++u < 10); 9000 return s; 9001 })(n, o, o + e, t, r); 9002 } 9003 }; 9004 })(), 9005 penner = (function () { 9006 var e = { 9007 linear: function () { 9008 return function (e) { 9009 return e; 9010 }; 9011 }, 9012 }, 9013 t = { 9014 Sine: function () { 9015 return function (e) { 9016 return 1 - Math.cos((e * Math.PI) / 2); 9017 }; 9018 }, 9019 Circ: function () { 9020 return function (e) { 9021 return 1 - Math.sqrt(1 - e * e); 9022 }; 9023 }, 9024 Back: function () { 9025 return function (e) { 9026 return e * e * (3 * e - 2); 9027 }; 9028 }, 9029 Bounce: function () { 9030 return function (e) { 9031 for ( 9032 var t, n = 4; 9033 e < ((t = Math.pow(2, --n)) - 1) / 11; 9034 9035 ); 9036 return ( 9037 1 / Math.pow(4, 3 - n) - 9038 7.5625 * Math.pow((3 * t - 2) / 22 - e, 2) 9039 ); 9040 }; 9041 }, 9042 Elastic: function (e, t) { 9043 void 0 === e && (e = 1), void 0 === t && (t = 0.5); 9044 var n = minMax(e, 1, 10), 9045 r = minMax(t, 0.1, 2); 9046 return function (e) { 9047 return 0 === e || 1 === e 9048 ? e 9049 : -n * 9050 Math.pow(2, 10 * (e - 1)) * 9051 Math.sin( 9052 ((e - 9053 1 - 9054 (r / (2 * Math.PI)) * 9055 Math.asin(1 / n)) * 9056 (2 * Math.PI)) / 9057 r 9058 ); 9059 }; 9060 }, 9061 }; 9062 return ( 9063 ['Quad', 'Cubic', 'Quart', 'Quint', 'Expo'].forEach(function ( 9064 e, 9065 n 9066 ) { 9067 t[e] = function () { 9068 return function (e) { 9069 return Math.pow(e, n + 2); 9070 }; 9071 }; 9072 }), 9073 Object.keys(t).forEach(function (n) { 9074 var r = t[n]; 9075 (e['easeIn' + n] = r), 9076 (e['easeOut' + n] = function (e, t) { 9077 return function (n) { 9078 return 1 - r(e, t)(1 - n); 9079 }; 9080 }), 9081 (e['easeInOut' + n] = function (e, t) { 9082 return function (n) { 9083 return n < 0.5 9084 ? r(e, t)(2 * n) / 2 9085 : 1 - r(e, t)(-2 * n + 2) / 2; 9086 }; 9087 }), 9088 (e['easeOutIn' + n] = function (e, t) { 9089 return function (n) { 9090 return n < 0.5 9091 ? (1 - r(e, t)(1 - 2 * n)) / 2 9092 : (r(e, t)(2 * n - 1) + 1) / 2; 9093 }; 9094 }); 9095 }), 9096 e 9097 ); 9098 })(); 9099 function parseEasings(e, t) { 9100 if (is.fnc(e)) return e; 9101 var n = e.split('(')[0], 9102 r = penner[n], 9103 a = parseEasingParameters(e); 9104 switch (n) { 9105 case 'spring': 9106 return spring(e, t); 9107 case 'cubicBezier': 9108 return applyArguments(bezier, a); 9109 case 'steps': 9110 return applyArguments(steps, a); 9111 default: 9112 return applyArguments(r, a); 9113 } 9114 }
9115 function selectString(e) { 9116 try { 9117 return document.querySelectorAll(e); 9118 } catch (e) { 9119 return; 9120 } 9121 } 9122 function filterArray(e, t) { 9123 for ( 9124 var n = e.length, 9125 r = arguments.length >= 2 ? arguments[1] : void 0, 9126 a = [], 9127 i = 0; 9128 i < n; 9129 i++ 9130 ) 9131 if (i in e) { 9132 var o = e[i]; 9133 t.call(r, o, i, e) && a.push(o); 9134 } 9135 return a; 9136 } 9137 function flattenArray(e) { 9138 return e.reduce(function (e, t) { 9139 return e.concat(is.arr(t) ? flattenArray(t) : t); 9140 }, []); 9141 } 9142 function toArray(e) { 9143 return is.arr(e) 9144 ? e 9145 : (is.str(e) && (e = selectString(e) || e), 9146 e instanceof NodeList || e instanceof HTMLCollection 9147 ? [].slice.call(e) 9148 : [e]); 9149 } 9150 function arrayContains(e, t) { 9151 return e.some(function (e) { 9152 return e === t; 9153 }); 9154 } 9155 function cloneObject(e) { 9156 var t = {}; 9157 for (var n in e) t[n] = e[n]; 9158 return t; 9159 } 9160 function replaceObjectProps(e, t) { 9161 var n = cloneObject(e); 9162 for (var r in e) n[r] = t.hasOwnProperty(r) ? t[r] : e[r]; 9163 return n; 9164 } 9165 function mergeObjects(e, t) { 9166 var n = cloneObject(e); 9167 for (var r in t) n[r] = is.und(e[r]) ? t[r] : e[r]; 9168 return n; 9169 } 9170 function rgbToRgba(e) { 9171 var t = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e); 9172 return t ? 'rgba(' + t[1] + ',1)' : e; 9173 } 9174 function hexToRgba(e) { 9175 var t = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function ( 9176 e, 9177 t, 9178 n, 9179 r 9180 ) { 9181 return t + t + n + n + r + r; 9182 }), 9183 n = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t); 9184 return ( 9185 'rgba(' + 9186 parseInt(n[1], 16) + 9187 ',' + 9188 parseInt(n[2], 16) + 9189 ',' + 9190 parseInt(n[3], 16) + 9191 ',1)' 9192 ); 9193 } 9194 function hslToRgba(e) { 9195 var t, 9196 n, 9197 r, 9198 a = 9199 /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e) || 9200 /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e), 9201 i = parseInt(a[1], 10) / 360, 9202 o = parseInt(a[2], 10) / 100, 9203 s = parseInt(a[3], 10) / 100, 9204 u = a[4] || 1; 9205 function c(e, t, n) { 9206 return ( 9207 n < 0 && (n += 1), 9208 n > 1 && (n -= 1), 9209 n < 1 / 6 9210 ? e + 6 * (t - e) * n 9211 : n < 0.5 9212 ? t 9213 : n < 2 / 3 9214 ? e + (t - e) * (2 / 3 - n) * 6 9215 : e 9216 ); 9217 } 9218 if (0 == o) t = n = r = s; 9219 else { 9220 var l = s < 0.5 ? s * (1 + o) : s + o - s * o, 9221 g = 2 * s - l; 9222 (t = c(g, l, i + 1 / 3)), 9223 (n = c(g, l, i)), 9224 (r = c(g, l, i - 1 / 3)); 9225 } 9226 return ( 9227 'rgba(' + 255 * t + ',' + 255 * n + ',' + 255 * r + ',' + u + ')' 9228 ); 9229 } 9230 function colorToRgb(e) { 9231 return is.rgb(e) 9232 ? rgbToRgba(e) 9233 : is.hex(e) 9234 ? hexToRgba(e) 9235 : is.hsl(e) 9236 ? hslToRgba(e) 9237 : void 0; 9238 } 9239 function getUnit(e) { 9240 var t = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec( 9241 e 9242 ); 9243 if (t) return t[1]; 9244 } 9245 function getTransformUnit(e) { 9246 return stringContains(e, 'translate') || 'perspective' === e 9247 ? 'px' 9248 : stringContains(e, 'rotate') || stringContains(e, 'skew') 9249 ? 'deg' 9250 : void 0; 9251 } 9252 function getFunctionValue(e, t) { 9253 return is.fnc(e) ? e(t.target, t.id, t.total) : e; 9254 } 9255 function getAttribute(e, t) { 9256 return e.getAttribute(t); 9257 } 9258 function convertPxToUnit(e, t, n) { 9259 if (arrayContains([n, 'deg', 'rad', 'turn'], getUnit(t))) return t; 9260 var r = cache.CSS[t + n]; 9261 if (!is.und(r)) return r; 9262 var a = document.createElement(e.tagName), 9263 i = 9264 e.parentNode && e.parentNode !== document 9265 ? e.parentNode 9266 : document.body; 9267 i.appendChild(a), 9268 (a.style.position = 'absolute'), 9269 (a.style.width = 100 + n); 9270 var o = 100 / a.offsetWidth; 9271 i.removeChild(a); 9272 var s = o * parseFloat(t); 9273 return (cache.CSS[t + n] = s), s; 9274 } 9275 function getCSSValue(e, t, n) { 9276 if (t in e.style) { 9277 var r = t.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(), 9278 a = 9279 e.style[t] || 9280 getComputedStyle(e).getPropertyValue(r) || 9281 '0'; 9282 return n ? convertPxToUnit(e, a, n) : a; 9283 } 9284 } 9285 function getAnimationType(e, t) { 9286 return is.dom(e) && 9287 !is.inp(e) && 9288 (!is.nil(getAttribute(e, t)) || (is.svg(e) && e[t])) 9289 ? 'attribute' 9290 : is.dom(e) && arrayContains(validTransforms, t) 9291 ? 'transform' 9292 : is.dom(e) && 'transform' !== t && getCSSValue(e, t) 9293 ? 'css' 9294 : null != e[t] 9295 ? 'object' 9296 : void 0; 9297 } 9298 function getElementTransforms(e) { 9299 if (is.dom(e)) { 9300 for ( 9301 var t, 9302 n = e.style.transform || '', 9303 r = /(\w+)\(([^)]*)\)/g, 9304 a = new Map(); 9305 (t = r.exec(n)); 9306 9307 ) 9308 a.set(t[1], t[2]); 9309 return a; 9310 } 9311 } 9312 function getTransformValue(e, t, n, r) { 9313 var a = stringContains(t, 'scale') ? 1 : 0 + getTransformUnit(t), 9314 i = getElementTransforms(e).get(t) || a; 9315 return ( 9316 n && (n.transforms.list.set(t, i), (n.transforms.last = t)), 9317 r ? convertPxToUnit(e, i, r) : i 9318 ); 9319 } 9320 function getOriginalTargetValue(e, t, n, r) { 9321 switch (getAnimationType(e, t)) { 9322 case 'transform': 9323 return getTransformValue(e, t, r, n); 9324 case 'css': 9325 return getCSSValue(e, t, n); 9326 case 'attribute': 9327 return getAttribute(e, t); 9328 default: 9329 return e[t] || 0; 9330 } 9331 } 9332 function getRelativeValue(e, t) { 9333 var n = /^(\*=|\+=|-=)/.exec(e); 9334 if (!n) return e; 9335 var r = getUnit(e) || 0, 9336 a = parseFloat(t), 9337 i = parseFloat(e.replace(n[0], '')); 9338 switch (n[0][0]) { 9339 case '+': 9340 return a + i + r; 9341 case '-': 9342 return a - i + r; 9343 case '*': 9344 return a * i + r; 9345 } 9346 } 9347 function validateValue(e, t) { 9348 if (is.col(e)) return colorToRgb(e); 9349 if (/\s/g.test(e)) return e; 9350 var n = getUnit(e), 9351 r = n ? e.substr(0, e.length - n.length) : e; 9352 return t ? r + t : r; 9353 } 9354 function getDistance(e, t) { 9355 return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)); 9356 } 9357 function getCircleLength(e) { 9358 return 2 * Math.PI * getAttribute(e, 'r'); 9359 } 9360 function getRectLength(e) { 9361 return 2 * getAttribute(e, 'width') + 2 * getAttribute(e, 'height'); 9362 } 9363 function getLineLength(e) { 9364 return getDistance( 9365 { x: getAttribute(e, 'x1'), y: getAttribute(e, 'y1') }, 9366 { x: getAttribute(e, 'x2'), y: getAttribute(e, 'y2') } 9367 ); 9368 } 9369 function getPolylineLength(e) { 9370 for (var t, n = e.points, r = 0, a = 0; a < n.numberOfItems; a++) { 9371 var i = n.getItem(a); 9372 a > 0 && (r += getDistance(t, i)), (t = i); 9373 } 9374 return r; 9375 } 9376 function getPolygonLength(e) { 9377 var t = e.points; 9378 return ( 9379 getPolylineLength(e) + 9380 getDistance(t.getItem(t.numberOfItems - 1), t.getItem(0)) 9381 ); 9382 } 9383 function getTotalLength(e) { 9384 if (e.getTotalLength) return e.getTotalLength(); 9385 switch (e.tagName.toLowerCase()) { 9386 case 'circle': 9387 return getCircleLength(e); 9388 case 'rect': 9389 return getRectLength(e); 9390 case 'line': 9391 return getLineLength(e); 9392 case 'polyline': 9393 return getPolylineLength(e); 9394 case 'polygon': 9395 return getPolygonLength(e); 9396 } 9397 } 9398 function setDashoffset(e) { 9399 var t = getTotalLength(e); 9400 return e.setAttribute('stroke-dasharray', t), t; 9401 } 9402 function getParentSvgEl(e) { 9403 for (var t = e.parentNode; is.svg(t) && is.svg(t.parentNode);) 9404 t = t.parentNode; 9405 return t; 9406 } 9407 function getParentSvg(e, t) { 9408 var n = t || {}, 9409 r = n.el || getParentSvgEl(e), 9410 a = r.getBoundingClientRect(), 9411 i = getAttribute(r, 'viewBox'), 9412 o = a.width, 9413 s = a.height,
9414 u = n.viewBox || (i ? i.split(' ') : [0, 0, o, s]); 9415 return { 9416 el: r, 9417 viewBox: u, 9418 x: u[0] / 1, 9419 y: u[1] / 1, 9420 w: o, 9421 h: s, 9422 vW: u[2], 9423 vH: u[3], 9424 }; 9425 } 9426 function getPath(e, t) { 9427 var n = is.str(e) ? selectString(e)[0] : e, 9428 r = t || 100; 9429 return function (e) { 9430 return { 9431 property: e, 9432 el: n, 9433 svg: getParentSvg(n), 9434 totalLength: getTotalLength(n) * (r / 100), 9435 }; 9436 }; 9437 } 9438 function getPathProgress(e, t, n) { 9439 function r(n) { 9440 void 0 === n && (n = 0); 9441 var r = t + n >= 1 ? t + n : 0; 9442 return e.el.getPointAtLength(r); 9443 } 9444 var a = getParentSvg(e.el, e.svg), 9445 i = r(), 9446 o = r(-1), 9447 s = r(1), 9448 u = n ? 1 : a.w / a.vW, 9449 c = n ? 1 : a.h / a.vH; 9450 switch (e.property) { 9451 case 'x': 9452 return (i.x - a.x) * u; 9453 case 'y': 9454 return (i.y - a.y) * c; 9455 case 'angle': 9456 return (180 * Math.atan2(s.y - o.y, s.x - o.x)) / Math.PI; 9457 } 9458 } 9459 function decomposeValue(e, t) { 9460 var n = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g, 9461 r = validateValue(is.pth(e) ? e.totalLength : e, t) + ''; 9462 return { 9463 original: r, 9464 numbers: r.match(n) ? r.match(n).map(Number) : [0], 9465 strings: is.str(e) || t ? r.split(n) : [], 9466 }; 9467 } 9468 function parseTargets(e) { 9469 return filterArray( 9470 e ? flattenArray(is.arr(e) ? e.map(toArray) : toArray(e)) : [], 9471 function (e, t, n) { 9472 return n.indexOf(e) === t; 9473 } 9474 ); 9475 } 9476 function getAnimatables(e) { 9477 var t = parseTargets(e); 9478 return t.map(function (e, n) { 9479 return { 9480 target: e, 9481 id: n, 9482 total: t.length, 9483 transforms: { list: getElementTransforms(e) }, 9484 }; 9485 }); 9486 } 9487 function normalizePropertyTweens(e, t) { 9488 var n = cloneObject(t); 9489 if ( 9490 (/^spring/.test(n.easing) && (n.duration = spring(n.easing)), 9491 is.arr(e)) 9492 ) { 9493 var r = e.length; 9494 2 === r && !is.obj(e[0]) 9495 ? (e = { value: e }) 9496 : is.fnc(t.duration) || (n.duration = t.duration / r); 9497 } 9498 var a = is.arr(e) ? e : [e]; 9499 return a 9500 .map(function (e, n) { 9501 var r = is.obj(e) && !is.pth(e) ? e : { value: e }; 9502 return ( 9503 is.und(r.delay) && (r.delay = n ? 0 : t.delay), 9504 is.und(r.endDelay) && 9505 (r.endDelay = n === a.length - 1 ? t.endDelay : 0), 9506 r 9507 ); 9508 }) 9509 .map(function (e) { 9510 return mergeObjects(e, n); 9511 }); 9512 } 9513 function flattenKeyframes(e) { 9514 for ( 9515 var t = filterArray( 9516 flattenArray( 9517 e.map(function (e) { 9518 return Object.keys(e); 9519 }) 9520 ), 9521 function (e) { 9522 return is.key(e); 9523 } 9524 ).reduce(function (e, t) { 9525 return e.indexOf(t) < 0 && e.push(t), e; 9526 }, []), 9527 n = {}, 9528 r = function (r) { 9529 var a = t[r]; 9530 n[a] = e.map(function (e) { 9531 var t = {}; 9532 for (var n in e) 9533 is.key(n) 9534 ? n == a && (t.value = e[n]) 9535 : (t[n] = e[n]); 9536 return t; 9537 }); 9538 }, 9539 a = 0; 9540 a < t.length; 9541 a++ 9542 ) 9543 r(a); 9544 return n; 9545 } 9546 function getProperties(e, t) { 9547 var n = [], 9548 r = t.keyframes; 9549 for (var a in (r && (t = mergeObjects(flattenKeyframes(r), t)), t)) 9550 is.key(a) && 9551 n.push({ name: a, tweens: normalizePropertyTweens(t[a], e) }); 9552 return n; 9553 } 9554 function normalizeTweenValues(e, t) { 9555 var n = {}; 9556 for (var r in e) { 9557 var a = getFunctionValue(e[r], t); 9558 is.arr(a) && 9559 1 === 9560 (a = a.map(function (e) { 9561 return getFunctionValue(e, t); 9562 })).length && 9563 (a = a[0]), 9564 (n[r] = a); 9565 } 9566 return ( 9567 (n.duration = parseFloat(n.duration)), 9568 (n.delay = parseFloat(n.delay)), 9569 n 9570 ); 9571 } 9572 function normalizeTweens(e, t) { 9573 var n; 9574 return e.tweens.map(function (r) { 9575 var a = normalizeTweenValues(r, t), 9576 i = a.value, 9577 o = is.arr(i) ? i[1] : i, 9578 s = getUnit(o), 9579 u = getOriginalTargetValue(t.target, e.name, s, t), 9580 c = n ? n.to.original : u, 9581 l = is.arr(i) ? i[0] : c, 9582 g = getUnit(l) || getUnit(u), 9583 f = s || g; 9584 return ( 9585 is.und(o) && (o = c), 9586 (a.from = decomposeValue(l, f)), 9587 (a.to = decomposeValue(getRelativeValue(o, l), f)), 9588 (a.start = n ? n.end : 0), 9589 (a.end = a.start + a.delay + a.duration + a.endDelay), 9590 (a.easing = parseEasings(a.easing, a.duration)), 9591 (a.isPath = is.pth(i)), 9592 (a.isPathTargetInsideSVG = a.isPath && is.svg(t.target)), 9593 (a.isColor = is.col(a.from.original)), 9594 a.isColor && (a.round = 1), 9595 (n = a), 9596 a 9597 ); 9598 }); 9599 } 9600 var setProgressValue = { 9601 css: function (e, t, n) { 9602 return (e.style[t] = n); 9603 }, 9604 attribute: function (e, t, n) { 9605 return e.setAttribute(t, n); 9606 }, 9607 object: function (e, t, n) { 9608 return (e[t] = n); 9609 }, 9610 transform: function (e, t, n, r, a) { 9611 if ((r.list.set(t, n), t === r.last || a)) { 9612 var i = ''; 9613 r.list.forEach(function (e, t) { 9614 i += t + '(' + e + ') '; 9615 }), 9616 (e.style.transform = i); 9617 } 9618 }, 9619 }; 9620 function setTargetsValue(e, t) { 9621 getAnimatables(e).forEach(function (e) { 9622 for (var n in t) { 9623 var r = getFunctionValue(t[n], e), 9624 a = e.target, 9625 i = getUnit(r), 9626 o = getOriginalTargetValue(a, n, i, e), 9627 s = getRelativeValue(validateValue(r, i || getUnit(o)), o), 9628 u = getAnimationType(a, n); 9629 setProgressValue[u](a, n, s, e.transforms, !0); 9630 } 9631 }); 9632 } 9633 function createAnimation(e, t) { 9634 var n = getAnimationType(e.target, t.name); 9635 if (n) { 9636 var r = normalizeTweens(t, e), 9637 a = r[r.length - 1]; 9638 return { 9639 type: n, 9640 property: t.name, 9641 animatable: e, 9642 tweens: r, 9643 duration: a.end, 9644 delay: r[0].delay, 9645 endDelay: a.endDelay, 9646 }; 9647 } 9648 } 9649 function getAnimations(e, t) { 9650 return filterArray( 9651 flattenArray( 9652 e.map(function (e) { 9653 return t.map(function (t) { 9654 return createAnimation(e, t); 9655 }); 9656 }) 9657 ), 9658 function (e) { 9659 return !is.und(e); 9660 } 9661 ); 9662 } 9663 function getInstanceTimings(e, t) { 9664 var n = e.length, 9665 r = function (e) { 9666 return e.timelineOffset ? e.timelineOffset : 0; 9667 }, 9668 a = {}; 9669 return ( 9670 (a.duration = n 9671 ? Math.max.apply( 9672 Math, 9673 e.map(function (e) { 9674 return r(e) + e.duration; 9675 }) 9676 ) 9677 : t.duration),
9678 (a.delay = n 9679 ? Math.min.apply( 9680 Math, 9681 e.map(function (e) { 9682 return r(e) + e.delay; 9683 }) 9684 ) 9685 : t.delay), 9686 (a.endDelay = n 9687 ? a.duration - 9688 Math.max.apply( 9689 Math, 9690 e.map(function (e) { 9691 return r(e) + e.duration - e.endDelay; 9692 }) 9693 ) 9694 : t.endDelay), 9695 a 9696 ); 9697 } 9698 var instanceID = 0; 9699 function createNewInstance(e) { 9700 var t = replaceObjectProps(defaultInstanceSettings, e), 9701 n = replaceObjectProps(defaultTweenSettings, e), 9702 r = getProperties(n, e), 9703 a = getAnimatables(e.targets), 9704 i = getAnimations(a, r), 9705 o = getInstanceTimings(i, n), 9706 s = instanceID; 9707 return ( 9708 instanceID++, 9709 mergeObjects(t, { 9710 id: s, 9711 children: [], 9712 animatables: a, 9713 animations: i, 9714 duration: o.duration, 9715 delay: o.delay, 9716 endDelay: o.endDelay, 9717 }) 9718 ); 9719 } 9720 var activeInstances = [], 9721 engine = (function () { 9722 var e; 9723 function t(n) { 9724 for (var r = activeInstances.length, a = 0; a < r;) { 9725 var i = activeInstances[a]; 9726 i.paused 9727 ? (activeInstances.splice(a, 1), r--) 9728 : (i.tick(n), a++); 9729 } 9730 e = a > 0 ? requestAnimationFrame(t) : void 0; 9731 } 9732 return ( 9733 'undefined' != typeof document && 9734 document.addEventListener('visibilitychange', function () { 9735 anime.suspendWhenDocumentHidden && 9736 (isDocumentHidden() 9737 ? (e = cancelAnimationFrame(e)) 9738 : (activeInstances.forEach(function (e) { 9739 return e._onDocumentVisibility(); 9740 }), 9741 engine())); 9742 }), 9743 function () { 9744 e || 9745 (isDocumentHidden() && 9746 anime.suspendWhenDocumentHidden) || 9747 !(activeInstances.length > 0) || 9748 (e = requestAnimationFrame(t)); 9749 } 9750 ); 9751 })(); 9752 function isDocumentHidden() { 9753 return !!document && document.hidden; 9754 } 9755 function anime(e) { 9756 void 0 === e && (e = {}); 9757 var t, 9758 n = 0, 9759 r = 0, 9760 a = 0, 9761 i = 0, 9762 o = null; 9763 function s(e) { 9764 var t = 9765 window.Promise && 9766 new Promise(function (e) { 9767 return (o = e); 9768 }); 9769 return (e.finished = t), t; 9770 } 9771 var u = createNewInstance(e); 9772 s(u); 9773 function c() { 9774 var e = u.direction; 9775 'alternate' !== e && 9776 (u.direction = 'normal' !== e ? 'normal' : 'reverse'), 9777 (u.reversed = !u.reversed), 9778 t.forEach(function (e) { 9779 return (e.reversed = u.reversed); 9780 }); 9781 } 9782 function l(e) { 9783 return u.reversed ? u.duration - e : e; 9784 } 9785 function g() { 9786 (n = 0), (r = l(u.currentTime) * (1 / anime.speed)); 9787 } 9788 function f(e, t) { 9789 t && t.seek(e - t.timelineOffset); 9790 } 9791 function m(e) { 9792 for (var t = 0, n = u.animations, r = n.length; t < r;) { 9793 var a = n[t], 9794 i = a.animatable, 9795 o = a.tweens, 9796 s = o.length - 1, 9797 c = o[s]; 9798 s && 9799 (c = 9800 filterArray(o, function (t) { 9801 return e < t.end; 9802 })[0] || c); 9803 for ( 9804 var l = 9805 minMax(e - c.start - c.delay, 0, c.duration) / 9806 c.duration, 9807 g = isNaN(l) ? 1 : c.easing(l), 9808 f = c.to.strings,
9809 m = c.round, 9810 d = [], 9811 p = c.to.numbers.length, 9812 v = void 0, 9813 h = 0; 9814 h < p; 9815 h++ 9816 ) { 9817 var y = void 0, 9818 b = c.to.numbers[h], 9819 T = c.from.numbers[h] || 0; 9820 (y = c.isPath 9821 ? getPathProgress( 9822 c.value, 9823 g * b, 9824 c.isPathTargetInsideSVG 9825 ) 9826 : T + g * (b - T)), 9827 m && 9828 ((c.isColor && h > 2) || 9829 (y = Math.round(y * m) / m)), 9830 d.push(y); 9831 } 9832 var x = f.length; 9833 if (x) { 9834 v = f[0]; 9835 for (var M = 0; M < x; M++) { 9836 f[M]; 9837 var A = f[M + 1], 9838 P = d[M]; 9839 isNaN(P) || (v += A ? P + A : P + ' '); 9840 } 9841 } else v = d[0]; 9842 setProgressValue[a.type](i.target, a.property, v, i.transforms), 9843 (a.currentValue = v), 9844 t++; 9845 } 9846 } 9847 function d(e) { 9848 u[e] && !u.passThrough && u[e](u); 9849 } 9850 function p(e) { 9851 var g = u.duration, 9852 p = u.delay, 9853 v = g - u.endDelay, 9854 h = l(e); 9855 (u.progress = minMax((h / g) * 100, 0, 100)), 9856 (u.reversePlayback = h < u.currentTime), 9857 t && 9858 (function (e) { 9859 if (u.reversePlayback) 9860 for (var n = i; n--;) f(e, t[n]); 9861 else for (var r = 0; r < i; r++) f(e, t[r]); 9862 })(h), 9863 !u.began && u.currentTime > 0 && ((u.began = !0), d('begin')), 9864 !u.loopBegan && 9865 u.currentTime > 0 && 9866 ((u.loopBegan = !0), d('loopBegin')), 9867 h <= p && 0 !== u.currentTime && m(0), 9868 ((h >= v && u.currentTime !== g) || !g) && m(g), 9869 h > p && h < v 9870 ? (u.changeBegan || 9871 ((u.changeBegan = !0), 9872 (u.changeCompleted = !1), 9873 d('changeBegin')), 9874 d('change'), 9875 m(h)) 9876 : u.changeBegan && 9877 ((u.changeCompleted = !0), 9878 (u.changeBegan = !1), 9879 d('changeComplete')), 9880 (u.currentTime = minMax(h, 0, g)), 9881 u.began && d('update'), 9882 e >= g && 9883 ((r = 0), 9884 u.remaining && !0 !== u.remaining && u.remaining--, 9885 u.remaining 9886 ? ((n = a), 9887 d('loopComplete'), 9888 (u.loopBegan = !1), 9889 'alternate' === u.direction && c()) 9890 : ((u.paused = !0), 9891 u.completed || 9892 ((u.completed = !0), 9893 d('loopComplete'), 9894 d('complete'), 9895 !u.passThrough && 9896 'Promise' in window && 9897 (o(), s(u))))); 9898 } 9899 return ( 9900 (u.reset = function () { 9901 var e = u.direction; 9902 (u.passThrough = !1), 9903 (u.currentTime = 0), 9904 (u.progress = 0), 9905 (u.paused = !0),
9906 (u.began = !1), 9907 (u.loopBegan = !1), 9908 (u.changeBegan = !1), 9909 (u.completed = !1), 9910 (u.changeCompleted = !1), 9911 (u.reversePlayback = !1), 9912 (u.reversed = 'reverse' === e), 9913 (u.remaining = u.loop), 9914 (t = u.children); 9915 for (var n = (i = t.length); n--;) u.children[n].reset(); 9916 ((u.reversed && !0 !== u.loop) || 9917 ('alternate' === e && 1 === u.loop)) && 9918 u.remaining++, 9919 m(u.reversed ? u.duration : 0); 9920 }), 9921 (u._onDocumentVisibility = g), 9922 (u.set = function (e, t) { 9923 return setTargetsValue(e, t), u; 9924 }), 9925 (u.tick = function (e) { 9926 (a = e), n || (n = a), p((a + (r - n)) * anime.speed); 9927 }), 9928 (u.seek = function (e) { 9929 p(l(e)); 9930 }), 9931 (u.pause = function () { 9932 (u.paused = !0), g(); 9933 }), 9934 (u.play = function () { 9935 u.paused && 9936 (u.completed && u.reset(), 9937 (u.paused = !1), 9938 activeInstances.push(u), 9939 g(), 9940 engine()); 9941 }), 9942 (u.reverse = function () { 9943 c(), (u.completed = !u.reversed), g(); 9944 }), 9945 (u.restart = function () { 9946 u.reset(), u.play(); 9947 }), 9948 (u.remove = function (e) { 9949 removeTargetsFromInstance(parseTargets(e), u); 9950 }), 9951 u.reset(), 9952 u.autoplay && u.play(), 9953 u 9954 ); 9955 } 9956 function removeTargetsFromAnimations(e, t) { 9957 for (var n = t.length; n--;) 9958 arrayContains(e, t[n].animatable.target) && t.splice(n, 1); 9959 } 9960 function removeTargetsFromInstance(e, t) { 9961 var n = t.animations, 9962 r = t.children; 9963 removeTargetsFromAnimations(e, n); 9964 for (var a = r.length; a--;) { 9965 var i = r[a], 9966 o = i.animations; 9967 removeTargetsFromAnimations(e, o), 9968 o.length || i.children.length || r.splice(a, 1); 9969 } 9970 n.length || r.length || t.pause(); 9971 } 9972 function removeTargetsFromActiveInstances(e) { 9973 for (var t = parseTargets(e), n = activeInstances.length; n--;) { 9974 removeTargetsFromInstance(t, activeInstances[n]); 9975 } 9976 } 9977 function stagger(e, t) { 9978 void 0 === t && (t = {}); 9979 var n = t.direction || 'normal', 9980 r = t.easing ? parseEasings(t.easing) : null, 9981 a = t.grid, 9982 i = t.axis, 9983 o = t.from || 0, 9984 s = 'first' === o, 9985 u = 'center' === o, 9986 c = 'last' === o, 9987 l = is.arr(e), 9988 g = l ? parseFloat(e[0]) : parseFloat(e), 9989 f = l ? parseFloat(e[1]) : 0, 9990 m = getUnit(l ? e[1] : e) || 0, 9991 d = t.start || 0 + (l ? g : 0), 9992 p = [], 9993 v = 0; 9994 return function (e, t, h) { 9995 if ( 9996 (s && (o = 0), 9997 u && (o = (h - 1) / 2), 9998 c && (o = h - 1), 9999 !p.length) 10000 ) { 10001 for (var y = 0; y < h; y++) { 10002 if (a) { 10003 var b = u ? (a[0] - 1) / 2 : o % a[0], 10004 T = u ? (a[1] - 1) / 2 : Math.floor(o / a[0]), 10005 x = b - (y % a[0]), 10006 M = T - Math.floor(y / a[0]), 10007 A = Math.sqrt(x * x + M * M); 10008 'x' === i && (A = -x), 'y' === i && (A = -M), p.push(A); 10009 } else p.push(Math.abs(o - y)); 10010 v = Math.max.apply(Math, p); 10011 } 10012 r && 10013 (p = p.map(function (e) { 10014 return r(e / v) * v; 10015 })), 10016 'reverse' === n && 10017 (p = p.map(function (e) { 10018 return i ? (e < 0 ? -1 * e : -e) : Math.abs(v - e); 10019 })); 10020 } 10021 return ( 10022 d + (l ? (f - g) / v : g) * (Math.round(100 * p[t]) / 100) + m 10023 ); 10024 }; 10025 } 10026 function timeline(e) { 10027 void 0 === e && (e = {}); 10028 var t = anime(e); 10029 return ( 10030 (t.duration = 0), 10031 (t.add = function (n, r) { 10032 var a = activeInstances.indexOf(t), 10033 i = t.children; 10034 function o(e) { 10035 e.passThrough = !0; 10036 } 10037 a > -1 && activeInstances.splice(a, 1); 10038 for (var s = 0; s < i.length; s++) o(i[s]); 10039 var u = mergeObjects( 10040 n,
10041 replaceObjectProps(defaultTweenSettings, e) 10042 ); 10043 u.targets = u.targets || e.targets; 10044 var c = t.duration; 10045 (u.autoplay = !1), 10046 (u.direction = t.direction), 10047 (u.timelineOffset = is.und(r) ? c : getRelativeValue(r, c)), 10048 o(t), 10049 t.seek(u.timelineOffset); 10050 var l = anime(u); 10051 o(l), i.push(l); 10052 var g = getInstanceTimings(i, e); 10053 return ( 10054 (t.delay = g.delay), 10055 (t.endDelay = g.endDelay), 10056 (t.duration = g.duration), 10057 t.seek(0), 10058 t.reset(), 10059 t.autoplay && t.play(), 10060 t 10061 ); 10062 }), 10063 t 10064 ); 10065 } 10066 (anime.version = '3.2.1'), 10067 (anime.speed = 1), 10068 (anime.suspendWhenDocumentHidden = !0), 10069 (anime.running = activeInstances), 10070 (anime.remove = removeTargetsFromActiveInstances), 10071 (anime.get = getOriginalTargetValue), 10072 (anime.set = setTargetsValue), 10073 (anime.convertPx = convertPxToUnit), 10074 (anime.path = getPath), 10075 (anime.setDashoffset = setDashoffset), 10076 (anime.stagger = stagger), 10077 (anime.timeline = timeline), 10078 (anime.easing = parseEasings), 10079 (anime.penner = penner), 10080 (anime.random = function (e, t) { 10081 return Math.floor(Math.random() * (t - e + 1)) + e; 10082 }); 10083 const AnimeDefault = { duration: 800, easing: 'easeInOutSine' }; 10084 const documentScrollTo = (e, o) => { 10085 const t = ('object' == typeof o ? o : {}).complete, 10086 n = 10087 window.document.scrollingElement || 10088 window.document.body || 10089 window.document.documentElement, 10090 l = n.style.scrollBehavior; 10091 (o = { 10092 scrollTop: e || 0, 10093 ...AnimeDefault, 10094 ...('object' == typeof o ? o : {}), 10095 }), 10096 (n.style.scrollBehavior = 'auto'), 10097 (o.complete = (e) => { 10098 (n.style.scrollBehavior = l), 'function' == typeof t && t(e); 10099 }), 10100 anime({ targets: n, ...o }); 10101 }; 10102 const NAME$e = 'navscroll', 10103 SELECTOR_NAVSCROLL = '[data-bs-navscroll]', 10104 SELECTOR_LIST$1 = 'ul.link-list', 10105 SELECTOR_LINK_CONTAINER = 'li.nav-link, li.nav-item', 10106 SELECTOR_CONTAINER = '.it-page-sections-container', 10107 SELECTOR_TOGGLER = '.custom-navbar-toggler', 10108 SELECTOR_COLLAPSIBLE = '.navbar-collapsable', 10109 SELECTOR_PROGRESS_BAR = '.it-navscroll-progressbar', 10110 Default$7 = { 10111 scrollPadding: 10, 10112 duration: 800, 10113 easing: 'easeInOutSine', 10114 }; 10115 class NavScroll extends BaseComponent { 10116 constructor(e, t) { 10117 super(e), 10118 (this._config = this._getConfig(t)), 10119 (this._togglerElement = SelectorEngine$1.findOne( 10120 SELECTOR_TOGGLER, 10121 this._element 10122 )), 10123 (this._sectionContainer = SelectorEngine$1.findOne( 10124 SELECTOR_CONTAINER 10125 )), 10126 (this._collapsible = this._getCollapsible()), 10127 (this._isCollapseOpened = !1), 10128 (this._callbackQueue = []), 10129 (this._scrollCb = null), 10130 this._bindEvents(); 10131 } 10132 static get NAME() { 10133 return NAME$e; 10134 } 10135 setScrollPadding(e) { 10136 this._config.scrollPadding = e; 10137 } 10138 dispose() { 10139 this._scrollCb && this._scrollCb.dispose(), super.dispose(); 10140 } 10141 _getConfig(e) { 10142 return (e = { 10143 ...Default$7, 10144 ...Manipulator.getDataAttributes(this._element), 10145 ...('object' == typeof e ? e : {}), 10146 }); 10147 } 10148 _bindEvents() { 10149 (this._scrollCb = onDocumentScroll$1(() => this._onScroll())), 10150 this._collapsible && 10151 (EventHandler$1.on( 10152 this._collapsible._element, 10153 'shown.bs.navbarcollapsible', 10154 () => this._onCollapseOpened() 10155 ), 10156 EventHandler$1.on( 10157 this._collapsible._element, 10158 'hidden.bs.navbarcollapsible', 10159 () => this._onCollapseClosed() 10160 )), 10161 SelectorEngine$1.find( 10162 'a.nav-link[href^="#"]', 10163 this._element 10164 ).forEach((e) => { 10165 e.addEventListener('click', (t) => { 10166 t.preventDefault(); 10167 const n = () => this._scrollToHash(e.hash); 10168 this._isCollapseOpened 10169 ? (this._callbackQueue.push(n), 10170 this._collapsible.hide()) 10171 : n(); 10172 }); 10173 }), 10174 EventHandler$1.on(window, 'load', () => { 10175 setTimeout(() => this._onScroll(), 150); 10176 }); 10177 } 10178 _onCollapseOpened() { 10179 this._isCollapseOpened = !0; 10180 } 10181 _onCollapseClosed() { 10182 for (; this._callbackQueue.length > 0;) { 10183 const e = this._callbackQueue.shift(); 10184 'function' == typeof e && e(); 10185 } 10186 this._isCollapseOpened = !1; 10187 } 10188 _getParentLinks(e) { 10189 const t = []; 10190 let n = e.closest(SELECTOR_LIST$1), 10191 o = null, 10192 l = !1; 10193 for (; n && !l;) { 10194 const e = n.closest(SELECTOR_LINK_CONTAINER); 10195 if (e) {
10196 const n = e.querySelector('a.nav-link'); 10197 n && t.push(n); 10198 } 10199 (o = n), 10200 (n = (n.parentElement || n).closest(SELECTOR_LIST$1)), 10201 n === o && (l = !0); 10202 } 10203 return t; 10204 } 10205 _decorateToggler(e) { 10206 if (this._togglerElement) { 10207 const t = SelectorEngine$1.findOne( 10208 '.it-list', 10209 this._togglerElement 10210 ); 10211 (this._togglerElement.innerText = ''), 10212 (this._togglerElement.textContent = ''), 10213 this._togglerElement.append(t), 10214 this._togglerElement.append(e); 10215 } 10216 } 10217 _scrollToHash(e) { 10218 const t = SelectorEngine$1.findOne(e, this._sectionContainer); 10219 t && 10220 (documentScrollTo(t.offsetTop - this._getScrollPadding(), { 10221 duration: this._config.duration, 10222 easing: this._config.easing, 10223 }), 10224 history.pushState 10225 ? history.pushState(null, null, e) 10226 : (location.hash = e)); 10227 } 10228 _updateProgress(e) { 10229 const t = SelectorEngine$1.find(SELECTOR_PROGRESS_BAR); 10230 if (t) { 10231 const n = 10232 (Math.abs(e.getBoundingClientRect().top) / 10233 e.getBoundingClientRect().height) * 10234 100, 10235 o = Math.min(100, Math.max(0, n)); 10236 t.forEach((t) => { 10237 e.getBoundingClientRect().top <= 0 10238 ? ((t.style.width = o + '%'), 10239 t.setAttribute('aria-valuenow', o)) 10240 : ((t.style.width = '0%'), 10241 t.setAttribute('aria-valuenow', 0)); 10242 }); 10243 } 10244 } 10245 _onScroll() { 10246 const e = this._sectionContainer 10247 ? this._sectionContainer.offsetTop 10248 : 0, 10249 t = document.scrollingElement.scrollTop - e, 10250 n = SelectorEngine$1.find('a.nav-link', this._element), 10251 o = this._getScrollPadding(); 10252 SelectorEngine$1.find('.it-page-section').forEach((l, i) => { 10253 if ( 10254 l.offsetTop - e <= t + o && 10255 (SelectorEngine$1.find( 10256 'a.nav-link.active', 10257 this._element 10258 ).forEach((e) => { 10259 e.classList.remove('active'); 10260 }), 10261 i < n.length) 10262 ) { 10263 const e = n[i]; 10264 this._getParentLinks(e).forEach((e) => { 10265 e.classList.add('active'); 10266 }), 10267 e.classList.add('active'), 10268 this._decorateToggler(e.innerText); 10269 } 10270 }), 10271 this._updateProgress(this._sectionContainer); 10272 } 10273 _getCollapsible() { 10274 const e = SelectorEngine$1.findOne( 10275 SELECTOR_COLLAPSIBLE, 10276 this._element 10277 ); 10278 return e ? NavBarCollapsible$1.getOrCreateInstance(e) : null; 10279 } 10280 _getScrollPadding() { 10281 return 'function' == typeof this._config.scrollPadding 10282 ? this._config.scrollPadding() 10283 : this._config.scrollPadding; 10284 } 10285 } 10286 const dataApiCb$2 = onDocumentScroll$1(() => { 10287 SelectorEngine$1.find(SELECTOR_NAVSCROLL).forEach((e) => { 10288 NavScroll.getOrCreateInstance(e); 10289 }), 10290 dataApiCb$2.dispose(); 10291 }); 10292 var NavScroll$1 = NavScroll; 10293 const NAME$d = 'sticky', 10294 EVENT_RESIZE = 'resize.bs.sticky', 10295 CLASS_NAME_WRAPPER = 'bs-it-sticky-wrapper', 10296 DATA_TARGET_MOBILE = 'data-bs-target-mobile', 10297 SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="sticky"]', 10298 Default$6 = { 10299 positionType: 'sticky', 10300 stickyClassName: '', 10301 stackable: !1, 10302 paddingTop: 0, 10303 }; 10304 class Sticky extends BaseComponent { 10305 constructor(t, e) { 10306 super(t), 10307 (this._config = this._getConfig(e)), 10308 (this._isSticky = !1), 10309 (this._wrapper = null),
10310 (this._stickyTarget = 10311 SelectorEngine$1.findOne( 10312 getSelectorFromElement(this._element), 10313 this._element 10314 ) || this._element), 10315 (this._stickyTargetMobile = 10316 SelectorEngine$1.findOne( 10317 this._element.getAttribute(DATA_TARGET_MOBILE), 10318 this._element 10319 ) || this._stickyTarget), 10320 (this._stickyLimit = 0), 10321 (this._stickyLimitMobile = 0), 10322 this._setLimit(), 10323 (this._scrollCb = null), 10324 (this._isMobile = isScreenMobile()), 10325 (this._prevTop = 0), 10326 this._onScroll(), 10327 this._bindEvents(); 10328 } 10329 dispose() { 10330 EventHandler$1.off(window, EVENT_RESIZE), 10331 this._scrollCb.dispose(), 10332 super.dispose(); 10333 } 10334 static get NAME() { 10335 return NAME$d; 10336 } 10337 _getConfig(t) { 10338 return (t = { 10339 ...Default$6, 10340 ...Manipulator.getDataAttributes(this._element), 10341 ...('object' == typeof t ? t : {}), 10342 }); 10343 } 10344 _bindEvents() { 10345 EventHandler$1.on(window, EVENT_RESIZE, () => this._onResize()), 10346 (this._scrollCb = onDocumentScroll$1(() => this._onScroll())); 10347 } 10348 _onResize() { 10349 (this._isMobile = isScreenMobile()), this._setLimit(); 10350 } 10351 _onScroll() { 10352 this._checkSticky(); 10353 } 10354 _setLimit() { 10355 (this._stickyLimit = this._cumulativeOffset( 10356 this._stickyTarget 10357 ).top), 10358 (this._stickyLimitMobile = this._cumulativeOffset( 10359 this._stickyTargetMobile 10360 ).top); 10361 } 10362 _getLimit() { 10363 let t = this._isMobile 10364 ? this._stickyLimitMobile 10365 : this._stickyLimit; 10366 return ( 10367 this._config.stackable &&
10368 this._getStickySimblings().forEach((e, i) => { 10369 const s = e.getBoundingClientRect(); 10370 t -= s.height + (0 === i ? parseFloat(e.style.top) : 0); 10371 }), 10372 t > 0 ? t : 0 10373 ); 10374 } 10375 _cumulativeOffset(t) { 10376 let e = 0, 10377 i = 0; 10378 do { 10379 (e += t.offsetTop || 0), 10380 (i += t.offsetLeft || 0), 10381 (t = t.offsetParent); 10382 } while (t); 10383 return { top: e, left: i }; 10384 } 10385 _isTypeSticky() { 10386 return 'sticky' === this._config.positionType; 10387 } 10388 _checkSticky() { 10389 this._isSticky || this._setLimit(); 10390 const t = this._getLimit(); 10391 window.pageYOffset > t ? this._setSticky() : this._unsetSticky(); 10392 } 10393 _setSticky() { 10394 if (!this._isSticky) { 10395 this._isSticky = !0; 10396 let t = 'bs-is-sticky'; 10397 this._isTypeSticky() || 10398 ((t = 'bs-is-fixed'), 10399 (this._wrapper = this._createWrapper())), 10400 this._element.classList.add(t), 10401 this._config.stickyClassName && 10402 this._element.classList.add( 10403 this._config.stickyClassName 10404 ), 10405 (this._prevTop = this._element.style.top), 10406 (this._element.style.top = this._getPositionTop() + 'px'), 10407 EventHandler$1.trigger(this._element, 'on.bs.sticky'); 10408 } 10409 } 10410 _unsetSticky() { 10411 if (this._isSticky) { 10412 let t = 'bs-is-sticky'; 10413 this._isTypeSticky() || 10414 ((t = 'bs-is-fixed'), this._destroyWrapper()), 10415 this._element.classList.remove(t), 10416 this._config.stickyClassName && 10417 this._element.classList.remove( 10418 this._config.stickyClassName 10419 ), 10420 (this._element.style.top = this._prevTop), 10421 (this._isSticky = !1), 10422 EventHandler$1.trigger(this._element, 'off.bs.sticky'); 10423 } 10424 } 10425 _createWrapper() { 10426 const t = document.createElement('div'); 10427 return ( 10428 t.classList.add(CLASS_NAME_WRAPPER), 10429 (t.style.width = '100%'), 10430 (t.style.height = 10431 this._element.getBoundingClientRect().height + 'px'), 10432 (t.style.overflow = 'hidden'), 10433 this._element.parentNode.insertBefore(t, this._element), 10434 t.appendChild(this._element), 10435 t 10436 ); 10437 } 10438 _destroyWrapper() { 10439 this._wrapper && 10440 (this._wrapper.parentNode.insertBefore( 10441 this._element, 10442 this._wrapper 10443 ), 10444 this._wrapper.remove()); 10445 } 10446 _getStickySimblings() { 10447 return SelectorEngine$1.find(SELECTOR_DATA_TOGGLE$1).filter((t) => { 10448 const e = Sticky.getInstance(t); 10449 return !(!e || !e._isSticky || t === this._element); 10450 }); 10451 } 10452 _getPositionTop() { 10453 let t = 0; 10454 return this._config.stackable
10455 ? (this._getStickySimblings().forEach((e, i) => { 10456 const s = e.getBoundingClientRect(); 10457 t += s.height + (0 === i ? parseFloat(e.style.top) : 0); 10458 }), 10459 t) 10460 : t + this._config.paddingTop; 10461 } 10462 } 10463 const dataApiCb$1 = onDocumentScroll$1(() => { 10464 SelectorEngine$1.find(SELECTOR_DATA_TOGGLE$1).forEach((t) => { 10465 Sticky.getOrCreateInstance(t); 10466 }), 10467 dataApiCb$1.dispose(); 10468 }); 10469 var Sticky$1 = Sticky; 10470 const DATA_MOUSE_FOCUS = 'data-focus-mouse'; 10471 class TrackFocus { 10472 constructor() { 10473 (this._usingMouse = !1), this._bindEvents(); 10474 } 10475 _bindEvents() { 10476 ['keydown', 'mousedown'].forEach((t) => { 10477 document.addEventListener(t, (t) => { 10478 this._usingMouse = 'mousedown' === t.type; 10479 }); 10480 }), 10481 document.addEventListener('focusin', (t) => { 10482 this._usingMouse && 10483 t.target && 10484 (t.target.classList.add('focus--mouse'), 10485 t.target.setAttribute(DATA_MOUSE_FOCUS, !0)); 10486 }), 10487 document.addEventListener('focusout', (t) => { 10488 t.target && 10489 (t.target.classList.remove('focus--mouse'), 10490 t.target.setAttribute(DATA_MOUSE_FOCUS, !1)); 10491 }); 10492 } 10493 } 10494 new TrackFocus(); 10495 var TrackFocus$1 = TrackFocus; 10496 var __defProp = Object.defineProperty, 10497 __getOwnPropSymbols = Object.getOwnPropertySymbols, 10498 __hasOwnProp = Object.prototype.hasOwnProperty, 10499 __propIsEnum = Object.prototype.propertyIsEnumerable, 10500 __defNormalProp = (e, i, s) => 10501 i in e 10502 ? __defProp(e, i, { 10503 enumerable: !0, 10504 configurable: !0, 10505 writable: !0, 10506 value: s, 10507 }) 10508 : (e[i] = s), 10509 __spreadValues = (e, i) => { 10510 for (var s in i || (i = {})) 10511 __hasOwnProp.call(i, s) && __defNormalProp(e, s, i[s]); 10512 if (__getOwnPropSymbols) 10513 for (var s of __getOwnPropSymbols(i)) 10514 __propIsEnum.call(i, s) && __defNormalProp(e, s, i[s]); 10515 return e; 10516 }, 10517 __publicField = (e, i, s) => ( 10518 __defNormalProp(e, 'symbol' != typeof i ? i + '' : i, s), s 10519 ); 10520 const EMAIL_REGEXP = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, 10521 NUMBER_REGEXP = /^[0-9]+$/, 10522 PASSWORD_REGEXP = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/, 10523 STRONG_PASSWORD_REGEXP = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/, 10524 isEmpty = (e) => { 10525 let i = e; 10526 return 'string' == typeof e && (i = e.trim()), !i; 10527 }, 10528 isLengthMoreThanMax = (e, i) => e.length > i, 10529 isLengthLessThanMin = (e, i) => e.length < i, 10530 isNumber = (e) => NUMBER_REGEXP.test(e), 10531 isPassword = (e) => PASSWORD_REGEXP.test(e), 10532 isStrongPassword = (e) => STRONG_PASSWORD_REGEXP.test(e), 10533 isNumberMoreThanMax = (e, i) => e > i, 10534 isNumberLessThanMin = (e, i) => e < i; 10535 var Rules, GroupRules, CustomStyleTagIds; 10536 !(function (e) { 10537 (e.Required = 'required'), 10538 (e.Email = 'email'), 10539 (e.MinLength = 'minLength'), 10540 (e.MaxLength = 'maxLength'), 10541 (e.Password = 'password'), 10542 (e.Number = 'number'), 10543 (e.MaxNumber = 'maxNumber'), 10544 (e.MinNumber = 'minNumber'), 10545 (e.StrongPassword = 'strongPassword'), 10546 (e.CustomRegexp = 'customRegexp'), 10547 (e.MinFilesCount = 'minFilesCount'), 10548 (e.MaxFilesCount = 'maxFilesCount'), 10549 (e.Files = 'files'); 10550 })(Rules || (Rules = {})), 10551 ((GroupRules || (GroupRules = {})).Required = 'required'), 10552 (function (e) { 10553 (e.Label = 'label'), (e.LabelArrow = 'labelArrow'); 10554 })(CustomStyleTagIds || (CustomStyleTagIds = {})); 10555 const getDefaultFieldMessage = (e, i) => { 10556 switch (e) { 10557 case Rules.Required: 10558 return 'The field is required'; 10559 case Rules.Email:
10560 return 'Email has invalid format'; 10561 case Rules.MaxLength: 10562 return 'The field must contain a maximum of :value characters'.replace( 10563 ':value', 10564 String(i) 10565 ); 10566 case Rules.MinLength: 10567 return 'The field must contain a minimum of :value characters'.replace( 10568 ':value', 10569 String(i) 10570 ); 10571 case Rules.Password: 10572 return 'Password must contain minimum eight characters, at least one letter and one number'; 10573 case Rules.Number: 10574 return 'Value should be a number'; 10575 case Rules.StrongPassword: 10576 return 'Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character'; 10577 case Rules.MaxNumber: 10578 return 'Number should be less or equal than :value'.replace( 10579 ':value', 10580 String(i) 10581 ); 10582 case Rules.MinNumber: 10583 return 'Number should be more or equal than :value'.replace( 10584 ':value', 10585 String(i) 10586 ); 10587 case Rules.MinFilesCount: 10588 return 'Files count should be more or equal than :value'.replace( 10589 ':value', 10590 String(i) 10591 ); 10592 case Rules.MaxFilesCount: 10593 return 'Files count should be less or equal than :value'.replace( 10594 ':value', 10595 String(i) 10596 ); 10597 case Rules.Files: 10598 return 'Uploaded files have one or several invalid properties (extension/size/type etc)'; 10599 default: 10600 return 'Value is incorrect'; 10601 } 10602 }, 10603 isPromise = (e) => !!e && 'function' == typeof e.then, 10604 errorLabelCss = 10605 ".just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}", 10606 defaultGlobalConfig = { 10607 errorFieldStyle: { color: '#b81111', border: '1px solid #B81111' }, 10608 errorFieldCssClass: 'just-validate-error-field', 10609 successFieldCssClass: 'just-validate-success-field', 10610 errorLabelStyle: { color: '#b81111' }, 10611 errorLabelCssClass: 'just-validate-error-label', 10612 successLabelCssClass: 'just-validate-success-label', 10613 focusInvalidField: !0, 10614 lockForm: !0, 10615 testingMode: !1, 10616 }; 10617 class JustValidate { 10618 constructor(e, i, s) { 10619 __publicField(this, 'form', null), 10620 __publicField(this, 'fields', {}), 10621 __publicField(this, 'groupFields', {}), 10622 __publicField(this, 'errors', {}), 10623 __publicField(this, 'isValid', !1), 10624 __publicField(this, 'isSubmitted', !1), 10625 __publicField(this, 'globalConfig', defaultGlobalConfig), 10626 __publicField(this, 'errorLabels', {}), 10627 __publicField(this, 'successLabels', {}), 10628 __publicField(this, 'eventListeners', []), 10629 __publicField(this, 'dictLocale', []), 10630 __publicField(this, 'currentLocale'), 10631 __publicField(this, 'customStyleTags', {}), 10632 __publicField(this, 'onSuccessCallback'), 10633 __publicField(this, 'onFailCallback'), 10634 __publicField(this, 'tooltips', []), 10635 __publicField(this, 'lastScrollPosition'), 10636 __publicField(this, 'isScrollTick'),
10637 __publicField(this, 'refreshAllTooltips', () => { 10638 this.tooltips.forEach((e) => { 10639 e.refresh(); 10640 }); 10641 }), 10642 __publicField(this, 'handleDocumentScroll', () => { 10643 (this.lastScrollPosition = window.scrollY), 10644 this.isScrollTick || 10645 (window.requestAnimationFrame(() => { 10646 this.refreshAllTooltips(), 10647 (this.isScrollTick = !1); 10648 }), 10649 (this.isScrollTick = !0)); 10650 }), 10651 __publicField(this, 'formSubmitHandler', (e) => { 10652 e.preventDefault(), 10653 (this.isSubmitted = !0), 10654 this.validateHandler(e); 10655 }), 10656 __publicField(this, 'handleFieldChange', (e) => { 10657 let i; 10658 for (const s in this.fields) { 10659 if (this.fields[s].elem === e) { 10660 i = s; 10661 break; 10662 } 10663 } 10664 i && this.validateField(i, !0); 10665 }), 10666 __publicField(this, 'handleGroupChange', (e) => { 10667 let i, s; 10668 for (const l in this.groupFields) { 10669 const t = this.groupFields[l]; 10670 if (t.elems.find((i) => i === e)) { 10671 (i = t), (s = l); 10672 break; 10673 } 10674 } 10675 i && s && this.validateGroup(s, i); 10676 }), 10677 __publicField(this, 'handlerChange', (e) => { 10678 e.target && 10679 (this.handleFieldChange(e.target), 10680 this.handleGroupChange(e.target), 10681 this.renderErrors()); 10682 }), 10683 this.initialize(e, i, s); 10684 } 10685 initialize(e, i, s) { 10686 if ( 10687 ((this.form = null), 10688 (this.errors = {}), 10689 (this.isValid = !1), 10690 (this.isSubmitted = !1), 10691 (this.globalConfig = defaultGlobalConfig), 10692 (this.errorLabels = {}), 10693 (this.successLabels = {}), 10694 (this.eventListeners = []), 10695 (this.customStyleTags = {}), 10696 (this.tooltips = []), 10697 'string' == typeof e) 10698 ) { 10699 const i = document.querySelector(e); 10700 if (!i) 10701 throw Error( 10702 `Form with ${e} selector not found! Please check the form selector` 10703 ); 10704 this.setForm(i); 10705 } else { 10706 if (!(e instanceof HTMLFormElement)) 10707 throw Error( 10708 'Form selector is not valid. Please specify a string selector or a DOM element.' 10709 ); 10710 this.setForm(e); 10711 } 10712 if ( 10713 ((this.globalConfig = __spreadValues( 10714 __spreadValues({}, defaultGlobalConfig), 10715 i 10716 )), 10717 s && (this.dictLocale = s), 10718 this.isTooltip()) 10719 ) { 10720 const e = document.createElement('style'); 10721 (e.textContent = errorLabelCss), 10722 (this.customStyleTags[ 10723 CustomStyleTagIds.Label 10724 ] = document.head.appendChild(e)), 10725 this.addListener( 10726 'scroll', 10727 document, 10728 this.handleDocumentScroll 10729 ); 10730 } 10731 } 10732 getLocalisedString(e) { 10733 var i; 10734 if (!this.currentLocale || !this.dictLocale.length) return e; 10735 return ( 10736 (null == (i = this.dictLocale.find((i) => i.key === e)) 10737 ? void 0 10738 : i.dict[this.currentLocale]) || e 10739 ); 10740 } 10741 getFieldErrorMessage(e, i) { 10742 const s = 10743 'function' == typeof e.errorMessage 10744 ? e.errorMessage(this.getElemValue(i), this.fields) 10745 : e.errorMessage; 10746 return ( 10747 this.getLocalisedString(s) || 10748 getDefaultFieldMessage(e.rule, e.value) 10749 ); 10750 } 10751 getFieldSuccessMessage(e, i) { 10752 const s = 10753 'function' == typeof e 10754 ? e(this.getElemValue(i), this.fields) 10755 : e; 10756 return this.getLocalisedString(s); 10757 } 10758 getGroupErrorMessage(e) { 10759 return ( 10760 this.getLocalisedString(e.errorMessage) || 10761 (e.rule === GroupRules.Required 10762 ? 'The field is required' 10763 : 'Group is incorrect') 10764 ); 10765 } 10766 getGroupSuccessMessage(e) { 10767 return this.getLocalisedString(e.successMessage); 10768 } 10769 setFieldInvalid(e, i) { 10770 (this.fields[e].isValid = !1), 10771 (this.fields[e].errorMessage = this.getFieldErrorMessage( 10772 i, 10773 this.fields[e].elem 10774 )); 10775 } 10776 setFieldValid(e, i) { 10777 (this.fields[e].isValid = !0), 10778 void 0 !== i && 10779 (this.fields[ 10780 e 10781 ].successMessage = this.getFieldSuccessMessage( 10782 i, 10783 this.fields[e].elem 10784 )); 10785 } 10786 setGroupInvalid(e, i) { 10787 (this.groupFields[e].isValid = !1), 10788 (this.groupFields[e].errorMessage = this.getGroupErrorMessage( 10789 i 10790 )); 10791 } 10792 setGroupValid(e, i) { 10793 (this.groupFields[e].isValid = !0), 10794 (this.groupFields[ 10795 e 10796 ].successMessage = this.getGroupSuccessMessage(i)); 10797 } 10798 getElemValue(e) { 10799 switch (e.type) { 10800 case 'checkbox': 10801 return e.checked; 10802 case 'file': 10803 return e.files; 10804 default: 10805 return e.value; 10806 } 10807 } 10808 validateGroupRule(e, i, s, l) { 10809 if (l.rule === GroupRules.Required) 10810 ('radio' !== i && 'checkbox' !== i) || 10811 (s.every((e) => !e.checked) 10812 ? this.setGroupInvalid(e, l) 10813 : this.setGroupValid(e, l)); 10814 } 10815 validateFieldRule(e, i, s, l = !1) { 10816 const t = s.value, 10817 r = this.getElemValue(i); 10818 if (s.plugin) { 10819 s.plugin(r, this.fields) || this.setFieldInvalid(e, s); 10820 } else { 10821 switch (s.rule) { 10822 case Rules.Required: 10823 isEmpty(r) && this.setFieldInvalid(e, s); 10824 break; 10825 case Rules.Email: 10826 if ('string' != typeof r) { 10827 this.setFieldInvalid(e, s); 10828 break; 10829 } 10830 (o = r), 10831 EMAIL_REGEXP.test(o) || this.setFieldInvalid(e, s); 10832 break; 10833 case Rules.MaxLength: 10834 if (void 0 === t) { 10835 console.error( 10836 `Value for ${s.rule} rule for [${e}
10836] field is not defined. The field will be always invalid.` 10837 ), 10838 this.setFieldInvalid(e, s); 10839 break; 10840 } 10841 if ('number' != typeof t) { 10842 console.error( 10843 `Value for ${s.rule} rule for [${e}] should be a number. The field will be always invalid.` 10844 ), 10845 this.setFieldInvalid(e, s); 10846 break; 10847 } 10848 if ('string' != typeof r) { 10849 this.setFieldInvalid(e, s); 10850 break; 10851 } 10852 if ('' === r) break; 10853 isLengthMoreThanMax(r, t) && this.setFieldInvalid(e, s); 10854 break; 10855 case Rules.MinLength: 10856 if (void 0 === t) { 10857 console.error( 10858 `Value for ${s.rule} rule for [${e}] field is not defined. The field will be always invalid.` 10859 ), 10860 this.setFieldInvalid(e, s); 10861 break; 10862 } 10863 if ('number' != typeof t) { 10864 console.error( 10865 `Value for ${s.rule} rule for [${e}] should be a number. The field will be always invalid.` 10866 ), 10867 this.setFieldInvalid(e, s); 10868 break; 10869 } 10870 if ('string' != typeof r) { 10871 this.setFieldInvalid(e, s); 10872 break; 10873 } 10874 if ('' === r) break; 10875 isLengthLessThanMin(r, t) && this.setFieldInvalid(e, s); 10876 break; 10877 case Rules.Password: 10878 if ('string' != typeof r) { 10879 this.setFieldInvalid(e, s); 10880 break; 10881 } 10882 if ('' === r) break; 10883 isPassword(r) || this.setFieldInvalid(e, s); 10884 break; 10885 case Rules.StrongPassword: 10886 if ('string' != typeof r) { 10887 this.setFieldInvalid(e, s); 10888 break; 10889 } 10890 if ('' === r) break; 10891 isStrongPassword(r) || this.setFieldInvalid(e, s); 10892 break; 10893 case Rules.Number: 10894 if ('string' != typeof r) { 10895 this.setFieldInvalid(e, s); 10896 break; 10897 } 10898 if ('' === r) break; 10899 isNumber(r) || this.setFieldInvalid(e, s); 10900 break; 10901 case Rules.MaxNumber: { 10902 if (void 0 === t) { 10903 console.error( 10904 `Value for ${s.rule} rule for [${e}] field is not defined. The field will be always invalid.` 10905 ), 10906 this.setFieldInvalid(e, s); 10907 break; 10908 } 10909 if ('number' != typeof t) { 10910 console.error( 10911 `Value for ${s.rule} rule for [${e}] field should be a number. The field will be always invalid.` 10912 ), 10913 this.setFieldInvalid(e, s); 10914 break; 10915 } 10916 if ('string' != typeof r) { 10917 this.setFieldInvalid(e, s); 10918 break; 10919 } 10920 if ('' === r) break; 10921 const i = +r; 10922 (Number.isNaN(i) || isNumberMoreThanMax(i, t)) && 10923 this.setFieldInvalid(e, s); 10924 break; 10925 } 10926 case Rules.MinNumber: { 10927 if (void 0 === t) { 10928 console.error( 10929 `Value for ${s.rule} rule for [${e}
10929] field is not defined. The field will be always invalid.` 10930 ), 10931 this.setFieldInvalid(e, s); 10932 break; 10933 } 10934 if ('number' != typeof t) { 10935 console.error( 10936 `Value for ${s.rule} rule for [${e}] field should be a number. The field will be always invalid.` 10937 ), 10938 this.setFieldInvalid(e, s); 10939 break; 10940 } 10941 if ('string' != typeof r) { 10942 this.setFieldInvalid(e, s); 10943 break; 10944 } 10945 if ('' === r) break; 10946 const i = +r; 10947 (Number.isNaN(i) || isNumberLessThanMin(i, t)) && 10948 this.setFieldInvalid(e, s); 10949 break; 10950 } 10951 case Rules.CustomRegexp: { 10952 if (void 0 === t) 10953 return ( 10954 console.error( 10955 `Value for ${s.rule} rule for [${e}] field is not defined. This field will be always invalid.` 10956 ), 10957 void this.setFieldInvalid(e, s) 10958 ); 10959 let i; 10960 try { 10961 i = new RegExp(t); 10962 } catch (i) { 10963 console.error( 10964 `Value for ${s.rule} rule for [${e}] should be a valid regexp. This field will be always invalid.` 10965 ), 10966 this.setFieldInvalid(e, s); 10967 break; 10968 } 10969 const l = String(r); 10970 '' === l || i.test(l) || this.setFieldInvalid(e, s); 10971 break; 10972 } 10973 case Rules.MinFilesCount: 10974 if (void 0 === t) { 10975 console.error( 10976 `Value for ${s.rule} rule for [${e}] field is not defined. This field will be always invalid.` 10977 ), 10978 this.setFieldInvalid(e, s); 10979 break; 10980 } 10981 if ('number' != typeof t) { 10982 console.error( 10983 `Value for ${s.rule} rule for [${e}] field should be a number. The field will be always invalid.` 10984 ), 10985 this.setFieldInvalid(e, s); 10986 break; 10987 } 10988 if ( 10989 Number.isFinite(null == r ? void 0 : r.length) && 10990 r.length < t 10991 ) { 10992 this.setFieldInvalid(e, s); 10993 break; 10994 } 10995 break; 10996 case Rules.MaxFilesCount: 10997 if (void 0 === t) { 10998 console.error( 10999 `Value for ${s.rule} rule for [${e}] field is not defined. This field will be always invalid.` 11000 ), 11001 this.setFieldInvalid(e, s); 11002 break; 11003 } 11004 if ('number' != typeof t) { 11005 console.error( 11006 `Value for ${s.rule} rule for [${e}] field should be a number. The field will be always invalid.` 11007 ), 11008 this.setFieldInvalid(e, s); 11009 break; 11010 } 11011 if ( 11012 Number.isFinite(null == r ? void 0 : r.length) && 11013 r.length > t 11014 ) { 11015 this.setFieldInvalid(e, s); 11016 break; 11017 } 11018 break; 11019 case Rules.Files: { 11020 if (void 0 === t) 11021 return ( 11022 console.error( 11023 `Value for ${s.rule} rule for [${e}
11023] field is not defined. This field will be always invalid.` 11024 ), 11025 void this.setFieldInvalid(e, s) 11026 ); 11027 if ('object' != typeof t) 11028 return ( 11029 console.error( 11030 `Value for ${s.rule} rule for [${e}] field should be an object. This field will be always invalid.` 11031 ), 11032 void this.setFieldInvalid(e, s) 11033 ); 11034 const i = t.files; 11035 if ('object' != typeof i) 11036 return ( 11037 console.error( 11038 `Value for ${s.rule} rule for [${e}] field should be an object with files array. This field will be always invalid.` 11039 ), 11040 void this.setFieldInvalid(e, s) 11041 ); 11042 const l = (e, i) => { 11043 const s = 11044 Number.isFinite(i.minSize) && 11045 e.size < i.minSize, 11046 l = 11047 Number.isFinite(i.maxSize) && 11048 e.size > i.maxSize, 11049 t = 11050 Array.isArray(i.names) && 11051 !i.names.includes(e.name), 11052 r = 11053 Array.isArray(i.extensions) && 11054 !i.extensions.includes( 11055 e.name.split('.')[ 11056 e.name.split('.').length - 1 11057 ] 11058 ), 11059 o = 11060 Array.isArray(i.types) && 11061 !i.types.includes(e.type); 11062 return s || l || t || r || o; 11063 }; 11064 if ('object' == typeof r && null !== r) 11065 for (let t = 0, o = r.length; t < o; ++t) { 11066 const o = r.item(t); 11067 if (!o) { 11068 this.setFieldInvalid(e, s); 11069 break; 11070 } 11071 if (l(o, i)) { 11072 this.setFieldInvalid(e, s); 11073 break; 11074 } 11075 } 11076 break; 11077 } 11078 default: { 11079 if ('function' != typeof s.validator) 11080 return ( 11081 console.error( 11082 `Validator for custom rule for [${e}] field should be a function. This field will be always invalid.` 11083 ), 11084 void this.setFieldInvalid(e, s) 11085 ); 11086 const i = s.validator(r, this.fields); 11087 if ( 11088 ('boolean' != typeof i && 11089 'function' != typeof i && 11090 console.error( 11091 `Validator return value for [${e}] field should be boolean or function. It will be cast to boolean.` 11092 ), 11093 'function' == typeof i) 11094 ) { 11095 if (!l) { 11096 this.fields[e].asyncCheckPending = !1; 11097 const l = i(); 11098 return isPromise(l) 11099 ? l 11100 .then((i) => { 11101 i || this.setFieldInvalid(e, s); 11102 }) 11103 .catch(() => { 11104 this.setFieldInvalid(e, s); 11105 }) 11106 : (console.error( 11107 `Validator function for custom rule for [${e}] field should return a Promise. This field will be always invali
11107d.` 11108 ), 11109 void this.setFieldInvalid(e, s)); 11110 } 11111 this.fields[e].asyncCheckPending = !0; 11112 } 11113 i || this.setFieldInvalid(e, s); 11114 } 11115 } 11116 var o; 11117 } 11118 } 11119 validateField(e, i = !1) { 11120 var s; 11121 const l = this.fields[e]; 11122 l.isValid = !0; 11123 const t = []; 11124 return ( 11125 [...l.rules].reverse().forEach((s) => { 11126 const r = this.validateFieldRule(e, l.elem, s, i); 11127 isPromise(r) && t.push(r); 11128 }), 11129 l.isValid && 11130 this.setFieldValid( 11131 e, 11132 null == (s = l.config) ? void 0 : s.successMessage 11133 ), 11134 Promise.allSettled(t) 11135 ); 11136 } 11137 revalidateField(e) { 11138 if ('string' != typeof e) 11139 throw Error( 11140 'Field selector is not valid. Please specify a string selector.' 11141 ); 11142 return this.fields[e] 11143 ? new Promise((i) => { 11144 this.validateField(e, !0).finally(() => { 11145 this.clearFieldError(e), 11146 this.clearFieldLabel(e), 11147 this.renderFieldError(e), 11148 i(!!this.fields[e].isValid); 11149 }); 11150 }) 11151 : (console.error('Field not found. Check the field selector.'), 11152 Promise.reject()); 11153 } 11154 validateGroup(e, i) { 11155 const s = []; 11156 return ( 11157 [...i.rules].reverse().forEach((l) => { 11158 const t = this.validateGroupRule(e, i.type, i.elems, l); 11159 isPromise(t) && s.push(t); 11160 }), 11161 Promise.allSettled(s) 11162 ); 11163 } 11164 focusInvalidField() { 11165 for (const e in this.fields) { 11166 const i = this.fields[e]; 11167 if (!i.isValid) { 11168 setTimeout(() => i.elem.focus(), 0); 11169 break; 11170 } 11171 } 11172 } 11173 afterSubmitValidation(e = !1) { 11174 this.renderErrors(e), 11175 this.globalConfig.focusInvalidField && this.focusInvalidField(); 11176 } 11177 validate(e = !1) { 11178 return new Promise((i) => { 11179 const s = []; 11180 Object.keys(this.fields).forEach((e) => { 11181 const i = this.validateField(e); 11182 isPromise(i) && s.push(i); 11183 }), 11184 Object.keys(this.groupFields).forEach((e) => { 11185 const i = this.groupFields[e], 11186 l = this.validateGroup(e, i); 11187 isPromise(l) && s.push(l); 11188 }), 11189 s.length 11190 ? Promise.allSettled(s).then(() => { 11191 this.afterSubmitValidation(e), i(!0); 11192 }) 11193 : (this.afterSubmitValidation(e), i(!1)); 11194 }); 11195 } 11196 revalidate() { 11197 return new Promise((e) => { 11198 this.validateHandler(void 0, !0).finally(() => { 11199 this.globalConfig.focusInvalidField && 11200 this.focusInvalidField(), 11201 e(this.isValid); 11202 }); 11203 }); 11204 } 11205 validateHandler(e, i = !1) { 11206 return ( 11207 this.globalConfig.lockForm && this.lockForm(), 11208 this.validate(i).finally(() => { 11209 var i, s; 11210 this.globalConfig.lockForm && this.unlockForm(), 11211 this.isValid 11212 ? null == (i = this.onSuccessCallback) || 11213 i.call(this, e) 11214 : null == (s = this.onFailCallback) || 11215 s.call(this, this.fields, this.groupFields); 11216 }) 11217 ); 11218 } 11219 setForm(e) { 11220 (this.form = e), 11221 this.form.setAttribute('novalidate', 'novalidate'), 11222 this.removeListener( 11223 'submit', 11224 this.form, 11225 this.formSubmitHandler 11226 ), 11227 this.addListener('submit', this.form, this.formSubmitHandler); 11228 } 11229 addListener(e, i, s) { 11230 i.addEventListener(e, s), 11231 this.eventListeners.push({ type: e, elem: i, func: s }); 11232 } 11233 removeListener(e, i, s) { 11234 i.removeEventListener(e, s), 11235 (this.eventListeners = this.eventListeners.filter( 11236 (s) => s.type !== e || s.elem !== i 11237 )); 11238 } 11239 addField(e, i, s) { 11240 if ('string' != typeof e) 11241 throw Error(
11242 'Field selector is not valid. Please specify a string selector.' 11243 ); 11244 const l = this.form.querySelector(e); 11245 if (!l) 11246 throw Error( 11247 `Field with ${e} selector not found! Please check the field selector.` 11248 ); 11249 if (!Array.isArray(i) || !i.length) 11250 throw Error( 11251 `Rules argument for the field [${e}] should be an array and should contain at least 1 element.` 11252 ); 11253 return ( 11254 i.forEach((i) => { 11255 if (!('rule' in i || 'validator' in i || 'plugin' in i)) 11256 throw Error( 11257 `Rules argument for the field [${e}] must contain at least one rule or validator property.` 11258 ); 11259 if ( 11260 !( 11261 i.validator || 11262 i.plugin || 11263 (i.rule && Object.values(Rules).includes(i.rule)) 11264 ) 11265 ) 11266 throw Error( 11267 `Rule should be one of these types: ${Object.values( 11268 Rules 11269 ).join(', ')}. Provided value: ${i.rule}` 11270 ); 11271 }), 11272 (this.fields[e] = { 11273 elem: l, 11274 rules: i, 11275 isValid: void 0, 11276 config: s, 11277 }), 11278 this.setListeners(l), 11279 this.isSubmitted && this.validate(), 11280 this 11281 ); 11282 } 11283 removeField(e) { 11284 if ('string' != typeof e) 11285 throw Error( 11286 'Field selector is not valid. Please specify a string selector.' 11287 ); 11288 if (!this.fields[e]) 11289 return ( 11290 console.error('Field not found. Check the field selector.'), 11291 this 11292 ); 11293 const i = this.getListenerType(this.fields[e].elem.type); 11294 return ( 11295 this.removeListener(i, this.fields[e].elem, this.handlerChange), 11296 this.clearErrors(), 11297 delete this.fields[e], 11298 this 11299 ); 11300 } 11301 removeGroup(e) { 11302 if ('string' != typeof e) 11303 throw Error( 11304 'Group selector is not valid. Please specify a string selector.' 11305 ); 11306 return this.groupFields[e] 11307 ? (this.groupFields[e].elems.forEach((e) => { 11308 const i = this.getListenerType(e.type); 11309 this.removeListener(i, e, this.handlerChange); 11310 }), 11311 this.clearErrors(), 11312 delete this.groupFields[e], 11313 this) 11314 : (console.error('Group not found. Check the group selector.'), 11315 this); 11316 } 11317 addRequiredGroup(e, i, s, l) { 11318 if ('string' != typeof e) 11319 throw Error( 11320 'Group selector is not valid. Please specify a string selector.' 11321 ); 11322 const t = this.form.querySelector(e); 11323 if (!t) 11324 throw Error( 11325 `Group with ${e} selector not found! Please check the group selector.` 11326 ); 11327 const r = t.querySelectorAll('input'), 11328 o = Array.from(r).every((e) => 'radio' === e.type), 11329 a = Array.from(r).every((e) => 'checkbox' === e.type); 11330 if (!o && !a) 11331 throw Error( 11332 'Group should contain either or checkboxes or radio buttons' 11333 ); 11334 return ( 11335 (this.groupFields[e] = { 11336 rules: [ 11337 { 11338 rule: GroupRules.Required, 11339 errorMessage: i, 11340 successMessage: l, 11341 }, 11342 ], 11343 groupElem: t, 11344 elems: Array.from(r), 11345 type: o ? 'radio' : 'checkbox', 11346 isDirty: !1, 11347 isValid: void 0, 11348 config: s, 11349 }), 11350 r.forEach((e) => { 11351 this.setListeners(e); 11352 }), 11353 this 11354 ); 11355 } 11356 getListenerType(e) { 11357 switch (e) { 11358 case 'checkbox': 11359 case 'select-one': 11360 case 'file': 11361 case 'radio': 11362 return 'change'; 11363 default: 11364 return 'input'; 11365 } 11366 } 11367 setListeners(e) { 11368 const i = this.getListenerType(e.type); 11369 this.removeListener(i, e, this.handlerChange), 11370 this.addListener(i, e, this.handlerChange); 11371 } 11372 clearFieldLabel(e) { 11373 var i, s; 11374 null == (i = this.errorLabels[e]) || i.remove(), 11375 null == (s = this.successLabels[e]) || s.remove(); 11376 } 11377 clearFieldError(e) { 11378 var i, s, l, t; 11379 const r = this.fields[e], 11380 o = 11381 (null == (i = r.config) ? void 0 : i.errorFieldStyle) || 11382 this.globalConfig.errorFieldStyle;
11383 Object.keys(o).forEach((e) => { 11384 r.elem.style[e] = ''; 11385 }); 11386 const a = 11387 (null == (s = r.config) ? void 0 : s.successFieldStyle) || 11388 this.globalConfig.successFieldStyle || 11389 {}; 11390 Object.keys(a).forEach((e) => { 11391 r.elem.style[e] = ''; 11392 }), 11393 r.elem.classList.remove( 11394 (null == (l = r.config) ? void 0 : l.errorFieldCssClass) || 11395 this.globalConfig.errorFieldCssClass, 11396 (null == (t = r.config) 11397 ? void 0 11398 : t.successFieldCssClass) || 11399 this.globalConfig.successFieldCssClass 11400 ); 11401 } 11402 clearErrors() { 11403 var e, i; 11404 Object.keys(this.errorLabels).forEach((e) => 11405 this.errorLabels[e].remove() 11406 ), 11407 Object.keys(this.successLabels).forEach((e) => 11408 this.successLabels[e].remove() 11409 ); 11410 for (const e in this.fields) this.clearFieldError(e); 11411 for (const s in this.groupFields) { 11412 const l = this.groupFields[s], 11413 t = 11414 (null == (e = l.config) ? void 0 : e.errorFieldStyle) || 11415 this.globalConfig.errorFieldStyle; 11416 Object.keys(t).forEach((e) => { 11417 l.elems.forEach((i) => { 11418 var s; 11419 (i.style[e] = ''), 11420 i.classList.remove( 11421 (null == (s = l.config) 11422 ? void 0 11423 : s.errorFieldCssClass) || 11424 this.globalConfig.errorFieldCssClass 11425 ); 11426 }); 11427 }); 11428 const r = 11429 (null == (i = l.config) ? void 0 : i.successFieldStyle) || 11430 this.globalConfig.successFieldStyle || 11431 {}; 11432 Object.keys(r).forEach((e) => { 11433 l.elems.forEach((i) => { 11434 var s; 11435 (i.style[e] = ''), 11436 i.classList.remove( 11437 (null == (s = l.config) 11438 ? void 0 11439 : s.successFieldCssClass) || 11440 this.globalConfig.successFieldCssClass 11441 ); 11442 }); 11443 }); 11444 } 11445 this.tooltips = []; 11446 } 11447 isTooltip() { 11448 return !!this.globalConfig.tooltip; 11449 } 11450 lockForm() { 11451 const e = this.form.querySelectorAll( 11452 'input, textarea, button, select' 11453 ); 11454 for (let i = 0, s = e.length; i < s; ++i) 11455 e[i].setAttribute('disabled', 'disabled'), 11456 (e[i].style.pointerEvents = 'none'), 11457 (e[i].style.webkitFilter = 'grayscale(100%)'), 11458 (e[i].style.filter = 'grayscale(100%)'); 11459 } 11460 unlockForm() { 11461 const e = this.form.querySelectorAll( 11462 'input, textarea, button, select' 11463 ); 11464 for (let i = 0, s = e.length; i < s; ++i) 11465 e[i].removeAttribute('disabled'), 11466 (e[i].style.pointerEvents = ''), 11467 (e[i].style.webkitFilter = ''), 11468 (e[i].style.filter = ''); 11469 } 11470 renderTooltip(e, i, s) { 11471 var l; 11472 const { 11473 top: t, 11474 left: r, 11475 width: o, 11476 height: a, 11477 } = e.getBoundingClientRect(), 11478 n = i.getBoundingClientRect(), 11479 d = 11480 s || 11481 (null == (l = this.globalConfig.tooltip) 11482 ? void 0 11483 : l.position); 11484 switch (d) { 11485 case 'left': 11486 (i.style.top = t + a / 2 - n.height / 2 + 'px'), 11487 (i.style.left = r - n.width - 5 + 'px'); 11488 break; 11489 case 'top': 11490 (i.style.top = t - n.height - 5 + 'px'), 11491 (i.style.left = r + o / 2 - n.width / 2 + 'px'); 11492 break; 11493 case 'right': 11494 (i.style.top = t + a / 2 - n.height / 2 + 'px'), 11495 (i.style.left = `${r + o + 5}px`); 11496 break; 11497 case 'bottom': 11498 (i.style.top = `${t + a + 5}px`), 11499 (i.style.left = r + o / 2 - n.width / 2 + 'px'); 11500 } 11501 i.dataset.direction = d; 11502 return { 11503 refresh: () => { 11504 this.renderTooltip(e, i, s); 11505 }, 11506 }; 11507 } 11508 createErrorLabelElem(e, i, s) { 11509 const l = document.createElement('div'); 11510 l.innerHTML = i; 11511 const t = this.isTooltip() 11512 ? null == s 11513 ? void 0 11514 : s.errorLabelStyle 11515 : (null == s ? void 0 : s.errorLabelStyle) || 11516 this.globalConfig.errorLabelStyle; 11517 return ( 11518 Object.assign(l.style, t), 11519 l.classList.add( 11520 (null == s ? void 0 : s.errorLabelCssClass) || 11521 this.globalConfig.errorLabelCssClass, 11522 'just-validate-error-label' 11523 ), 11524 this.isTooltip() && (l.dataset.tooltip = 'true'), 11525 this.globalConfig.testingMode && 11526 (l.dataset.testId = `error-label-${e}`), 11527 (this.errorLabels[e] = l), 11528 l 11529 ); 11530 } 11531 createSuccessLabelElem(e, i, s) { 11532 if (void 0 === i) return null; 11533 const l = document.createElement('div'); 11534 l.innerHTML = i; 11535 const t = 11536 (null == s ? void 0 : s.successLabelStyle) || 11537 this.globalConfig.successLabelStyle; 11538 return ( 11539 Object.assign(l.style, t), 11540 l.classList.add( 11541 (null == s ? void 0 : s.successLabelCssClass) || 11542 this.globalConfig.successLabelCssClass, 11543 'just-validate-success-label' 11544 ), 11545 this.globalConfig.testingMode && 11546 (l.dataset.testId = `success-label-${e}`), 11547 (this.successLabels[e] = l), 11548 l 11549 ); 11550 } 11551 renderErrorsContainer(e, i) { 11552 const s = i || this.globalConfig.errorsContainer; 11553 if ('string' == typeof s) { 11554 const i = this.form.querySelector(s); 11555 if (i) return i.appendChild(e), !0; 11556 console.error( 11557 `Error container with ${s} selector not found. Errors will be rendered as usual` 11558 ); 11559 } 11560 return s instanceof Element 11561 ? (s.appendChild(e), !0) 11562 : (void 0 !== s && 11563 console.error(
11564 'Error container not found. It should be a string or existing Element. Errors will be rendered as usual' 11565 ), 11566 !1); 11567 } 11568 renderGroupLabel(e, i, s, l) { 11569 if (!l) { 11570 if (this.renderErrorsContainer(i, s)) return; 11571 } 11572 e.appendChild(i); 11573 } 11574 renderFieldLabel(e, i, s, l) { 11575 var t, r, o, a, n, d, u; 11576 if (!l) { 11577 if (this.renderErrorsContainer(i, s)) return; 11578 } 11579 if ('checkbox' === e.type || 'radio' === e.type) { 11580 const s = document.querySelector( 11581 `label[for="${e.getAttribute('id')}"]` 11582 ); 11583 'label' === 11584 (null == 11585 (r = null == (t = e.parentElement) ? void 0 : t.tagName) 11586 ? void 0 11587 : r.toLowerCase()) 11588 ? null == 11589 (a = 11590 null == (o = e.parentElement) 11591 ? void 0 11592 : o.parentElement) || a.appendChild(i) 11593 : s 11594 ? null == (n = s.parentElement) || n.appendChild(i) 11595 : null == (d = e.parentElement) || d.appendChild(i); 11596 } else null == (u = e.parentElement) || u.appendChild(i); 11597 } 11598 renderFieldError(e) { 11599 var i, s, l, t, r, o; 11600 const a = this.fields[e]; 11601 if (a.isValid) { 11602 if (!a.asyncCheckPending) { 11603 const l = this.createSuccessLabelElem( 11604 e, 11605 a.successMessage, 11606 a.config 11607 ); 11608 l && 11609 this.renderFieldLabel( 11610 a.elem, 11611 l, 11612 null == (i = a.config) ? void 0 : i.errorsContainer, 11613 !0 11614 ), 11615 a.elem.classList.add( 11616 (null == (s = a.config) 11617 ? void 0 11618 : s.successFieldCssClass) || 11619 this.globalConfig.successFieldCssClass 11620 ); 11621 } 11622 return; 11623 } 11624 (this.isValid = !1), 11625 a.elem.classList.add( 11626 (null == (l = a.config) ? void 0 : l.errorFieldCssClass) || 11627 this.globalConfig.errorFieldCssClass 11628 ); 11629 const n = this.createErrorLabelElem(e, a.errorMessage, a.config); 11630 this.renderFieldLabel( 11631 a.elem, 11632 n, 11633 null == (t = a.config) ? void 0 : t.errorsContainer 11634 ), 11635 this.isTooltip() && 11636 this.tooltips.push( 11637 this.renderTooltip( 11638 a.elem, 11639 n, 11640 null == 11641 (o = 11642 null == (r = a.config) ? void 0 : r.tooltip) 11643 ? void 0 11644 : o.position 11645 ) 11646 ); 11647 } 11648 renderErrors(e = !1) { 11649 var i, s, l, t; 11650 if (this.isSubmitted || e) { 11651 this.clearErrors(), (this.isValid = !0); 11652 for (const e in this.groupFields) { 11653 const r = this.groupFields[e]; 11654 if (r.isValid) { 11655 r.elems.forEach((e) => { 11656 var i, s; 11657 Object.assign( 11658 e.style, 11659 (null == (i = r.config) 11660 ? void 0 11661 : i.successFieldStyle) || 11662 this.globalConfig.successFieldStyle 11663 ), 11664 e.classList.add( 11665 (null == (s = r.config) 11666 ? void 0 11667 : s.successFieldCssClass) || 11668 this.globalConfig.successFieldCssClass 11669 ); 11670 }); 11671 const s = this.createSuccessLabelElem( 11672 e, 11673 r.successMessage, 11674 r.config 11675 ); 11676 s && 11677 this.renderGroupLabel( 11678 r.groupElem, 11679 s, 11680 null == (i = r.config) 11681 ? void 0 11682 : i.errorsContainer, 11683 !0 11684 ); 11685 continue; 11686 } 11687 (this.isValid = !1),
11688 r.elems.forEach((e) => { 11689 var i, s; 11690 Object.assign( 11691 e.style, 11692 (null == (i = r.config) 11693 ? void 0 11694 : i.errorFieldStyle) || 11695 this.globalConfig.errorFieldStyle 11696 ), 11697 e.classList.add( 11698 (null == (s = r.config) 11699 ? void 0 11700 : s.errorFieldCssClass) || 11701 this.globalConfig.errorFieldCssClass 11702 ); 11703 }); 11704 const o = this.createErrorLabelElem( 11705 e, 11706 r.errorMessage, 11707 r.config 11708 ); 11709 this.renderGroupLabel( 11710 r.groupElem, 11711 o, 11712 null == (s = r.config) ? void 0 : s.errorsContainer 11713 ), 11714 this.isTooltip() && 11715 this.tooltips.push( 11716 this.renderTooltip( 11717 r.groupElem, 11718 o, 11719 null == 11720 (t = 11721 null == (l = r.config) 11722 ? void 0 11723 : l.tooltip) 11724 ? void 0 11725 : t.position 11726 ) 11727 ); 11728 } 11729 for (const e in this.fields) this.renderFieldError(e); 11730 } 11731 } 11732 destroy() { 11733 this.eventListeners.forEach((e) => { 11734 this.removeListener(e.type, e.elem, e.func); 11735 }), 11736 Object.keys(this.customStyleTags).forEach((e) => { 11737 this.customStyleTags[e].remove(); 11738 }), 11739 this.clearErrors(), 11740 this.globalConfig.lockForm && this.unlockForm(); 11741 } 11742 refresh() { 11743 this.destroy(), 11744 this.form 11745 ? (this.initialize(this.form, this.globalConfig), 11746 Object.keys(this.fields).forEach((e) => { 11747 this.addField( 11748 e, 11749 [...this.fields[e].rules], 11750 this.fields[e].config 11751 ); 11752 })) 11753 : console.error( 11754 'Cannot initialize the library! Form is not defined' 11755 ); 11756 } 11757 setCurrentLocale(e) { 11758 'string' == typeof e || void 0 === e 11759 ? ((this.currentLocale = e), 11760 this.isSubmitted && this.validate()) 11761 : console.error('Current locale should be a string'); 11762 } 11763 onSuccess(e) { 11764 return (this.onSuccessCallback = e), this; 11765 } 11766 onFail(e) { 11767 return (this.onFailCallback = e), this; 11768 } 11769 } 11770 class CssClassObserver { 11771 constructor(t, s, e, a, i) { 11772 (this.targetNode = t), 11773 (this.classToWatch = s), 11774 (this.classAddedCallback = e), 11775 (this.classRemovedCallback = a), 11776 (this.observer = null), 11777 (this.lastClassState = t.classList.contains(this.classToWatch)), 11778 (this.ignoreToggle = !!i), 11779 this.init(); 11780 } 11781 init() { 11782 (this.observer = new MutationObserver((t) => 11783 this.mutationCallback(t) 11784 )), 11785 this.observe(); 11786 } 11787 observe() { 11788 this.observer.observe(this.targetNode, { attributes: !0 }); 11789 } 11790 disconnect() { 11791 this.observer.disconnect(); 11792 } 11793 mutationCallback(t) { 11794 for (let s of t) 11795 if ('attributes' === s.type && 'class' === s.attributeName) { 11796 let t = s.target.classList.contains(this.classToWatch); 11797 (this.ignoreToggle || this.lastClassState !== t) && 11798 ((this.lastClassState = t), 11799 t 11800 ? this.classAddedCallback() 11801 : this.classRemovedCallback()); 11802 } 11803 } 11804 } 11805 class ContentObserver { 11806 constructor(t, s, e, a) { 11807 (this.targetNode = t), 11808 (this.contentSelector = s), 11809 (this.contentAddedCallback = e), 11810 (this.contentRemovedCallback = a), 11811 (this.observer = null),
11812 this.init(); 11813 } 11814 init() { 11815 (this.observer = new MutationObserver((t) => 11816 this.mutationCallback(t) 11817 )), 11818 this.observe(); 11819 } 11820 observe() { 11821 this.observer.observe(this.targetNode, { childList: !0 }); 11822 } 11823 disconnect() { 11824 this.observer.disconnect(); 11825 } 11826 mutationCallback(t) { 11827 for (let s of t) 11828 'childList' === s.type && 11829 (s.addedNodes.forEach((t) => { 11830 t.matches(this.contentSelector) && 11831 this.contentAddedCallback(); 11832 }), 11833 s.removedNodes.forEach((t) => { 11834 t.matches(this.contentSelector) && 11835 this.contentRemovedCallback(); 11836 })); 11837 } 11838 } 11839 const CONFIG_DEFAULT = { 11840 errorFieldCssClass: 'is-invalid', 11841 errorLabelCssClass: 'just-validate-error-label', 11842 }, 11843 NAME$c = 'justvalidatebi', 11844 CLASS_NAME_SRONLY = 'sr-only-justvalidate-bi', 11845 SELECTOR_SPAN_SRONLY = `.${CLASS_NAME_SRONLY}`; 11846 class FormValidate { 11847 constructor(e, t) { 11848 return ( 11849 (this.formSelector = e), 11850 (this.target = document.querySelector(e)), 11851 (this.validate = new JustValidate(e, t)), 11852 (this.config = Object.assign( 11853 {}, 11854 CONFIG_DEFAULT, 11855 this.validate.globalConfig 11856 )), 11857 (this.formItems = []), 11858 this.init(), 11859 this.validate 11860 ); 11861 } 11862 init() { 11863 this.target.querySelectorAll('input, select').forEach((e) => { 11864 const t = new CssClassObserver( 11865 e, 11866 this.config.errorFieldCssClass, 11867 () => this.onInputError(e), 11868 () => this.onInputErrorRemove(e), 11869 !0 11870 ); 11871 e.id || 11872 e.setAttribute('id', NAME$c + '-input-' + Math.random()), 11873 this.formItems.push({ item: e, watcher: t }); 11874 }); 11875 this.target.querySelectorAll('fieldset').forEach((e) => { 11876 if ( 11877 e.querySelectorAll('input[type=radio],input[type=checkbox]') 11878 .length > 0 11879 ) { 11880 const t = new ContentObserver( 11881 e, 11882 '.' + this.config.errorLabelCssClass, 11883 () => this.onFieldsetError(e), 11884 () => this.onFieldsetErrorRemove(e) 11885 ); 11886 e.id || 11887 e.setAttribute( 11888 'id', 11889 NAME$c + '-fieldset-' + Math.random() 11890 ), 11891 this.formItems.push({ item: e, watcher: t }); 11892 } 11893 }); 11894 } 11895 onInputError(e) { 11896 const t = this.getErrorMessages(e), 11897 r = []; 11898 t.forEach((t, s) => { 11899 const i = e.id + '-error-' + s; 11900 t.setAttribute('id', i), r.push(i); 11901 }), 11902 r.length > 0 && 11903 (e.setAttribute('aria-describedby', r.join(' ')), 11904 e.setAttribute('aria-invalid', 'true')); 11905 } 11906 onInputErrorRemove(e) { 11907 e.removeAttribute('aria-describedby'), 11908 e.setAttribute('aria-invalid', 'false'); 11909 } 11910 onFieldsetError(e) { 11911 const t = this.getErrorMessages(e), 11912 r = [], 11913 s = []; 11914 if ( 11915 (t.forEach((t, i) => { 11916 const o = e.id + '-error-' + i; 11917 t.setAttribute('id', o), r.push(o), s.push(t.textContent); 11918 }), 11919 r.length > 0) 11920 ) { 11921 const t = e.querySelector('legend'); 11922 t && 11923 (t.setAttribute('aria-describedby', r.join(' ')), 11924 t.setAttribute('aria-invalid', 'true')); 11925 } 11926 } 11927 onFieldsetErrorRemove(e) { 11928 const t = e.querySelector('legend'); 11929 if (t) { 11930 t.removeAttribute('aria-describedby'), 11931 t.setAttribute('aria-invalid', 'false'); 11932 const e = t.querySelector(SELECTOR_SPAN_SRONLY); 11933 e && e.remove(); 11934 } 11935 } 11936 getErrorMessages(e) { 11937 let t = e, 11938 r = t.querySelectorAll('.' + this.config.errorLabelCssClass); 11939 for (; null != t && 0 === r.length;) 11940 (t = t.parentNode), 11941 (r = t.querySelectorAll( 11942 '.' + this.config.errorLabelCssClass 11943 )); 11944 return r; 11945 } 11946 } 11947 const ValidatorSelectAutocomplete = (e, t = {}) => (r, s) => { 11948 let i = !1; 11949 const o = s[e]; 11950 if (!o) 11951 throw new Error( 11952 'ValidatorSelectAutocomplete: ' + e + ' not found as form field' 11953 ); 11954 return ( 11955 t.required || r 11956 ? document 11957 .querySelector('#' + o.elem.id + '-select') 11958 .querySelectorAll('option') 11959 .forEach((e) => { 11960 e.text === r && (i = !0); 11961 }) 11962 : (i = !0), 11963 i 11964 ); 11965 }; 11966 const NAME$b = 'input', 11967 EVENT_CHANGE = 'change.bs.input'; 11968 class Input extends BaseComponent { 11969 constructor(e) { 11970 super(e), (this._label = new InputLabel$1(e)), this._bindEvents(); 11971 } 11972 static get NAME() { 11973 return NAME$b; 11974 } 11975 _bindEvents() { 11976 'file' === this._element.getAttribute('type') && 11977 EventHandler$1.on(this._element, EVENT_CHANGE, () => { 11978 this._handleFileDescription(); 11979 }); 11980 } 11981 _handleFileDescription() { 11982 const e = []; 11983 let t = '';
11984 Array.from(this._element.files).forEach((t) => { 11985 const n = Math.round(parseInt(t.size, 10) / 1024); 11986 e.push(t.name + ' (' + n + 'kb)'); 11987 }), 11988 this._element.files.length > 1 && 11989 (t = this._element.files.length + ' file da caricare: '); 11990 const n = SelectorEngine$1.findOne( 11991 'label[for="' + 11992 this._element.getAttribute('id') + 11993 '"] label.form-file-name', 11994 this._element 11995 ); 11996 n && (n.innerText = t + e.join('; ')); 11997 } 11998 } 11999 const excludes = [ 12000 'select', 12001 'input[data-bs-input][type="number"]', 12002 'input[data-bs-input][type="password"]', 12003 'input[data-bs-autocomplete][type="search"]', 12004 'input[type="time"]', 12005 ], 12006 inputs$2 = SelectorEngine$1.find('input, textarea').filter((e) => { 12007 let t = !0; 12008 return ( 12009 excludes.forEach((n) => { 12010 e.matches(n) && (t = !1); 12011 }), 12012 t 12013 ); 12014 }); 12015 inputs$2.forEach((e) => { 12016 Input.getOrCreateInstance(e); 12017 }); 12018 var Input$1 = Input; 12019 var commonjsGlobal = 12020 typeof globalThis !== 'undefined' 12021 ? globalThis 12022 : typeof window !== 'undefined' 12023 ? window 12024 : typeof global !== 'undefined' 12025 ? global 12026 : typeof self !== 'undefined' 12027 ? self 12028 : {}; 12029 12030 function unwrapExports(x) { 12031 return x && 12032 x.__esModule && 12033 Object.prototype.hasOwnProperty.call(x, 'default') 12034 ? x['default'] 12035 : x; 12036 } 12037 12038 function createCommonjsModule(fn, module) { 12039 return ( 12040 (module = { exports: {} }), 12041 fn(module, module.exports), 12042 module.exports 12043 ); 12044 } 12045 var accessibleAutocomplete_min = createCommonjsModule(function (e, t) { 12046 var n; 12047 (n = function () { 12048 return (function (e) { 12049 var t = {}; 12050 function n(r) { 12051 if (t[r]) return t[r].exports; 12052 var o = (t[r] = { i: r, l: !1, exports: {} }); 12053 return ( 12054 e[r].call(o.exports, o, o.exports, n), 12055 (o.l = !0), 12056 o.exports 12057 ); 12058 } 12059 return ( 12060 (n.m = e), 12061 (n.c = t), 12062 (n.d = function (e, t, r) { 12063 n.o(e, t) || 12064 Object.defineProperty(e, t, { 12065 enumerable: !0, 12066 get: r, 12067 }); 12068 }), 12069 (n.r = function (e) { 12070 'undefined' != typeof Symbol && 12071 Symbol.toStringTag && 12072 Object.defineProperty(e, Symbol.toStringTag, { 12073 value: 'Module', 12074 }), 12075 Object.defineProperty(e, '__esModule', { 12076 value: !0, 12077 }); 12078 }), 12079 (n.t = function (e, t) { 12080 if ((1 & t && (e = n(e)), 8 & t)) return e; 12081 if (4 & t && 'object' == typeof e && e && e.__esModule) 12082 return e; 12083 var r = Object.create(null); 12084 if ( 12085 (n.r(r), 12086 Object.defineProperty(r, 'default', { 12087 enumerable: !0, 12088 value: e, 12089 }), 12090 2 & t && 'string' != typeof e) 12091 ) 12092 for (var o in e) 12093 n.d( 12094 r, 12095 o, 12096 function (t) { 12097 return e[t]; 12098 }.bind(null, o) 12099 ); 12100 return r; 12101 }), 12102 (n.n = function (e) { 12103 var t =
12104 e && e.__esModule 12105 ? function () { 12106 return e.default; 12107 } 12108 : function () { 12109 return e; 12110 }; 12111 return n.d(t, 'a', t), t; 12112 }), 12113 (n.o = function (e, t) { 12114 return Object.prototype.hasOwnProperty.call(e, t); 12115 }), 12116 (n.p = '/'), 12117 n((n.s = 37)) 12118 ); 12119 })([ 12120 function (e, t, n) { 12121 var r = n(1), 12122 o = n(6), 12123 i = n(7), 12124 u = n(16), 12125 a = n(18), 12126 s = 'prototype', 12127 l = function (e, t, n) { 12128 var c, 12129 p, 12130 f, 12131 d, 12132 h = e & l.F, 12133 v = e & l.G, 12134 m = e & l.S, 12135 y = e & l.P, 12136 _ = e & l.B, 12137 g = v 12138 ? r 12139 : m 12140 ? r[t] || (r[t] = {}) 12141 : (r[t] || {})[s], 12142 b = v ? o : o[t] || (o[t] = {}), 12143 w = b[s] || (b[s] = {}); 12144 for (c in (v && (n = t), n)) 12145 (f = ((p = !h && g && void 0 !== g[c]) ? g : n)[ 12146 c 12147 ]), 12148 (d = 12149 _ && p 12150 ? a(f, r) 12151 : y && 'function' == typeof f 12152 ? a(Function.call, f) 12153 : f), 12154 g && u(g, c, f, e & l.U), 12155 b[c] != f && i(b, c, d), 12156 y && w[c] != f && (w[c] = f); 12157 }; 12158 (r.core = o), 12159 (l.F = 1), 12160 (l.G = 2), 12161 (l.S = 4), 12162 (l.P = 8), 12163 (l.B = 16), 12164 (l.W = 32), 12165 (l.U = 64), 12166 (l.R = 128), 12167 (e.exports = l); 12168 }, 12169 function (e, t) { 12170 var n = (e.exports = 12171 'undefined' != typeof window && window.Math == Math 12172 ? window 12173 : 'undefined' != typeof self && self.Math == Math 12174 ? self 12175 : Function('return this')()); 12176 'number' == typeof __g && (__g = n); 12177 }, 12178 function (e, t) { 12179 e.exports = function (e) { 12180 return 'object' == typeof e 12181 ? null !== e 12182 : 'function' == typeof e; 12183 }; 12184 }, 12185 function (e, t, n) { 12186 e.exports = !n(4)(function () { 12187 return ( 12188 7 != 12189 Object.defineProperty({}, 'a', { 12190 get: function () { 12191 return 7; 12192 }, 12193 }).a 12194 ); 12195 }); 12196 }, 12197 function (e, t) { 12198 e.exports = function (e) { 12199 try { 12200 return !!e(); 12201 } catch (e) { 12202 return !0; 12203 } 12204 }; 12205 }, 12206 function (e, t, n) { 12207 n.r(t), 12208 n.d(t, 'h', function () { 12209 return a; 12210 }), 12211 n.d(t, 'createElement', function () { 12212 return a; 12213 }), 12214 n.d(t, 'cloneElement', function () { 12215 return c; 12216 }), 12217 n.d(t, 'Component', function () { 12218 return L; 12219 }), 12220 n.d(t, 'render', function () { 12221 return T; 12222 }), 12223 n.d(t, 'rerender', function () { 12224 return h; 12225 }), 12226 n.d(t, 'options', function () { 12227 return o; 12228 }); 12229 var r = function () { }, 12230 o = {}, 12231 i = [], 12232 u = []; 12233 function a(e, t) { 12234 var n, 12235 a, 12236 s, 12237 l, 12238 c = u; 12239 for (l = arguments.length; 2 < l--;) 12240 i.push(arguments[l]); 12241 for ( 12242 t && 12243 null != t.children && 12244 (i.length || i.push(t.children), delete t.children); 12245 i.length; 12246 12247 ) 12248 if ((a = i.pop()) && void 0 !== a.pop) 12249 for (l = a.length; l--;) i.push(a[l]); 12250 else 12251 'boolean' == typeof a && (a = null),
12252 (s = 'function' != typeof e) && 12253 (null == a 12254 ? (a = '') 12255 : 'number' == typeof a 12256 ? (a = String(a)) 12257 : 'string' != typeof a && (s = !1)), 12258 s && n 12259 ? (c[c.length - 1] += a) 12260 : c === u 12261 ? (c = [a]) 12262 : c.push(a), 12263 (n = s); 12264 var p = new r(); 12265 return ( 12266 (p.nodeName = e), 12267 (p.children = c), 12268 (p.attributes = null == t ? void 0 : t), 12269 (p.key = null == t ? void 0 : t.key), 12270 void 0 !== o.vnode && o.vnode(p), 12271 p 12272 ); 12273 } 12274 function s(e, t) { 12275 for (var n in t) e[n] = t[n]; 12276 return e; 12277 } 12278 var l = 12279 'function' == typeof Promise
12280 ? Promise.resolve().then.bind(Promise.resolve()) 12281 : setTimeout; 12282 function c(e, t) { 12283 return a( 12284 e.nodeName, 12285 s(s({}, e.attributes), t), 12286 2 < arguments.length 12287 ? [].slice.call(arguments, 2) 12288 : e.children 12289 ); 12290 } 12291 var p = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i, 12292 f = []; 12293 function d(e) { 12294 !e._dirty && 12295 (e._dirty = !0) && 12296 1 == f.push(e) && 12297 (o.debounceRendering || l)(h); 12298 } 12299 function h() { 12300 var e, 12301 t = f; 12302 for (f = []; (e = t.pop());) e._dirty && j(e); 12303 } 12304 function v(e, t) { 12305 return ( 12306 e.normalizedNodeName === t || 12307 e.nodeName.toLowerCase() === t.toLowerCase() 12308 ); 12309 } 12310 function m(e) { 12311 var t = s({}, e.attributes); 12312 t.children = e.children; 12313 var n = e.nodeName.defaultProps; 12314 if (void 0 !== n) 12315 for (var r in n) void 0 === t[r] && (t[r] = n[r]); 12316 return t; 12317 } 12318 function y(e) { 12319 var t = e.parentNode; 12320 t && t.removeChild(e); 12321 } 12322 function _(e, t, n, r, o) { 12323 if (('className' === t && (t = 'class'), 'key' === t)); 12324 else if ('ref' === t) n && n(null), r && r(e); 12325 else if ('class' !== t || o) 12326 if ('style' === t) { 12327 if ( 12328 ((r && 12329 'string' != typeof r && 12330 'string' != typeof n) || 12331 (e.style.cssText = r || ''), 12332 r && 'object' == typeof r) 12333 ) { 12334 if ('string' != typeof n) 12335 for (var i in n) 12336 i in r || (e.style[i] = ''); 12337 for (var i in r) 12338 e.style[i] = 12339 'number' == typeof r[i] && 12340 !1 === p.test(i) 12341 ? r[i] + 'px' 12342 : r[i]; 12343 } 12344 } else if ('dangerouslySetInnerHTML' === t) 12345 r && (e.innerHTML = r.__html || ''); 12346 else if ('o' == t[0] && 'n' == t[1]) { 12347 var u = t !== (t = t.replace(/Capture$/, '')); 12348 (t = t.toLowerCase().substring(2)), 12349 r 12350 ? n || e.addEventListener(t, g, u) 12351 : e.removeEventListener(t, g, u), 12352 ((e._listeners || (e._listeners = {}))[ 12353 t 12354 ] = r); 12355 } else if ( 12356 'list' !== t && 12357 'type' !== t && 12358 !o && 12359 t in e 12360 ) { 12361 try { 12362 e[t] = null == r ? '' : r; 12363 } catch (e) { } 12364 (null != r && !1 !== r) || 12365 'spellcheck' == t || 12366 e.removeAttribute(t); 12367 } else { 12368 var a = 12369 o && t !== (t = t.replace(/^xlink:?/, '')); 12370 null == r || !1 === r 12371 ? a 12372 ? e.removeAttributeNS( 12373 'http://www.w3.org/1999/xlink', 12374 t.toLowerCase() 12375 ) 12376 : e.removeAttribute(t) 12377 : 'function' != typeof r && 12378 (a 12379 ? e.setAttributeNS( 12380 'http://www.w3.org/1999/xlink', 12381 t.toLowerCase(), 12382 r 12383 ) 12384 : e.setAttribute(t, r)); 12385 } 12386 else e.className = r || ''; 12387 } 12388 function g(e) { 12389 return this._listeners[e.type]( 12390 (o.event && o.event(e)) || e 12391 ); 12392 } 12393 var b = [], 12394 w = 0, 12395 x = !1, 12396 O = !1; 12397 function C() { 12398 for (var e; (e = b.pop());) 12399 o.afterMount && o.afterMount(e), 12400 e.componentDidMount && e.componentDidMount(); 12401 } 12402 function S(e, t, n, r, o) { 12403 var i = e, 12404 u = x; 12405 if ( 12406 ((null != t && 'boolean' != typeof t) || (t = ''), 12407 'string' == typeof t || 'number' == typeof t) 12408 ) 12409 return ( 12410 e && 12411 void 0 !== e.splitText && 12412 e.parentNode && 12413 (!e._component || o) 12414 ? e.nodeValue != t && (e.nodeValue = t) 12415 : ((i = document.createTextNode(t)), 12416 e && 12417 (e.parentNode && 12418 e.parentNode.replaceChild(i, e), 12419 E(e, !0))), 12420 (i.__preactattr_ = !0), 12421 i 12422 ); 12423 var a = t.nodeName; 12424 if ('function' == typeof a) 12425 return (function (e, t, n, r) { 12426 for ( 12427 var o = e && e._component, 12428 i = o, 12429 u = e, 12430 a = 12431 o && 12432 e._componentConstructor === 12433 t.nodeName, 12434 s = a, 12435 l = m(t);
12436 o && !s && (o = o._parentComponent); 12437 12438 ) 12439 s = o.constructor === t.nodeName; 12440 return ( 12441 o && s && (!r || o._component) 12442 ? (k(o, l, 3, n, r), (e = o.base)) 12443 : (i && !a && (P(i), (e = u = null)), 12444 (o = I(t.nodeName, l, n)), 12445 e && 12446 !o.nextBase && 12447 ((o.nextBase = e), (u = null)), 12448 k(o, l, 1, n, r), 12449 (e = o.base), 12450 u && 12451 e !== u && 12452 ((u._component = null), 12453 E(u, !1))), 12454 e 12455 ); 12456 })(e, t, n, r); 12457 if ( 12458 ((x = 'svg' === a || ('foreignObject' !== a && x)), 12459 (a = String(a)), 12460 (!e || !v(e, a)) && 12461 ((i = (function (e, t) { 12462 var n = t 12463 ? document.createElementNS( 12464 'http://www.w3.org/2000/svg', 12465 e 12466 ) 12467 : document.createElement(e); 12468 return (n.normalizedNodeName = e), n; 12469 })(a, x)), 12470 e)) 12471 ) { 12472 for (; e.firstChild;) i.appendChild(e.firstChild); 12473 e.parentNode && e.parentNode.replaceChild(i, e), 12474 E(e, !0); 12475 } 12476 var s = i.firstChild, 12477 l = i.__preactattr_, 12478 c = t.children; 12479 if (null == l) { 12480 l = i.__preactattr_ = {}; 12481 for (var p = i.attributes, f = p.length; f--;) 12482 l[p[f].name] = p[f].value; 12483 } 12484 return ( 12485 !O && 12486 c && 12487 1 === c.length && 12488 'string' == typeof c[0] && 12489 null != s && 12490 void 0 !== s.splitText && 12491 null == s.nextSibling 12492 ? s.nodeValue != c[0] && (s.nodeValue = c[0]) 12493 : ((c && c.length) || null != s) && 12494 (function (e, t, n, r, o) { 12495 var i, 12496 u, 12497 a, 12498 s, 12499 l, 12500 c, 12501 p, 12502 f, 12503 d = e.childNodes, 12504 h = [], 12505 m = {}, 12506 _ = 0, 12507 g = 0, 12508 b = d.length, 12509 w = 0, 12510 x = t ? t.length : 0; 12511 if (0 !== b) 12512 for (var O = 0; O < b; O++) { 12513 var C = d[O], 12514 M = C.__preactattr_; 12515 null != 12516 (N = 12517 x && M 12518 ? C._component 12519 ? C._component.__key 12520 : M.key 12521 : null) 12522 ? (_++, (m[N] = C)) 12523 : (M || 12524 (void 0 !== C.splitText 12525 ? !o || 12526 C.nodeValue.trim() 12527 : o)) && 12528 (h[w++] = C); 12529 } 12530 if (0 !== x) 12531 for (O = 0; O < x; O++) { 12532 var N; 12533 if ( 12534 ((l = null),
12535 null != (N = (s = t[O]).key)) 12536 ) 12537 _ && 12538 void 0 !== m[N] && 12539 ((l = m[N]), 12540 (m[N] = void 0), 12541 _--); 12542 else if (g < w) 12543 for (i = g; i < w; i++) 12544 if ( 12545 void 0 !== h[i] && 12546 ((c = u = h[i]), 12547 (f = o), 12548 'string' == 12549 typeof (p = s) || 12550 'number' == typeof p 12551 ? void 0 !== 12552 c.splitText 12553 : 'string' == 12554 typeof p.nodeName 12555 ? !c._componentConstructor && 12556 v(c, p.nodeName) 12557 : f || 12558 c._componentConstructor === 12559 p.nodeName) 12560 ) { 12561 (l = u), 12562 (h[i] = void 0), 12563 i === w - 1 && 12564 w--, 12565 i === g && g++; 12566 break; 12567 } 12568 (l = S(l, s, n, r)), 12569 (a = d[O]), 12570 l && 12571 l !== e && 12572 l !== a && 12573 (null == a 12574 ? e.appendChild(l) 12575 : l === a.nextSibling 12576 ? y(a) 12577 : e.insertBefore( 12578 l, 12579 a 12580 )); 12581 } 12582 if (_) 12583 for (var O in m) 12584 void 0 !== m[O] && E(m[O], !1); 12585 for (; g <= w;) 12586 void 0 !== (l = h[w--]) && E(l, !1); 12587 })( 12588 i, 12589 c, 12590 n, 12591 r, 12592 O || null != l.dangerouslySetInnerHTML 12593 ), 12594 (function (e, t, n) { 12595 var r; 12596 for (r in n) 12597 (t && null != t[r]) || 12598 null == n[r] || 12599 _(e, r, n[r], (n[r] = void 0), x); 12600 for (r in t) 12601 'children' === r || 12602 'innerHTML' === r || 12603 (r in n && 12604 t[r] === 12605 ('value' === r || 12606 'checked' === r 12607 ? e[r] 12608 : n[r])) || 12609 _(e, r, n[r], (n[r] = t[r]), x); 12610 })(i, t.attributes, l), 12611 (x = u), 12612 i 12613 ); 12614 } 12615 function E(e, t) { 12616 var n = e._component; 12617 n 12618 ? P(n) 12619 : (null != e.__preactattr_ && 12620 e.__preactattr_.ref && 12621 e.__preactattr_.ref(null), 12622 (!1 !== t && null != e.__preactattr_) || y(e), 12623 M(e)); 12624 } 12625 function M(e) { 12626 for (e = e.lastChild; e;) { 12627 var t = e.previousSibling; 12628 E(e, !0), (e = t); 12629 } 12630 } 12631 var N = []; 12632 function I(e, t, n) { 12633 var r, 12634 o = N.length; 12635 for ( 12636 e.prototype && e.prototype.render 12637 ? ((r = new e(t, n)), L.call(r, t, n)) 12638 : (((r = new L(t, n)).constructor = e), 12639 (r.render = A)); 12640 o--; 12641 12642 ) 12643 if (N[o].constructor === e) 12644 return ( 12645 (r.nextBase = N[o].nextBase), 12646 N.splice(o, 1), 12647 r 12648 ); 12649 return r; 12650 } 12651 function A(e, t, n) { 12652 return this.constructor(e, n); 12653 } 12654 function k(e, t, n, r, i) { 12655 e._disable || 12656 ((e._disable = !0), 12657 (e.__ref = t.ref), 12658 (e.__key = t.key), 12659 delete t.ref, 12660 delete t.key, 12661 void 0 === e.constructor.getDerivedStateFromProps && 12662 (!e.base || i 12663 ? e.componentWillMount && 12664 e.componentWillMount() 12665 : e.componentWillReceiveProps && 12666 e.componentWillReceiveProps(t, r)), 12667 r && 12668 r !== e.context && 12669 (e.prevContext || (e.prevContext = e.context), 12670 (e.context = r)), 12671 e.prevProps || (e.prevProps = e.props), 12672 (e.props = t), 12673 (e._disable = !1), 12674 0 !== n && 12675 (1 !== n && 12676 !1 === o.syncComponentUpdates && 12677 e.base 12678 ? d(e) 12679 : j(e, 1, i)), 12680 e.__ref && e.__ref(e)); 12681 } 12682 function j(e, t, n, r) { 12683 if (!e._disable) { 12684 var i, 12685 u, 12686 a, 12687 l = e.props, 12688 c = e.state, 12689 p = e.context, 12690 f = e.prevProps || l, 12691 d = e.prevState || c, 12692 h = e.prevContext || p, 12693 v = e.base, 12694 y = e.nextBase, 12695 _ = v || y, 12696 g = e._component, 12697 M = !1, 12698 N = h; 12699 if ( 12700 (e.constructor.getDerivedStateFromProps && 12701 ((c = s( 12702 s({}, c), 12703 e.constructor.getDerivedStateFromProps( 12704 l, 12705 c 12706 ) 12707 )), 12708 (e.state = c)), 12709 v && 12710 ((e.props = f), 12711 (e.state = d), 12712 (e.context = h), 12713 2 !== t && 12714 e.shouldComponentUpdate && 12715 !1 === e.shouldComponentUpdate(l, c, p) 12716 ? (M = !0) 12717 : e.componentWillUpdate && 12718 e.componentWillUpdate(l, c, p), 12719 (e.props = l), 12720 (e.state = c), 12721 (e.context = p)), 12722 (e.prevProps = e.prevState = e.prevContext = e.nextBase = null),
12723 (e._dirty = !1), 12724 !M) 12725 ) { 12726 (i = e.render(l, c, p)), 12727 e.getChildContext && 12728 (p = s(s({}, p), e.getChildContext())), 12729 v && 12730 e.getSnapshotBeforeUpdate && 12731 (N = e.getSnapshotBeforeUpdate(f, d)); 12732 var A, 12733 L, 12734 T = i && i.nodeName; 12735 if ('function' == typeof T) { 12736 var B = m(i); 12737 (u = g) && 12738 u.constructor === T && 12739 B.key == u.__key 12740 ? k(u, B, 1, p, !1) 12741 : ((A = u), 12742 (e._component = u = I(T, B, p)), 12743 (u.nextBase = u.nextBase || y), 12744 (u._parentComponent = e), 12745 k(u, B, 0, p, !1), 12746 j(u, 1, n, !0)), 12747 (L = u.base); 12748 } else 12749 (a = _), 12750 (A = g) && (a = e._component = null), 12751 (_ || 1 === t) && 12752 (a && (a._component = null), 12753 (L = (function (e, t, n, r, o, i) { 12754 w++ || 12755 ((x = 12756 null != o && 12757 void 0 !== 12758 o.ownerSVGElement), 12759 (O = 12760 null != e && 12761 !( 12762 '__preactattr_' in e 12763 ))); 12764 var u = S(e, t, n, r, i); 12765 return ( 12766 o && 12767 u.parentNode !== o && 12768 o.appendChild(u), 12769 --w || ((O = !1), i || C()), 12770 u 12771 ); 12772 })( 12773 a, 12774 i, 12775 p, 12776 n || !v, 12777 _ && _.parentNode, 12778 !0 12779 ))); 12780 if (_ && L !== _ && u !== g) { 12781 var D = _.parentNode; 12782 D && 12783 L !== D && 12784 (D.replaceChild(L, _), 12785 A || ((_._component = null), E(_, !1))); 12786 } 12787 if ((A && P(A), (e.base = L) && !r)) { 12788 for ( 12789 var F = e, R = e; 12790 (R = R._parentComponent); 12791 12792 ) 12793 (F = R).base = L; 12794 (L._component = F), 12795 (L._componentConstructor = 12796 F.constructor); 12797 } 12798 } 12799 for ( 12800 !v || n 12801 ? b.unshift(e) 12802 : M || 12803 (e.componentDidUpdate && 12804 e.componentDidUpdate(f, d, N), 12805 o.afterUpdate && o.afterUpdate(e)); 12806 e._renderCallbacks.length; 12807 12808 ) 12809 e._renderCallbacks.pop().call(e); 12810 w || r || C(); 12811 } 12812 } 12813 function P(e) { 12814 o.beforeUnmount && o.beforeUnmount(e); 12815 var t = e.base; 12816 (e._disable = !0), 12817 e.componentWillUnmount && e.componentWillUnmount(), 12818 (e.base = null); 12819 var n = e._component; 12820 n 12821 ? P(n) 12822 : t && 12823 (t.__preactattr_ && 12824 t.__preactattr_.ref && 12825 t.__preactattr_.ref(null), 12826 y((e.nextBase = t)), 12827 N.push(e), 12828 M(t)), 12829 e.__ref && e.__ref(null); 12830 } 12831 function L(e, t) { 12832 (this._dirty = !0), 12833 (this.context = t), 12834 (this.props = e), 12835 (this.state = this.state || {}), 12836 (this._renderCallbacks = []); 12837 } 12838 function T(e, t, n) { 12839 return (function (e, t, n, r, o, i) { 12840 w++ || 12841 ((x = 12842 null != o && void 0 !== o.ownerSVGElement), 12843 (O = null != e && !('__preactattr_' in e))); 12844 var u = S(e, t, n, r, i); 12845 return ( 12846 o && u.parentNode !== o && o.appendChild(u), 12847 --w || ((O = !1), i || C()), 12848 u 12849 ); 12850 })(n, e, {}, !1, t, !1); 12851 } 12852 s(L.prototype, { 12853 setState: function (e, t) { 12854 this.prevState || (this.prevState = this.state), 12855 (this.state = s( 12856 s({}, this.state), 12857 'function' == typeof e 12858 ? e(this.state, this.props) 12859 : e 12860 )), 12861 t && this._renderCallbacks.push(t), 12862 d(this); 12863 },
12864 forceUpdate: function (e) { 12865 e && this._renderCallbacks.push(e), j(this, 2); 12866 }, 12867 render: function () { }, 12868 }); 12869 var B = { 12870 h: a, 12871 createElement: a, 12872 cloneElement: c, 12873 Component: L, 12874 render: T, 12875 rerender: h, 12876 options: o, 12877 }; 12878 t.default = B; 12879 }, 12880 function (e, t) { 12881 var n = (e.exports = { version: '2.5.7' }); 12882 'number' == typeof __e && (__e = n); 12883 }, 12884 function (e, t, n) { 12885 var r = n(8), 12886 o = n(40); 12887 e.exports = n(3) 12888 ? function (e, t, n) { 12889 return r.f(e, t, o(1, n)); 12890 } 12891 : function (e, t, n) { 12892 return (e[t] = n), e; 12893 }; 12894 }, 12895 function (e, t, n) { 12896 var r = n(9), 12897 o = n(38), 12898 i = n(39), 12899 u = Object.defineProperty; 12900 t.f = n(3) 12901 ? Object.defineProperty 12902 : function (e, t, n) { 12903 if ((r(e), (t = i(t, !0)), r(n), o)) 12904 try { 12905 return u(e, t, n); 12906 } catch (e) { } 12907 if ('get' in n || 'set' in n) 12908 throw TypeError('Accessors not supported!'); 12909 return 'value' in n && (e[t] = n.value), e; 12910 }; 12911 }, 12912 function (e, t, n) { 12913 var r = n(2); 12914 e.exports = function (e) { 12915 if (!r(e)) throw TypeError(e + ' is not an object!'); 12916 return e; 12917 }; 12918 }, 12919 function (e, t) { 12920 var n = 0, 12921 r = Math.random(); 12922 e.exports = function (e) { 12923 return 'Symbol('.concat( 12924 void 0 === e ? '' : e, 12925 ')_', 12926 (++n + r).toString(36) 12927 ); 12928 }; 12929 }, 12930 function (e, t, n) { 12931 var r = n(22); 12932 e.exports = Object('z').propertyIsEnumerable(0) 12933 ? Object 12934 : function (e) { 12935 return 'String' == r(e) ? e.split('') : Object(e); 12936 }; 12937 }, 12938 function (e, t) { 12939 e.exports = function (e) { 12940 if (null == e) 12941 throw TypeError("Can't call method on " + e); 12942 return e; 12943 }; 12944 }, 12945 function (e, t, n) { 12946 var r = n(4); 12947 e.exports = function (e, t) { 12948 return ( 12949 !!e && 12950 r(function () { 12951 t 12952 ? e.call(null, function () { }, 1) 12953 : e.call(null); 12954 }) 12955 ); 12956 }; 12957 }, 12958 function (e, t, n) { 12959 var r = n(0); 12960 r(r.S + r.F, 'Object', { assign: n(41) }); 12961 }, 12962 function (e, t, n) { 12963 var r = n(2), 12964 o = n(1).document, 12965 i = r(o) && r(o.createElement); 12966 e.exports = function (e) { 12967 return i ? o.createElement(e) : {}; 12968 }; 12969 }, 12970 function (e, t, n) { 12971 var r = n(1), 12972 o = n(7), 12973 i = n(17), 12974 u = n(10)('src'), 12975 a = 'toString', 12976 s = Function[a], 12977 l = ('' + s).split(a); 12978 (n(6).inspectSource = function (e) { 12979 return s.call(e); 12980 }), 12981 (e.exports = function (e, t, n, a) { 12982 var s = 'function' == typeof n; 12983 s && (i(n, 'name') || o(n, 'name', t)), 12984 e[t] !== n && 12985 (s && 12986 (i(n, u) || 12987 o( 12988 n, 12989 u, 12990 e[t] 12991 ? '' + e[t] 12992 : l.join(String(t)) 12993 )), 12994 e === r 12995 ? (e[t] = n) 12996 : a 12997 ? e[t] 12998 ? (e[t] = n) 12999 : o(e, t, n) 13000 : (delete e[t], o(e, t, n))); 13001 })(Function.prototype, a, function () { 13002 return ( 13003 ('function' == typeof this && this[u]) || 13004 s.call(this) 13005 ); 13006 }); 13007 }, 13008 function (e, t) { 13009 var n = {}.hasOwnProperty; 13010 e.exports = function (e, t) { 13011 return n.call(e, t); 13012 }; 13013 }, 13014 function (e, t, n) { 13015 var r = n(19); 13016 e.exports = function (e, t, n) { 13017 if ((r(e), void 0 === t)) return e; 13018 switch (n) { 13019 case 1: 13020 return function (n) { 13021 return e.call(t, n); 13022 }; 13023 case 2: 13024 return function (n, r) { 13025 return e.call(t, n, r); 13026 }; 13027 case 3: 13028 return function (n, r, o) { 13029 return e.call(t, n, r, o); 13030 }; 13031 } 13032 return function () { 13033 return e.apply(t, arguments); 13034 }; 13035 }; 13036 }, 13037 function (e, t) { 13038 e.exports = function (e) { 13039 if ('function' != typeof e) 13040 throw TypeError(e + ' is not a function!'); 13041 return e; 13042 }; 13043 }, 13044 function (e, t, n) { 13045 var r = n(42), 13046 o = n(28); 13047 e.exports = 13048 Object.keys || 13049 function (e) { 13050 return r(e, o); 13051 }; 13052 }, 13053 function (e, t, n) { 13054 var r = n(11), 13055 o = n(12); 13056 e.exports = function (e) { 13057 return r(o(e)); 13058 }; 13059 }, 13060 function (e, t) { 13061 var n = {}.toString; 13062 e.exports = function (e) { 13063 return n.call(e).slice(8, -1); 13064 }; 13065 }, 13066 function (e, t, n) { 13067 var r = n(21), 13068 o = n(24), 13069 i = n(43); 13070 e.exports = function (e) { 13071 return function (t, n, u) { 13072 var a, 13073 s = r(t), 13074 l = o(s.length), 13075 c = i(u, l); 13076 if (e && n != n) { 13077 for (; c < l;) 13078 if ((a = s[c++]) != a) return !0; 13079 } else 13080 for (; c < l; c++) 13081 if ((e || c in s) && s[c] === n) 13082 return e || c || 0; 13083 return !e && -1; 13084 }; 13085 }; 13086 }, 13087 function (e, t, n) { 13088 var r = n(25), 13089 o = Math.min; 13090 e.exports = function (e) { 13091 return 0 < e ? o(r(e), 9007199254740991) : 0; 13092 }; 13093 }, 13094 function (e, t) { 13095 var n = Math.ceil, 13096 r = Math.floor; 13097 e.exports = function (e) { 13098 return isNaN((e = +e)) ? 0 : (0 < e ? r : n)(e); 13099 }; 13100 }, 13101 function (e, t, n) { 13102 var r = n(27)('keys'), 13103 o = n(10); 13104 e.exports = function (e) { 13105 return r[e] || (r[e] = o(e)); 13106 }; 13107 }, 13108 function (e, t, n) { 13109 var r = n(6), 13110 o = n(1),
13111 i = '__core-js_shared__', 13112 u = o[i] || (o[i] = {}); 13113 (e.exports = function (e, t) { 13114 return u[e] || (u[e] = void 0 !== t ? t : {}); 13115 })('versions', []).push({ 13116 version: r.version, 13117 mode: n(44) ? 'pure' : 'global', 13118 copyright: '© 2018 Denis Pushkarev (zloirock.ru)', 13119 }); 13120 }, 13121 function (e, t) { 13122 e.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split( 13123 ',' 13124 ); 13125 }, 13126 function (e, t, n) { 13127 var r = n(12); 13128 e.exports = function (e) { 13129 return Object(r(e)); 13130 }; 13131 }, 13132 function (e, t, n) { 13133 var r = n(8).f, 13134 o = Function.prototype, 13135 i = /^\s*function ([^ (]*)/; 13136 'name' in o || 13137 (n(3) && 13138 r(o, 'name', { 13139 configurable: !0, 13140 get: function () { 13141 try { 13142 return ('' + this).match(i)[1]; 13143 } catch (e) { 13144 return ''; 13145 } 13146 }, 13147 })); 13148 }, 13149 function (e, t, n) { 13150 var r = n(0), 13151 o = n(32)(1); 13152 r(r.P + r.F * !n(13)([].map, !0), 'Array', { 13153 map: function (e) { 13154 return o(this, e, arguments[1]); 13155 }, 13156 }); 13157 }, 13158 function (e, t, n) { 13159 var r = n(18), 13160 o = n(11), 13161 i = n(29), 13162 u = n(24), 13163 a = n(47); 13164 e.exports = function (e, t) { 13165 var n = 1 == e, 13166 s = 2 == e, 13167 l = 3 == e, 13168 c = 4 == e, 13169 p = 6 == e, 13170 f = 5 == e || p, 13171 d = t || a; 13172 return function (t, a, h) { 13173 for ( 13174 var v, 13175 m, 13176 y = i(t), 13177 _ = o(y), 13178 g = r(a, h, 3), 13179 b = u(_.length), 13180 w = 0, 13181 x = n ? d(t, b) : s ? d(t, 0) : void 0; 13182 w < b; 13183 w++ 13184 ) 13185 if ( 13186 (f || w in _) && 13187 ((m = g((v = _[w]), w, y)), e) 13188 ) 13189 if (n) x[w] = m; 13190 else if (m) 13191 switch (e) { 13192 case 3: 13193 return !0; 13194 case 5: 13195 return v; 13196 case 6: 13197 return w; 13198 case 2: 13199 x.push(v); 13200 } 13201 else if (c) return !1; 13202 return p ? -1 : l || c ? c : x; 13203 }; 13204 }; 13205 }, 13206 function (e, t, n) { 13207 var r = n(22); 13208 e.exports = 13209 Array.isArray || 13210 function (e) { 13211 return 'Array' == r(e); 13212 }; 13213 }, 13214 function (e, t, n) { 13215 var r = n(27)('wks'),
13216 o = n(10), 13217 i = n(1).Symbol, 13218 u = 'function' == typeof i; 13219 (e.exports = function (e) { 13220 return ( 13221 r[e] || 13222 (r[e] = (u && i[e]) || (u ? i : o)('Symbol.' + e)) 13223 ); 13224 }).store = r; 13225 }, 13226 function (e, t, n) { 13227 var r = n(0), 13228 o = n(23)(!1), 13229 i = [].indexOf, 13230 u = !!i && 1 / [1].indexOf(1, -0) < 0; 13231 r(r.P + r.F * (u || !n(13)(i)), 'Array', { 13232 indexOf: function (e) { 13233 return u 13234 ? i.apply(this, arguments) || 0 13235 : o(this, e, arguments[1]); 13236 }, 13237 }); 13238 }, 13239 function (e, t, n) { 13240 var r = n(0); 13241 r(r.S, 'Object', { create: n(52) }); 13242 }, 13243 function (e, t, n) { 13244 (t.__esModule = !0), 13245 (t.default = void 0), 13246 n(14), 13247 n(30), 13248 n(31), 13249 n(35), 13250 n(49), 13251 n(50); 13252 var r = n(5), 13253 o = (function (e) { 13254 return e && e.__esModule ? e : { default: e }; 13255 })(n(51)); 13256 function i(e) { 13257 if (!e.element) 13258 throw new Error('element is not defined'); 13259 if (!e.id) throw new Error('id is not defined'); 13260 if (!e.source) throw new Error('source is not defined'); 13261 Array.isArray(e.source) && (e.source = u(e.source)), 13262 (0, r.render)( 13263 (0, r.createElement)(o.default, e), 13264 e.element 13265 ); 13266 } 13267 var u = function (e) { 13268 return function (t, n) { 13269 n( 13270 e.filter(function (e) { 13271 return ( 13272 -1 !== 13273 e.toLowerCase().indexOf(t.toLowerCase()) 13274 ); 13275 }) 13276 ); 13277 }; 13278 }; 13279 i.enhanceSelectElement = function (e) { 13280 if (!e.selectElement) 13281 throw new Error('selectElement is not defined'); 13282 if (!e.source) { 13283 var t = [].filter.call( 13284 e.selectElement.options, 13285 function (t) { 13286 return t.value || e.preserveNullOptions; 13287 } 13288 ); 13289 e.source = t.map(function (e) { 13290 return e.textContent || e.innerText; 13291 }); 13292 } 13293 if ( 13294 ((e.onConfirm = 13295 e.onConfirm || 13296 function (t) { 13297 var n = [].filter.call( 13298 e.selectElement.options, 13299 function (e) { 13300 return ( 13301 (e.textContent || 13302 e.innerText) === t 13303 ); 13304 } 13305 )[0]; 13306 n && (n.selected = !0); 13307 }), 13308 e.selectElement.value || void 0 === e.defaultValue) 13309 ) { 13310 var n = 13311 e.selectElement.options[ 13312 e.selectElement.options.selectedIndex 13313 ]; 13314 e.defaultValue = n.textContent || n.innerText; 13315 } 13316 void 0 === e.name && (e.name = ''), 13317 void 0 === e.id && 13318 (void 0 === e.selectElement.id 13319 ? (e.id = '') 13320 : (e.id = e.selectElement.id)), 13321 void 0 === e.autoselect && (e.autoselect = !0); 13322 var r = document.createElement('div'); 13323 e.selectElement.parentNode.insertBefore( 13324 r, 13325 e.selectElement 13326 ), 13327 i(Object.assign({}, e, { element: r })), 13328 (e.selectElement.style.display = 'none'), 13329 (e.selectElement.id = 13330 e.selectElement.id + '-select'); 13331 }; 13332 var a = i; 13333 t.default = a; 13334 }, 13335 function (e, t, n) { 13336 e.exports = 13337 !n(3) && 13338 !n(4)(function () { 13339 return ( 13340 7 != 13341 Object.defineProperty(n(15)('div'), 'a', { 13342 get: function () { 13343 return 7; 13344 }, 13345 }).a 13346 ); 13347 }); 13348 }, 13349 function (e, t, n) { 13350 var r = n(2); 13351 e.exports = function (e, t) { 13352 if (!r(e)) return e; 13353 var n, o; 13354 if ( 13355 t && 13356 'function' == typeof (n = e.toString) && 13357 !r((o = n.call(e))) 13358 ) 13359 return o; 13360 if ( 13361 'function' == typeof (n = e.valueOf) && 13362 !r((o = n.call(e))) 13363 ) 13364 return o; 13365 if ( 13366 !t && 13367 'function' == typeof (n = e.toString) && 13368 !r((o = n.call(e))) 13369 ) 13370 return o; 13371 throw TypeError(
13372 "Can't convert object to primitive value" 13373 ); 13374 }; 13375 }, 13376 function (e, t) { 13377 e.exports = function (e, t) { 13378 return { 13379 enumerable: !(1 & e), 13380 configurable: !(2 & e), 13381 writable: !(4 & e), 13382 value: t, 13383 }; 13384 }; 13385 }, 13386 function (e, t, n) { 13387 var r = n(20), 13388 o = n(45), 13389 i = n(46), 13390 u = n(29), 13391 a = n(11), 13392 s = Object.assign; 13393 e.exports = 13394 !s || 13395 n(4)(function () { 13396 var e = {}, 13397 t = {}, 13398 n = Symbol(), 13399 r = 'abcdefghijklmnopqrst'; 13400 return ( 13401 (e[n] = 7), 13402 r.split('').forEach(function (e) { 13403 t[e] = e; 13404 }), 13405 7 != s({}, e)[n] || 13406 Object.keys(s({}, t)).join('') != r 13407 ); 13408 }) 13409 ? function (e, t) { 13410 for ( 13411 var n = u(e), 13412 s = arguments.length, 13413 l = 1, 13414 c = o.f, 13415 p = i.f; 13416 l < s; 13417 13418 ) 13419 for ( 13420 var f, 13421 d = a(arguments[l++]), 13422 h = c ? r(d).concat(c(d)) : r(d), 13423 v = h.length, 13424 m = 0; 13425 m < v; 13426 13427 ) 13428 p.call(d, (f = h[m++])) && 13429 (n[f] = d[f]); 13430 return n; 13431 } 13432 : s; 13433 }, 13434 function (e, t, n) { 13435 var r = n(17), 13436 o = n(21), 13437 i = n(23)(!1), 13438 u = n(26)('IE_PROTO'); 13439 e.exports = function (e, t) { 13440 var n, 13441 a = o(e), 13442 s = 0, 13443 l = []; 13444 for (n in a) n != u && r(a, n) && l.push(n); 13445 for (; t.length > s;) 13446 r(a, (n = t[s++])) && (~i(l, n) || l.push(n)); 13447 return l; 13448 }; 13449 }, 13450 function (e, t, n) { 13451 var r = n(25), 13452 o = Math.max, 13453 i = Math.min; 13454 e.exports = function (e, t) { 13455 return (e = r(e)) < 0 ? o(e + t, 0) : i(e, t); 13456 }; 13457 }, 13458 function (e, t) { 13459 e.exports = !1; 13460 }, 13461 function (e, t) { 13462 t.f = Object.getOwnPropertySymbols; 13463 }, 13464 function (e, t) { 13465 t.f = {}.propertyIsEnumerable; 13466 }, 13467 function (e, t, n) { 13468 var r = n(48); 13469 e.exports = function (e, t) { 13470 return new (r(e))(t); 13471 }; 13472 }, 13473 function (e, t, n) { 13474 var r = n(2), 13475 o = n(33), 13476 i = n(34)('species'); 13477 e.exports = function (e) { 13478 var t; 13479 return ( 13480 o(e) && 13481 ('function' != typeof (t = e.constructor) || 13482 (t !== Array && !o(t.prototype)) || 13483 (t = void 0), 13484 r(t) && null === (t = t[i]) && (t = void 0)), 13485 void 0 === t ? Array : t 13486 ); 13487 }; 13488 }, 13489 function (e, t, n) { 13490 var r = n(0), 13491 o = n(32)(2); 13492 r(r.P + r.F * !n(13)([].filter, !0), 'Array', { 13493 filter: function (e) { 13494 return o(this, e, arguments[1]); 13495 }, 13496 }); 13497 }, 13498 function (e, t, n) { 13499 var r = n(0); 13500 r(r.S, 'Array', { isArray: n(33) }); 13501 }, 13502 function (e, t, n) {
13503 (t.__esModule = !0), 13504 (t.default = void 0), 13505 n(14), 13506 n(36), 13507 n(30), 13508 n(31), 13509 n(35), 13510 n(55), 13511 n(58); 13512 var r = n(5), 13513 o = u(n(60)), 13514 i = u(n(61)); 13515 function u(e) { 13516 return e && e.__esModule ? e : { default: e }; 13517 } 13518 function a() { 13519 return (a = 13520 Object.assign || 13521 function (e) { 13522 for (var t = 1; t < arguments.length; t++) { 13523 var n = arguments[t]; 13524 for (var r in n) 13525 Object.prototype.hasOwnProperty.call( 13526 n, 13527 r 13528 ) && (e[r] = n[r]); 13529 } 13530 return e; 13531 }).apply(this, arguments); 13532 } 13533 function s(e) { 13534 if (void 0 === e) 13535 throw new ReferenceError( 13536 "this hasn't been initialised - super() hasn't been called" 13537 ); 13538 return e; 13539 } 13540 var l = { 13541 13: 'enter', 13542 27: 'escape', 13543 32: 'space', 13544 38: 'up', 13545 40: 'down', 13546 }; 13547 function c() { 13548 return ('undefined' != typeof navigator && !( 13549 !navigator.userAgent.match( 13550 /(iPod|iPhone|iPad)/g 13551 ) || !navigator.userAgent.match(/AppleWebKit/g) 13552 )); 13553 } 13554 var p = (function (e) { 13555 function t(t) { 13556 var n; 13557 return ( 13558 ((n = 13559 e.call(this, t) || 13560 this).elementReferences = {}), 13561 (n.state = { 13562 focused: null, 13563 hovered: null, 13564 menuOpen: !1, 13565 options: t.defaultValue 13566 ? [t.defaultValue] 13567 : [], 13568 query: t.defaultValue, 13569 validChoiceMade: !1, 13570 selected: null, 13571 ariaHint: !0, 13572 }), 13573 (n.handleComponentBlur = n.handleComponentBlur.bind( 13574 s(s(n)) 13575 )), 13576 (n.handleKeyDown = n.handleKeyDown.bind( 13577 s(s(n)) 13578 )), 13579 (n.handleUpArrow = n.handleUpArrow.bind( 13580 s(s(n)) 13581 )), 13582 (n.handleDownArrow = n.handleDownArrow.bind( 13583 s(s(n)) 13584 )), 13585 (n.handleEnter = n.handleEnter.bind(s(s(n)))), 13586 (n.handlePrintableKey = n.handlePrintableKey.bind( 13587 s(s(n)) 13588 )), 13589 (n.handleListMouseLeave = n.handleListMouseLeave.bind( 13590 s(s(n)) 13591 )), 13592 (n.handleOptionBlur = n.handleOptionBlur.bind( 13593 s(s(n)) 13594 )), 13595 (n.handleOptionClick = n.handleOptionClick.bind( 13596 s(s(n)) 13597 )), 13598 (n.handleOptionFocus = n.handleOptionFocus.bind( 13599 s(s(n)) 13600 )), 13601 (n.handleOptionMouseDown = n.handleOptionMouseDown.bind( 13602 s(s(n)) 13603 )), 13604 (n.handleOptionMouseEnter = n.handleOptionMouseEnter.bind( 13605 s(s(n)) 13606 )), 13607 (n.handleInputBlur = n.handleInputBlur.bind( 13608 s(s(n)) 13609 )), 13610 (n.handleInputChange = n.handleInputChange.bind( 13611 s(s(n)) 13612 )), 13613 (n.handleInputFocus = n.handleInputFocus.bind( 13614 s(s(n)) 13615 )), 13616 (n.pollInputElement = n.pollInputElement.bind( 13617 s(s(n)) 13618 )), 13619 (n.getDirectInputChanges = n.getDirectInputChanges.bind( 13620 s(s(n)) 13621 )), 13622 n 13623 ); 13624 } 13625 !(function (e, t) { 13626 (e.prototype = Object.create(t.prototype)), 13627 ((e.prototype.constructor = e).__proto__ = t); 13628 })(t, e); 13629 var n = t.prototype; 13630 return ( 13631 (n.isQueryAnOption = function (e, t) { 13632 var n = this; 13633 return ( 13634 -1 !== 13635 t 13636 .map(function (e) { 13637 return n 13638 .templateInputValue(e) 13639 .toLowerCase(); 13640 }) 13641 .indexOf(e.toLowerCase()) 13642 ); 13643 }), 13644 (n.componentDidMount = function () { 13645 this.pollInputElement(); 13646 }), 13647 (n.componentWillUnmount = function () { 13648 clearTimeout(this.$pollInput); 13649 }), 13650 (n.pollInputElement = function () { 13651 var e = this; 13652 this.getDirectInputChanges(), 13653 (this.$pollInput = setTimeout(function () { 13654 e.pollInputElement(); 13655 }, 100)); 13656 }), 13657 (n.getDirectInputChanges = function () { 13658 var e = this.elementReferences[-1]; 13659 e && 13660 e.value !== this.state.query && 13661 this.handleInputChange({ 13662 target: { value: e.value }, 13663 }); 13664 }), 13665 (n.componentDidUpdate = function (e, t) { 13666 var n = this.state.focused, 13667 r = null === n, 13668 o = t.focused !== n; 13669 o && !r && this.elementReferences[n].focus(); 13670 var i = -1 === n, 13671 u = o && null === t.focused; 13672 if (i && u) { 13673 var a = this.elementReferences[n]; 13674 a.setSelectionRange(0, a.value.length); 13675 } 13676 }), 13677 (n.hasAutoselect = function () { 13678 return !c() && this.props.autoselect; 13679 }), 13680 (n.templateInputValue = function (e) { 13681 var t = 13682 this.props.templates && 13683 this.props.templates.inputValue; 13684 return t ? t(e) : e; 13685 }), 13686 (n.templateSuggestion = function (e) { 13687 var t = 13688 this.props.templates && 13689 this.props.templates.suggestion; 13690 return t ? t(e) : e; 13691 }), 13692 (n.handleComponentBlur = function (e) { 13693 var t, 13694 n = this.state, 13695 r = n.options, 13696 o = n.query, 13697 i = n.selected; 13698 this.props.confirmOnBlur 13699 ? ((t = e.query || o), 13700 this.props.onConfirm(r[i])) 13701 : (t = o), 13702 this.setState({ 13703 focused: null, 13704 menuOpen: e.menuOpen || !1, 13705 query: t, 13706 selected: null, 13707 validChoiceMade: this.isQueryAnOption( 13708 t, 13709 r 13710 ), 13711 }); 13712 }), 13713 (n.handleListMouseLeave = function (e) { 13714 this.setState({ hovered: null }); 13715 }), 13716 (n.handleOptionBlur = function (e, t) { 13717 var n = this.state, 13718 r = n.focused, 13719 o = n.menuOpen, 13720 i = n.options, 13721 u = n.selected, 13722 a = null === e.relatedTarget, 13723 s = 13724 e.relatedTarget === 13725 this.elementReferences[-1], 13726 l = r !== t && -1 !== r; 13727 if ((!l && a) || (!l && !s)) { 13728 var p = o && c(); 13729 this.handleComponentBlur({ 13730 menuOpen: p, 13731 query: this.templateInputValue(i[u]), 13732 }); 13733 } 13734 }), 13735 (n.handleInputBlur = function (e) { 13736 var t = this.state, 13737 n = t.focused, 13738 r = t.menuOpen, 13739 o = t.options, 13740 i = t.query, 13741 u = t.selected; 13742 if (-1 === n) { 13743 var a = r && c(), 13744 s = c() 13745 ? i 13746 : this.templateInputValue(o[u]); 13747 this.handleComponentBlur({ 13748 menuOpen: a, 13749 query: s, 13750 }); 13751 } 13752 }), 13753 (n.handleInputChange = function (e) { 13754 var t = this, 13755 n = this.props, 13756 r = n.minLength, 13757 o = n.source, 13758 i = n.showAllValues, 13759 u = this.hasAutoselect(), 13760 a = e.target.value, 13761 s = 0 === a.length, 13762 l = this.state.query.length !== a.length, 13763 c = a.length >= r; 13764 this.setState({ query: a, ariaHint: s }), 13765 i || (!s && l && c) 13766 ? o(a, function (e) { 13767 var n = 0 < e.length; 13768 t.setState({ 13769 menuOpen: n, 13770 options: e, 13771 selected: u && n ? 0 : -1, 13772 validChoiceMade: !1, 13773 }); 13774 })
13775 : (!s && c) || 13776 this.setState({ 13777 menuOpen: !1, 13778 options: [], 13779 }); 13780 }), 13781 (n.handleInputClick = function (e) { 13782 this.handleInputChange(e); 13783 }), 13784 (n.handleInputFocus = function (e) { 13785 var t = this.state, 13786 n = t.query, 13787 r = t.validChoiceMade, 13788 o = t.options, 13789 i = this.props.minLength, 13790 u = !r && n.length >= i && 0 < o.length; 13791 u 13792 ? this.setState(function (e) { 13793 var t = e.menuOpen; 13794 return { 13795 focused: -1, 13796 menuOpen: u || t, 13797 selected: -1, 13798 }; 13799 }) 13800 : this.setState({ focused: -1 }); 13801 }), 13802 (n.handleOptionFocus = function (e) { 13803 this.setState({ 13804 focused: e, 13805 hovered: null, 13806 selected: e, 13807 }); 13808 }), 13809 (n.handleOptionMouseEnter = function (e, t) { 13810 c() || this.setState({ hovered: t }); 13811 }), 13812 (n.handleOptionClick = function (e, t) { 13813 var n = this.state.options[t], 13814 r = this.templateInputValue(n); 13815 this.props.onConfirm(n), 13816 this.setState({ 13817 focused: -1, 13818 hovered: null, 13819 menuOpen: !1, 13820 query: r, 13821 selected: -1, 13822 validChoiceMade: !0, 13823 }), 13824 this.forceUpdate(); 13825 }), 13826 (n.handleOptionMouseDown = function (e) { 13827 e.preventDefault(); 13828 }), 13829 (n.handleUpArrow = function (e) { 13830 e.preventDefault(); 13831 var t = this.state, 13832 n = t.menuOpen, 13833 r = t.selected; 13834 -1 !== r && n && this.handleOptionFocus(r - 1); 13835 }), 13836 (n.handleDownArrow = function (e) { 13837 var t = this; 13838 if ( 13839 (e.preventDefault(), 13840 this.props.showAllValues && 13841 !1 === this.state.menuOpen) 13842 ) 13843 e.preventDefault(), 13844 this.props.source('', function (e) { 13845 t.setState({ 13846 menuOpen: !0, 13847 options: e, 13848 selected: 0, 13849 focused: 0, 13850 hovered: null, 13851 }); 13852 }); 13853 else if (!0 === this.state.menuOpen) { 13854 var n = this.state, 13855 r = n.menuOpen, 13856 o = n.options, 13857 i = n.selected; 13858 i !== o.length - 1 && 13859 r && 13860 this.handleOptionFocus(i + 1); 13861 } 13862 }), 13863 (n.handleSpace = function (e) { 13864 var t = this; 13865 this.props.showAllValues && 13866 !1 === this.state.menuOpen && 13867 '' === this.state.query && 13868 (e.preventDefault(), 13869 this.props.source('', function (e) { 13870 t.setState({ 13871 menuOpen: !0, 13872 options: e, 13873 }); 13874 })), 13875 -1 !== this.state.focused && 13876 (e.preventDefault(), 13877 this.handleOptionClick( 13878 e, 13879 this.state.focused 13880 )); 13881 }), 13882 (n.handleEnter = function (e) { 13883 this.state.menuOpen && 13884 (e.preventDefault(), 13885 0 <= this.state.selected && 13886 this.handleOptionClick( 13887 e, 13888 this.state.selected 13889 )); 13890 }), 13891 (n.handlePrintableKey = function (e) { 13892 var t = this.elementReferences[-1]; 13893 e.target === t || t.focus(); 13894 }), 13895 (n.handleKeyDown = function (e) { 13896 switch (l[e.keyCode]) { 13897 case 'up': 13898 this.handleUpArrow(e); 13899 break; 13900 case 'down': 13901 this.handleDownArrow(e); 13902 break; 13903 case 'space': 13904 this.handleSpace(e); 13905 break; 13906 case 'enter': 13907 this.handleEnter(e); 13908 break; 13909 case 'escape': 13910 this.handleComponentBlur({ 13911 query: this.state.query, 13912 }); 13913 break; 13914 default: 13915 (function (e) { 13916 return ( 13917 (47 < e && e < 58) || 13918 32 === e || 13919 8 === e || 13920 (64 < e && e < 91) || 13921 (95 < e && e < 112) || 13922 (185 < e && e < 193) || 13923 (218 < e && e < 223) 13924 ); 13925 })(e.keyCode) && 13926 this.handlePrintableKey(e); 13927 } 13928 }), 13929 (n.render = function () { 13930 var e, 13931 t = this, 13932 n = this.props, 13933 i = n.cssNamespace, 13934 u = n.displayMenu, 13935 s = n.id, 13936 l = n.minLength, 13937 p = n.name, 13938 f = n.placeholder, 13939 d = n.required, 13940 h = n.showAllValues, 13941 v = n.tNoResults, 13942 m = n.tStatusQueryTooShort, 13943 y = n.tStatusNoResults, 13944 _ = n.tStatusSelectedOption, 13945 g = n.tStatusResults, 13946 b = n.tAssistiveHint, 13947 w = n.dropdownArrow, 13948 x = this.state, 13949 O = x.focused, 13950 C = x.hovered, 13951 S = x.menuOpen, 13952 E = x.options, 13953 M = x.query, 13954 N = x.selected, 13955 I = x.ariaHint, 13956 A = x.validChoiceMade, 13957 k = this.hasAutoselect(), 13958 j = -1 === O, 13959 P = 0 === E.length, 13960 L = 0 !== M.length, 13961 T = M.length >= l, 13962 B = 13963 this.props.showNoOptionsFound && 13964 j && 13965 P && 13966 L && 13967 T, 13968 D = i + '__wrapper', 13969 F = i + '__input', 13970 R = null !== O ? ' ' + F + '--focused' : '', 13971 U = this.props.showAllValues 13972 ? ' ' + F + '--show-all-values' 13973 : ' ' + F + '--default', 13974 V = i + '__dropdown-arrow-down', 13975 q = -1 !== O && null !== O, 13976 H = i + '__menu', 13977 W = H + '--' + u, 13978 K = 13979 H +
13980 '--' + 13981 (S || B ? 'visible' : 'hidden'), 13982 Q = i + '__option', 13983 z = i + '__hint', 13984 G = this.templateInputValue(E[N]), 13985 $ = 13986 G && 13987 0 === 13988 G.toLowerCase().indexOf( 13989 M.toLowerCase() 13990 ) && 13991 k 13992 ? M + G.substr(M.length) 13993 : '', 13994 J = s + '__assistiveHint', 13995 X = I ? { 'aria-describedby': J } : null; 13996 return ( 13997 h && 13998 'string' == 13999 typeof (e = w({ className: V })) && 14000 (e = (0, r.createElement)('div', { 14001 className: 14002 i + 14003 '__dropdown-arrow-down-wrapper', 14004 dangerouslySetInnerHTML: { 14005 __html: e, 14006 }, 14007 })), 14008 (0, r.createElement)( 14009 'div', 14010 { 14011 className: D, 14012 onKeyDown: this.handleKeyDown, 14013 }, 14014 (0, r.createElement)(o.default, { 14015 id: s, 14016 length: E.length, 14017 queryLength: M.length, 14018 minQueryLength: l, 14019 selectedOption: this.templateInputValue( 14020 E[N] 14021 ), 14022 selectedOptionIndex: N, 14023 validChoiceMade: A, 14024 isInFocus: 14025 null !== this.state.focused, 14026 tQueryTooShort: m, 14027 tNoResults: y, 14028 tSelectedOption: _, 14029 tResults: g, 14030 }), 14031 $ && 14032 (0, r.createElement)( 14033 'span', 14034 null, 14035 (0, r.createElement)('input', { 14036 className: z, 14037 readonly: !0, 14038 tabIndex: '-1', 14039 value: $, 14040 }) 14041 ), 14042 (0, r.createElement)( 14043 'input', 14044 a( 14045 { 14046 'aria-expanded': S 14047 ? 'true' 14048 : 'false', 14049 'aria-activedescendant': 14050 !!q && 14051 s + '__option--' + O, 14052 'aria-owns': 14053 s + '__listbox', 14054 'aria-autocomplete': this.hasAutoselect() 14055 ? 'both' 14056 : 'list', 14057 }, 14058 X, 14059 { 14060 autoComplete: 'off', 14061 className: '' + F + R + U, 14062 id: s, 14063 onClick: function (e) { 14064 return t.handleInputClick( 14065 e 14066 ); 14067 }, 14068 onBlur: this 14069 .handleInputBlur, 14070 }, 14071 (function (e) { 14072 return { onInput: e }; 14073 })(this.handleInputChange), 14074 { 14075 onFocus: this 14076 .handleInputFocus, 14077 name: p, 14078 placeholder: f, 14079 ref: function (e) { 14080 t.elementReferences[ 14081 -1 14082 ] = e; 14083 }, 14084 type: 'text', 14085 role: 'combobox', 14086 required: d, 14087 value: M, 14088 } 14089 ) 14090 ), 14091 e, 14092 (0, r.createElement)( 14093 'ul', 14094 { 14095 className: 14096 H + ' ' + W + ' ' + K, 14097 onMouseLeave: function (e) { 14098 return t.handleListMouseLeave( 14099 e 14100 ); 14101 }, 14102 id: s + '__listbox', 14103 role: 'listbox', 14104 }, 14105 E.map(function (e, n) { 14106 var o = 14107 (-1 === O 14108 ? N === n 14109 : O === n) && 14110 null === C 14111 ? ' ' + 14112 Q +
14113 '--focused' 14114 : '', 14115 i = 14116 n % 2 14117 ? ' ' + Q + '--odd' 14118 : '', 14119 u = c() 14120 ? '<span id=' + 14121 s + 14122 '__option-suffix--' + 14123 n + 14124 ' style="border:0;clip:rect(0 0 0 0);height:1px;marginBottom:-1px;marginRight:-1px;overflow:hidden;padding:0;position:absolute;whiteSpace:nowrap;width:1px"> ' + 14125 (n + 1) + 14126 ' of ' + 14127 E.length + 14128 '</span>' 14129 : ''; 14130 return (0, 14131 r.createElement)('li', { 14132 'aria-selected': 14133 O === n 14134 ? 'true' 14135 : 'false', 14136 className: '' + Q + o + i, 14137 dangerouslySetInnerHTML: { 14138 __html: 14139 t.templateSuggestion( 14140 e 14141 ) + u, 14142 }, 14143 id: s + '__option--' + n, 14144 key: n, 14145 onBlur: function (e) { 14146 return t.handleOptionBlur( 14147 e, 14148 n 14149 ); 14150 }, 14151 onClick: function (e) { 14152 return t.handleOptionClick( 14153 e, 14154 n 14155 ); 14156 }, 14157 onMouseDown: 14158 t.handleOptionMouseDown, 14159 onMouseEnter: function (e) { 14160 return t.handleOptionMouseEnter( 14161 e, 14162 n 14163 ); 14164 }, 14165 ref: function (e) { 14166 t.elementReferences[ 14167 n 14168 ] = e; 14169 }, 14170 role: 'option', 14171 tabIndex: '-1', 14172 'aria-posinset': n + 1, 14173 'aria-setsize': E.length, 14174 }); 14175 }), 14176 B && 14177 (0, r.createElement)( 14178 'li', 14179 { 14180 className: 14181 Q + 14182 ' ' + 14183 Q +
14184 '--no-results', 14185 }, 14186 v() 14187 ) 14188 ), 14189 (0, r.createElement)( 14190 'span', 14191 { 14192 id: J, 14193 style: { display: 'none' }, 14194 }, 14195 b() 14196 ) 14197 ) 14198 ); 14199 }), 14200 t 14201 ); 14202 })(r.Component); 14203 (t.default = p).defaultProps = { 14204 autoselect: !1, 14205 cssNamespace: 'autocomplete', 14206 defaultValue: '', 14207 displayMenu: 'inline', 14208 minLength: 0, 14209 name: 'input-autocomplete', 14210 placeholder: '', 14211 onConfirm: function () { }, 14212 confirmOnBlur: !0, 14213 showNoOptionsFound: !0, 14214 showAllValues: !1, 14215 required: !1, 14216 tNoResults: function () { 14217 return 'No results found'; 14218 }, 14219 tAssistiveHint: function () { 14220 return 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.'; 14221 }, 14222 dropdownArrow: i.default, 14223 }; 14224 }, 14225 function (e, t, n) { 14226 var r = n(9), 14227 o = n(53), 14228 i = n(28), 14229 u = n(26)('IE_PROTO'), 14230 a = function () { }, 14231 s = 'prototype', 14232 l = function () { 14233 var e, 14234 t = n(15)('iframe'), 14235 r = i.length; 14236 for ( 14237 t.style.display = 'none', 14238 n(54).appendChild(t), 14239 t.src = 'javascript:', 14240 (e = t.contentWindow.document).open(), 14241 e.write( 14242 '<script>document.F=Object</script>' 14243 ), 14244 e.close(), 14245 l = e.F; 14246 r--; 14247 14248 ) 14249 delete l[s][i[r]]; 14250 return l(); 14251 }; 14252 e.exports = 14253 Object.create || 14254 function (e, t) { 14255 var n; 14256 return ( 14257 null !== e 14258 ? ((a[s] = r(e)), 14259 (n = new a()), 14260 (a[s] = null), 14261 (n[u] = e)) 14262 : (n = l()), 14263 void 0 === t ? n : o(n, t) 14264 ); 14265 }; 14266 }, 14267 function (e, t, n) { 14268 var r = n(8), 14269 o = n(9), 14270 i = n(20); 14271 e.exports = n(3) 14272 ? Object.defineProperties 14273 : function (e, t) { 14274 o(e); 14275 for ( 14276 var n, u = i(t), a = u.length, s = 0; 14277 s < a; 14278 14279 ) 14280 r.f(e, (n = u[s++]), t[n]); 14281 return e; 14282 }; 14283 }, 14284 function (e, t, n) { 14285 var r = n(1).document; 14286 e.exports = r && r.documentElement; 14287 }, 14288 function (e, t, n) { 14289 var r = n(0); 14290 r(r.P, 'Function', { bind: n(56) }); 14291 }, 14292 function (e, t, n) { 14293 var r = n(19), 14294 o = n(2), 14295 i = n(57), 14296 u = [].slice, 14297 a = {}; 14298 e.exports = 14299 Function.bind || 14300 function (e) { 14301 var t = r(this), 14302 n = u.call(arguments, 1), 14303 s = function () { 14304 var r = n.concat(u.call(arguments)); 14305 return this instanceof s 14306 ? (function (e, t, n) { 14307 if (!(t in a)) { 14308 for ( 14309 var r = [], o = 0; 14310 o < t; 14311 o++ 14312 ) 14313 r[o] = 'a[' + o + ']'; 14314 a[t] = Function( 14315 'F,a', 14316 'return new F(' +
14317 r.join(',') + 14318 ')' 14319 ); 14320 } 14321 return a[t](e, n); 14322 })(t, r.length, r) 14323 : i(t, r, e); 14324 }; 14325 return ( 14326 o(t.prototype) && (s.prototype = t.prototype), s 14327 ); 14328 }; 14329 }, 14330 function (e, t) { 14331 e.exports = function (e, t, n) { 14332 var r = void 0 === n; 14333 switch (t.length) { 14334 case 0: 14335 return r ? e() : e.call(n); 14336 case 1: 14337 return r ? e(t[0]) : e.call(n, t[0]); 14338 case 2: 14339 return r 14340 ? e(t[0], t[1]) 14341 : e.call(n, t[0], t[1]); 14342 case 3: 14343 return r 14344 ? e(t[0], t[1], t[2]) 14345 : e.call(n, t[0], t[1], t[2]); 14346 case 4: 14347 return r 14348 ? e(t[0], t[1], t[2], t[3]) 14349 : e.call(n, t[0], t[1], t[2], t[3]); 14350 } 14351 return e.apply(n, t); 14352 }; 14353 }, 14354 function (e, t, n) { 14355 n(59)('match', 1, function (e, t, n) { 14356 return [ 14357 function (n) { 14358 var r = e(this), 14359 o = null == n ? void 0 : n[t]; 14360 return void 0 !== o 14361 ? o.call(n, r) 14362 : new RegExp(n)[t](String(r)); 14363 }, 14364 n, 14365 ]; 14366 }); 14367 }, 14368 function (e, t, n) { 14369 var r = n(7), 14370 o = n(16), 14371 i = n(4), 14372 u = n(12), 14373 a = n(34); 14374 e.exports = function (e, t, n) { 14375 var s = a(e), 14376 l = n(u, s, ''[e]), 14377 c = l[0], 14378 p = l[1]; 14379 i(function () { 14380 var t = {}; 14381 return ( 14382 (t[s] = function () { 14383 return 7; 14384 }), 14385 7 != ''[e](t) 14386 ); 14387 }) && 14388 (o(String.prototype, e, c), 14389 r( 14390 RegExp.prototype, 14391 s, 14392 2 == t 14393 ? function (e, t) { 14394 return p.call(e, this, t); 14395 } 14396 : function (e) { 14397 return p.call(e, this); 14398 } 14399 )); 14400 }; 14401 }, 14402 function (e, t, n) { 14403 (t.__esModule = !0), (t.default = void 0), n(36); 14404 var r = n(5), 14405 o = (function (e) { 14406 function t() { 14407 for ( 14408 var t, 14409 n = arguments.length, 14410 r = new Array(n), 14411 o = 0; 14412 o < n; 14413 o++ 14414 ) 14415 r[o] = arguments[o]; 14416 return ( 14417 ((t = 14418 e.call.apply(e, [this].concat(r)) || 14419 this).state = { 14420 bump: !1, 14421 debounced: !1, 14422 }), 14423 t 14424 ); 14425 } 14426 !(function (e, t) { 14427 (e.prototype = Object.create(t.prototype)), 14428 ((e.prototype.constructor = e).__proto__ = t); 14429 })(t, e); 14430 var n = t.prototype; 14431 return ( 14432 (n.componentWillMount = function () { 14433 var e = this; 14434 this.debounceStatusUpdate = (function ( 14435 e, 14436 t, 14437 n 14438 ) { 14439 var r; 14440 return function () { 14441 var o = this, 14442 i = arguments, 14443 u = function () { 14444 (r = null),
14445 n || e.apply(o, i); 14446 }, 14447 a = n && !r; 14448 clearTimeout(r), 14449 (r = setTimeout(u, t)), 14450 a && e.apply(o, i); 14451 }; 14452 })(function () { 14453 if (!e.state.debounced) { 14454 var t = 14455 !e.props.isInFocus || 14456 e.props.validChoiceMade; 14457 e.setState(function (e) { 14458 return { 14459 bump: !e.bump, 14460 debounced: !0, 14461 silenced: t, 14462 }; 14463 }); 14464 } 14465 }, 1400); 14466 }), 14467 (n.componentWillReceiveProps = function (e) { 14468 e.queryLength, 14469 this.setState({ debounced: !1 }); 14470 }), 14471 (n.render = function () { 14472 var e, 14473 t = this.props, 14474 n = t.id, 14475 o = t.length, 14476 i = t.queryLength, 14477 u = t.minQueryLength, 14478 a = t.selectedOption, 14479 s = t.selectedOptionIndex, 14480 l = t.tQueryTooShort, 14481 c = t.tNoResults, 14482 p = t.tSelectedOption, 14483 f = t.tResults, 14484 d = this.state, 14485 h = d.bump, 14486 v = d.debounced, 14487 m = d.silenced, 14488 y = i < u, 14489 _ = 0 === o, 14490 g = a ? p(a, o, s) : ''; 14491 return ( 14492 (e = y ? l(u) : _ ? c() : f(o, g)), 14493 this.debounceStatusUpdate(), 14494 (0, r.createElement)( 14495 'div', 14496 { 14497 style: { 14498 border: '0', 14499 clip: 'rect(0 0 0 0)', 14500 height: '1px', 14501 marginBottom: '-1px', 14502 marginRight: '-1px', 14503 overflow: 'hidden', 14504 padding: '0', 14505 position: 'absolute', 14506 whiteSpace: 'nowrap', 14507 width: '1px', 14508 }, 14509 }, 14510 (0, r.createElement)( 14511 'div', 14512 { 14513 id: n + '__status--A', 14514 role: 'status', 14515 'aria-atomic': 'true', 14516 'aria-live': 'polite', 14517 }, 14518 !m && v && h ? e : '' 14519 ), 14520 (0, r.createElement)( 14521 'div', 14522 { 14523 id: n + '__status--B', 14524 role: 'status', 14525 'aria-atomic': 'true', 14526 'aria-live': 'polite', 14527 }, 14528 m || !v || h ? '' : e 14529 ) 14530 ) 14531 ); 14532 }), 14533 t 14534 ); 14535 })(r.Component); 14536 (t.default = o).defaultProps = { 14537 tQueryTooShort: function (e) { 14538 return ( 14539 'Type in ' + 14540 e + 14541 ' or more characters for results' 14542 ); 14543 }, 14544 tNoResults: function () { 14545 return 'No search results'; 14546 }, 14547 tSelectedOption: function (e, t, n) { 14548 return ( 14549 e + 14550 ' ' + 14551 (n + 1) + 14552 ' of ' + 14553 t + 14554 ' is highlighted' 14555 ); 14556 }, 14557 tResults: function (e, t) { 14558 return ( 14559 e + 14560 ' ' + 14561 (1 === e ? 'result' : 'results') + 14562 ' ' + 14563 (1 === e ? 'is' : 'are') + 14564 ' available. ' + 14565 t 14566 ); 14567 }, 14568 }; 14569 }, 14570 function (e, t, n) {
14571 (t.__esModule = !0), (t.default = void 0); 14572 var r = n(5); 14573 t.default = function (e) { 14574 var t = e.className; 14575 return (0, r.createElement)( 14576 'svg', 14577 { 14578 version: '1.1', 14579 xmlns: 'http://www.w3.org/2000/svg', 14580 className: t, 14581 focusable: 'false', 14582 }, 14583 (0, r.createElement)( 14584 'g', 14585 { 14586 stroke: 'none', 14587 fill: 'none', 14588 'fill-rule': 'evenodd', 14589 }, 14590 (0, r.createElement)('polygon', { 14591 fill: '#000000', 14592 points: '0 0 22 0 11 17', 14593 }) 14594 ) 14595 ); 14596 }; 14597 }, 14598 ]).default; 14599 }), 14600 (e.exports = n()); 14601 }); 14602 var accessibleAutocomplete = unwrapExports(accessibleAutocomplete_min); 14603 const NAME$a = 'selectautocomplete'; 14604 class SelectAutocomplete extends BaseComponent { 14605 constructor(e, t) { 14606 super(e), (this._config = t), this._enhance(); 14607 } 14608 static get NAME() { 14609 return NAME$a; 14610 } 14611 _enhance() { 14612 accessibleAutocomplete.enhanceSelectElement( 14613 Object.assign( 14614 {}, 14615 { selectElement: this._element }, 14616 this._config 14617 ) 14618 ); 14619 } 14620 } 14621 var SelectAutocomplete$1 = SelectAutocomplete; 14622 const NAME$9 = 'inputsearchautocomplete', 14623 DATA_KEY$4 = 'bs.inputsearchautocomplete', 14624 EVENT_KEY$4 = `.${DATA_KEY$4}`, 14625 Default$5 = { autocomplete: [] }, 14626 EVENT_KEYUP$1 = `keyup${EVENT_KEY$4}`, 14627 EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$4}.data-api`, 14628 CLASS_NAME_SHOW$1 = 'autocomplete-list-show', 14629 DATA_AUTOCOMPLETE = 'data-bs-autocomplete', 14630 SELECTOR_SEARCH = 'input[data-bs-autocomplete][type="search"]'; 14631 class InputSearch extends BaseComponent { 14632 constructor(e, t) { 14633 super(e), 14634 (this._config = this._getConfig(t)), 14635 (this._items = []), 14636 (this._autocompleteElement = null), 14637 (this._label = new InputLabel$1(e)), 14638 this._init(), 14639 this._bindEvents(); 14640 } 14641 static get NAME() { 14642 return NAME$9; 14643 } 14644 search() { 14645 const e = this._element.value; //!!! $autocomplete.empty() 14646 (this._autocompleteElement.innerHTML = ''), 14647 e 14648 ? this._items.forEach((t) => { 14649 let n = new RegExp('(' + e + ')', 'gi'), 14650 o = t.text.replace(n, '<mark>$1</mark>'), 14651 a = t.label ? '<em>' + t.label + '</em>' : '', 14652 s = t.icon ? t.icon : '', 14653 i = t.link ? t.link : '#'; 14654 -1 !== o.toLowerCase().indexOf(e.toLowerCase()) && 14655 (this._autocompleteElement.classList.add( 14656 CLASS_NAME_SHOW$1 14657 ), 14658 this._autocompleteElement.appendChild( 14659 this._createOption(i, o, a, s) 14660 )); 14661 }) 14662 : this._autocompleteElement.classList.remove( 14663 CLASS_NAME_SHOW$1 14664 ); 14665 } 14666 _getConfig(e) { 14667 return (e = { ...Default$5, ...('object' == typeof e ? e : {}) }); 14668 } 14669 _getItems() { 14670 try { 14671 return JSON.parse( 14672 this._element.getAttribute(DATA_AUTOCOMPLETE) 14673 ); 14674 } catch (e) { 14675 return ( 14676 console.error(
14677 '[InputSearchAutocomplete] invalid data provided for data-bs-autocomplete attribute', 14678 e 14679 ), 14680 [] 14681 ); 14682 } 14683 } 14684 _init() { 14685 this._element.classList.contains('autocomplete') && 14686 ((this._items = this._getItems()), 14687 (this._autocompleteElement = document.createElement('ul')), 14688 this._autocompleteElement.classList.add('autocomplete-list'), 14689 this._element.parentNode.insertBefore( 14690 this._autocompleteElement, 14691 this._element.nextSibling 14692 )); 14693 } 14694 _bindEvents() { 14695 EventHandler$1.on(this._element, EVENT_KEYUP$1, () => 14696 this.search() 14697 ); 14698 } 14699 _createOption(e, t, n, o) { 14700 const a = document.createElement('li'); 14701 return ( 14702 (a.innerHTML = `<a href="${e}">\n ${o}\n <span class="autocomplete-list-text">\n <span>${t}</span>\n ${n}\n </span>\n </a>`), 14703 a 14704 ); 14705 } 14706 } 14707 const inputs$1 = SelectorEngine$1.find(SELECTOR_SEARCH); 14708 inputs$1.forEach((e) => { 14709 EventHandler$1.one(e, EVENT_KEYUP_DATA_API, () => { 14710 InputSearch.getOrCreateInstance(e).search(); 14711 }); 14712 }); 14713 var InputSearchAutocomplete = InputSearch; 14714 const NAME$8 = 'inputpassword', 14715 DATA_KEY$3 = 'bs.inputpassword', 14716 EVENT_KEY$3 = `.${DATA_KEY$3}`, 14717 Default$4 = { 14718 shortPass: 'Password molto debole', 14719 badPass: 'Password debole', 14720 goodPass: 'Password sicura', 14721 strongPass: 'Password molto sicura', 14722 enterPass: 'Inserisci almeno 8 caratteri e una lettera maiuscola', 14723 alertCaps: 'CAPS LOCK inserito', 14724 showText: !0, 14725 minimumLength: 4, 14726 }, 14727 EVENT_CLICK$5 = `click${EVENT_KEY$3}`, 14728 EVENT_KEYUP = `keyup${EVENT_KEY$3}`, 14729 EVENT_KEYDOWN = `keydown${EVENT_KEY$3}`, 14730 EVENT_KEYPRESS = `keypress${EVENT_KEY$3}`, 14731 EVENT_SCORE = `score${EVENT_KEY$3}`, 14732 EVENT_TEXT = `text${EVENT_KEY$3}`, 14733 CLASS_NAME_METER = 'input-password-strength-meter', 14734 SELECTOR_PASSWORD = 'input[data-bs-input][type="password"]'; 14735 class InputPassword extends BaseComponent { 14736 constructor(t, e) { 14737 super(t), 14738 (this._config = this._getConfig(e)), 14739 (this._isCustom = this._element.classList.contains( 14740 'input-password' 14741 )), 14742 (this._hasMeter = this._element.classList.contains( 14743 CLASS_NAME_METER 14744 )), 14745 (this._isShiftPressed = !1), 14746 (this._isCapsOn = !1), 14747 (this._grayBarElement = null), 14748 (this._colorBarElement = null), 14749 (this._textElement = null), 14750 (this._capsElement = null), 14751 (this._showPwdElement = null), 14752 (this._label = new InputLabel$1(t)), 14753 this._init(), 14754 this._bindEvents(); 14755 } 14756 static get NAME() { 14757 return NAME$8; 14758 } 14759 _getConfig(t) { 14760 return (t = { 14761 ...Default$4, 14762 ...Manipulator.getDataAttributes(this._element), 14763 ...('object' == typeof t ? t : {}), 14764 }); 14765 } 14766 _init() { 14767 if (this._hasMeter) { 14768 (this._grayBarElement = document.createElement('div')), 14769 this._grayBarElement.classList.add( 14770 'password-meter', 14771 'progress', 14772 'rounded-0', 14773 'position-absolute' 14774 ), 14775 (this._grayBarElement.innerHTML = 14776 '<div class="row position-absolute w-100 m-0">\n <div class="col-3 border-start border-end border-white"></div>\n <div class="col-3 border-start border-end border-white"></div>\n <div class="col-3 border-start border-end border-white"></div>\n <div class="col-3 border-start border-end border-white"></div>\n </div>'), 14777 (this._colorBarElement = document.createElement('div')), 14778 this._colorBarElement.classList.add('progress-bar'), 14779 this._colorBarElement.setAttribute('role', 'progressbar'), 14780 this._colorBarElement.setAttribute('aria-valuenow', '0'), 14781 this._colorBarElement.setAttribute('aria-valuemin', '0'), 14782 this._colorBarElement.setAttribute('aria-valuemax', '100'); 14783 const t = document.createElement('div'); 14784 t.classList.add('password-strength-meter'), 14785 this._grayBarElement.appendChild(this._colorBarElement), 14786 this._config.showText && 14787 ((this._textElement = document.createElement('small')), 14788 this._textElement.classList.add( 14789 'form-text', 14790 'text-muted' 14791 ), 14792 (this._textElement.innerHTML = this._config.enterPass), 14793 t.appendChild(this._textElement)), 14794 t.appendChild(this._grayBarElement), 14795 this._element.parentNode.insertBefore( 14796 t, 14797 this._element.nextSibling 14798 ); 14799 } 14800 this._isCustom && 14801 ((this._capsElement = document.createElement('small')), 14802 (this._capsElement.style.display = 'none'), 14803 this._capsElement.classList.add( 14804 'password-caps', 14805 'form-text', 14806 'text-warning', 14807 'position-absolute', 14808 'bg-white', 14809 'w-100' 14810 ), 14811 (this._capsElement.innerHTML = this._config.alertCaps), 14812 this._element.parentNode.appendChild(this._capsElement)), 14813 (this._showPwdElement = SelectorEngine$1.findOne( 14814 '.password-icon', 14815 this._element.parentNode 14816 )); 14817 } 14818 _bindEvents() { 14819 this._hasMeter && 14820 EventHandler$1.on(this._element, EVENT_KEYUP, () => 14821 this._checkPassword() 14822 ), 14823 this._isCustom && 14824 (EventHandler$1.on(this._element, EVENT_KEYDOWN, (t) => { 14825 'Shift' === t.key && (this._isShiftPressed = !0); 14826 }), 14827 EventHandler$1.on(this._element, EVENT_KEYUP, (t) => { 14828 'Shift' === t.key && (this._isShiftPressed = !1), 14829 'CapsLock' === t.key && 14830 ((this._isCapsOn = !this._isCapsOn), 14831 this._isCapsOn
14832 ? this._showCapsMsg() 14833 : this._hideCapsMsg()); 14834 }), 14835 EventHandler$1.on(this._element, EVENT_KEYPRESS, (t) => { 14836 (t.key.match(/[A-Z]$/) || []).length > 0 && 14837 !this._isShiftPressed 14838 ? ((this._isCapsOn = !0), this._showCapsMsg()) 14839 : this._isCapsOn && 14840 ((this._isCapsOn = !1), this._hideCapsMsg()); 14841 })), 14842 this._showPwdElement && 14843 EventHandler$1.on(this._showPwdElement, EVENT_CLICK$5, () => 14844 this._toggleShowPassword() 14845 ); 14846 } 14847 _showCapsMsg() { 14848 this._capsElement.style.display = 'block'; 14849 } 14850 _hideCapsMsg() { 14851 this._capsElement.style.display = 'none'; 14852 } 14853 _toggleShowPassword() { 14854 const t = 'password' === this._element.getAttribute('type'); 14855 SelectorEngine$1.find( 14856 '[class^="password-icon"]', 14857 this._showPwdElement 14858 ).forEach((t) => t.classList.toggle('d-none')), 14859 t 14860 ? this._element.setAttribute('type', 'text') 14861 : this._element.setAttribute('type', 'password'); 14862 } 14863 _checkPassword() { 14864 const t = this._calculateScore(this._element.value), 14865 e = t < 0 ? 0 : t; 14866 if ( 14867 (this._colorBarElement.classList.forEach((t) => { 14868 t.match(/(^|\s)bg-\S+/g) && 14869 this._colorBarElement.classList.remove(t); 14870 }), 14871 this._colorBarElement.classList.add( 14872 'bg-' + this._scoreColor(t) 14873 ), 14874 (this._colorBarElement.style.width = e + '%'), 14875 this._colorBarElement.setAttribute('aria-valuenow', e), 14876 EventHandler$1.trigger(this._element, EVENT_SCORE), 14877 this._config.showText) 14878 ) { 14879 let e = this._scoreText(t); 14880 0 === this._element.value.length && 14881 t <= 0 && 14882 (e = this._config.enterPass), 14883 -1 === this._textElement.innerHTML.search(e) && 14884 ((this._textElement.innerHTML = e), 14885 this._textElement.classList.forEach((t) => { 14886 t.match(/(^|\s)text-\S+/g) && 14887 this._textElement.classList.remove(t); 14888 }), 14889 this._textElement.classList.add( 14890 'text-' + this._scoreColor(t) 14891 ), 14892 EventHandler$1.trigger(this._element, EVENT_TEXT)); 14893 } 14894 } 14895 _scoreText(t) { 14896 return -1 === t || (t = t < 0 ? 0 : t) < 26 14897 ? this._config.shortPass 14898 : t < 51 14899 ? this._config.badPass 14900 : t < 76 14901 ? this._config.goodPass 14902 : this._config.strongPass; 14903 } 14904 _scoreColor(t) { 14905 return -1 === t 14906 ? 'danger' 14907 : -2 === t 14908 ? 'muted' 14909 : (t = t < 0 ? 0 : t) < 26 14910 ? 'danger' 14911 : t < 51 14912 ? 'warning' 14913 : 'success'; 14914 } 14915 _calculateScore(t) { 14916 var e = 0; 14917 if (0 === t.trim().length) return -2; 14918 if (t.length < this._config.minimumLength) return -1; 14919 (e += 4 * t.length), 14920 (e += this._checkRepetition(1, t).length - t.length), 14921 (e += this._checkRepetition(2, t).length - t.length), 14922 (e += this._checkRepetition(3, t).length - t.length), 14923 (e += this._checkRepetition(4, t).length - t.length), 14924 t.match(/(.*[0-9].*[0-9].*[0-9])/) && (e += 5); 14925 var s = '.*[!,@,#,$,%,^,&,*,?,_,~]'; 14926 return ((s = new RegExp('(' + s + s + ')')), t.match(s) && (e += 5), t.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) && (e += 10), t.match(/([a-zA-Z])/) && t.match(/([0-9])/) && (e += 15), t.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && 14927 t.match(/([0-9])/) && 14928 (e += 15), t.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && 14929 t.match(/([a-zA-Z])/) && 14930 (e += 15), (t.match(/^\w+$/) || t.match(/^\d+$/)) && (e -= 10), e > 100 && (e = 100), e < 0 && (e = 0), e); 14931 } 14932 _checkRepetition(t, e) { 14933 for (var s = '', i = !1, n = 0; n < e.length; n++) { 14934 i = !0; 14935 for (var r = 0; r < t && r + n + t < e.length; r++) 14936 i = i && e.charAt(r + n) === e.charAt(r + n + t); 14937 r < t && (i = !1), 14938 i ? ((n += t - 1), (i = !1)) : (s += e.charAt(n)); 14939 } 14940 return s; 14941 } 14942 } 14943 const inputs = SelectorEngine$1.find(SELECTOR_PASSWORD);
vendor: 16,384 bytes, lines 14944-15269
14944 inputs.forEach((t) => { 14945 InputPassword.getOrCreateInstance(t); 14946 }); 14947 var InputPassword$1 = InputPassword; 14948 var shifty_node = createCommonjsModule(function (t, e) { 14949 /*! Shifty 2.17.1 - https://github.com/jeremyckahn/shifty */ 14950 var n; 14951 (n = function () { 14952 return (() => { 14953 var t = { 14954 720: (t, e, n) => { 14955 n.r(e), 14956 n.d(e, { 14957 Scene: () => Yt, 14958 Tweenable: () => _t, 14959 interpolate: () => Ut, 14960 processTweens: () => ft, 14961 setBezierFunction: () => te, 14962 tween: () => mt, 14963 unsetBezierFunction: () => ee, 14964 }); 14965 var r = {}; 14966 n.r(r), 14967 n.d(r, { 14968 bounce: () => D, 14969 bouncePast: () => q, 14970 easeFrom: () => B, 14971 easeFromTo: () => Q, 14972 easeInBack: () => E, 14973 easeInCirc: () => j, 14974 easeInCubic: () => c, 14975 easeInExpo: () => b, 14976 easeInOutBack: () => F, 14977 easeInOutCirc: () => P, 14978 easeInOutCubic: () => l, 14979 easeInOutExpo: () => S, 14980 easeInOutQuad: () => s, 14981 easeInOutQuart: () => v, 14982 easeInOutQuint: () => y, 14983 easeInOutSine: () => w, 14984 easeInQuad: () => a, 14985 easeInQuart: () => h, 14986 easeInQuint: () => _, 14987 easeInSine: () => d, 14988 easeOutBack: () => x, 14989 easeOutBounce: () => M, 14990 easeOutCirc: () => k, 14991 easeOutCubic: () => f, 14992 easeOutExpo: () => O, 14993 easeOutQuad: () => u, 14994 easeOutQuart: () => p, 14995 easeOutQuint: () => m, 14996 easeOutSine: () => g, 14997 easeTo: () => H, 14998 elastic: () => I, 14999 linear: () => o, 15000 swingFrom: () => A, 15001 swingFromTo: () => T, 15002 swingTo: () => C, 15003 }); 15004 var i = {}; 15005 n.r(i), 15006 n.d(i, { 15007 afterTween: () => Ht, 15008 beforeTween: () => Bt, 15009 doesApply: () => qt, 15010 tweenCreated: () => Qt, 15011 }); 15012 /*! 15013 * All equations are adapted from Thomas Fuchs' 15014 * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js). 15015 * 15016 * Based on Easing Equations (c) 2003 [Robert 15017 * Penner](http://www.robertpenner.com/), all rights reserved. This work is 15018 * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html). 15019 */ 15020 /*! 15021 * TERMS OF USE - EASING EQUATIONS 15022 * Open source under the BSD License. 15023 * Easing Equations (c) 2003 Robert Penner, all rights reserved. 15024 */ 15025 var o = function (t) { 15026 return t; 15027 }, 15028 a = function (t) { 15029 return Math.pow(t, 2); 15030 }, 15031 u = function (t) { 15032 return -(Math.pow(t - 1, 2) - 1); 15033 }, 15034 s = function (t) { 15035 return (t /= 0.5) < 1 15036 ? 0.5 * Math.pow(t, 2) 15037 : -0.5 * ((t -= 2) * t - 2); 15038 }, 15039 c = function (t) { 15040 return Math.pow(t, 3); 15041 }, 15042 f = function (t) { 15043 return Math.pow(t - 1, 3) + 1; 15044 }, 15045 l = function (t) { 15046 return (t /= 0.5) < 1 15047 ? 0.5 * Math.pow(t, 3) 15048 : 0.5 * (Math.pow(t - 2, 3) + 2); 15049 }, 15050 h = function (t) { 15051 return Math.pow(t, 4); 15052 }, 15053 p = function (t) { 15054 return -(Math.pow(t - 1, 4) - 1); 15055 }, 15056 v = function (t) { 15057 return (t /= 0.5) < 1 15058 ? 0.5 * Math.pow(t, 4) 15059 : -0.5 * 15060 ((t -= 2) * Math.pow(t, 3) - 2); 15061 }, 15062 _ = function (t) { 15063 return Math.pow(t, 5); 15064 }, 15065 m = function (t) { 15066 return Math.pow(t - 1, 5) + 1; 15067 }, 15068 y = function (t) { 15069 return (t /= 0.5) < 1 15070 ? 0.5 * Math.pow(t, 5) 15071 : 0.5 * (Math.pow(t - 2, 5) + 2); 15072 }, 15073 d = function (t) { 15074 return 1 - Math.cos(t * (Math.PI / 2)); 15075 }, 15076 g = function (t) { 15077 return Math.sin(t * (Math.PI / 2)); 15078 }, 15079 w = function (t) { 15080 return -0.5 * (Math.cos(Math.PI * t) - 1); 15081 }, 15082 b = function (t) { 15083 return 0 === t 15084 ? 0 15085 : Math.pow(2, 10 * (t - 1)); 15086 }, 15087 O = function (t) { 15088 return 1 === t 15089 ? 1 15090 : 1 - Math.pow(2, -10 * t); 15091 }, 15092 S = function (t) { 15093 return 0 === t 15094 ? 0 15095 : 1 === t 15096 ? 1 15097 : (t /= 0.5) < 1 15098 ? 0.5 * Math.pow(2, 10 * (t - 1)) 15099 : 0.5 * (2 - Math.pow(2, -10 * --t)); 15100 }, 15101 j = function (t) { 15102 return -(Math.sqrt(1 - t * t) - 1); 15103 }, 15104 k = function (t) { 15105 return Math.sqrt(1 - Math.pow(t - 1, 2)); 15106 }, 15107 P = function (t) { 15108 return (t /= 0.5) < 1 15109 ? -0.5 * (Math.sqrt(1 - t * t) - 1) 15110 : 0.5 * 15111 (Math.sqrt(1 - (t -= 2) * t) + 1); 15112 }, 15113 M = function (t) { 15114 return t < 1 / 2.75 15115 ? 7.5625 * t * t 15116 : t < 2 / 2.75 15117 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 15118 : t < 2.5 / 2.75 15119 ? 7.5625 * (t -= 2.25 / 2.75) * t + 15120 0.9375 15121 : 7.5625 * (t -= 2.625 / 2.75) * t + 15122 0.984375; 15123 }, 15124 E = function (t) { 15125 var e = 1.70158; 15126 return t * t * ((e + 1) * t - e); 15127 }, 15128 x = function (t) { 15129 var e = 1.70158; 15130 return (t -= 1) * t * ((e + 1) * t + e) + 1; 15131 }, 15132 F = function (t) { 15133 var e = 1.70158; 15134 return (t /= 0.5) < 1 15135 ? t * 15136 t * 15137 ((1 + (e *= 1.525)) * t - e) * 15138 0.5 15139 : 0.5 * 15140 ((t -= 2) * 15141 t * 15142 ((1 + (e *= 1.525)) * t + e) + 15143 2); 15144 }, 15145 I = function (t) { 15146 return ( 15147 -1 * 15148 Math.pow(4, -8 * t) * 15149 Math.sin( 15150 ((6 * t - 1) * (2 * Math.PI)) / 15151 2 15152 ) + 15153 1 15154 ); 15155 }, 15156 T = function (t) { 15157 var e = 1.70158; 15158 return (t /= 0.5) < 1 15159 ? t * 15160 t * 15161 ((1 + (e *= 1.525)) * t - e) * 15162 0.5 15163 : 0.5 * 15164 ((t -= 2) * 15165 t * 15166 ((1 + (e *= 1.525)) * t + e) + 15167 2); 15168 }, 15169 A = function (t) { 15170 var e = 1.70158; 15171 return t * t * ((e + 1) * t - e); 15172 }, 15173 C = function (t) { 15174 var e = 1.70158; 15175 return (t -= 1) * t * ((e + 1) * t + e) + 1; 15176 }, 15177 D = function (t) { 15178 return t < 1 / 2.75 15179 ? 7.5625 * t * t 15180 : t < 2 / 2.75 15181 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 15182 : t < 2.5 / 2.75 15183 ? 7.5625 * (t -= 2.25 / 2.75) * t + 15184 0.9375 15185 : 7.5625 * (t -= 2.625 / 2.75) * t + 15186 0.984375; 15187 }, 15188 q = function (t) { 15189 return t < 1 / 2.75 15190 ? 7.5625 * t * t 15191 : t < 2 / 2.75 15192 ? 2 - 15193 (7.5625 * (t -= 1.5 / 2.75) * t + 15194 0.75) 15195 : t < 2.5 / 2.75 15196 ? 2 - 15197 (7.5625 * (t -= 2.25 / 2.75) * t + 15198 0.9375) 15199 : 2 - 15200 (7.5625 * (t -= 2.625 / 2.75) * t + 15201 0.984375); 15202 }, 15203 Q = function (t) { 15204 return (t /= 0.5) < 1 15205 ? 0.5 * Math.pow(t, 4) 15206 : -0.5 * 15207 ((t -= 2) * Math.pow(t, 3) - 2); 15208 }, 15209 B = function (t) { 15210 return Math.pow(t, 4); 15211 }, 15212 H = function (t) { 15213 return Math.pow(t, 0.25); 15214 }; 15215 function N(t, e) { 15216 if (!(t instanceof e)) 15217 throw new TypeError( 15218 'Cannot call a class as a function' 15219 ); 15220 } 15221 function R(t, e) { 15222 for (var n = 0; n < e.length; n++) { 15223 var r = e[n]; 15224 (r.enumerable = r.enumerable || !1), 15225 (r.configurable = !0), 15226 'value' in r && (r.writable = !0), 15227 Object.defineProperty(t, r.key, r); 15228 } 15229 } 15230 function z(t) { 15231 return ( 15232 (z = 15233 'function' == typeof Symbol && 15234 'symbol' == typeof Symbol.iterator 15235 ? function (t) { 15236 return typeof t; 15237 } 15238 : function (t) { 15239 return t && 15240 'function' == 15241 typeof Symbol && 15242 t.constructor === 15243 Symbol && 15244 t !== Symbol.prototype 15245 ? 'symbol' 15246 : typeof t; 15247 }), 15248 z(t) 15249 ); 15250 } 15251 function G(t, e) { 15252 var n = Object.keys(t); 15253 if (Object.getOwnPropertySymbols) { 15254 var r = Object.getOwnPropertySymbols(t); 15255 e && 15256 (r = r.filter(function (e) { 15257 return Object.getOwnPropertyDescriptor( 15258 t, 15259 e 15260 ).enumerable; 15261 })), 15262 n.push.apply(n, r); 15263 } 15264 return n; 15265 } 15266 function L(t) { 15267 for (var e = 1; e < arguments.length; e++) { 15268 var n = 15269 null
15269 != arguments[e] 15270 ? arguments[e] 15271 : {}; 15272 e % 2 15273 ? G(Object(n), !0).forEach(function ( 15274 e 15275 ) { 15276 U(t, e, n[e]); 15277 }) 15278 : Object.getOwnPropertyDescriptors 15279 ? Object.defineProperties( 15280 t, 15281 Object.getOwnPropertyDescriptors( 15282 n 15283 ) 15284 ) 15285 : G(Object(n)).forEach(function (e) { 15286 Object.defineProperty( 15287 t, 15288 e, 15289 Object.getOwnPropertyDescriptor( 15290 n, 15291 e 15292 ) 15293 ); 15294 }); 15295 } 15296 return t; 15297 } 15298 function U(t, e, n) { 15299 return ( 15300 e in t 15301 ? Object.defineProperty(t, e, { 15302 value: n, 15303 enumerable: !0, 15304 configurable: !0, 15305 writable: !0, 15306 }) 15307 : (t[e] = n), 15308 t 15309 ); 15310 } 15311 var V, 15312 W, 15313 $, 15314 J = 'linear', 15315 K = 15316 'undefined' != typeof window 15317 ? window 15318 : commonjsGlobal, 15319 X = 'afterTween', 15320 Y = 'afterTweenEnd', 15321 Z = 'beforeTween', 15322 tt = 'tweenCreated', 15323 et = 'function', 15324 nt = 'string', 15325 rt = 15326 K.requestAnimationFrame || 15327 K.webkitRequestAnimationFrame || 15328 K.oRequestAnimationFrame || 15329 K.msRequestAnimationFrame || 15330 (K.mozCancelRequestAnimationFrame && 15331 K.mozRequestAnimationFrame) || 15332 setTimeout, 15333 it = function () { }, 15334 ot = null, 15335 at = null, 15336 ut = L({}, r), 15337 st = function (t, e, n, r, i, o, a) { 15338 var u, 15339 s, 15340 c, 15341 f = t < o ? 0 : (t - o) / i, 15342 l = !1; 15343 for (var h in (a && 15344 a.call && 15345 ((l = !0), (u = a(f))), 15346 e)) 15347 l || 15348 (u = ((s = a[h]).call ? s : ut[s])( 15349 f 15350 )), 15351 (c = n[h]), 15352 (e[h] = c + (r[h] - c) * u); 15353 return e; 15354 }, 15355 ct = function (t, e) { 15356 var n = t._timestamp, 15357 r = t._currentState, 15358 i = t._delay; 15359 if (!(e < n + i)) { 15360 var o = t._duration, 15361 a = t._targetState, 15362 u = n + i + o, 15363 s = e > u ? u : e, 15364 c = s >= u, 15365 f = o - (u - s), 15366 l = t._filters.length > 0; 15367 if (c) 15368 return ( 15369 t._render(a, t._data, f), 15370 t.stop(!0) 15371 ); 15372 l && t._applyFilter(Z), 15373 s < n + i 15374 ? (n = o = s = 1) 15375 : (n += i), 15376 st( 15377 s, 15378 r, 15379 t._originalState, 15380 a, 15381 o, 15382 n, 15383 t._easing 15384 ), 15385 l && t._applyFilter(X), 15386 t._render(r, t._data, f); 15387 } 15388 }, 15389 ft = function () { 15390 for (var t, e = _t.now(), n = ot; n;) 15391 (t = n._next), ct(n, e), (n = t); 15392 }, 15393 lt = 15394 Date.now || 15395 function () { 15396 return +new Date(); 15397 }, 15398 ht = function (t) { 15399 var e = 15400 arguments.length > 1 && 15401 void 0 !== arguments[1] 15402 ? arguments[1] 15403 : J, 15404 n = 15405 arguments.length > 2 && 15406 void 0 !== arguments[2] 15407 ? arguments[2] 15408 : {}, 15409 r = z(e); 15410 if (ut[e]) return ut[e]; 15411 if (r === nt || r === et) 15412 for (var i in t) n[i] = e; 15413 else for (var o in t) n[o] = e[o] || J; 15414 return n; 15415 }, 15416 pt = function (t) { 15417 t === ot 15418 ? (ot = t._next) 15419 ? (ot._previous = null) 15420 : (at = null) 15421 : t === at 15422 ? (at = t._previous) 15423 ? (at._next = null) 15424 : (ot = null) 15425 : ((W = t._previous), 15426 ($ = t._next), 15427 (W._next = $), 15428 ($._previous = W)), 15429 (t._previous = t._next = null); 15430 }, 15431 vt = 15432 'function' == typeof Promise 15433 ? Promise 15434 : null, 15435 _t = (function () { 15436 function t() { 15437 var e = 15438 arguments.length > 0 && 15439 void 0 !== arguments[0] 15440 ? arguments[0] 15441 : {}, 15442 n = 15443 arguments.length > 1 && 15444 void 0 !== arguments[1] 15445 ? arguments[1] 15446 : void 0; 15447 N(this, t), 15448 (this._config = {}), 15449 (this._data = {}),
15450 (this._delay = 0), 15451 (this._filters = []), 15452 (this._next = null), 15453 (this._previous = null), 15454 (this._timestamp = null), 15455 (this._resolve = null), 15456 (this._reject = null), 15457 (this._currentState = e || {}), 15458 (this._originalState = {}), 15459 (this._targetState = {}), 15460 (this._start = it), 15461 (this._render = it), 15462 (this._promiseCtor = vt), 15463 n && this.setConfig(n); 15464 } 15465 var e, n; 15466 return ( 15467 (e = t), 15468 (n = [ 15469 { 15470 key: '_applyFilter', 15471 value: function (t) { 15472 for ( 15473 var e = this._filters 15474 .length; 15475 e > 0; 15476 e-- 15477 ) { 15478 var n = this._filters[ 15479 e - e 15480 ][t]; 15481 n && n(this); 15482 } 15483 }, 15484 }, 15485 { 15486 key: 'tween', 15487 value: function () { 15488 var e = 15489 arguments.length > 0 && 15490 void 0 !== arguments[0] 15491 ? arguments[0] 15492 : void 0; 15493 return ( 15494 this._isPlaying && 15495 this.stop(), 15496 (!e && this._config) || 15497 this.setConfig(e), 15498 (this._pausedAtTime = null), 15499 (this._timestamp = t.now()), 15500 this._start( 15501 this.get(), 15502 this._data 15503 ), 15504 this._delay && 15505 this._render( 15506 this 15507 ._currentState, 15508 this._data, 15509 0 15510 ), 15511 this._resume( 15512 this._timestamp 15513 ) 15514 ); 15515 }, 15516 }, 15517 { 15518 key: 'setConfig', 15519 value: function () { 15520 var e = 15521 arguments.length > 15522 0 && 15523 void 0 !== 15524 arguments[0] 15525 ? arguments[0] 15526 : {}, 15527 n = this._config; 15528 for (var r in e) 15529 n[r] = e[r]; 15530 var i = n.promise, 15531 o = 15532 void 0 === i 15533 ? this 15534 ._promiseCtor 15535 : i, 15536 a = n.start, 15537 u = 15538 void 0 === a 15539 ? it 15540 : a, 15541 s = n.finish, 15542 c = n.render, 15543 f = 15544 void 0 === c 15545 ? this._config 15546 .step || 15547 it 15548 : c, 15549 l = n.step, 15550 h = 15551 void 0 === l 15552 ? it 15553 : l; 15554 (this._data = 15555 n.data || 15556 n.attachment || 15557 this._data), 15558 (this._isPlaying = !1), 15559 (this._pausedAtTime = null),
15560 (this._scheduleId = null), 15561 (this._delay = 15562 e.delay || 0), 15563 (this._start = u), 15564 (this._render = f || h), 15565 (this._duration = 15566 n.duration || 500), 15567 (this._promiseCtor = o), 15568 s && 15569 (this._resolve = s); 15570 var p = e.from, 15571 v = e.to, 15572 _ = 15573 void 0 === v 15574 ? {} 15575 : v, 15576 m = this._currentState, 15577 y = this._originalState, 15578 d = this._targetState; 15579 for (var g in p) 15580 m[g] = p[g]; 15581 var w = !1; 15582 for (var b in m) { 15583 var O = m[b]; 15584 w || 15585 z(O) !== nt || 15586 (w = !0), 15587 (y[b] = O), 15588 (d[ 15589 b 15590 ] = _.hasOwnProperty( 15591 b 15592 ) 15593 ? _[b] 15594 : O); 15595 } 15596 if ( 15597 ((this._easing = ht( 15598 this._currentState, 15599 n.easing, 15600 this._easing 15601 )), 15602 (this._filters.length = 0), 15603 w) 15604 ) { 15605 for (var S in t.filters) 15606 t.filters[ 15607 S 15608 ].doesApply(this) && 15609 this._filters.push( 15610 t.filters[S] 15611 ); 15612 this._applyFilter(tt); 15613 } 15614 return this; 15615 }, 15616 }, 15617 { 15618 key: 'then', 15619 value: function (t, e) { 15620 var n = this; 15621 return ( 15622 (this._promise = new this._promiseCtor( 15623 function (t, e) { 15624 (n._resolve = t), 15625 (n._reject = e); 15626 } 15627 )), 15628 this._promise.then(t, e) 15629 ); 15630 }, 15631 }, 15632 { 15633 key: 'catch', 15634 value: function (t) { 15635 return this.then().catch(t); 15636 }, 15637 }, 15638 { 15639 key: 'get', 15640 value: function () { 15641 return L( 15642 {}, 15643 this._currentState 15644 ); 15645 }, 15646 }, 15647 { 15648 key: 'set', 15649 value: function (t) { 15650 this._currentState = t; 15651 }, 15652 }, 15653 { 15654 key: 'pause', 15655 value: function () { 15656 if (this._isPlaying) 15657 return ( 15658 (this._pausedAtTime = t.now()), 15659 (this._isPlaying = !1), 15660 pt(this), 15661 this 15662 ); 15663 }, 15664 }, 15665 { 15666 key: 'resume', 15667 value: function () { 15668 return this._resume(); 15669 }, 15670 }, 15671 { 15672 key: '_resume', 15673 value: function () { 15674 var e = 15675 arguments.length > 0 && 15676 void 0 !== arguments[0] 15677 ? arguments[0] 15678 : t.now(); 15679 return null === 15680 this._timestamp 15681 ? this.tween() 15682 : this._isPlaying 15683 ? this._promise 15684 : (this._pausedAtTime && 15685 ((this._timestamp += 15686 e - 15687 this 15688 ._pausedAtTime), 15689 (this._pausedAtTime = null)), 15690 (this._isPlaying = !0), 15691 null === ot 15692 ? ((ot = this), 15693 (at = this)) 15694 : ((this._previous = at), 15695 (at._next = this), 15696 (at = this)), 15697 this); 15698 }, 15699 }, 15700 { 15701 key: 'seek', 15702 value: function (e) { 15703 e = Math.max(e, 0); 15704 var n = t.now(); 15705 return ( 15706 this._timestamp + e === 15707 0 || 15708 ((this._timestamp = 15709 n - e), 15710 ct(this, n)), 15711 this 15712 ); 15713 }, 15714 }, 15715 { 15716 key: 'stop', 15717 value: function () { 15718 var t = 15719 arguments.length > 0 && 15720 void 0 !== 15721 arguments[0] && 15722 arguments[0]; 15723 if (!this._isPlaying) 15724 return this; 15725 (this._isPlaying = !1), 15726 pt(this); 15727 var e = 15728 this._filters.length > 15729 0; 15730 return ( 15731 t && 15732 (e && 15733 this._applyFilter( 15734 Z 15735 ), 15736 st( 15737 1, 15738 this 15739 ._currentState, 15740 this 15741 ._originalState, 15742 this 15743 ._targetState, 15744 1, 15745 0, 15746 this._easing 15747 ), 15748 e && 15749 (this._applyFilter( 15750 X 15751 ), 15752 this._applyFilter( 15753 Y 15754 ))), 15755 this._resolve && 15756 this._resolve({ 15757 data: this 15758 ._data, 15759 state: this 15760 ._currentState, 15761 tweenable: this, 15762 }), 15763 (this._resolve = null),
15764 (this._reject = null), 15765 this 15766 ); 15767 }, 15768 }, 15769 { 15770 key: 'cancel', 15771 value: function () { 15772 var t = 15773 arguments.length > 15774 0 && 15775 void 0 !== 15776 arguments[0] && 15777 arguments[0], 15778 e = this._currentState, 15779 n = this._data, 15780 r = this._isPlaying; 15781 return r 15782 ? (this._reject && 15783 this._reject({ 15784 data: n, 15785 state: e, 15786 tweenable: this, 15787 }), 15788 (this._resolve = null), 15789 (this._reject = null), 15790 this.stop(t)) 15791 : this; 15792 }, 15793 }, 15794 { 15795 key: 'isPlaying', 15796 value: function () { 15797 return this._isPlaying; 15798 }, 15799 }, 15800 { 15801 key: 'setScheduleFunction', 15802 value: function (e) { 15803 t.setScheduleFunction(e); 15804 }, 15805 }, 15806 { 15807 key: 'data', 15808 value: function () { 15809 var t = 15810 arguments.length > 0 && 15811 void 0 !== arguments[0] 15812 ? arguments[0] 15813 : null; 15814 return ( 15815 t && 15816 (this._data = L( 15817 {}, 15818 t 15819 )), 15820 this._data 15821 ); 15822 }, 15823 }, 15824 { 15825 key: 'dispose', 15826 value: function () { 15827 for (var t in this) 15828 delete this[t]; 15829 }, 15830 }, 15831 ]), 15832 n && R(e.prototype, n), 15833 t 15834 ); 15835 })(); 15836 function mt() { 15837 var t = 15838 arguments.length > 0 && 15839 void 0 !== arguments[0] 15840 ? arguments[0] 15841 : {}, 15842 e = new _t(); 15843 return e.tween(t), (e.tweenable = e), e; 15844 } 15845 U(_t, 'now', function () { 15846 return V; 15847 }), 15848 (_t.setScheduleFunction = function (t) { 15849 return (rt = t); 15850 }), 15851 (_t.formulas = ut), 15852 (_t.filters = {}), 15853 (function t() {
15854 (V = lt()), 15855 rt.call(K, t, 16.666666666666668), 15856 ft(); 15857 })(); 15858 var yt, 15859 dt, 15860 gt = /(\d|-|\.)/, 15861 wt = /([^\-0-9.]+)/g, 15862 bt = /[0-9.-]+/g, 15863 Ot = 15864 ((yt = bt.source), 15865 (dt = /,\s*/.source), 15866 new RegExp( 15867 'rgba?\\(' 15868 .concat(yt) 15869 .concat(dt) 15870 .concat(yt) 15871 .concat(dt) 15872 .concat(yt, '(') 15873 .concat(dt) 15874 .concat(yt, ')?\\)'), 15875 'g' 15876 )), 15877 St = /^.*\(/, 15878 jt = /#([0-9]|[a-f]){3,6}/gi, 15879 kt = 'VAL', 15880 Pt = function (t, e) { 15881 return t.map(function (t, n) { 15882 return '_'.concat(e, '_').concat(n); 15883 }); 15884 }; 15885 function Mt(t) { 15886 return parseInt(t, 16); 15887 } 15888 var Et = function (t) { 15889 return 'rgb('.concat( 15890 ((e = t), 15891 3 === (e = e.replace(/#/, '')).length && 15892 (e = 15893 (e = e.split(''))[0] + 15894 e[0] + 15895 e[1] + 15896 e[1] + 15897 e[2] + 15898 e[2]), 15899 [ 15900 Mt(e.substr(0, 2)), 15901 Mt(e.substr(2, 2)), 15902 Mt(e.substr(4, 2)), 15903 ]).join(','), 15904 ')' 15905 ); 15906 var e; 15907 }, 15908 xt = function (t, e, n) { 15909 var r = e.match(t), 15910 i = e.replace(t, kt); 15911 return ( 15912 r && 15913 r.forEach(function (t) { 15914 return (i = i.replace( 15915 kt, 15916 n(t) 15917 )); 15918 }), 15919 i 15920 ); 15921 }, 15922 Ft = function (t) { 15923 for (var e in t) { 15924 var n = t[e]; 15925 'string' == typeof n && 15926 n.match(jt) && 15927 (t[e] = xt(jt, n, Et)); 15928 } 15929 }, 15930 It = function (t) { 15931 var e = t.match(bt), 15932 n = e.slice(0, 3).map(Math.floor), 15933 r = t.match(St)[0]; 15934 if (3 === e.length) 15935 return '' 15936 .concat(r) 15937 .concat(n.join(','), ')'); 15938 if (4 === e.length) 15939 return '' 15940 .concat(r) 15941 .concat(n.join(','), ',') 15942 .concat(e[3], ')'); 15943 throw new Error( 15944 'Invalid rgbChunk: '.concat(t) 15945 ); 15946 }, 15947 Tt = function (t) { 15948 return t.match(bt); 15949 }, 15950 At = function (t, e) { 15951 var n = {}; 15952 return ( 15953 e.forEach(function (e) { 15954 (n[e] = t[e]), delete t[e]; 15955 }), 15956 n 15957 ); 15958 }, 15959 Ct = function (t, e) { 15960 return e.map(function (e) { 15961 return t[e]; 15962 }); 15963 }, 15964 Dt = function (t, e) { 15965 return ( 15966 e.forEach(function (e) { 15967 return (t = t.replace( 15968 kt, 15969 +e.toFixed(4) 15970 )); 15971 }), 15972 t 15973 ); 15974 }, 15975 qt = function (t) { 15976 for (var e in t._currentState) 15977 if ( 15978 'string' == 15979 typeof t._currentState[e] 15980 ) 15981 return !0; 15982 return !1; 15983 }; 15984 function Qt(t) { 15985 var e = t._currentState; 15986 [e, t._originalState, t._targetState].forEach( 15987 Ft 15988 ), 15989 (t._tokenData = (function (t) { 15990 var e, 15991 n, 15992 r = {}; 15993 for (var i in t) { 15994 var o = t[i]; 15995 'string' == typeof o && 15996 (r[i] = { 15997 formatString: 15998 ((e = o), 15999 (n = void 0), 16000 (n = e.match(wt)), 16001 n 16002 ? (1 === n.length || 16003 e 16004 .charAt(0) 16005 .match( 16006 gt 16007 )) && 16008 n.unshift('') 16009 : (n = ['', '']), 16010 n.join(kt)), 16011 chunkNames: Pt(Tt(o), i), 16012 }); 16013 } 16014 return r; 16015 })(e)); 16016 } 16017 function Bt(t) { 16018 var e = t._currentState, 16019 n = t._originalState, 16020 r = t._targetState, 16021 i = t._easing, 16022 o = t._tokenData; 16023 !(function (t, e) { 16024 var n = function (n) { 16025 var r = e[n].chunkNames, 16026 i = t[n]; 16027 if ('string' == typeof i) { 16028 var o = i.split(' '), 16029 a = o[o.length - 1]; 16030 r.forEach(function (e, n) { 16031 return (t[e] = o[n] || a); 16032 }); 16033 } else 16034 r.forEach(function (e) { 16035 return (t[e] = i); 16036 }); 16037 delete t[n]; 16038 }; 16039 for (var r in e) n(r); 16040 })(i, o), 16041 [e, n, r].forEach(function (t) { 16042 return (function (t, e) { 16043 var n = function (n) {
16044 Tt(t[n]).forEach(function ( 16045 r, 16046 i 16047 ) { 16048 return (t[ 16049 e[n].chunkNames[i] 16050 ] = +r); 16051 }), 16052 delete t[n]; 16053 }; 16054 for (var r in e) n(r); 16055 })(t, o); 16056 }); 16057 } 16058 function Ht(t) { 16059 var e = t._currentState, 16060 n = t._originalState, 16061 r = t._targetState, 16062 i = t._easing, 16063 o = t._tokenData; 16064 [e, n, r].forEach(function (t) { 16065 return (function (t, e) { 16066 for (var n in e) { 16067 var r = e[n], 16068 i = r.chunkNames, 16069 o = r.formatString, 16070 a = Dt(o, Ct(At(t, i), i)); 16071 t[n] = xt(Ot, a, It); 16072 } 16073 })(t, o); 16074 }), 16075 (function (t, e) { 16076 for (var n in e) { 16077 var r = e[n].chunkNames, 16078 i = t[r[0]]; 16079 t[n] = 16080 'string' == typeof i 16081 ? r 16082 .map(function (e) { 16083 var n = t[e]; 16084 return ( 16085 delete t[e], n 16086 ); 16087 }) 16088 .join(' ') 16089 : i; 16090 } 16091 })(i, o); 16092 } 16093 function Nt(t, e) { 16094 var n = Object.keys(t); 16095 if (Object.getOwnPropertySymbols) { 16096 var r = Object.getOwnPropertySymbols(t); 16097 e && 16098 (r = r.filter(function (e) { 16099 return Object.getOwnPropertyDescriptor( 16100 t, 16101 e 16102 ).enumerable; 16103 })), 16104 n.push.apply(n, r); 16105 } 16106 return n; 16107 } 16108 function Rt(t) { 16109 for (var e = 1; e < arguments.length; e++) { 16110 var n = 16111 null != arguments[e] 16112 ? arguments[e] 16113 : {}; 16114 e % 2 16115 ? Nt(Object(n), !0).forEach(function ( 16116 e 16117 ) { 16118 zt(t, e, n[e]); 16119 }) 16120 : Object.getOwnPropertyDescriptors 16121 ? Object.defineProperties( 16122 t, 16123 Object.getOwnPropertyDescriptors( 16124 n 16125 ) 16126 )
16127 : Nt(Object(n)).forEach(function (e) { 16128 Object.defineProperty( 16129 t, 16130 e, 16131 Object.getOwnPropertyDescriptor( 16132 n, 16133 e 16134 ) 16135 ); 16136 }); 16137 } 16138 return t; 16139 } 16140 function zt(t, e, n) { 16141 return ( 16142 e in t 16143 ? Object.defineProperty(t, e, { 16144 value: n, 16145 enumerable: !0, 16146 configurable: !0, 16147 writable: !0, 16148 }) 16149 : (t[e] = n), 16150 t 16151 ); 16152 } 16153 var Gt = new _t(), 16154 Lt = _t.filters, 16155 Ut = function (t, e, n, r) { 16156 var i = 16157 arguments.length > 4 && 16158 void 0 !== arguments[4] 16159 ? arguments[4] 16160 : 0, 16161 o = Rt({}, t), 16162 a = ht(t, r); 16163 for (var u in ((Gt._filters.length = 0), 16164 Gt.set({}), 16165 (Gt._currentState = o), 16166 (Gt._originalState = t), 16167 (Gt._targetState = e), 16168 (Gt._easing = a), 16169 Lt)) 16170 Lt[u].doesApply(Gt) && 16171 Gt._filters.push(Lt[u]); 16172 Gt._applyFilter('tweenCreated'), 16173 Gt._applyFilter('beforeTween'); 16174 var s = st(n, o, t, e, 1, i, a); 16175 return Gt._applyFilter('afterTween'), s; 16176 }; 16177 function Vt(t) { 16178 return ((function (t) { 16179 if (Array.isArray(t)) return Wt(t); 16180 })(t) || 16181 (function (t) { 16182 if ( 16183 'undefined' != typeof Symbol && 16184 Symbol.iterator in Object(t) 16185 ) 16186 return Array.from(t); 16187 })(t) || 16188 (function (t, e) { 16189 if (t) { 16190 if ('string' == typeof t) 16191 return Wt(t, e); 16192 var n = Object.prototype.toString 16193 .call(t) 16194 .slice(8, -1); 16195 return ('Object' === n && 16196 t.constructor && 16197 (n = t.constructor.name), 'Map' === n || 'Set' === n 16198 ? Array.from(t) 16199 : 'Arguments' === n || 16200 /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test( 16201 n 16202 ) 16203 ? Wt(t, e) 16204 : void 0); 16205 } 16206 })(t) || (function () { 16207 throw new TypeError( 16208 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' 16209 ); 16210 })()); 16211 } 16212 function Wt(t, e) { 16213 (null == e || e > t.length) && (e = t.length); 16214 for (var n = 0, r = new Array(e); n < e; n++) 16215 r[n] = t[n]; 16216 return r; 16217 } 16218 function $t(t, e) { 16219 if (!(t instanceof e)) 16220 throw new TypeError( 16221 'Cannot call a class as a function' 16222 ); 16223 } 16224 function Jt(t, e) { 16225 for (var n = 0; n < e.length; n++) { 16226 var r = e[n]; 16227 (r.enumerable = r.enumerable || !1), 16228 (r.configurable = !0), 16229 'value' in r && (r.writable = !0), 16230 Object.defineProperty(t, r.key, r); 16231 } 16232 } 16233 function Kt(t, e) { 16234 var n = e.get(t); 16235 if (!n) 16236 throw new TypeError( 16237 'attempted to get private field on non-instance' 16238 ); 16239 return n.get ? n.get.call(t) : n.value; 16240 } 16241 var Xt = new WeakMap(), 16242 Yt = (function () { 16243 function t() { 16244 $t(this, t), 16245 Xt.set(this, { 16246 writable: !0, 16247 value: [], 16248 }); 16249 for ( 16250 var e = arguments.length, 16251 n = new Array(e), 16252 r = 0; 16253 r < e; 16254 r++ 16255 ) 16256 n[r] = arguments[r];
16257 n.forEach(this.add.bind(this)); 16258 } 16259 var e, n; 16260 return ( 16261 (e = t), 16262 (n = [ 16263 { 16264 key: 'add', 16265 value: function (t) { 16266 return ( 16267 Kt(this, Xt).push(t), t 16268 ); 16269 }, 16270 }, 16271 { 16272 key: 'remove', 16273 value: function (t) { 16274 var e = Kt( 16275 this, 16276 Xt 16277 ).indexOf(t); 16278 return ( 16279 ~e && 16280 Kt(this, Xt).splice( 16281 e, 16282 1 16283 ), 16284 t 16285 ); 16286 }, 16287 }, 16288 { 16289 key: 'empty', 16290 value: function () { 16291 return this.tweenables.map( 16292 this.remove.bind(this) 16293 ); 16294 }, 16295 }, 16296 { 16297 key: 'isPlaying', 16298 value: function () { 16299 return Kt(this, Xt).some( 16300 function (t) { 16301 return t.isPlaying(); 16302 } 16303 ); 16304 }, 16305 }, 16306 { 16307 key: 'play', 16308 value: function () { 16309 return ( 16310 Kt(this, Xt).forEach( 16311 function (t) { 16312 return t.tween(); 16313 } 16314 ), 16315 this 16316 ); 16317 }, 16318 }, 16319 { 16320 key: 'pause', 16321 value: function () { 16322 return ( 16323 Kt(this, Xt).forEach( 16324 function (t) { 16325 return t.pause(); 16326 } 16327 ), 16328 this 16329 ); 16330 }, 16331 }, 16332 { 16333 key: 'resume', 16334 value: function () { 16335 return ( 16336 Kt(this, Xt).forEach( 16337 function (t) { 16338 return t.resume(); 16339 } 16340 ), 16341 this 16342 ); 16343 }, 16344 }, 16345 { 16346 key: 'stop', 16347 value: function (t) { 16348 return ( 16349 Kt(this, Xt).forEach( 16350 function (e) { 16351 return e.stop( 16352 t 16353 ); 16354 } 16355 ), 16356 this 16357 ); 16358 }, 16359 }, 16360 { 16361 key: 'tweenables', 16362 get: function () { 16363 return Vt(Kt(this, Xt)); 16364 }, 16365 }, 16366 { 16367 key: 'promises', 16368 get: function () { 16369 return Kt(this, Xt).map( 16370 function (t) { 16371 return t.then(); 16372 } 16373 ); 16374 }, 16375 }, 16376 ]) && Jt(e.prototype, n), 16377 t 16378 ); 16379 })(); 16380 function Zt(t, e, n, r, i, o) { 16381 var a, 16382 u, 16383 s = 0, 16384 c = 0, 16385 f = 0, 16386 l = 0, 16387 h = 0, 16388 p = 0, 16389 v = function (t) { 16390 return ((s * t + c) * t + f) * t; 16391 }, 16392 _ = function (t) { 16393 return (3 * s * t + 2 * c) * t + f; 16394 }, 16395 m = function (t) { 16396 return t >= 0 ? t : 0 - t; 16397 }; 16398 return ( 16399 (s = 16400 1 - 16401 (f = 3 * e) - 16402 (c = 3 * (r - e) - f)), 16403 (l = 16404 1 - 16405 (p = 3 * n) - 16406 (h = 3 * (i - n) - p)), 16407 (a = t), 16408 (u = (function (t) { 16409 return 1 / (200 * t); 16410 })(o)), 16411 (function (t) { 16412 return ((l * t + h) * t + p) * t; 16413 })( 16414 (function (t, e) { 16415 var n, r, i, o, a, u; 16416 for (i = t, u = 0; u < 8; u++) { 16417 if (((o = v(i) - t), m(o) < e)) 16418 return i; 16419 if (((a = _(i)), m(a) < 1e-6)) 16420 break; 16421 i -= o / a; 16422 }
16423 if ((i = t) < (n = 0)) return n; 16424 if (i > (r = 1)) return r; 16425 for (; n < r;) { 16426 if (((o = v(i)), m(o - t) < e)) 16427 return i; 16428 t > o ? (n = i) : (r = i), 16429 (i = 0.5 * (r - n) + n); 16430 } 16431 return i; 16432 })(a, u) 16433 ) 16434 ); 16435 } 16436 var te = function (t, e, n, r, i) { 16437 var o = (function (t, e, n, r) { 16438 return function (i) { 16439 return Zt(i, t, e, n, r, 1); 16440 }; 16441 })(e, n, r, i); 16442 return ( 16443 (o.displayName = t), 16444 (o.x1 = e), 16445 (o.y1 = n), 16446 (o.x2 = r), 16447 (o.y2 = i), 16448 (_t.formulas[t] = o) 16449 ); 16450 }, 16451 ee = function (t) { 16452 return delete _t.formulas[t]; 16453 }; 16454 _t.filters.token = i; 16455 }, 16456 }, 16457 e = {}; 16458 function n(r) { 16459 if (e[r]) return e[r].exports; 16460 var i = (e[r] = { exports: {} }); 16461 return t[r](i, i.exports, n), i.exports; 16462 } 16463 return ( 16464 (n.d = (t, e) => { 16465 for (var r in e) 16466 n.o(e, r) && 16467 !n.o(t, r) && 16468 Object.defineProperty(t, r, { 16469 enumerable: !0, 16470 get: e[r], 16471 }); 16472 }), 16473 (n.o = (t, e) => 16474 Object.prototype.hasOwnProperty.call(t, e)), 16475 (n.r = (t) => { 16476 'undefined' != typeof Symbol && 16477 Symbol.toStringTag && 16478 Object.defineProperty(t, Symbol.toStringTag, { 16479 value: 'Module', 16480 }), 16481 Object.defineProperty(t, '__esModule', { 16482 value: !0, 16483 }); 16484 }), 16485 n(720) 16486 ); 16487 })(); 16488 }), 16489 (t.exports = n()); 16490 }); 16491 unwrapExports(shifty_node); 16492 var PREFIXES = 'Webkit Moz O ms'.split(' '), 16493 FLOAT_COMPARISON_EPSILON = 0.001; 16494 function extend(t, e, i) { 16495 for (var r in ((t = t || {}), (i = i || !1), (e = e || {}))) 16496 if (e.hasOwnProperty(r)) { 16497 var s = t[r], 16498 l = e[r]; 16499 i && isObject(s) && isObject(l) 16500 ? (t[r] = extend(s, l, i)) 16501 : (t[r] = l); 16502 } 16503 return t; 16504 } 16505 function render(t, e) { 16506 var i = t; 16507 for (var r in e) 16508 if (e.hasOwnProperty(r)) { 16509 var s = e[r], 16510 l = new RegExp('\\{' + r + '\\}', 'g'); 16511 i = i.replace(l, s); 16512 } 16513 return i; 16514 } 16515 function setStyle(t, e, i) { 16516 for (var r = t.style, s = 0; s < PREFIXES.length; ++s) { 16517 r[PREFIXES[s] + capitalize(e)] = i; 16518 } 16519 r[e] = i; 16520 } 16521 function setStyles(t, e) { 16522 forEachObject(e, function (e, i) { 16523 null != e && 16524 (isObject(e) && !0 === e.prefix 16525 ? setStyle(t, i, e.value) 16526 : (t.style[i] = e)); 16527 }); 16528 } 16529 function capitalize(t) { 16530 return t.charAt(0).toUpperCase() + t.slice(1); 16531 } 16532 function isString(t) { 16533 return 'string' == typeof t || t instanceof String; 16534 } 16535 function isFunction(t) { 16536 return 'function' == typeof t; 16537 } 16538 function isArray(t) { 16539 return '[object Array]' === Object.prototype.toString.call(t); 16540 } 16541 function isObject(t) { 16542 return !isArray(t) && 'object' === typeof t && !!t; 16543 } 16544 function forEachObject(t, e) { 16545 for (var i in t) { 16546 if (t.hasOwnProperty(i)) e(t[i], i); 16547 } 16548 } 16549 function floatEquals(t, e) { 16550 return Math.abs(t - e) < FLOAT_COMPARISON_EPSILON; 16551 } 16552 function removeChildren(t) { 16553 for (; t.firstChild;) t.removeChild(t.firstChild); 16554 } 16555 var utils$1 = { 16556 extend: extend, 16557 render: render, 16558 setStyle: setStyle, 16559 setStyles: setStyles, 16560 capitalize: capitalize, 16561 isString: isString, 16562 isFunction: isFunction, 16563 isObject: isObject,
16564 forEachObject: forEachObject, 16565 floatEquals: floatEquals, 16566 removeChildren: removeChildren, 16567 }; 16568 var Tweenable = shifty_node.Tweenable, 16569 EASING_ALIASES = { 16570 easeIn: 'easeInCubic', 16571 easeOut: 'easeOutCubic', 16572 easeInOut: 'easeInOutCubic', 16573 }, 16574 Path = function t(e, s) { 16575 if (!(this instanceof t)) 16576 throw new Error('Constructor was called without new keyword'); 16577 var o; 16578 (s = utils$1.extend( 16579 { 16580 delay: 0, 16581 duration: 800, 16582 easing: 'linear', 16583 from: {}, 16584 to: {}, 16585 step: function () { }, 16586 }, 16587 s 16588 )), 16589 (o = utils$1.isString(e) ? document.querySelector(e) : e), 16590 (this.path = o), 16591 (this._opts = s), 16592 (this._tweenable = null); 16593 var i = this.path.getTotalLength(); 16594 (this.path.style.strokeDasharray = i + ' ' + i), this.set(0); 16595 }; 16596 (Path.prototype.value = function () { 16597 var t = this._getComputedDashOffset(), 16598 e = this.path.getTotalLength(); 16599 return parseFloat((1 - t / e).toFixed(6), 10); 16600 }), 16601 (Path.prototype.set = function (t) { 16602 this.stop(), 16603 (this.path.style.strokeDashoffset = this._progressToOffset(t)); 16604 var e = this._opts.step; 16605 if (utils$1.isFunction(e)) { 16606 var s = this._easing(this._opts.easing); 16607 e( 16608 this._calculateTo(t, s), 16609 this._opts.shape || this, 16610 this._opts.attachment 16611 ); 16612 } 16613 }), 16614 (Path.prototype.stop = function () { 16615 this._stopTween(), 16616 (this.path.style.strokeDashoffset = this._getComputedDashOffset()); 16617 }), 16618 (Path.prototype.animate = function (t, e, s) { 16619 (e = e || {}), utils$1.isFunction(e) && ((s = e), (e = {})); 16620 var o = utils$1.extend({}, e), 16621 i = utils$1.extend({}, this._opts); 16622 e = utils$1.extend(i, e); 16623 var a = this._easing(e.easing), 16624 n = this._resolveFromAndTo(t, a, o); 16625 this.stop(), this.path.getBoundingClientRect(); 16626 var r = this._getComputedDashOffset(), 16627 h = this._progressToOffset(t), 16628 p = this; 16629 (this._tweenable = new Tweenable()), 16630 this._tweenable 16631 .tween({ 16632 from: utils$1.extend({ offset: r }, n.from), 16633 to: utils$1.extend({ offset: h }, n.to), 16634 duration: e.duration, 16635 delay: e.delay, 16636 easing: a, 16637 step: function (t) { 16638 p.path.style.strokeDashoffset = t.offset; 16639 var s = e.shape || p; 16640 e.step(t, s, e.attachment); 16641 }, 16642 }) 16643 .then(function (t) { 16644 utils$1.isFunction(s) && s(); 16645 }); 16646 }), 16647 (Path.prototype._getComputedDashOffset = function () { 16648 var t = window.getComputedStyle(this.path, null); 16649 return parseFloat(t.getPropertyValue('stroke-dashoffset'), 10); 16650 }), 16651 (Path.prototype._progressToOffset = function (t) { 16652 var e = this.path.getTotalLength(); 16653 return e - t * e; 16654 }), 16655 (Path.prototype._resolveFromAndTo = function (t, e, s) { 16656 return s.from && s.to 16657 ? { from: s.from, to: s.to } 16658 : { from: this._calculateFrom(e), to: this._calculateTo(t, e) }; 16659 }), 16660 (Path.prototype._calculateFrom = function (t) { 16661 return shifty_node.interpolate( 16662 this._opts.from, 16663 this._opts.to, 16664 this.value(), 16665 t 16666 ); 16667 }), 16668 (Path.prototype._calculateTo = function (t, e) { 16669 return shifty_node.interpolate( 16670 this._opts.from, 16671 this._opts.to, 16672 t, 16673 e 16674 ); 16675 }), 16676 (Path.prototype._stopTween = function () { 16677 null !== this._tweenable && 16678 (this._tweenable.stop(), (this._tweenable = null)); 16679 }), 16680 (Path.prototype._easing = function (t) { 16681 return EASING_ALIASES.hasOwnProperty(t) ? EASING_ALIASES[t] : t; 16682 }); 16683 var path = Path; 16684 var DESTROYED_ERROR = 'Object is destroyed', 16685 Shape = function t(e, r) { 16686 if (!(this instanceof t)) 16687 throw new Error('Constructor was called without new keyword'); 16688 if (0 !== arguments.length) { 16689 (this._opts = utils$1.extend( 16690 { 16691 color: '#555', 16692 strokeWidth: 1, 16693 trailColor: null, 16694 trailWidth: null, 16695 fill: null, 16696 text: { 16697 style: { 16698 color: null, 16699 position: 'absolute', 16700 left: '50%', 16701 top: '50%', 16702 padding: 0, 16703 margin: 0, 16704 transform: { 16705 prefix: !0, 16706 value: 'translate(-50%, -50%)', 16707 }, 16708 }, 16709 autoStyleContainer: !0, 16710 alignToBottom: !0, 16711 value: null, 16712 className: 'progressbar-text', 16713 }, 16714 svgStyle: { display: 'block', width: '100%' }, 16715 warnings: !1, 16716 }, 16717 r, 16718 !0 16719 )), 16720 utils$1.isObject(r) && 16721 void 0 !== r.svgStyle && 16722 (this._opts.svgStyle = r.svgStyle), 16723 utils$1.isObject(r) && 16724 utils$1.isObject(r.text) && 16725 void 0 !== r.text.style && 16726 (this._opts.text.style = r.text.style); 16727 var i, 16728 s = this._createSvgView(this._opts); 16729 if (!(i = utils$1.isString(e) ? document.querySelector(e) : e)) 16730 throw new Error('Container does not exist: ' + e); 16731 (this._container = i), 16732 this._container.appendChild(s.svg), 16733 this._opts.warnings && 16734 this._warnContainerAspectRatio(this._container), 16735 this._opts.svgStyle && 16736 utils$1.setStyles(s.svg, this._opts.svgStyle), 16737 (this.svg = s.svg), 16738 (this.path = s.path), 16739 (this.trail = s.trail), 16740 (this.text = null); 16741 var o = utils$1.extend( 16742 { attachment: void 0, shape: this }, 16743 this._opts 16744 ); 16745 (this._progressPath = new path(s.path, o)), 16746 utils$1.isObject(this._opts.text) && 16747 null !== this._opts.text.value && 16748 this.setText(this._opts.text.value); 16749 } 16750 }; 16751 (Shape.prototype.animate = function (t, e, r) { 16752 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16753 this._progressPath.animate(t, e, r); 16754 }), 16755 (Shape.prototype.stop = function () { 16756 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16757 void 0 !== this._progressPath && this._progressPath.stop(); 16758 }), 16759 (Shape.prototype.pause = function () { 16760 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16761 void 0 !== this._progressPath && 16762 this._progressPath._tweenable && 16763 this._progressPath._tweenable.pause(); 16764 }), 16765 (Shape.prototype.resume = function () { 16766 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16767 void 0 !== this._progressPath && 16768 this._progressPath._tweenable && 16769 this._progressPath._tweenable.resume(); 16770 }), 16771 (Shape.prototype.destroy = function () { 16772 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16773 this.stop(), 16774 this.svg.parentNode.removeChild(this.svg), 16775 (this.svg = null),
16776 (this.path = null), 16777 (this.trail = null), 16778 (this._progressPath = null), 16779 null !== this.text && 16780 (this.text.parentNode.removeChild(this.text), 16781 (this.text = null)); 16782 }), 16783 (Shape.prototype.set = function (t) { 16784 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16785 this._progressPath.set(t); 16786 }), 16787 (Shape.prototype.value = function () { 16788 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16789 return void 0 === this._progressPath 16790 ? 0 16791 : this._progressPath.value(); 16792 }), 16793 (Shape.prototype.setText = function (t) { 16794 if (null === this._progressPath) throw new Error(DESTROYED_ERROR); 16795 null === this.text && 16796 ((this.text = this._createTextContainer( 16797 this._opts, 16798 this._container 16799 )), 16800 this._container.appendChild(this.text)), 16801 utils$1.isObject(t) 16802 ? (utils$1.removeChildren(this.text), 16803 this.text.appendChild(t)) 16804 : (this.text.innerHTML = t); 16805 }), 16806 (Shape.prototype._createSvgView = function (t) { 16807 var e = document.createElementNS( 16808 'http://www.w3.org/2000/svg', 16809 'svg' 16810 ); 16811 this._initializeSvg(e, t); 16812 var r = null; 16813 (t.trailColor || t.trailWidth) && 16814 ((r = this._createTrail(t)), e.appendChild(r)); 16815 var i = this._createPath(t); 16816 return e.appendChild(i), { svg: e, path: i, trail: r }; 16817 }), 16818 (Shape.prototype._initializeSvg = function (t, e) { 16819 t.setAttribute('viewBox', '0 0 100 100'); 16820 }), 16821 (Shape.prototype._createPath = function (t) { 16822 var e = this._pathString(t); 16823 return this._createPathElement(e, t); 16824 }), 16825 (Shape.prototype._createTrail = function (t) { 16826 var e = this._trailString(t), 16827 r = utils$1.extend({}, t); 16828 return ( 16829 r.trailColor || (r.trailColor = '#eee'), 16830 r.trailWidth || (r.trailWidth = r.strokeWidth), 16831 (r.color = r.trailColor), 16832 (r.strokeWidth = r.trailWidth), 16833 (r.fill = null), 16834 this._createPathElement(e, r) 16835 ); 16836 }), 16837 (Shape.prototype._createPathElement = function (t, e) { 16838 var r = document.createElementNS( 16839 'http://www.w3.org/2000/svg', 16840 'path' 16841 ); 16842 return ( 16843 r.setAttribute('d', t), 16844 r.setAttribute('stroke', e.color), 16845 r.setAttribute('stroke-width', e.strokeWidth), 16846 e.fill 16847 ? r.setAttribute('fill', e.fill) 16848 : r.setAttribute('fill-opacity', '0'), 16849 r 16850 ); 16851 }), 16852 (Shape.prototype._createTextContainer = function (t, e) { 16853 var r = document.createElement('div'); 16854 r.className = t.text.className; 16855 var i = t.text.style; 16856 return ( 16857 i && 16858 (t.text.autoStyleContainer && 16859 (e.style.position = 'relative'), 16860 utils$1.setStyles(r, i), 16861 i.color || (r.style.color = t.color)), 16862 this._initializeTextContainer(t, e, r), 16863 r 16864 ); 16865 }), 16866 (Shape.prototype._initializeTextContainer = function (t, e, r) { }), 16867 (Shape.prototype._pathString = function (t) { 16868 throw new Error('Override this function for each progress bar'); 16869 }), 16870 (Shape.prototype._trailString = function (t) { 16871 throw new Error('Override this function for each progress bar'); 16872 }), 16873 (Shape.prototype._warnContainerAspectRatio = function (t) { 16874 if (this.containerAspectRatio) { 16875 var e = window.getComputedStyle(t, null), 16876 r = parseFloat(e.getPropertyValue('width'), 10), 16877 i = parseFloat(e.getPropertyValue('height'), 10); 16878 utils$1.floatEquals(this.containerAspectRatio, r / i) || 16879 (console.warn( 16880 'Incorrect aspect ratio of container', 16881 '#' + t.id, 16882 'detected:', 16883 e.getPropertyValue('width') + '(width)', 16884 '/', 16885 e.getPropertyValue('height') + '(height)', 16886 '=', 16887 r / i 16888 ), 16889 console.warn( 16890 'Aspect ratio of should be', 16891 this.containerAspectRatio 16892 )); 16893 } 16894 }); 16895 var shape = Shape; 16896 var Line = function (t, e) { 16897 (this._pathTemplate = 'M 0,{center} L 100,{center}'), 16898 shape.apply(this, arguments); 16899 }; 16900 (Line.prototype = new shape()), 16901 (Line.prototype.constructor = Line), 16902 (Line.prototype._initializeSvg = function (t, e) { 16903 t.setAttribute('viewBox', '0 0 100 ' + e.strokeWidth), 16904 t.setAttribute('preserveAspectRatio', 'none'); 16905 }), 16906 (Line.prototype._pathString = function (t) { 16907 return utils$1.render(this._pathTemplate, { 16908 center: t.strokeWidth / 2, 16909 }); 16910 }), 16911 (Line.prototype._trailString = function (t) { 16912 return this._pathString(t); 16913 }); 16914 var line = Line; 16915 var Circle = function (r, t) { 16916 (this._pathTemplate = 16917 'M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}'), 16918 (this.containerAspectRatio = 1), 16919 shape.apply(this, arguments); 16920 }; 16921 (Circle.prototype = new shape()), 16922 (Circle.prototype.constructor = Circle), 16923 (Circle.prototype._pathString = function (r) { 16924 var t = r.strokeWidth; 16925 r.trailWidth && r.trailWidth > r.strokeWidth && (t = r.trailWidth); 16926 var i = 50 - t / 2; 16927 return utils$1.render(this._pathTemplate, { 16928 radius: i, 16929 '2radius': 2 * i, 16930 }); 16931 }), 16932 (Circle.prototype._trailString = function (r) { 16933 return this._pathString(r); 16934 }); 16935 var circle = Circle; 16936 var SemiCircle = function (t, i) { 16937 (this._pathTemplate = 16938 'M 50,50 m -{radius},0 a {radius},{radius}
16938 0 1 1 {2radius},0'), 16939 (this.containerAspectRatio = 2), 16940 shape.apply(this, arguments); 16941 }; 16942 (SemiCircle.prototype = new shape()), 16943 (SemiCircle.prototype.constructor = SemiCircle), 16944 (SemiCircle.prototype._initializeSvg = function (t, i) { 16945 t.setAttribute('viewBox', '0 0 100 50'); 16946 }), 16947 (SemiCircle.prototype._initializeTextContainer = function (t, i, e) { 16948 t.text.style && 16949 ((e.style.top = 'auto'), 16950 (e.style.bottom = '0'), 16951 t.text.alignToBottom 16952 ? utils$1.setStyle(e, 'transform', 'translate(-50%, 0)') 16953 : utils$1.setStyle(e, 'transform', 'translate(-50%, 50%)')); 16954 }), 16955 (SemiCircle.prototype._pathString = circle.prototype._pathString), 16956 (SemiCircle.prototype._trailString = circle.prototype._trailString); 16957 var semicircle = SemiCircle; 16958 var Square = function (t, r) { 16959 (this._pathTemplate = 16960 'M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}'), 16961 (this._trailTemplate = 16962 'M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}'), 16963 shape.apply(this, arguments); 16964 }; 16965 (Square.prototype = new shape()), 16966 (Square.prototype.constructor = Square), 16967 (Square.prototype._pathString = function (t) { 16968 var r = 100 - t.strokeWidth / 2; 16969 return utils$1.render(this._pathTemplate, { 16970 width: r, 16971 strokeWidth: t.strokeWidth, 16972 halfOfStrokeWidth: t.strokeWidth / 2, 16973 }); 16974 }), 16975 (Square.prototype._trailString = function (t) { 16976 var r = 100 - t.strokeWidth / 2; 16977 return utils$1.render(this._trailTemplate, { 16978 width: r, 16979 strokeWidth: t.strokeWidth, 16980 halfOfStrokeWidth: t.strokeWidth / 2, 16981 startMargin: t.strokeWidth / 2 - t.trailWidth / 2, 16982 }); 16983 }); 16984 var square = Square; 16985 var main = { 16986 Line: line, 16987 Circle: circle, 16988 SemiCircle: semicircle, 16989 Square: square, 16990 Path: path, 16991 Shape: shape, 16992 utils: utils$1, 16993 }; 16994 const NAME$7 = 'progressdonut', 16995 SELECTOR_DONUT$1 = '[data-bs-progress-donut]', 16996 Default$3 = { 16997 color: '#0073E6', 16998 trailColor: '#D4E9FF', 16999 strokeWidth: 24, 17000 trailWidth: 12, 17001 easing: 'easeInOut', 17002 duration: 1400, 17003 text: { autoStyleContainer: !1 }, 17004 animate: !0, 17005 value: 0, 17006 }; 17007 class ProgressDonut extends BaseComponent { 17008 constructor(t, e) { 17009 super(t), 17010 (this._config = this._getConfig(e)), 17011 (this._bar = null), 17012 this._init(); 17013 } 17014 static get NAME() { 17015 return NAME$7; 17016 } 17017 set(t) { 17018 this._config.animate ? this._bar.animate(t) : this._bar.set(t); 17019 } 17020 dispose() { 17021 this._bar.destroy(), super.dispose(); 17022 } 17023 _getConfig(t) { 17024 return (t = { 17025 ...Default$3, 17026 step: this._getStepCallback(), 17027 ...Manipulator.getDataAttributes(this._element), 17028 ...('object' == typeof t ? t : {}), 17029 }); 17030 } 17031 _getStepCallback() { 17032 return (t, e) => { 17033 const s = Math.round(100 * e.value()); 17034 e.setText(s + '%'); 17035 }; 17036 } 17037 _init() { 17038 (this._bar = new main.Circle(this._element, this._config)), 17039 this._config.value > 0 && this.set(this._config.value); 17040 } 17041 } 17042 SelectorEngine$1.find(SELECTOR_DONUT$1).forEach((t) => { 17043 ProgressDonut.getOrCreateInstance(t); 17044 }); 17045 var ProgressDonut$1 = ProgressDonut; 17046 const NAME$6 = 'upload', 17047 SELECTOR_FORM = '[data-bs-upload-dragdrop]', 17048 SELECTOR_DONUT = '[data-bs-progress-donut]'; 17049 class UploadDragDrop extends BaseComponent { 17050 constructor(e) { 17051 super(e); 17052 const t = SelectorEngine$1.findOne(SELECTOR_DONUT, this._element); 17053 t && (this._donut = ProgressDonut$1.getOrCreateInstance(t)), 17054 this._bindEvents(); 17055 } 17056 static get NAME() { 17057 return NAME$6; 17058 } 17059 progress(e) { 17060 this._donut.set(e); 17061 } 17062 start() { 17063 this.reset(), this._element.classList.add('loading'); 17064 } 17065 success() { 17066 this._element.classList.remove('loading'), 17067 this._element.classList.add('success'); 17068 } 17069 reset() { 17070 this._element.classList.remove('loading'), 17071 this._element.classList.remove('success'), 17072 this._donut.set(0); 17073 } 17074 dispose() { 17075 this._donut.dispose(), super.dispose(); 17076 } 17077 _bindEvents() { 17078 EventHandler$1.on(this._element, 'drag', (e) => 17079 this._preventEvent(e) 17080 ), 17081 EventHandler$1.on(this._element, 'dragstart', (e) => 17082 this._preventEvent(e) 17083 ), 17084 EventHandler$1.on(this._element, 'dragend', (e) => 17085 this._preventEvent(e) 17086 ), 17087 EventHandler$1.on(this._element, 'dragover', (e) => 17088 this._preventEvent(e) 17089 ), 17090 EventHandler$1.on(this._element, 'dragenter', (e) => 17091 this._preventEvent(e) 17092 ), 17093 EventHandler$1.on(this._element, 'dragleave', (e) => 17094 this._preventEvent(e) 17095 ), 17096 EventHandler$1.on(this._element, 'drop', (e) => 17097 this._preventEvent(e) 17098 ), 17099 EventHandler$1.on(this._element, 'dragover', () => 17100 this._dropIn() 17101 ), 17102 EventHandler$1.on(this._element, 'dragenter', () => 17103 this._dropIn() 17104 ), 17105 EventHandler$1.on(this._element, 'dragleave', () => 17106 this._dropOut() 17107 ), 17108 EventHandler$1.on(this._element, 'dragend', () => 17109 this._dropOut() 17110 ), 17111 EventHandler$1.on(this._element, 'drop', () => this._dropOut()), 17112 EventHandler$1.on(this._element, 'drop', () => this._drop()); 17113 } 17114 _preventEvent(e) { 17115 e.preventDefault(), e.stopPropagation(); 17116 } 17117 _dropIn() { 17118 this._isSuccess() || this._element.classList.add('dragover'); 17119 } 17120 _dropOut() { 17121 this._isSuccess() || this._element.classList.remove('dragover'); 17122 } 17123 _drop() { 17124 this._isSuccess() || this.start(); 17125 } 17126 _isSuccess() { 17127 return this._element.classList.contains('success'); 17128 } 17129 }
17130 SelectorEngine$1.find(SELECTOR_FORM).forEach((e) => { 17131 UploadDragDrop.getOrCreateInstance(e); 17132 }); 17133 var UploadDragDrop$1 = UploadDragDrop; 17134 const NAME$5 = 'backtotop', 17135 DATA_KEY$2 = 'bs.backtotop', 17136 EVENT_KEY$2 = `.${DATA_KEY$2}`, 17137 EVENT_CLICK$4 = `click${EVENT_KEY$2}`, 17138 CLASS_NAME_SHOW = 'back-to-top-show', 17139 SELECTOR_TOGGLE$2 = '[data-bs-toggle="backtotop"]', 17140 Default$2 = { 17141 positionTop: 0, 17142 scrollLimit: 100, 17143 duration: 800, 17144 easing: 'easeInOutSine', 17145 }; 17146 class BackToTop extends BaseComponent { 17147 constructor(o, t) { 17148 super(o), 17149 (this._config = this._getConfig(t)), 17150 (this._scrollCb = null), 17151 (this._isAnim = !1), 17152 (this._prevScrollBehavior = ''), 17153 this._bindEvents(); 17154 } 17155 static get NAME() { 17156 return NAME$5; 17157 } 17158 show() { 17159 this._element.classList.contains(CLASS_NAME_SHOW) || 17160 this._element.classList.add(CLASS_NAME_SHOW); 17161 } 17162 hide() { 17163 this._element.classList.contains(CLASS_NAME_SHOW) && 17164 this._element.classList.remove(CLASS_NAME_SHOW); 17165 } 17166 toggleShow() { 17167 document.scrollingElement.scrollTop > this._config.scrollLimit 17168 ? this.show() 17169 : this.hide(); 17170 } 17171 scrollToTop() { 17172 this._isAnim || 17173 ((this._isAnim = !0), 17174 documentScrollTo(this._config.positionTop, { 17175 duration: this._config.duration, 17176 easing: this._config.easing, 17177 complete: () => { 17178 this._isAnim = !1; 17179 }, 17180 })); 17181 } 17182 dispose() { 17183 this._scrollCb && this._scrollCb.dispose(), super.dispose(); 17184 } 17185 _getConfig(o) { 17186 return (o = { 17187 ...Default$2, 17188 ...Manipulator.getDataAttributes(this._element), 17189 ...('object' == typeof o ? o : {}), 17190 }); 17191 } 17192 _bindEvents() { 17193 (this._scrollCb = onDocumentScroll$1(() => this.toggleShow())), 17194 EventHandler$1.on(this._element, EVENT_CLICK$4, (o) => { 17195 o.preventDefault(), this.scrollToTop(); 17196 }); 17197 } 17198 } 17199 const dataApiCb = onDocumentScroll$1(() => { 17200 SelectorEngine$1.find(SELECTOR_TOGGLE$2).forEach((o) => { 17201 BackToTop.getOrCreateInstance(o).toggleShow(); 17202 }), 17203 dataApiCb.dispose(); 17204 }); 17205 var BackToTop$1 = BackToTop; 17206 const NAME$4 = 'historyback', 17207 DATA_KEY$1 = 'bs.historyback', 17208 EVENT_KEY$1 = `.${DATA_KEY$1}`, 17209 EVENT_CLICK$3 = `click${EVENT_KEY$1}`, 17210 EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$1}.data-api`, 17211 SELECTOR_TOGGLE$1 = '[data-bs-toggle="historyback"]'; 17212 class HistoryBack extends BaseComponent { 17213 constructor(t) { 17214 super(t), this._bindEvents(); 17215 } 17216 static get NAME() { 17217 return NAME$4; 17218 } 17219 back() { 17220 window.history.back(); 17221 } 17222 _bindEvents() { 17223 EventHandler$1.on(this._element, EVENT_CLICK$3, (t) => { 17224 t.preventDefault(), this.back(); 17225 }); 17226 } 17227 } 17228 const toggles$1 = SelectorEngine$1.find(SELECTOR_TOGGLE$1); 17229 toggles$1.forEach((t) => { 17230 EventHandler$1.one(t, EVENT_CLICK_DATA_API$2, (e) => { 17231 e.preventDefault(); 17232 HistoryBack.getOrCreateInstance(t).back(); 17233 }); 17234 }); 17235 var HistoryBack$1 = HistoryBack; 17236 const NAME$3 = 'historyback', 17237 DATA_KEY = 'bs.historyback', 17238 EVENT_KEY = `.${DATA_KEY}`, 17239 EVENT_CLICK$2 = `click${EVENT_KEY}`, 17240 EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY}.data-api`, 17241 SELECTOR_TOGGLE = '[data-bs-toggle="forward"]', 17242 Default$1 = { duration: 800, easing: 'easeInOutSine' }; 17243 class Forward extends BaseComponent { 17244 constructor(t, e) { 17245 super(t), (this._config = this._getConfig(e)), this._bindEvents(); 17246 } 17247 static get NAME() { 17248 return NAME$3; 17249 } 17250 goToTarget() { 17251 const t = getElementFromSelector(this._element); 17252 t && 17253 documentScrollTo(t.offsetTop, { 17254 duration: this._config.duration, 17255 easing: this._config.easing, 17256 }); 17257 } 17258 _getConfig(t) { 17259 return (t = { 17260 ...Default$1, 17261 ...Manipulator.getDataAttributes(this._element), 17262 ...('object' == typeof t ? t : {}), 17263 }); 17264 } 17265 _bindEvents() { 17266 EventHandler$1.on(this._element, EVENT_CLICK$2, (t) => { 17267 t.preventDefault(), this.goToTarget(); 17268 }); 17269 } 17270 } 17271 const toggles = SelectorEngine$1.find(SELECTOR_TOGGLE);
17272 toggles.forEach((t) => { 17273 EventHandler$1.one(t, EVENT_CLICK_DATA_API$1, (e) => { 17274 e.preventDefault(); 17275 Forward.getOrCreateInstance(t).goToTarget(); 17276 }); 17277 }); 17278 var Forward$1 = Forward; 17279 var evEmitter = createCommonjsModule(function (e) { 17280 var t, n; 17281 (t = 'undefined' != typeof window ? window : commonjsGlobal), 17282 (n = function () { 17283 function e() { } 17284 var t = e.prototype; 17285 return ( 17286 (t.on = function (e, t) { 17287 if (e && t) { 17288 var n = (this._events = this._events || {}), 17289 s = (n[e] = n[e] || []); 17290 return -1 == s.indexOf(t) && s.push(t), this; 17291 } 17292 }), 17293 (t.once = function (e, t) { 17294 if (e && t) { 17295 this.on(e, t); 17296 var n = (this._onceEvents = this._onceEvents || {}); 17297 return ((n[e] = n[e] || {})[t] = !0), this; 17298 } 17299 }), 17300 (t.off = function (e, t) { 17301 var n = this._events && this._events[e]; 17302 if (n && n.length) { 17303 var s = n.indexOf(t); 17304 return -1 != s && n.splice(s, 1), this; 17305 } 17306 }), 17307 (t.emitEvent = function (e, t) { 17308 var n = this._events && this._events[e]; 17309 if (n && n.length) { 17310 (n = n.slice(0)), (t = t || []); 17311 for ( 17312 var s = this._onceEvents && this._onceEvents[e], 17313 o = 0; 17314 o < n.length; 17315 o++ 17316 ) { 17317 var i = n[o]; 17318 s && s[i] && (this.off(e, i), delete s[i]), 17319 i.apply(this, t); 17320 } 17321 return this; 17322 } 17323 }), 17324 (t.allOff = function () { 17325 delete this._events, delete this._onceEvents; 17326 }), 17327 e 17328 ); 17329 }), 17330 e.exports ? (e.exports = n()) : (t.EvEmitter = n()); 17331 }); 17332 var getSize = createCommonjsModule(function (t) { 17333 /*! 17334 * getSize v2.0.3 17335 * measure size of elements 17336 * MIT license 17337 */ 17338 !(function (e, i) { 17339 t.exports ? (t.exports = i()) : (e.getSize = i()); 17340 })(window, function () { 17341 function t(t) { 17342 var e = parseFloat(t); 17343 return -1 == t.indexOf('%') && !isNaN(e) && e; 17344 } 17345 var e = 17346 'undefined' == typeof console 17347 ? function () { } 17348 : function (t) { 17349 console.error(t); 17350 }, 17351 i = [ 17352 'paddingLeft', 17353 'paddingRight', 17354 'paddingTop', 17355 'paddingBottom', 17356 'marginLeft', 17357 'marginRight', 17358 'marginTop', 17359 'marginBottom', 17360 'borderLeftWidth', 17361 'borderRightWidth', 17362 'borderTopWidth', 17363 'borderBottomWidth', 17364 ], 17365 o = i.length; 17366 function r(t) { 17367 var i = getComputedStyle(t); 17368 return ( 17369 i || 17370 e( 17371 'Style returned ' + 17372 i + 17373 '. Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1' 17374 ), 17375 i 17376 ); 17377 } 17378 var n, 17379 d = !1; 17380 function h(e) { 17381 if ( 17382 ((function () { 17383 if (!d) { 17384 d = !0; 17385 var e = document.createElement('div'); 17386 (e.style.width = '200px'), 17387 (e.style.padding = '1px 2px 3px 4px'), 17388 (e.style.borderStyle = 'solid'), 17389 (e.style.borderWidth = '1px 2px 3px 4px'), 17390 (e.style.boxSizing = 'border-box'); 17391 var i = document.body || document.documentElement; 17392 i.appendChild(e); 17393 var o = r(e); 17394 (n = 200 == Math.round(t(o.width))), 17395 (h.isBoxSizeOuter = n), 17396 i.removeChild(e); 17397 } 17398 })(), 17399 'string' == typeof e && (e = document.querySelector(e)), 17400 e && 'object' == typeof e && e.nodeType) 17401 ) { 17402 var a = r(e); 17403 if ('none' == a.display) 17404 return (function () { 17405 for ( 17406 var t = { 17407 width: 0, 17408 height: 0, 17409 innerWidth: 0, 17410 innerHeight: 0, 17411 outerWidth: 0, 17412 outerHeight: 0, 17413 }, 17414 e = 0; 17415 e < o; 17416 e++ 17417 ) 17418 t[i[e]] = 0; 17419 return t; 17420 })(); 17421 var p = {}; 17422 (p.width = e.offsetWidth), (p.height = e.offsetHeight); 17423 for ( 17424 var g = (p.isBorderBox = 'border-box' == a.boxSizing), 17425 u = 0; 17426 u < o; 17427 u++ 17428 ) { 17429 var s = i[u], 17430 m = a[s], 17431 f = parseFloat(m); 17432 p[s] = isNaN(f) ? 0 : f; 17433 } 17434 var l = p.paddingLeft + p.paddingRight, 17435 c = p.paddingTop + p.paddingBottom, 17436 x = p.marginLeft + p.marginRight, 17437 b = p.marginTop + p.marginBottom, 17438 v = p.borderLeftWidth + p.borderRightWidth, 17439 y = p.borderTopWidth + p.borderBottomWidth, 17440 W = g && n, 17441 S = t(a.width); 17442 !1 !== S && (p.width = S + (W ? 0 : l + v)); 17443 var w = t(a.height); 17444 return ( 17445 !1 !== w && (p.height = w + (W ? 0 : c + y)), 17446 (p.innerWidth = p.width - (l + v)), 17447 (p.innerHeight = p.height - (c + y)), 17448 (p.outerWidth = p.width + x), 17449 (p.outerHeight = p.height + b), 17450 p 17451 ); 17452 } 17453 } 17454 return h; 17455 }); 17456 }); 17457 var matchesSelector = createCommonjsModule(function (e) { 17458 !(function (t, r) { 17459 e.exports ? (e.exports = r()) : (t.matchesSelector = r()); 17460 })(window, function () { 17461 var e = (function () { 17462 var e = window.Element.prototype; 17463 if (e.matches) return 'matches'; 17464 if (e.matchesSelector) return 'matchesSelector'; 17465 for ( 17466 var t = ['webkit', 'moz', 'ms', 'o'], r = 0; 17467 r < t.length; 17468 r++ 17469 ) { 17470 var o = t[r] + 'MatchesSelector'; 17471 if (e[o]) return o; 17472 } 17473 })(); 17474 return function (t, r) { 17475 return t[e](r); 17476 }; 17477 }); 17478 }); 17479 var utils = createCommonjsModule(function (e) { 17480 !(function (t, r) { 17481 e.exports 17482 ? (e.exports = r(t, matchesSelector)) 17483 : (t.fizzyUIUtils = r(t, t.matchesSelector)); 17484 })(window, function (e, t) { 17485 var r = { 17486 extend: function (e, t) { 17487 for (var r in t) e[r] = t[r]; 17488 return e; 17489 }, 17490 modulo: function (e, t) { 17491 return ((e % t) + t) % t; 17492 }, 17493 }, 17494 o = Array.prototype.slice; 17495 (r.makeArray = function (e) { 17496 return Array.isArray(e) 17497 ? e 17498 : null == e 17499 ? [] 17500 : 'object' == typeof e && 'number' == typeof e.length 17501 ? o.call(e) 17502 : [e]; 17503 }), 17504 (r.removeFrom = function (e, t) { 17505 var r = e.indexOf(t); 17506 -1 != r && e.splice(r, 1); 17507 }), 17508 (r.getParent = function (e, r) { 17509 for (; e.parentNode && e != document.body;) 17510 if (((e = e.parentNode), t(e, r))) return e; 17511 }), 17512 (r.getQueryElement = function (e) { 17513 return 'string' == typeof e ? document.querySelector(e) : e; 17514 }), 17515 (r.handleEvent = function (e) { 17516 var t = 'on' + e.type; 17517 this[t] && this[t](e); 17518 }), 17519 (r.filterFindElements = function (e, o) { 17520 e = r.makeArray(e); 17521 var n = []; 17522 return ( 17523 e.forEach(function (e) { 17524 if (e instanceof HTMLElement) 17525 if (o) { 17526 t(e, o) && n.push(e); 17527 for ( 17528 var r = e.querySelectorAll(
17528o), u = 0; 17529 u < r.length; 17530 u++ 17531 ) 17532 n.push(r[u]); 17533 } else n.push(e); 17534 }), 17535 n 17536 ); 17537 }), 17538 (r.debounceMethod = function (e, t, r) { 17539 r = r || 100; 17540 var o = e.prototype[t], 17541 n = t + 'Timeout'; 17542 e.prototype[t] = function () { 17543 var e = this[n]; 17544 clearTimeout(e); 17545 var t = arguments, 17546 u = this; 17547 this[n] = setTimeout(function () { 17548 o.apply(u, t), delete u[n]; 17549 }, r); 17550 }; 17551 }), 17552 (r.docReady = function (e) { 17553 var t = document.readyState; 17554 'complete' == t || 'interactive' == t 17555 ? setTimeout(e) 17556 : document.addEventListener('DOMContentLoaded', e); 17557 }), 17558 (r.toDashed = function (e) { 17559 return e 17560 .replace(/(.)([A-Z])/g, function (e, t, r) { 17561 return t + '-' + r; 17562 }) 17563 .toLowerCase(); 17564 }); 17565 var n = e.console; 17566 return ( 17567 (r.htmlInit = function (t, o) { 17568 r.docReady(function () { 17569 var u = r.toDashed(o), 17570 a = 'data-' + u, 17571 i = document.querySelectorAll('[' + a + ']'), 17572 c = document.querySelectorAll('.js-' + u), 17573 s = r.makeArray(i).concat(r.makeArray(c)), 17574 l = a + '-options', 17575 m = e.jQuery; 17576 s.forEach(function (e) { 17577 var r, 17578 u = e.getAttribute(a) || e.getAttribute(l); 17579 try { 17580 r = u && JSON.parse(u); 17581 } catch (t) { 17582 return void ( 17583 n && 17584 n.error( 17585 'Error parsing ' + 17586 a + 17587 ' on ' + 17588 e.className + 17589 ': ' + 17590 t 17591 ) 17592 ); 17593 } 17594 var i = new t(e, r); 17595 m && m.data(e, o, i); 17596 }); 17597 }); 17598 }), 17599 r 17600 ); 17601 }); 17602 }); 17603 var item = createCommonjsModule(function (t) { 17604 !(function (i, n) { 17605 t.exports 17606 ? (t.exports = n(evEmitter, getSize)) 17607 : ((i.Outlayer = {}), 17608 (i.Outlayer.Item = n(i.EvEmitter, i.getSize))); 17609 })(window, function (t, i) { 17610 var n = document.documentElement.style, 17611 o = 17612 'string' == typeof n.transition 17613 ? 'transition' 17614 : 'WebkitTransition', 17615 e = 17616 'string' == typeof n.transform 17617 ? 'transform' 17618 : 'WebkitTransform', 17619 s = { 17620 WebkitTransition: 'webkitTransitionEnd', 17621 transition: 'transitionend', 17622 }[o], 17623 r = { 17624 transform: e, 17625 transition: o, 17626 transitionDuration: o + 'Duration', 17627 transitionProperty: o + 'Property', 17628 transitionDelay: o + 'Delay', 17629 }; 17630 function a(t, i) { 17631 t && 17632 ((this.element = t),
17633 (this.layout = i), 17634 (this.position = { x: 0, y: 0 }), 17635 this._create()); 17636 } 17637 var h = (a.prototype = Object.create(t.prototype)); 17638 (h.constructor = a), 17639 (h._create = function () { 17640 (this._transn = { 17641 ingProperties: {}, 17642 clean: {}, 17643 onEnd: {}, 17644 }), 17645 this.css({ position: 'absolute' }); 17646 }), 17647 (h.handleEvent = function (t) { 17648 var i = 'on' + t.type; 17649 this[i] && this[i](t); 17650 }), 17651 (h.getSize = function () { 17652 this.size = i(this.element); 17653 }), 17654 (h.css = function (t) { 17655 var i = this.element.style; 17656 for (var n in t) { 17657 i[r[n] || n] = t[n]; 17658 } 17659 }), 17660 (h.getPosition = function () { 17661 var t = getComputedStyle(this.element), 17662 i = this.layout._getOption('originLeft'), 17663 n = this.layout._getOption('originTop'), 17664 o = t[i ? 'left' : 'right'], 17665 e = t[n ? 'top' : 'bottom'], 17666 s = parseFloat(o), 17667 r = parseFloat(e), 17668 a = this.layout.size; 17669 -1 != o.indexOf('%') && (s = (s / 100) * a.width), 17670 -1 != e.indexOf('%') && (r = (r / 100) * a.height), 17671 (s = isNaN(s) ? 0 : s), 17672 (r = isNaN(r) ? 0 : r), 17673 (s -= i ? a.paddingLeft : a.paddingRight), 17674 (r -= n ? a.paddingTop : a.paddingBottom), 17675 (this.position.x = s), 17676 (this.position.y = r); 17677 }), 17678 (h.layoutPosition = function () { 17679 var t = this.layout.size, 17680 i = {}, 17681 n = this.layout._getOption('originLeft'), 17682 o = this.layout._getOption('originTop'), 17683 e = n ? 'paddingLeft' : 'paddingRight', 17684 s = n ? 'left' : 'right', 17685 r = n ? 'right' : 'left', 17686 a = this.position.x + t[e]; 17687 (i[s] = this.getXValue(a)), (i[r] = ''); 17688 var h = o ? 'paddingTop' : 'paddingBottom', 17689 l = o ? 'top' : 'bottom', 17690 p = o ? 'bottom' : 'top', 17691 u = this.position.y + t[h]; 17692 (i[l] = this.getYValue(u)), 17693 (i[p] = ''), 17694 this.css(i), 17695 this.emitEvent('layout', [this]); 17696 }), 17697 (h.getXValue = function (t) { 17698 var i = this.layout._getOption('horizontal'); 17699 return this.layout.options.percentPosition && !i 17700 ? (t / this.layout.size.width) * 100 + '%' 17701 : t + 'px'; 17702 }), 17703 (h.getYValue = function (t) { 17704 var i = this.layout._getOption('horizontal'); 17705 return this.layout.options.percentPosition && i 17706 ? (t / this.layout.size.height) * 100 + '%' 17707 : t + 'px'; 17708 }), 17709 (h._transitionTo = function (t, i) { 17710 this.getPosition(); 17711 var n = this.position.x, 17712 o = this.position.y, 17713 e = t == this.position.x && i == this.position.y; 17714 if ((this.setPosition(t, i), !e || this.isTransitioning)) { 17715 var s = t - n, 17716 r = i - o, 17717 a = {}; 17718 (a.transform = this.getTranslate(s, r)), 17719 this.transition({ 17720 to: a, 17721 onTransitionEnd: { 17722 transform: this.layoutPosition, 17723 }, 17724 isCleaning: !0, 17725 }); 17726 } else this.layoutPosition(); 17727 }), 17728 (h.getTranslate = function (t, i) { 17729 return ( 17730 'translate3d(' + 17731 (t = this.layout._getOption('originLeft') ? t : -t) + 17732 'px, ' + 17733 (i = this.layout._getOption('originTop') ? i : -i) + 17734 'px, 0)' 17735 ); 17736 }), 17737 (h.goTo = function (t, i) { 17738 this.setPosition(t, i), this.layoutPosition(); 17739 }), 17740 (h.moveTo = h._transitionTo), 17741 (h.setPosition = function (t, i) { 17742 (this.position.x = parseFloat(t)), 17743 (this.position.y = parseFloat(i)); 17744 }), 17745 (h._nonTransition = function (t) { 17746 for (var i in (this.css(t.to), 17747 t.isCleaning && this._removeStyles(t.to), 17748 t.onTransitionEnd)) 17749 t.onTransitionEnd[i].call(this); 17750 }), 17751 (h.transition = function (t) { 17752 if (parseFloat(this.layout.options.transitionDuration)) { 17753 var i = this._transn; 17754 for (var n in t.onTransitionEnd) 17755 i.onEnd[n] = t.onTransitionEnd[n]; 17756 for (n in t.to) 17757 (i.ingProperties[n] = !0), 17758 t.isCleaning && (i.clean[n] = !0); 17759 if (t.from) { 17760 this.css(t.from); 17761 this.element.offsetHeight; 17762 } 17763 this.enableTransition(t.to), 17764 this.css(t.to), 17765 (this.isTransitioning = !0); 17766 } else this._nonTransition(t); 17767 }); 17768 var l = 17769 'opacity,' + 17770 e.replace(/([A-Z])/g, function (t) { 17771 return '-' + t.toLowerCase(); 17772 }); 17773 (h.enableTransition = function () { 17774 if (!this.isTransitioning) { 17775 var t = this.layout.options.transitionDuration; 17776 (t = 'number' == typeof t ? t + 'ms' : t), 17777 this.css({ 17778 transitionProperty: l, 17779 transitionDuration: t, 17780 transitionDelay: this.staggerDelay || 0, 17781 }), 17782 this.element.addEventListener(s, this, !1); 17783 } 17784 }), 17785 (h.onwebkitTransitionEnd = function (t) { 17786 this.ontransitionend(t); 17787 }), 17788 (h.onotransitionend = function (t) { 17789 this.ontransitionend(t); 17790 }); 17791 var p = { '-webkit-transform': 'transform' }; 17792 (h.ontransitionend = function (t) { 17793 if (t.target === this.element) { 17794 var i = this._transn, 17795 n = p[t.propertyName] || t.propertyName; 17796 if ( 17797 (delete i.ingProperties[n], 17798 (function (t) { 17799 for (var i in t) return !1; 17800 return !0; 17801 })(i.ingProperties) && this.disableTransition(), 17802 n in i.clean && 17803 ((this.element.style[t.propertyName] = ''), 17804 delete i.clean[n]), 17805 n in i.onEnd) 17806 ) 17807 i.onEnd[n].call(this), delete i.onEnd[n]; 17808 this.emitEvent('transitionEnd', [this]); 17809 } 17810 }), 17811 (h.disableTransition = function () { 17812 this.removeTransitionStyles(), 17813 this.element.removeEventListener(s, this, !1), 17814 (this.isTransitioning = !1); 17815 }), 17816 (h._removeStyles = function (t) { 17817 var i = {}; 17818 for (var n in t) i[n] = ''; 17819 this.css(i); 17820 }); 17821 var u = { 17822 transitionProperty: '', 17823 transitionDuration: '', 17824 transitionDelay: '', 17825 }; 17826 return ( 17827 (h.removeTransitionStyles = function () { 17828 this.css(u); 17829 }), 17830 (h.stagger = function (t) { 17831 (t = isNaN(t) ? 0 : t), (this.staggerDelay = t + 'ms'); 17832 }), 17833 (h.removeElem = function () { 17834 this.element.parentNode.removeChild(this.element), 17835 this.css({ display: '' }), 17836 this.emitEvent('remove', [this]); 17837 }), 17838 (h.remove = function () { 17839 o && parseFloat(this.layout.options.transitionDuration) 17840 ? (this.once('transitionEnd', function () { 17841 this.removeElem(); 17842 }), 17843 this.hide()) 17844 : this.removeElem(); 17845 }), 17846 (h.reveal = function () { 17847 delete this.isHidden, this.css({ display: '' }); 17848 var t = this.layout.options, 17849 i = {}; 17850 (i[ 17851 this.getHideRevealTransitionEndProperty('visibleStyle') 17852 ] = this.onRevealTransitionEnd), 17853 this.transition({ 17854 from: t.hiddenStyle, 17855 to: t.visibleStyle, 17856 isCleaning: !0, 17857 onTransitionEnd: i, 17858 }); 17859 }), 17860 (h.onRevealTransitionEnd = function () { 17861 this.isHidden || this.emitEvent('reveal'); 17862 }), 17863 (h.getHideRevealTransitionEndProperty = function (t) { 17864 var i = this.layout.options[t]; 17865 if (i.opacity) return 'opacity'; 17866 for (var n in i) return n; 17867 }), 17868 (h.hide = function () { 17869 (this.isHidden = !0), this.css({ display: '' }); 17870 var t = this.layout.options, 17871 i = {}; 17872 (i[ 17873 this.getHideRevealTransitionEndProperty('hiddenStyle') 17874 ] = this.onHideTransitionEnd), 17875 this.transition({ 17876 from: t.visibleStyle, 17877 to: t.hiddenStyle, 17878 isCleaning: !0, 17879 onTransitionEnd: i, 17880 }); 17881 }), 17882 (h.onHideTransitionEnd = function () { 17883 this.isHidden && 17884 (this.css({ display: 'none' }), this.emitEvent('hide')); 17885 }), 17886 (h.destroy = function () { 17887 this.css({ 17888 position: '', 17889 left: '', 17890 right: '', 17891 top: '', 17892 bottom: '', 17893 transition: '', 17894 transform: '', 17895 }); 17896 }), 17897 a 17898 ); 17899 }); 17900 }); 17901 var outlayer = createCommonjsModule(function (t) { 17902 /*! 17903 * Outlayer v2.1.1 17904 * the brains and guts of a layout library 17905 * MIT license 17906 */ 17907 !(function (e, i) { 17908 t.exports 17909 ? (t.exports = i(e, evEmitter, getSize, utils, item)) 17910 : (e.Outlayer = i( 17911 e, 17912 e.EvEmitter, 17913 e.getSize, 17914 e.fizzyUIUtils, 17915 e.Outlayer.Item 17916 )); 17917 })(window, function (t, e, i, n, o) { 17918 var s = t.console, 17919 r = t.jQuery, 17920 a = function () { }, 17921 h = 0, 17922 u = {}; 17923 function m(t, e) { 17924 var i = n.getQueryElement(t); 17925 if (i) { 17926 (this.element = i), 17927 r && (this.$element = r(this.element)), 17928 (this.options = n.extend( 17929 {}, 17930 this.constructor.defaults 17931 )), 17932 this.option(e); 17933 var o = ++h; 17934 (this.element.outlayerGUID = o), 17935 (u[o] = this), 17936 this._create(), 17937 this._getOption('initLayout') && this.layout(); 17938 } else s && s.error('Bad element for ' + this.constructor.namespace + ': ' + (i || t)); 17939 } 17940 (m.namespace = 'outlayer'), 17941 (m.Item = o), 17942 (m.defaults = { 17943 containerStyle: { position: 'relative' }, 17944 initLayout: !0, 17945 originLeft: !0, 17946 originTop: !0, 17947 resize: !0, 17948 resizeContainer: !0, 17949 transitionDuration: '0.4s', 17950 hiddenStyle: { opacity: 0, transform: 'scale(0.001)' }, 17951 visibleStyle: { opacity: 1, transform: 'scale(1)' }, 17952 }); 17953 var c = m.prototype; 17954 function l(t) { 17955 function e() { 17956 t.apply(this, arguments); 17957 } 17958 return ( 17959 (e.prototype = Object.create(t.prototype)), 17960 (e.prototype.constructor = e), 17961 e 17962 ); 17963 } 17964 n.extend(c, e.prototype), 17965 (c.option = function (t) { 17966 n.extend(this.options, t); 17967 }), 17968 (c._getOption = function (t) { 17969 var e = this.constructor.compatOptions[t]; 17970 return e && void 0 !== this.options[e] 17971 ? this.options[e] 17972 : this.options[t]; 17973 }), 17974 (m.compatOptions = { 17975 initLayout: 'isInitLayout', 17976 horizontal: 'isHorizontal', 17977 layoutInstant: 'isLayoutInstant', 17978 originLeft: 'isOriginLeft', 17979 originTop: 'isOriginTop', 17980 resize: 'isResizeBound', 17981 resizeContainer: 'isResizingContainer', 17982 }), 17983 (c._create = function () { 17984 this.reloadItems(), 17985 (this.stamps = []), 17986 this.stamp(this.options.stamp), 17987 n.extend( 17988 this.element.style, 17989 this.options.containerStyle 17990 ), 17991 this._getOption('resize') && this.bindResize(); 17992 }), 17993 (c.reloadItems = function () { 17994 this.items = this._itemize(this.element.children); 17995 }), 17996 (c._itemize = function (t) { 17997 for ( 17998 var e = this._filterFindItemElements(t), 17999 i = this.constructor.Item, 18000 n = [], 18001 o = 0; 18002 o < e.length; 18003 o++ 18004 ) { 18005 var s = new i(e[o], this); 18006 n.push(s); 18007 } 18008 return n; 18009 }), 18010 (c._filterFindItemElements = function (t) { 18011 return n.filterFindElem
18011ents(t, this.options.itemSelector); 18012 }), 18013 (c.getItemElements = function () { 18014 return this.items.map(function (t) { 18015 return t.element; 18016 }); 18017 }), 18018 (c.layout = function () { 18019 this._resetLayout(), this._manageStamps(); 18020 var t = this._getOption('layoutInstant'), 18021 e = void 0 !== t ? t : !this._isLayoutInited; 18022 this.layoutItems(this.items, e), 18023 (this._isLayoutInited = !0); 18024 }), 18025 (c._init = c.layout), 18026 (c._resetLayout = function () { 18027 this.getSize(); 18028 }), 18029 (c.getSize = function () { 18030 this.size = i(this.element); 18031 }), 18032 (c._getMeasurement = function (t, e) { 18033 var n, 18034 o = this.options[t]; 18035 o 18036 ? ('string' == typeof o 18037 ? (n = this.element.querySelector(o)) 18038 : o instanceof HTMLElement && (n = o), 18039 (this[t] = n ? i(n)[e] : o)) 18040 : (this[t] = 0); 18041 }), 18042 (c.layoutItems = function (t, e) { 18043 (t = this._getItemsForLayout(t)), 18044 this._layoutItems(t, e), 18045 this._postLayout(); 18046 }), 18047 (c._getItemsForLayout = function (t) { 18048 return t.filter(function (t) { 18049 return !t.isIgnored; 18050 }); 18051 }), 18052 (c._layoutItems = function (t, e) { 18053 if ( 18054 (this._emitCompleteOnItems('layout', t), t && t.length) 18055 ) { 18056 var i = []; 18057 t.forEach(function (t) { 18058 var n = this._getItemLayoutPosition(t); 18059 (n.item = t), 18060 (n.isInstant = e || t.isLayoutInstant), 18061 i.push(n); 18062 }, this), 18063 this._processLayoutQueue(i); 18064 } 18065 }), 18066 (c._getItemLayoutPosition = function () { 18067 return { x: 0, y: 0 }; 18068 }), 18069 (c._processLayoutQueue = function (t) { 18070 this.updateStagger(), 18071 t.forEach(function (t, e) { 18072 this._positionItem( 18073 t.item, 18074 t.x, 18075 t.y, 18076 t.isInstant, 18077 e 18078 ); 18079 }, this); 18080 }), 18081 (c.updateStagger = function () { 18082 var t = this.options.stagger; 18083 if (null != t) 18084 return ((this.stagger = (function (t) { 18085 if ('number' == typeof t) return t; 18086 var e = t.match(/(^\d*\.?\d*)(\w*)/), 18087 i = e && e[1], 18088 n = e && e[2]; 18089 if (!i.length) return 0; 18090 return (i = parseFloat(i)) * (f[n] || 1); 18091 })(t)), this.stagger); 18092 this.stagger = 0; 18093 }), 18094 (c._positionItem = function (t, e, i, n, o) { 18095 n 18096 ? t.goTo(e, i) 18097 : (t.stagger(o * this.stagger), t.moveTo(e, i)); 18098 }), 18099 (c._postLayout = function () { 18100 this.resizeContainer(); 18101 }), 18102 (c.resizeContainer = function () { 18103 if (this._getOption('resizeContainer')) { 18104 var t = this._getContainerSize(); 18105 t && 18106 (this._setContainerMeasure(t.width, !0), 18107 this._setContainerMeasure(t.height, !1)); 18108 } 18109 }), 18110 (c._getContainerSize = a), 18111 (c._setContainerMeasure = function (t, e) { 18112 if (void 0 !== t) { 18113 var i = this.size; 18114 i.isBorderBox && 18115 (t += e 18116 ? i.paddingLeft + 18117 i.paddingRight + 18118 i.borderLeftWidth + 18119 i.borderRightWidth 18120 : i.paddingBottom + 18121 i.paddingTop + 18122 i.borderTopWidth + 18123 i.borderBottomWidth), 18124 (t = Math.max(t, 0)), 18125 (this.element.style[e ? 'width' : 'height'] = 18126 t + 'px'); 18127 } 18128 }), 18129 (c._emitCompleteOnItems = function (t, e) { 18130 var i = this; 18131 function n() { 18132 i.dispatchEvent(t + 'Complete', null, [e]); 18133 } 18134 var o = e.length; 18135 if (e && o) { 18136 var s = 0; 18137 e.forEach(function (e) { 18138 e.once(t, r); 18139 }); 18140 } else n(); 18141 function r() { 18142 ++s == o && n(); 18143 } 18144 }), 18145 (c.dispatchEvent = function (t, e, i) { 18146 var n = e ? [e].concat(i) : i; 18147 if ((this.emitEvent(t, n), r)) 18148 if ( 18149 ((this.$element = this.$element || r(this.element)), 18150 e) 18151 ) { 18152 var o = r.Event(e); 18153 (o.type = t), this.$element.trigger(o, i); 18154 } else this.$element.trigger(t, i); 18155 }), 18156 (c.ignore = function (t) { 18157 var e = this.getItem(t); 18158 e && (e.isIgnored = !0); 18159 }), 18160 (c.unignore = function (t) { 18161 var e = this.getItem(t); 18162 e && delete e.isIgnored; 18163 }), 18164 (c.stamp = function (t) { 18165 (t = this._find(t)) &&
18166 ((this.stamps = this.stamps.concat(t)), 18167 t.forEach(this.ignore, this)); 18168 }), 18169 (c.unstamp = function (t) { 18170 (t = this._find(t)) && 18171 t.forEach(function (t) { 18172 n.removeFrom(this.stamps, t), this.unignore(t); 18173 }, this); 18174 }), 18175 (c._find = function (t) { 18176 if (t) 18177 return ( 18178 'string' == typeof t && 18179 (t = this.element.querySelectorAll(t)), 18180 (t = n.makeArray(t)) 18181 ); 18182 }), 18183 (c._manageStamps = function () { 18184 this.stamps && 18185 this.stamps.length && 18186 (this._getBoundingRect(), 18187 this.stamps.forEach(this._manageStamp, this)); 18188 }), 18189 (c._getBoundingRect = function () { 18190 var t = this.element.getBoundingClientRect(), 18191 e = this.size; 18192 this._boundingRect = { 18193 left: t.left + e.paddingLeft + e.borderLeftWidth, 18194 top: t.top + e.paddingTop + e.borderTopWidth, 18195 right: t.right - (e.paddingRight + e.borderRightWidth), 18196 bottom: 18197 t.bottom - (e.paddingBottom + e.borderBottomWidth), 18198 }; 18199 }), 18200 (c._manageStamp = a), 18201 (c._getElementOffset = function (t) { 18202 var e = t.getBoundingClientRect(), 18203 n = this._boundingRect, 18204 o = i(t); 18205 return { 18206 left: e.left - n.left - o.marginLeft, 18207 top: e.top - n.top - o.marginTop, 18208 right: n.right - e.right - o.marginRight, 18209 bottom: n.bottom - e.bottom - o.marginBottom, 18210 }; 18211 }), 18212 (c.handleEvent = n.handleEvent), 18213 (c.bindResize = function () { 18214 t.addEventListener('resize', this), 18215 (this.isResizeBound = !0); 18216 }), 18217 (c.unbindResize = function () { 18218 t.removeEventListener('resize', this), 18219 (this.isResizeBound = !1); 18220 }), 18221 (c.onresize = function () { 18222 this.resize(); 18223 }), 18224 n.debounceMethod(m, 'onresize', 100), 18225 (c.resize = function () { 18226 this.isResizeBound && 18227 this.needsResizeLayout() && 18228 this.layout(); 18229 }), 18230 (c.needsResizeLayout = function () { 18231 var t = i(this.element); 18232 return ( 18233 this.size && t && t.innerWidth !== this.size.innerWidth 18234 ); 18235 }), 18236 (c.addItems = function (t) { 18237 var e = this._itemize(t); 18238 return e.length && (this.items = this.items.concat(e)), e; 18239 }), 18240 (c.appended = function (t) { 18241 var e = this.addItems(t); 18242 e.length && (this.layoutItems(e, !0), this.reveal(e)); 18243 }), 18244 (c.prepended = function (t) { 18245 var e = this._itemize(t); 18246 if (e.length) { 18247 var i = this.items.slice(0); 18248 (this.items = e.concat(i)), 18249 this._resetLayout(), 18250 this._manageStamps(), 18251 this.layoutItems(e, !0), 18252 this.reveal(e), 18253 this.layoutItems(i); 18254 } 18255 }), 18256 (c.reveal = function (t) { 18257 if ( 18258 (this._emitCompleteOnItems('reveal', t), t && t.length) 18259 ) { 18260 var e = this.updateStagger(); 18261 t.forEach(function (t, i) { 18262 t.stagger(i * e), t.reveal(); 18263 }); 18264 } 18265 }), 18266 (c.hide = function (t) { 18267 if ((this._emitCompleteOnItems('hide', t), t && t.length)) { 18268 var e = this.updateStagger(); 18269 t.forEach(function (t, i) { 18270 t.stagger(i * e), t.hide(); 18271 }); 18272 } 18273 }), 18274 (c.revealItemElements = function (t) { 18275 var e = this.getItems(t); 18276 this.reveal(e); 18277 }), 18278 (c.hideItemElements = function (t) { 18279 var e = this.getItems(t); 18280 this.hide(e); 18281 }), 18282 (c.getItem = function (t) { 18283 for (var e = 0; e < this.items.length; e++) { 18284 var i = this.items[e]; 18285 if (i.element == t) return i; 18286 } 18287 }), 18288 (c.getItems = function (t) { 18289 t = n.makeArray(t); 18290 var e = []; 18291 return ( 18292 t.forEach(function (t) { 18293 var i = this.getItem(t); 18294 i && e.push(i); 18295 }, this), 18296 e 18297 ); 18298 }), 18299 (c.remove = function (t) { 18300 var e = this.getItems(t); 18301 this._emitCompleteOnItems('remove', e), 18302 e && 18303 e.length && 18304 e.forEach(function (t) { 18305 t.remove(), n.removeFrom(this.items, t); 18306 }, this); 18307 }), 18308 (c.destroy = function () { 18309 var t = this.element.style; 18310 (t.height = ''), 18311 (t.position = ''), 18312 (t.width = ''),
18313 this.items.forEach(function (t) { 18314 t.destroy(); 18315 }), 18316 this.unbindResize(); 18317 var e = this.element.outlayerGUID; 18318 delete u[e], 18319 delete this.element.outlayerGUID, 18320 r && 18321 r.removeData( 18322 this.element, 18323 this.constructor.namespace 18324 ); 18325 }), 18326 (m.data = function (t) { 18327 var e = (t = n.getQueryElement(t)) && t.outlayerGUID; 18328 return e && u[e]; 18329 }), 18330 (m.create = function (t, e) { 18331 var i = l(m); 18332 return ( 18333 (i.defaults = n.extend({}, m.defaults)), 18334 n.extend(i.defaults, e), 18335 (i.compatOptions = n.extend({}, m.compatOptions)), 18336 (i.namespace = t), 18337 (i.data = m.data), 18338 (i.Item = l(o)), 18339 n.htmlInit(i, t), 18340 r && r.bridget && r.bridget(t, i), 18341 i 18342 ); 18343 }); 18344 var f = { ms: 1, s: 1e3 }; 18345 return (m.Item = o), m; 18346 }); 18347 }); 18348 var masonry = createCommonjsModule(function (t) { 18349 /*! 18350 * Masonry v4.2.2 18351 * Cascading grid layout library 18352 * https://masonry.desandro.com 18353 * MIT License 18354 * by David DeSandro 18355 */ 18356 !(function (i, o) { 18357 t.exports 18358 ? (t.exports = o(outlayer, getSize)) 18359 : (i.Masonry = o(i.Outlayer, i.getSize)); 18360 })(window, function (t, i) { 18361 var o = t.create('masonry');
18362 o.compatOptions.fitWidth = 'isFitWidth'; 18363 var e = o.prototype; 18364 return ( 18365 (e._resetLayout = function () { 18366 this.getSize(), 18367 this._getMeasurement('columnWidth', 'outerWidth'), 18368 this._getMeasurement('gutter', 'outerWidth'), 18369 this.measureColumns(), 18370 (this.colYs = []); 18371 for (var t = 0; t < this.cols; t++) this.colYs.push(0); 18372 (this.maxY = 0), (this.horizontalColIndex = 0); 18373 }), 18374 (e.measureColumns = function () { 18375 if ((this.getContainerWidth(), !this.columnWidth)) { 18376 var t = this.items[0], 18377 o = t && t.element; 18378 this.columnWidth = 18379 (o && i(o).outerWidth) || this.containerWidth; 18380 } 18381 var e = (this.columnWidth += this.gutter), 18382 r = this.containerWidth + this.gutter, 18383 s = r / e, 18384 n = e - (r % e); 18385 (s = Math[n && n < 1 ? 'round' : 'floor'](s)), 18386 (this.cols = Math.max(s, 1)); 18387 }), 18388 (e.getContainerWidth = function () { 18389 var t = this._getOption('fitWidth') 18390 ? this.element.parentNode 18391 : this.element, 18392 o = i(t); 18393 this.containerWidth = o && o.innerWidth; 18394 }), 18395 (e._getItemLayoutPosition = function (t) { 18396 t.getSize(); 18397 var i = t.size.outerWidth % this.columnWidth, 18398 o = Math[i && i < 1 ? 'round' : 'ceil']( 18399 t.size.outerWidth / this.columnWidth 18400 ); 18401 o = Math.min(o, this.cols); 18402 for ( 18403 var e = this[ 18404 this.options.horizontalOrder 18405 ? '_getHorizontalColPosition' 18406 : '_getTopColPosition' 18407 ](o, t), 18408 r = { x: this.columnWidth * e.col, y: e.y }, 18409 s = e.y + t.size.outerHeight, 18410 n = o + e.col, 18411 h = e.col; 18412 h < n; 18413 h++ 18414 ) 18415 this.colYs[h] = s; 18416 return r; 18417 }), 18418 (e._getTopColPosition = function (t) { 18419 var i = this._getTopColGroup(t), 18420 o = Math.min.apply(Math, i); 18421 return { col: i.indexOf(o), y: o }; 18422 }), 18423 (e._getTopColGroup = function (t) { 18424 if (t < 2) return this.colYs; 18425 for (var i = [], o = this.cols + 1 - t, e = 0; e < o; e++) 18426 i[e] = this._getColGroupY(e, t); 18427 return i; 18428 }), 18429 (e._getColGroupY = function (t, i) { 18430 if (i < 2) return this.colYs[t]; 18431 var o = this.colYs.slice(t, t + i); 18432 return Math.max.apply(Math, o); 18433 }), 18434 (e._getHorizontalColPosition = function (t, i) { 18435 var o = this.horizontalColIndex % this.cols; 18436 o = t > 1 && o + t > this.cols ? 0 : o; 18437 var e = i.size.outerWidth && i.size.outerHeight; 18438 return ( 18439 (this.horizontalColIndex = e 18440 ? o + t 18441 : this.horizontalColIndex), 18442 { col: o, y: this._getColGroupY(o, t) } 18443 ); 18444 }), 18445 (e._manageStamp = function (t) { 18446 var o = i(t), 18447 e = this._getElementOffset(t), 18448 r = this._getOption('originLeft') ? e.left : e.right, 18449 s = r + o.outerWidth, 18450 n = Math.floor(r / this.columnWidth); 18451 n = Math.max(0, n); 18452 var h = Math.floor(s / this.columnWidth); 18453 (h -= s % this.columnWidth ? 0 : 1), 18454 (h = Math.min(this.cols - 1, h)); 18455 for ( 18456 var a = 18457 (this._getOption('originTop') 18458 ? e.top 18459 : e.bottom) + o.outerHeight, 18460 l = n; 18461 l <= h; 18462 l++ 18463 ) 18464 this.colYs[l] = Math.max(a, this.colYs[l]); 18465 }), 18466 (e._getContainerSize = function () { 18467 this.maxY = Math.max.apply(Math, this.colYs); 18468 var t = { height: this.maxY }; 18469 return ( 18470 this._getOption('fitWidth') && 18471 (t.width = this._getContainerFitWidth()), 18472 t 18473 ); 18474 }), 18475 (e._getContainerFitWidth = function () { 18476 for (var t = 0, i = this.cols; --i && 0 === this.colYs[i];) 18477 t++; 18478 return (this.cols - t) * this.columnWidth - this.gutter; 18479 }), 18480 (e.needsResizeLayout = function () { 18481 var t = this.containerWidth; 18482 return this.getContainerWidth(), t != this.containerWidth; 18483 }), 18484 o 18485 ); 18486 }); 18487 }); 18488 const NAME$2 = 'masonry', 18489 SELECTOR_DATA_TOGGLE = '[data-bs-toggle="masonry"]', 18490 SELECTOR_LOADER = '.masonry-loader', 18491 Default = { percentPosition: !0 }; 18492 class Masonry extends BaseComponent { 18493 constructor(e, t) { 18494 super(e), 18495 (this._config = this._getConfig(t)), 18496 (this._masonry = null),
18497 (this._images = SelectorEngine$1.find('img', this._element)), 18498 (this._loadCounter = 0), 18499 this._init(); 18500 } 18501 static get NAME() { 18502 return NAME$2; 18503 } 18504 dispose() { 18505 this._masonry && (this._masonry.destroy(), (this._masonry = null)), 18506 super.dispose(); 18507 } 18508 _getConfig(e) { 18509 return (e = { 18510 ...Default, 18511 ...Manipulator.getDataAttributes(this._element), 18512 ...('object' == typeof e ? e : {}), 18513 }); 18514 } 18515 _init() { 18516 this._images.length > 0 18517 ? this._images.forEach((e) => { 18518 const t = new Image(); 18519 (t.onload = () => this._onLoadEnd()), (t.src = e.src); 18520 }) 18521 : this._initMasonry(); 18522 } 18523 _onLoadEnd() { 18524 this._loadCounter++, 18525 this._loadCounter >= this._images.length && this._initMasonry(); 18526 } 18527 _initMasonry() { 18528 this._masonry = new masonry(this._element, this._config); 18529 } 18530 _createLoader() { 18531 const e = document.createElement('div'); 18532 return ( 18533 e.classList.add( 18534 'masonry-loader', 18535 'fade', 18536 'd-flex', 18537 'justify-content-center', 18538 'align-items-center' 18539 ), 18540 (e.innerHTML = 18541 '<div class="progress-spinner progress-spinner-active"><span class="visually-hidden">Caricamento...</span></div>'), 18542 this._element.appendChild(e), 18543 e 18544 ); 18545 } 18546 _getOrCreateLoader() { 18547 const e = SelectorEngine$1.findOne(SELECTOR_LOADER, this._element); 18548 return e || this._createLoader(); 18549 } 18550 _destroyLoader() { 18551 const e = SelectorEngine$1.findOne(SELECTOR_LOADER, this._element); 18552 e && e.remove(); 18553 } 18554 _showLoader() { 18555 this._getOrCreateLoader().classList.add('show'); 18556 } 18557 _hideLoader() { 18558 this._destroyLoader(); 18559 } 18560 } 18561 const masonries = SelectorEngine$1.find(SELECTOR_DATA_TOGGLE); 18562 masonries.length > 0 && 18563 masonries.forEach((e) => { 18564 Masonry.getOrCreateInstance(e); 18565 }); 18566 var Masonry$1 = Masonry; 18567 const NAME$1 = 'list', 18568 EVENT_CLICK$1 = 'click.bs.list', 18569 EVENT_CLICK_DATA_API = 'click.bs.list.data-api', 18570 SELECTOR_LIST = '[data-bs-list-checkbox]'; 18571 class List extends BaseComponent { 18572 constructor(e) { 18573 super(e), this._init(); 18574 } 18575 static get NAME() { 18576 return NAME$1; 18577 } 18578 toggleCheckbox(e) { 18579 const t = SelectorEngine$1.findOne('input', e); 18580 t && 18581 (t.checked 18582 ? ((t.checked = !1), e.classList.remove('active')) 18583 : ((t.checked = !0), e.classList.add('active'))); 18584 } 18585 _init() { 18586 this._initCheckbox(); 18587 } 18588 _initCheckbox() { 18589 SelectorEngine$1.find( 18590 'input[type=checkbox]', 18591 this._element 18592 ).forEach((e) => { 18593 EventHandler$1.on(e.closest('a'), EVENT_CLICK$1, (t) => { 18594 t.preventDefault(), this.toggleCheckbox(e.closest('a')); 18595 }); 18596 }); 18597 } 18598 } 18599 SelectorEngine$1.find(SELECTOR_LIST).forEach((e) => { 18600 SelectorEngine$1.find('input[type=checkbox]', e).forEach((t) => { 18601 EventHandler$1.one(t.closest('a'), EVENT_CLICK_DATA_API, (t) => { 18602 if (!List.getInstance(e)) { 18603 t.preventDefault(); 18604 List.getOrCreateInstance(e).toggleCheckbox(t.currentTarget); 18605 } 18606 }); 18607 }); 18608 }); 18609 var List$1 = List; 18610 const NAME = 'transfer', 18611 EVENT_CLICK = 'click.bs.transfer', 18612 SELECTOR_BLOCK = '[data-bs-transfer]', 18613 SELECTOR_HEAD = '.transfer-header', 18614 SELECTOR_HEAD_INPUT = '.transfer-header input', 18615 SELECTOR_HEAD_LABEL = '.transfer-header span.num', 18616 SELECTOR_LIST_INPUT = '.transfer-group input', 18617 SELECTOR_SOURCE = '.it-transfer-wrapper.source', 18618 SELECTOR_TARGET = '.it-transfer-wrapper.target'; 18619 class Transfer extends BaseComponent { 18620 constructor(e) { 18621 super(e), 18622 (this._addBtnElement = SelectorEngine$1.findOne( 18623 'a.transfer', 18624 this._element 18625 )), 18626 (this._invBtnElement = SelectorEngine$1.findOne( 18627 'a.backtransfer', 18628 this._element 18629 )), 18630 (this._resetBtnElement = SelectorEngine$1.findOne( 18631 'a.reset', 18632 this._element 18633 )), 18634 (this._listDefault = { 18635 source: SelectorEngine$1.find( 18636 SELECTOR_SOURCE + ' .transfer-group .form-check', 18637 this._element 18638 ), 18639 target: SelectorEngine$1.find( 18640 SELECTOR_TARGET + ' .transfer-group .form-check', 18641 this._element 18642 ), 18643 }), 18644 this._bindEvents(); 18645 } 18646 static get NAME() { 18647 return NAME; 18648 } 18649 _bindEvents() { 18650 SelectorEngine$1.find(SELECTOR_HEAD_INPUT, this._element).forEach( 18651 (e) => { 18652 EventHandler$1.on(e, EVENT_CLICK, () => { 18653 this._checkListHeader( 18654 e.closest('.it-transfer-wrapper') 18655 ); 18656 }); 18657 } 18658 ), 18659 SelectorEngine$1.find( 18660 SELECTOR_LIST_INPUT, 18661 this._element 18662 ).forEach((e) => { 18663 EventHandler$1.on(e, EVENT_CLICK, () => { 18664 this._checkList(e.closest('.it-transfer-wrapper')); 18665 }); 18666 }), 18667 EventHandler$1.on(this._addBtnElement, EVENT_CLICK, (e) => { 18668 e.preventDefault(), 18669 this._disableElement(this._addBtnElement), 18670 this._addItems(); 18671 }), 18672 EventHandler$1.on(this._invBtnElement, EVENT_CLICK, (e) => { 18673 e.preventDefault(), 18674 this._disableElement(this._invBtnElement), 18675 this._addItems(!0); 18676 }), 18677 EventHandler$1.on(this._resetBtnElement, EVENT_CLICK, (e) => { 18678 e.preventDefault(), 18679 this._disableElement(this._addBtnElement), 18680 this._disableElement(this._invBtnElement), 18681 this._disableElement(this._resetBtnElement), 18682 this._resetAll(); 18683 }); 18684 } 18685 _disableElement(e) { 18686 e.classList.remove('active'), 18687 e.setAttribute('disabled', 'disabled'), 18688 e.setAttribute('aria-disabled', 'true'); 18689 } 18690 _enableElement(e) { 18691 e.classList.add('active'), 18692 e.removeAttribute('disabled'), 18693 e.removeAttribute('aria-disabled'); 18694 } 18695 _getScopeData(e) { 18696 return { 18697 scope: e, 18698 list: SelectorEngine$1.find(SELECTOR_LIST_INPUT, e), 18699 listChecked: SelectorEngine$1.find( 18700 SELECTOR_LIST_INPUT + ':checked', 18701 e 18702 ), 18703 head: SelectorEngine$1.findOne(SELECTOR_HEAD, e), 18704 inputHead: SelectorEngine$1.findOne(SELECTOR_HEAD_INPUT, e), 18705 labelNumHead: SelectorEngine$1.findOne(SELECTOR_HEAD_LABEL, e), 18706 group: SelectorEngine$1.findOne('.transfer-group', e), 18707 }; 18708 } 18709 _checkList(e) { 18710 const t = this._getScopeData(e); 18711 0 == t.listChecked.length 18712 ? (t.inputHead.classList.remove('semi-checked'), 18713 (t.inputHead.checked = !0), 18714 e.classList.contains('source') 18715 ? this._disableElement(this._addBtnElement) 18716 : this._disableElement(this._invBtnElement)) 18717 : (t.listChecked.length == t.list.length 18718 ? (t.inputHead.classList.remove('semi-checked'), 18719 (t.inputHead.checked = !0)) 18720 : (t.inputHead.classList.add('semi-checked'), 18721 (t.inputHead.checked = !1)), 18722 e.classList.contains('source') 18723 ? this._enableElement(this._addBtnElement) 18724 : this._enableElement(this._invBtnElement)); 18725 } 18726 _checkListHeader(e) { 18727 const t = this._getScopeData(e); 18728 t.listChecked.length > 0 18729 ? (t.list.forEach((e) => { 18730 e.checked = !1; 18731 }), 18732 t.inputHead.classList.remove('semi-checked'), 18733 (t.inputHead.checked = !1), 18734 e.classList.contains('source') 18735 ? this._disableElement(this._addBtnElement) 18736 : this._disableElement(this._invBtnElement)) 18737 : (t.list.forEach((e) => { 18738 e.checked = !0; 18739 }), 18740 e.classList.contains('source') 18741 ? this._enableElement(this._addBtnElement) 18742 : this._enableElement(this._invBtnElement)); 18743 } 18744 _addItems(e) { 18745 const t = this._getScopeData( 18746 SelectorEngine$1.findOne( 18747 e ? SELECTOR_TARGET : SELECTOR_SOURCE, 18748 this._element 18749 ) 18750 ), 18751 n = this._getScopeData( 18752 SelectorEngine$1.findOne( 18753 e ? SELECTOR_SOURCE : SELECTOR_TARGET, 18754 this._element 18755 ) 18756 ), 18757 s = t.listChecked, 18758 i = t.inputHead, 18759 r = t.labelNumHead, 18760 a = s.length, 18761 E = t.list.length, 18762 l = n.group, 18763 c = n.list.length + a, 18764 d = n.labelNumHead, 18765 _ = n.inputHead;
18766 s.forEach((e) => { 18767 const t = e.closest('.form-check'); 18768 t.remove(), l.appendChild(t), (e.checked = !1); 18769 }); 18770 const h = E - a, 18771 o = c; 18772 (r.innerText = h), 18773 (d.innerText = o), 18774 0 == h && i.setAttribute('disabled', !0), 18775 o > 0 && _.removeAttribute('disabled'), 18776 i.classList.remove('semi-checked'), 18777 (i.checked = !1), 18778 this._enableElement(this._resetBtnElement); 18779 } 18780 _resetAll() { 18781 const e = { 18782 source: this._getScopeData( 18783 SelectorEngine$1.findOne(SELECTOR_SOURCE, this._element) 18784 ), 18785 target: this._getScopeData( 18786 SelectorEngine$1.findOne(SELECTOR_TARGET, this._element) 18787 ), 18788 }; 18789 Object.keys(e).forEach((t) => { 18790 e[t].list.forEach((e) => e.closest('.form-check').remove()); 18791 }), 18792 Object.keys(e).forEach((t) => { 18793 this._listDefault[t].forEach((n) => { 18794 (n.checked = !1), e[t].group.appendChild(n); 18795 }), 18796 (e[t].labelNumHead.innerText = this._listDefault[ 18797 t 18798 ].length), 18799 e[t].inputHead.removeAttribute('disabled'), 18800 e[t].inputHead.classList.remove('semi-checked'), 18801 (e[t].inputHead.checked = !1); 18802 }); 18803 } 18804 } 18805 SelectorEngine$1.find(SELECTOR_BLOCK).forEach((e) => { 18806 Transfer.getOrCreateInstance(e); 18807 }); 18808 var Transfer$1 = Transfer; 18809 loadPlugin(icons), loadPlugin(fontsLoader), loadPlugin(headerSticky); 18810 (window.BOOTSTRAP_ITALIA_VERSION = BOOTSTRAP_ITALIA_VERSION), 18811 (window.bootstrap = { 18812 Alert: Alert, 18813 Button: Button, 18814 Carousel: Carousel, 18815 Collapse: Collapse, 18816 Dropdown: Dropdown, 18817 Modal: Modal, 18818 Offcanvas: Offcanvas, 18819 Popover: Popover, 18820 ScrollSpy: ScrollSpy, 18821 Tab: Tab, 18822 Toast: Toast, 18823 Tooltip: Tooltip, 18824 Accordion: Accordion$1, 18825 BackToTop: BackToTop$1, 18826 CarouselBI: CarouselBI$1, 18827 Cookiebar: Cookiebar$1, 18828 Dimmer: Dimmer$1, 18829 FormValidate: FormValidate, 18830 Forward: Forward$1, 18831 HistoryBack: HistoryBack$1, 18832 Input: Input$1, 18833 InputNumber: InputNumber$1, 18834 InputPassword: InputPassword$1, 18835 InputSearchAutocomplete: InputSearchAutocomplete, 18836 List: List$1, 18837 Masonry: Masonry$1, 18838 NavBarCollapsible: NavBarCollapsible$1, 18839 NavScroll: NavScroll$1, 18840 Notification: Notification$1, 18841 ProgressDonut: ProgressDonut$1, 18842 SelectAutocomplete: SelectAutocomplete$1, 18843 Sticky: Sticky$1, 18844 TrackFocus: TrackFocus$1, 18845 Transfer: Transfer$1, 18846 UploadDragDrop: UploadDragDrop$1, 18847 ValidatorSelectAutocomplete: ValidatorSelectAutocomplete, 18848 }); 18849})(); 18850//# sourceMappingURL=vendor.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.