PageRenderTime 99ms CodeModel.GetById 20ms app.highlight 60ms RepoModel.GetById 1ms app.codeStats 1ms

/js/bootstrap.bundle.js

https://bitbucket.org/denissilva/cgpdi_admin
JavaScript | 6328 lines | 3950 code | 1039 blank | 1339 comment | 671 complexity | 6866f102282d95443edf73ca112b117b MD5 | raw file

Large files files are truncated, but you can click here to view the full file

   1/*!
   2  * Bootstrap v4.0.0 (https://getbootstrap.com)
   3  * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
   4  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   5  */
   6(function (global, factory) {
   7	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) :
   8	typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) :
   9	(factory((global.bootstrap = {}),global.jQuery));
  10}(this, (function (exports,$) { 'use strict';
  11
  12$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  13
  14function _defineProperties(target, props) {
  15  for (var i = 0; i < props.length; i++) {
  16    var descriptor = props[i];
  17    descriptor.enumerable = descriptor.enumerable || false;
  18    descriptor.configurable = true;
  19    if ("value" in descriptor) descriptor.writable = true;
  20    Object.defineProperty(target, descriptor.key, descriptor);
  21  }
  22}
  23
  24function _createClass(Constructor, protoProps, staticProps) {
  25  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  26  if (staticProps) _defineProperties(Constructor, staticProps);
  27  return Constructor;
  28}
  29
  30function _extends() {
  31  _extends = Object.assign || function (target) {
  32    for (var i = 1; i < arguments.length; i++) {
  33      var source = arguments[i];
  34
  35      for (var key in source) {
  36        if (Object.prototype.hasOwnProperty.call(source, key)) {
  37          target[key] = source[key];
  38        }
  39      }
  40    }
  41
  42    return target;
  43  };
  44
  45  return _extends.apply(this, arguments);
  46}
  47
  48function _inheritsLoose(subClass, superClass) {
  49  subClass.prototype = Object.create(superClass.prototype);
  50  subClass.prototype.constructor = subClass;
  51  subClass.__proto__ = superClass;
  52}
  53
  54/**
  55 * --------------------------------------------------------------------------
  56 * Bootstrap (v4.0.0): util.js
  57 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  58 * --------------------------------------------------------------------------
  59 */
  60
  61var Util = function ($$$1) {
  62  /**
  63   * ------------------------------------------------------------------------
  64   * Private TransitionEnd Helpers
  65   * ------------------------------------------------------------------------
  66   */
  67  var transition = false;
  68  var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
  69
  70  function toType(obj) {
  71    return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
  72  }
  73
  74  function getSpecialTransitionEndEvent() {
  75    return {
  76      bindType: transition.end,
  77      delegateType: transition.end,
  78      handle: function handle(event) {
  79        if ($$$1(event.target).is(this)) {
  80          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
  81        }
  82
  83        return undefined; // eslint-disable-line no-undefined
  84      }
  85    };
  86  }
  87
  88  function transitionEndTest() {
  89    if (typeof window !== 'undefined' && window.QUnit) {
  90      return false;
  91    }
  92
  93    return {
  94      end: 'transitionend'
  95    };
  96  }
  97
  98  function transitionEndEmulator(duration) {
  99    var _this = this;
 100
 101    var called = false;
 102    $$$1(this).one(Util.TRANSITION_END, function () {
 103      called = true;
 104    });
 105    setTimeout(function () {
 106      if (!called) {
 107        Util.triggerTransitionEnd(_this);
 108      }
 109    }, duration);
 110    return this;
 111  }
 112
 113  function setTransitionEndSupport() {
 114    transition = transitionEndTest();
 115    $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
 116
 117    if (Util.supportsTransitionEnd()) {
 118      $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
 119    }
 120  }
 121
 122  function escapeId(selector) {
 123    // We escape IDs in case of special selectors (selector = '#myId:something')
 124    // $.escapeSelector does not exist in jQuery < 3
 125    selector = typeof $$$1.escapeSelector === 'function' ? $$$1.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
 126    return selector;
 127  }
 128  /**
 129   * --------------------------------------------------------------------------
 130   * Public Util Api
 131   * --------------------------------------------------------------------------
 132   */
 133
 134
 135  var Util = {
 136    TRANSITION_END: 'bsTransitionEnd',
 137    getUID: function getUID(prefix) {
 138      do {
 139        // eslint-disable-next-line no-bitwise
 140        prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
 141      } while (document.getElementById(prefix));
 142
 143      return prefix;
 144    },
 145    getSelectorFromElement: function getSelectorFromElement(element) {
 146      var selector = element.getAttribute('data-target');
 147
 148      if (!selector || selector === '#') {
 149        selector = element.getAttribute('href') || '';
 150      } // If it's an ID
 151
 152
 153      if (selector.charAt(0) === '#') {
 154        selector = escapeId(selector);
 155      }
 156
 157      try {
 158        var $selector = $$$1(document).find(selector);
 159        return $selector.length > 0 ? selector : null;
 160      } catch (err) {
 161        return null;
 162      }
 163    },
 164    reflow: function reflow(element) {
 165      return element.offsetHeight;
 166    },
 167    triggerTransitionEnd: function triggerTransitionEnd(element) {
 168      $$$1(element).trigger(transition.end);
 169    },
 170    supportsTransitionEnd: function supportsTransitionEnd() {
 171      return Boolean(transition);
 172    },
 173    isElement: function isElement(obj) {
 174      return (obj[0] || obj).nodeType;
 175    },
 176    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
 177      for (var property in configTypes) {
 178        if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
 179          var expectedTypes = configTypes[property];
 180          var value = config[property];
 181          var valueType = value && Util.isElement(value) ? 'element' : toType(value);
 182
 183          if (!new RegExp(expectedTypes).test(valueType)) {
 184            throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
 185          }
 186        }
 187      }
 188    }
 189  };
 190  setTransitionEndSupport();
 191  return Util;
 192}($);
 193
 194/**
 195 * --------------------------------------------------------------------------
 196 * Bootstrap (v4.0.0): alert.js
 197 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 198 * --------------------------------------------------------------------------
 199 */
 200
 201var Alert = function ($$$1) {
 202  /**
 203   * ------------------------------------------------------------------------
 204   * Constants
 205   * ------------------------------------------------------------------------
 206   */
 207  var NAME = 'alert';
 208  var VERSION = '4.0.0';
 209  var DATA_KEY = 'bs.alert';
 210  var EVENT_KEY = "." + DATA_KEY;
 211  var DATA_API_KEY = '.data-api';
 212  var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
 213  var TRANSITION_DURATION = 150;
 214  var Selector = {
 215    DISMISS: '[data-dismiss="alert"]'
 216  };
 217  var Event = {
 218    CLOSE: "close" + EVENT_KEY,
 219    CLOSED: "closed" + EVENT_KEY,
 220    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
 221  };
 222  var ClassName = {
 223    ALERT: 'alert',
 224    FADE: 'fade',
 225    SHOW: 'show'
 226    /**
 227     * ------------------------------------------------------------------------
 228     * Class Definition
 229     * ------------------------------------------------------------------------
 230     */
 231
 232  };
 233
 234  var Alert =
 235  /*#__PURE__*/
 236  function () {
 237    function Alert(element) {
 238      this._element = element;
 239    } // Getters
 240
 241
 242    var _proto = Alert.prototype;
 243
 244    // Public
 245    _proto.close = function close(element) {
 246      element = element || this._element;
 247
 248      var rootElement = this._getRootElement(element);
 249
 250      var customEvent = this._triggerCloseEvent(rootElement);
 251
 252      if (customEvent.isDefaultPrevented()) {
 253        return;
 254      }
 255
 256      this._removeElement(rootElement);
 257    };
 258
 259    _proto.dispose = function dispose() {
 260      $$$1.removeData(this._element, DATA_KEY);
 261      this._element = null;
 262    }; // Private
 263
 264
 265    _proto._getRootElement = function _getRootElement(element) {
 266      var selector = Util.getSelectorFromElement(element);
 267      var parent = false;
 268
 269      if (selector) {
 270        parent = $$$1(selector)[0];
 271      }
 272
 273      if (!parent) {
 274        parent = $$$1(element).closest("." + ClassName.ALERT)[0];
 275      }
 276
 277      return parent;
 278    };
 279
 280    _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
 281      var closeEvent = $$$1.Event(Event.CLOSE);
 282      $$$1(element).trigger(closeEvent);
 283      return closeEvent;
 284    };
 285
 286    _proto._removeElement = function _removeElement(element) {
 287      var _this = this;
 288
 289      $$$1(element).removeClass(ClassName.SHOW);
 290
 291      if (!Util.supportsTransitionEnd() || !$$$1(element).hasClass(ClassName.FADE)) {
 292        this._destroyElement(element);
 293
 294        return;
 295      }
 296
 297      $$$1(element).one(Util.TRANSITION_END, function (event) {
 298        return _this._destroyElement(element, event);
 299      }).emulateTransitionEnd(TRANSITION_DURATION);
 300    };
 301
 302    _proto._destroyElement = function _destroyElement(element) {
 303      $$$1(element).detach().trigger(Event.CLOSED).remove();
 304    }; // Static
 305
 306
 307    Alert._jQueryInterface = function _jQueryInterface(config) {
 308      return this.each(function () {
 309        var $element = $$$1(this);
 310        var data = $element.data(DATA_KEY);
 311
 312        if (!data) {
 313          data = new Alert(this);
 314          $element.data(DATA_KEY, data);
 315        }
 316
 317        if (config === 'close') {
 318          data[config](this);
 319        }
 320      });
 321    };
 322
 323    Alert._handleDismiss = function _handleDismiss(alertInstance) {
 324      return function (event) {
 325        if (event) {
 326          event.preventDefault();
 327        }
 328
 329        alertInstance.close(this);
 330      };
 331    };
 332
 333    _createClass(Alert, null, [{
 334      key: "VERSION",
 335      get: function get() {
 336        return VERSION;
 337      }
 338    }]);
 339    return Alert;
 340  }();
 341  /**
 342   * ------------------------------------------------------------------------
 343   * Data Api implementation
 344   * ------------------------------------------------------------------------
 345   */
 346
 347
 348  $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
 349  /**
 350   * ------------------------------------------------------------------------
 351   * jQuery
 352   * ------------------------------------------------------------------------
 353   */
 354
 355  $$$1.fn[NAME] = Alert._jQueryInterface;
 356  $$$1.fn[NAME].Constructor = Alert;
 357
 358  $$$1.fn[NAME].noConflict = function () {
 359    $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
 360    return Alert._jQueryInterface;
 361  };
 362
 363  return Alert;
 364}($);
 365
 366/**
 367 * --------------------------------------------------------------------------
 368 * Bootstrap (v4.0.0): button.js
 369 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 370 * --------------------------------------------------------------------------
 371 */
 372
 373var Button = function ($$$1) {
 374  /**
 375   * ------------------------------------------------------------------------
 376   * Constants
 377   * ------------------------------------------------------------------------
 378   */
 379  var NAME = 'button';
 380  var VERSION = '4.0.0';
 381  var DATA_KEY = 'bs.button';
 382  var EVENT_KEY = "." + DATA_KEY;
 383  var DATA_API_KEY = '.data-api';
 384  var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
 385  var ClassName = {
 386    ACTIVE: 'active',
 387    BUTTON: 'btn',
 388    FOCUS: 'focus'
 389  };
 390  var Selector = {
 391    DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
 392    DATA_TOGGLE: '[data-toggle="buttons"]',
 393    INPUT: 'input',
 394    ACTIVE: '.active',
 395    BUTTON: '.btn'
 396  };
 397  var Event = {
 398    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
 399    FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
 400    /**
 401     * ------------------------------------------------------------------------
 402     * Class Definition
 403     * ------------------------------------------------------------------------
 404     */
 405
 406  };
 407
 408  var Button =
 409  /*#__PURE__*/
 410  function () {
 411    function Button(element) {
 412      this._element = element;
 413    } // Getters
 414
 415
 416    var _proto = Button.prototype;
 417
 418    // Public
 419    _proto.toggle = function toggle() {
 420      var triggerChangeEvent = true;
 421      var addAriaPressed = true;
 422      var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
 423
 424      if (rootElement) {
 425        var input = $$$1(this._element).find(Selector.INPUT)[0];
 426
 427        if (input) {
 428          if (input.type === 'radio') {
 429            if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) {
 430              triggerChangeEvent = false;
 431            } else {
 432              var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0];
 433
 434              if (activeElement) {
 435                $$$1(activeElement).removeClass(ClassName.ACTIVE);
 436              }
 437            }
 438          }
 439
 440          if (triggerChangeEvent) {
 441            if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
 442              return;
 443            }
 444
 445            input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE);
 446            $$$1(input).trigger('change');
 447          }
 448
 449          input.focus();
 450          addAriaPressed = false;
 451        }
 452      }
 453
 454      if (addAriaPressed) {
 455        this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE));
 456      }
 457
 458      if (triggerChangeEvent) {
 459        $$$1(this._element).toggleClass(ClassName.ACTIVE);
 460      }
 461    };
 462
 463    _proto.dispose = function dispose() {
 464      $$$1.removeData(this._element, DATA_KEY);
 465      this._element = null;
 466    }; // Static
 467
 468
 469    Button._jQueryInterface = function _jQueryInterface(config) {
 470      return this.each(function () {
 471        var data = $$$1(this).data(DATA_KEY);
 472
 473        if (!data) {
 474          data = new Button(this);
 475          $$$1(this).data(DATA_KEY, data);
 476        }
 477
 478        if (config === 'toggle') {
 479          data[config]();
 480        }
 481      });
 482    };
 483
 484    _createClass(Button, null, [{
 485      key: "VERSION",
 486      get: function get() {
 487        return VERSION;
 488      }
 489    }]);
 490    return Button;
 491  }();
 492  /**
 493   * ------------------------------------------------------------------------
 494   * Data Api implementation
 495   * ------------------------------------------------------------------------
 496   */
 497
 498
 499  $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
 500    event.preventDefault();
 501    var button = event.target;
 502
 503    if (!$$$1(button).hasClass(ClassName.BUTTON)) {
 504      button = $$$1(button).closest(Selector.BUTTON);
 505    }
 506
 507    Button._jQueryInterface.call($$$1(button), 'toggle');
 508  }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
 509    var button = $$$1(event.target).closest(Selector.BUTTON)[0];
 510    $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
 511  });
 512  /**
 513   * ------------------------------------------------------------------------
 514   * jQuery
 515   * ------------------------------------------------------------------------
 516   */
 517
 518  $$$1.fn[NAME] = Button._jQueryInterface;
 519  $$$1.fn[NAME].Constructor = Button;
 520
 521  $$$1.fn[NAME].noConflict = function () {
 522    $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
 523    return Button._jQueryInterface;
 524  };
 525
 526  return Button;
 527}($);
 528
 529/**
 530 * --------------------------------------------------------------------------
 531 * Bootstrap (v4.0.0): carousel.js
 532 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 533 * --------------------------------------------------------------------------
 534 */
 535
 536var Carousel = function ($$$1) {
 537  /**
 538   * ------------------------------------------------------------------------
 539   * Constants
 540   * ------------------------------------------------------------------------
 541   */
 542  var NAME = 'carousel';
 543  var VERSION = '4.0.0';
 544  var DATA_KEY = 'bs.carousel';
 545  var EVENT_KEY = "." + DATA_KEY;
 546  var DATA_API_KEY = '.data-api';
 547  var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
 548  var TRANSITION_DURATION = 600;
 549  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
 550
 551  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
 552
 553  var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
 554
 555  var Default = {
 556    interval: 5000,
 557    keyboard: true,
 558    slide: false,
 559    pause: 'hover',
 560    wrap: true
 561  };
 562  var DefaultType = {
 563    interval: '(number|boolean)',
 564    keyboard: 'boolean',
 565    slide: '(boolean|string)',
 566    pause: '(string|boolean)',
 567    wrap: 'boolean'
 568  };
 569  var Direction = {
 570    NEXT: 'next',
 571    PREV: 'prev',
 572    LEFT: 'left',
 573    RIGHT: 'right'
 574  };
 575  var Event = {
 576    SLIDE: "slide" + EVENT_KEY,
 577    SLID: "slid" + EVENT_KEY,
 578    KEYDOWN: "keydown" + EVENT_KEY,
 579    MOUSEENTER: "mouseenter" + EVENT_KEY,
 580    MOUSELEAVE: "mouseleave" + EVENT_KEY,
 581    TOUCHEND: "touchend" + EVENT_KEY,
 582    LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
 583    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
 584  };
 585  var ClassName = {
 586    CAROUSEL: 'carousel',
 587    ACTIVE: 'active',
 588    SLIDE: 'slide',
 589    RIGHT: 'carousel-item-right',
 590    LEFT: 'carousel-item-left',
 591    NEXT: 'carousel-item-next',
 592    PREV: 'carousel-item-prev',
 593    ITEM: 'carousel-item'
 594  };
 595  var Selector = {
 596    ACTIVE: '.active',
 597    ACTIVE_ITEM: '.active.carousel-item',
 598    ITEM: '.carousel-item',
 599    NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
 600    INDICATORS: '.carousel-indicators',
 601    DATA_SLIDE: '[data-slide], [data-slide-to]',
 602    DATA_RIDE: '[data-ride="carousel"]'
 603    /**
 604     * ------------------------------------------------------------------------
 605     * Class Definition
 606     * ------------------------------------------------------------------------
 607     */
 608
 609  };
 610
 611  var Carousel =
 612  /*#__PURE__*/
 613  function () {
 614    function Carousel(element, config) {
 615      this._items = null;
 616      this._interval = null;
 617      this._activeElement = null;
 618      this._isPaused = false;
 619      this._isSliding = false;
 620      this.touchTimeout = null;
 621      this._config = this._getConfig(config);
 622      this._element = $$$1(element)[0];
 623      this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0];
 624
 625      this._addEventListeners();
 626    } // Getters
 627
 628
 629    var _proto = Carousel.prototype;
 630
 631    // Public
 632    _proto.next = function next() {
 633      if (!this._isSliding) {
 634        this._slide(Direction.NEXT);
 635      }
 636    };
 637
 638    _proto.nextWhenVisible = function nextWhenVisible() {
 639      // Don't call next when the page isn't visible
 640      // or the carousel or its parent isn't visible
 641      if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
 642        this.next();
 643      }
 644    };
 645
 646    _proto.prev = function prev() {
 647      if (!this._isSliding) {
 648        this._slide(Direction.PREV);
 649      }
 650    };
 651
 652    _proto.pause = function pause(event) {
 653      if (!event) {
 654        this._isPaused = true;
 655      }
 656
 657      if ($$$1(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
 658        Util.triggerTransitionEnd(this._element);
 659        this.cycle(true);
 660      }
 661
 662      clearInterval(this._interval);
 663      this._interval = null;
 664    };
 665
 666    _proto.cycle = function cycle(event) {
 667      if (!event) {
 668        this._isPaused = false;
 669      }
 670
 671      if (this._interval) {
 672        clearInterval(this._interval);
 673        this._interval = null;
 674      }
 675
 676      if (this._config.interval && !this._isPaused) {
 677        this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
 678      }
 679    };
 680
 681    _proto.to = function to(index) {
 682      var _this = this;
 683
 684      this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
 685
 686      var activeIndex = this._getItemIndex(this._activeElement);
 687
 688      if (index > this._items.length - 1 || index < 0) {
 689        return;
 690      }
 691
 692      if (this._isSliding) {
 693        $$$1(this._element).one(Event.SLID, function () {
 694          return _this.to(index);
 695        });
 696        return;
 697      }
 698
 699      if (activeIndex === index) {
 700        this.pause();
 701        this.cycle();
 702        return;
 703      }
 704
 705      var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
 706
 707      this._slide(direction, this._items[index]);
 708    };
 709
 710    _proto.dispose = function dispose() {
 711      $$$1(this._element).off(EVENT_KEY);
 712      $$$1.removeData(this._element, DATA_KEY);
 713      this._items = null;
 714      this._config = null;
 715      this._element = null;
 716      this._interval = null;
 717      this._isPaused = null;
 718      this._isSliding = null;
 719      this._activeElement = null;
 720      this._indicatorsElement = null;
 721    }; // Private
 722
 723
 724    _proto._getConfig = function _getConfig(config) {
 725      config = _extends({}, Default, config);
 726      Util.typeCheckConfig(NAME, config, DefaultType);
 727      return config;
 728    };
 729
 730    _proto._addEventListeners = function _addEventListeners() {
 731      var _this2 = this;
 732
 733      if (this._config.keyboard) {
 734        $$$1(this._element).on(Event.KEYDOWN, function (event) {
 735          return _this2._keydown(event);
 736        });
 737      }
 738
 739      if (this._config.pause === 'hover') {
 740        $$$1(this._element).on(Event.MOUSEENTER, function (event) {
 741          return _this2.pause(event);
 742        }).on(Event.MOUSELEAVE, function (event) {
 743          return _this2.cycle(event);
 744        });
 745
 746        if ('ontouchstart' in document.documentElement) {
 747          // If it's a touch-enabled device, mouseenter/leave are fired as
 748          // part of the mouse compatibility events on first tap - the carousel
 749          // would stop cycling until user tapped out of it;
 750          // here, we listen for touchend, explicitly pause the carousel
 751          // (as if it's the second time we tap on it, mouseenter compat event
 752          // is NOT fired) and after a timeout (to allow for mouse compatibility
 753          // events to fire) we explicitly restart cycling
 754          $$$1(this._element).on(Event.TOUCHEND, function () {
 755            _this2.pause();
 756
 757            if (_this2.touchTimeout) {
 758              clearTimeout(_this2.touchTimeout);
 759            }
 760
 761            _this2.touchTimeout = setTimeout(function (event) {
 762              return _this2.cycle(event);
 763            }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
 764          });
 765        }
 766      }
 767    };
 768
 769    _proto._keydown = function _keydown(event) {
 770      if (/input|textarea/i.test(event.target.tagName)) {
 771        return;
 772      }
 773
 774      switch (event.which) {
 775        case ARROW_LEFT_KEYCODE:
 776          event.preventDefault();
 777          this.prev();
 778          break;
 779
 780        case ARROW_RIGHT_KEYCODE:
 781          event.preventDefault();
 782          this.next();
 783          break;
 784
 785        default:
 786      }
 787    };
 788
 789    _proto._getItemIndex = function _getItemIndex(element) {
 790      this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM));
 791      return this._items.indexOf(element);
 792    };
 793
 794    _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
 795      var isNextDirection = direction === Direction.NEXT;
 796      var isPrevDirection = direction === Direction.PREV;
 797
 798      var activeIndex = this._getItemIndex(activeElement);
 799
 800      var lastItemIndex = this._items.length - 1;
 801      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
 802
 803      if (isGoingToWrap && !this._config.wrap) {
 804        return activeElement;
 805      }
 806
 807      var delta = direction === Direction.PREV ? -1 : 1;
 808      var itemIndex = (activeIndex + delta) % this._items.length;
 809      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
 810    };
 811
 812    _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
 813      var targetIndex = this._getItemIndex(relatedTarget);
 814
 815      var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]);
 816
 817      var slideEvent = $$$1.Event(Event.SLIDE, {
 818        relatedTarget: relatedTarget,
 819        direction: eventDirectionName,
 820        from: fromIndex,
 821        to: targetIndex
 822      });
 823      $$$1(this._element).trigger(slideEvent);
 824      return slideEvent;
 825    };
 826
 827    _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
 828      if (this._indicatorsElement) {
 829        $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
 830
 831        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
 832
 833        if (nextIndicator) {
 834          $$$1(nextIndicator).addClass(ClassName.ACTIVE);
 835        }
 836      }
 837    };
 838
 839    _proto._slide = function _slide(direction, element) {
 840      var _this3 = this;
 841
 842      var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0];
 843
 844      var activeElementIndex = this._getItemIndex(activeElement);
 845
 846      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
 847
 848      var nextElementIndex = this._getItemIndex(nextElement);
 849
 850      var isCycling = Boolean(this._interval);
 851      var directionalClassName;
 852      var orderClassName;
 853      var eventDirectionName;
 854
 855      if (direction === Direction.NEXT) {
 856        directionalClassName = ClassName.LEFT;
 857        orderClassName = ClassName.NEXT;
 858        eventDirectionName = Direction.LEFT;
 859      } else {
 860        directionalClassName = ClassName.RIGHT;
 861        orderClassName = ClassName.PREV;
 862        eventDirectionName = Direction.RIGHT;
 863      }
 864
 865      if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
 866        this._isSliding = false;
 867        return;
 868      }
 869
 870      var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
 871
 872      if (slideEvent.isDefaultPrevented()) {
 873        return;
 874      }
 875
 876      if (!activeElement || !nextElement) {
 877        // Some weirdness is happening, so we bail
 878        return;
 879      }
 880
 881      this._isSliding = true;
 882
 883      if (isCycling) {
 884        this.pause();
 885      }
 886
 887      this._setActiveIndicatorElement(nextElement);
 888
 889      var slidEvent = $$$1.Event(Event.SLID, {
 890        relatedTarget: nextElement,
 891        direction: eventDirectionName,
 892        from: activeElementIndex,
 893        to: nextElementIndex
 894      });
 895
 896      if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.SLIDE)) {
 897        $$$1(nextElement).addClass(orderClassName);
 898        Util.reflow(nextElement);
 899        $$$1(activeElement).addClass(directionalClassName);
 900        $$$1(nextElement).addClass(directionalClassName);
 901        $$$1(activeElement).one(Util.TRANSITION_END, function () {
 902          $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
 903          $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
 904          _this3._isSliding = false;
 905          setTimeout(function () {
 906            return $$$1(_this3._element).trigger(slidEvent);
 907          }, 0);
 908        }).emulateTransitionEnd(TRANSITION_DURATION);
 909      } else {
 910        $$$1(activeElement).removeClass(ClassName.ACTIVE);
 911        $$$1(nextElement).addClass(ClassName.ACTIVE);
 912        this._isSliding = false;
 913        $$$1(this._element).trigger(slidEvent);
 914      }
 915
 916      if (isCycling) {
 917        this.cycle();
 918      }
 919    }; // Static
 920
 921
 922    Carousel._jQueryInterface = function _jQueryInterface(config) {
 923      return this.each(function () {
 924        var data = $$$1(this).data(DATA_KEY);
 925
 926        var _config = _extends({}, Default, $$$1(this).data());
 927
 928        if (typeof config === 'object') {
 929          _config = _extends({}, _config, config);
 930        }
 931
 932        var action = typeof config === 'string' ? config : _config.slide;
 933
 934        if (!data) {
 935          data = new Carousel(this, _config);
 936          $$$1(this).data(DATA_KEY, data);
 937        }
 938
 939        if (typeof config === 'number') {
 940          data.to(config);
 941        } else if (typeof action === 'string') {
 942          if (typeof data[action] === 'undefined') {
 943            throw new TypeError("No method named \"" + action + "\"");
 944          }
 945
 946          data[action]();
 947        } else if (_config.interval) {
 948          data.pause();
 949          data.cycle();
 950        }
 951      });
 952    };
 953
 954    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
 955      var selector = Util.getSelectorFromElement(this);
 956
 957      if (!selector) {
 958        return;
 959      }
 960
 961      var target = $$$1(selector)[0];
 962
 963      if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
 964        return;
 965      }
 966
 967      var config = _extends({}, $$$1(target).data(), $$$1(this).data());
 968      var slideIndex = this.getAttribute('data-slide-to');
 969
 970      if (slideIndex) {
 971        config.interval = false;
 972      }
 973
 974      Carousel._jQueryInterface.call($$$1(target), config);
 975
 976      if (slideIndex) {
 977        $$$1(target).data(DATA_KEY).to(slideIndex);
 978      }
 979
 980      event.preventDefault();
 981    };
 982
 983    _createClass(Carousel, null, [{
 984      key: "VERSION",
 985      get: function get() {
 986        return VERSION;
 987      }
 988    }, {
 989      key: "Default",
 990      get: function get() {
 991        return Default;
 992      }
 993    }]);
 994    return Carousel;
 995  }();
 996  /**
 997   * ------------------------------------------------------------------------
 998   * Data Api implementation
 999   * ------------------------------------------------------------------------
1000   */
1001
1002
1003  $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
1004  $$$1(window).on(Event.LOAD_DATA_API, function () {
1005    $$$1(Selector.DATA_RIDE).each(function () {
1006      var $carousel = $$$1(this);
1007
1008      Carousel._jQueryInterface.call($carousel, $carousel.data());
1009    });
1010  });
1011  /**
1012   * ------------------------------------------------------------------------
1013   * jQuery
1014   * ------------------------------------------------------------------------
1015   */
1016
1017  $$$1.fn[NAME] = Carousel._jQueryInterface;
1018  $$$1.fn[NAME].Constructor = Carousel;
1019
1020  $$$1.fn[NAME].noConflict = function () {
1021    $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
1022    return Carousel._jQueryInterface;
1023  };
1024
1025  return Carousel;
1026}($);
1027
1028/**
1029 * --------------------------------------------------------------------------
1030 * Bootstrap (v4.0.0): collapse.js
1031 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1032 * --------------------------------------------------------------------------
1033 */
1034
1035var Collapse = function ($$$1) {
1036  /**
1037   * ------------------------------------------------------------------------
1038   * Constants
1039   * ------------------------------------------------------------------------
1040   */
1041  var NAME = 'collapse';
1042  var VERSION = '4.0.0';
1043  var DATA_KEY = 'bs.collapse';
1044  var EVENT_KEY = "." + DATA_KEY;
1045  var DATA_API_KEY = '.data-api';
1046  var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
1047  var TRANSITION_DURATION = 600;
1048  var Default = {
1049    toggle: true,
1050    parent: ''
1051  };
1052  var DefaultType = {
1053    toggle: 'boolean',
1054    parent: '(string|element)'
1055  };
1056  var Event = {
1057    SHOW: "show" + EVENT_KEY,
1058    SHOWN: "shown" + EVENT_KEY,
1059    HIDE: "hide" + EVENT_KEY,
1060    HIDDEN: "hidden" + EVENT_KEY,
1061    CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
1062  };
1063  var ClassName = {
1064    SHOW: 'show',
1065    COLLAPSE: 'collapse',
1066    COLLAPSING: 'collapsing',
1067    COLLAPSED: 'collapsed'
1068  };
1069  var Dimension = {
1070    WIDTH: 'width',
1071    HEIGHT: 'height'
1072  };
1073  var Selector = {
1074    ACTIVES: '.show, .collapsing',
1075    DATA_TOGGLE: '[data-toggle="collapse"]'
1076    /**
1077     * ------------------------------------------------------------------------
1078     * Class Definition
1079     * ------------------------------------------------------------------------
1080     */
1081
1082  };
1083
1084  var Collapse =
1085  /*#__PURE__*/
1086  function () {
1087    function Collapse(element, config) {
1088      this._isTransitioning = false;
1089      this._element = element;
1090      this._config = this._getConfig(config);
1091      this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1092      var tabToggles = $$$1(Selector.DATA_TOGGLE);
1093
1094      for (var i = 0; i < tabToggles.length; i++) {
1095        var elem = tabToggles[i];
1096        var selector = Util.getSelectorFromElement(elem);
1097
1098        if (selector !== null && $$$1(selector).filter(element).length > 0) {
1099          this._selector = selector;
1100
1101          this._triggerArray.push(elem);
1102        }
1103      }
1104
1105      this._parent = this._config.parent ? this._getParent() : null;
1106
1107      if (!this._config.parent) {
1108        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1109      }
1110
1111      if (this._config.toggle) {
1112        this.toggle();
1113      }
1114    } // Getters
1115
1116
1117    var _proto = Collapse.prototype;
1118
1119    // Public
1120    _proto.toggle = function toggle() {
1121      if ($$$1(this._element).hasClass(ClassName.SHOW)) {
1122        this.hide();
1123      } else {
1124        this.show();
1125      }
1126    };
1127
1128    _proto.show = function show() {
1129      var _this = this;
1130
1131      if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) {
1132        return;
1133      }
1134
1135      var actives;
1136      var activesData;
1137
1138      if (this._parent) {
1139        actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]"));
1140
1141        if (actives.length === 0) {
1142          actives = null;
1143        }
1144      }
1145
1146      if (actives) {
1147        activesData = $$$1(actives).not(this._selector).data(DATA_KEY);
1148
1149        if (activesData && activesData._isTransitioning) {
1150          return;
1151        }
1152      }
1153
1154      var startEvent = $$$1.Event(Event.SHOW);
1155      $$$1(this._element).trigger(startEvent);
1156
1157      if (startEvent.isDefaultPrevented()) {
1158        return;
1159      }
1160
1161      if (actives) {
1162        Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide');
1163
1164        if (!activesData) {
1165          $$$1(actives).data(DATA_KEY, null);
1166        }
1167      }
1168
1169      var dimension = this._getDimension();
1170
1171      $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
1172      this._element.style[dimension] = 0;
1173
1174      if (this._triggerArray.length > 0) {
1175        $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
1176      }
1177
1178      this.setTransitioning(true);
1179
1180      var complete = function complete() {
1181        $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
1182        _this._element.style[dimension] = '';
1183
1184        _this.setTransitioning(false);
1185
1186        $$$1(_this._element).trigger(Event.SHOWN);
1187      };
1188
1189      if (!Util.supportsTransitionEnd()) {
1190        complete();
1191        return;
1192      }
1193
1194      var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1195      var scrollSize = "scroll" + capitalizedDimension;
1196      $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1197      this._element.style[dimension] = this._element[scrollSize] + "px";
1198    };
1199
1200    _proto.hide = function hide() {
1201      var _this2 = this;
1202
1203      if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) {
1204        return;
1205      }
1206
1207      var startEvent = $$$1.Event(Event.HIDE);
1208      $$$1(this._element).trigger(startEvent);
1209
1210      if (startEvent.isDefaultPrevented()) {
1211        return;
1212      }
1213
1214      var dimension = this._getDimension();
1215
1216      this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1217      Util.reflow(this._element);
1218      $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
1219
1220      if (this._triggerArray.length > 0) {
1221        for (var i = 0; i < this._triggerArray.length; i++) {
1222          var trigger = this._triggerArray[i];
1223          var selector = Util.getSelectorFromElement(trigger);
1224
1225          if (selector !== null) {
1226            var $elem = $$$1(selector);
1227
1228            if (!$elem.hasClass(ClassName.SHOW)) {
1229              $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
1230            }
1231          }
1232        }
1233      }
1234
1235      this.setTransitioning(true);
1236
1237      var complete = function complete() {
1238        _this2.setTransitioning(false);
1239
1240        $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
1241      };
1242
1243      this._element.style[dimension] = '';
1244
1245      if (!Util.supportsTransitionEnd()) {
1246        complete();
1247        return;
1248      }
1249
1250      $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
1251    };
1252
1253    _proto.setTransitioning = function setTransitioning(isTransitioning) {
1254      this._isTransitioning = isTransitioning;
1255    };
1256
1257    _proto.dispose = function dispose() {
1258      $$$1.removeData(this._element, DATA_KEY);
1259      this._config = null;
1260      this._parent = null;
1261      this._element = null;
1262      this._triggerArray = null;
1263      this._isTransitioning = null;
1264    }; // Private
1265
1266
1267    _proto._getConfig = function _getConfig(config) {
1268      config = _extends({}, Default, config);
1269      config.toggle = Boolean(config.toggle); // Coerce string values
1270
1271      Util.typeCheckConfig(NAME, config, DefaultType);
1272      return config;
1273    };
1274
1275    _proto._getDimension = function _getDimension() {
1276      var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH);
1277      return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1278    };
1279
1280    _proto._getParent = function _getParent() {
1281      var _this3 = this;
1282
1283      var parent = null;
1284
1285      if (Util.isElement(this._config.parent)) {
1286        parent = this._config.parent; // It's a jQuery object
1287
1288        if (typeof this._config.parent.jquery !== 'undefined') {
1289          parent = this._config.parent[0];
1290        }
1291      } else {
1292        parent = $$$1(this._config.parent)[0];
1293      }
1294
1295      var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1296      $$$1(parent).find(selector).each(function (i, element) {
1297        _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1298      });
1299      return parent;
1300    };
1301
1302    _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1303      if (element) {
1304        var isOpen = $$$1(element).hasClass(ClassName.SHOW);
1305
1306        if (triggerArray.length > 0) {
1307          $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
1308        }
1309      }
1310    }; // Static
1311
1312
1313    Collapse._getTargetFromElement = function _getTargetFromElement(element) {
1314      var selector = Util.getSelectorFromElement(element);
1315      return selector ? $$$1(selector)[0] : null;
1316    };
1317
1318    Collapse._jQueryInterface = function _jQueryInterface(config) {
1319      return this.each(function () {
1320        var $this = $$$1(this);
1321        var data = $this.data(DATA_KEY);
1322
1323        var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config);
1324
1325        if (!data && _config.toggle && /show|hide/.test(config)) {
1326          _config.toggle = false;
1327        }
1328
1329        if (!data) {
1330          data = new Collapse(this, _config);
1331          $this.data(DATA_KEY, data);
1332        }
1333
1334        if (typeof config === 'string') {
1335          if (typeof data[config] === 'undefined') {
1336            throw new TypeError("No method named \"" + config + "\"");
1337          }
1338
1339          data[config]();
1340        }
1341      });
1342    };
1343
1344    _createClass(Collapse, null, [{
1345      key: "VERSION",
1346      get: function get() {
1347        return VERSION;
1348      }
1349    }, {
1350      key: "Default",
1351      get: function get() {
1352        return Default;
1353      }
1354    }]);
1355    return Collapse;
1356  }();
1357  /**
1358   * ------------------------------------------------------------------------
1359   * Data Api implementation
1360   * ------------------------------------------------------------------------
1361   */
1362
1363
1364  $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
1365    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1366    if (event.currentTarget.tagName === 'A') {
1367      event.preventDefault();
1368    }
1369
1370    var $trigger = $$$1(this);
1371    var selector = Util.getSelectorFromElement(this);
1372    $$$1(selector).each(function () {
1373      var $target = $$$1(this);
1374      var data = $target.data(DATA_KEY);
1375      var config = data ? 'toggle' : $trigger.data();
1376
1377      Collapse._jQueryInterface.call($target, config);
1378    });
1379  });
1380  /**
1381   * ------------------------------------------------------------------------
1382   * jQuery
1383   * ------------------------------------------------------------------------
1384   */
1385
1386  $$$1.fn[NAME] = Collapse._jQueryInterface;
1387  $$$1.fn[NAME].Constructor = Collapse;
1388
1389  $$$1.fn[NAME].noConflict = function () {
1390    $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
1391    return Collapse._jQueryInterface;
1392  };
1393
1394  return Collapse;
1395}($);
1396
1397/**!
1398 * @fileOverview Kickass library to create and place poppers near their reference elements.
1399 * @version 1.12.9
1400 * @license
1401 * Copyright (c) 2016 Federico Zivolo and contributors
1402 *
1403 * Permission is hereby granted, free of charge, to any person obtaining a copy
1404 * of this software and associated documentation files (the "Software"), to deal
1405 * in the Software without restriction, including without limitation the rights
1406 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1407 * copies of the Software, and to permit persons to whom the Software is
1408 * furnished to do so, subject to the following conditions:
1409 *
1410 * The above copyright notice and this permission notice shall be included in all
1411 * copies or substantial portions of the Software.
1412 *
1413 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1415 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1416 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1417 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1418 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1419 * SOFTWARE.
1420 */
1421var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
1422var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
1423var timeoutDuration = 0;
1424for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
1425  if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
1426    timeoutDuration = 1;
1427    break;
1428  }
1429}
1430
1431function microtaskDebounce(fn) {
1432  var called = false;
1433  return function () {
1434    if (called) {
1435      return;
1436    }
1437    called = true;
1438    window.Promise.resolve().then(function () {
1439      called = false;
1440      fn();
1441    });
1442  };
1443}
1444
1445function taskDebounce(fn) {
1446  var scheduled = false;
1447  return function () {
1448    if (!scheduled) {
1449      scheduled = true;
1450      setTimeout(function () {
1451        scheduled = false;
1452        fn();
1453      }, timeoutDuration);
1454    }
1455  };
1456}
1457
1458var supportsMicroTasks = isBrowser && window.Promise;
1459
1460/**
1461* Create a debounced version of a method, that's asynchronously deferred
1462* but called in the minimum time possible.
1463*
1464* @method
1465* @memberof Popper.Utils
1466* @argument {Function} fn
1467* @returns {Function}
1468*/
1469var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
1470
1471/**
1472 * Check if the given variable is a function
1473 * @method
1474 * @memberof Popper.Utils
1475 * @argument {Any} functionToCheck - variable to check
1476 * @returns {Boolean} answer to: is a function?
1477 */
1478function isFunction(functionToCheck) {
1479  var getType = {};
1480  return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1481}
1482
1483/**
1484 * Get CSS computed property of the given element
1485 * @method
1486 * @memberof Popper.Utils
1487 * @argument {Eement} element
1488 * @argument {String} property
1489 */
1490function getStyleComputedProperty(element, property) {
1491  if (element.nodeType !== 1) {
1492    return [];
1493  }
1494  // NOTE: 1 DOM access here
1495  var css = getComputedStyle(element, null);
1496  return property ? css[property] : css;
1497}
1498
1499/**
1500 * Returns the parentNode or the host of the element
1501 * @method
1502 * @memberof Popper.Utils
1503 * @argument {Element} element
1504 * @returns {Element} parent
1505 */
1506function getParentNode(element) {
1507  if (element.nodeName === 'HTML') {
1508    return element;
1509  }
1510  return element.parentNode || element.host;
1511}
1512
1513/**
1514 * Returns the scrolling parent of the given element
1515 * @method
1516 * @memberof Popper.Utils
1517 * @argument {Element} element
1518 * @returns {Element} scroll parent
1519 */
1520function getScrollParent(element) {
1521  // Return body, `getScroll` will take care to get the correct `scrollTop` from it
1522  if (!element) {
1523    return document.body;
1524  }
1525
1526  switch (element.nodeName) {
1527    case 'HTML':
1528    case 'BODY':
1529      return element.ownerDocument.body;
1530    case '#document':
1531      return element.body;
1532  }
1533
1534  // Firefox want us to check `-x` and `-y` variations as well
1535
1536  var _getStyleComputedProp = getStyleComputedProperty(element),
1537      overflow = _getStyleComputedProp.overflow,
1538      overflowX = _getStyleComputedProp.overflowX,
1539      overflowY = _getStyleComputedProp.overflowY;
1540
1541  if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
1542    return element;
1543  }
1544
1545  return getScrollParent(getParentNode(element));
1546}
1547
1548/**
1549 * Returns the offset parent of the given element
1550 * @method
1551 * @memberof Popper.Utils
1552 * @argument {Element} element
1553 * @returns {Element} offset parent
1554 */
1555function getOffsetParent(element) {
1556  // NOTE: 1 DOM access here
1557  var offsetParent = element && element.offsetParent;
1558  var nodeName = offsetParent && offsetParent.nodeName;
1559
1560  if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
1561    if (element) {
1562      return element.ownerDocument.documentElement;
1563    }
1564
1565    return document.documentElement;
1566  }
1567
1568  // .offsetParent will return the closest TD or TABLE in case
1569  // no offsetParent is present, I hate this job...
1570  if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
1571    return getOffsetParent(offsetParent);
1572  }
1573
1574  return offsetParent;
1575}
1576
1577function isOffsetContainer(element) {
1578  var nodeName = element.nodeName;
1579
1580  if (nodeName === 'BODY') {
1581    return false;
1582  }
1583  return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
1584}
1585
1586/**
1587 * Finds the root node (document, shadowDOM root) of the given element
1588 * @method
1589 * @memberof Popper.Utils
1590 * @argument {Element} node
1591 * @returns {Element} root node
1592 */
1593function getRoot(node) {
1594  if (node.parentNode !== null) {
1595    return getRoot(node.parentNode);
1596  }
1597
1598  return node;
1599}
1600
1601/**
1602 * Finds the offset parent common to the two provided nodes
1603 * @method
1604 * @memberof Popper.Utils
1605 * @argument {Element} element1
1606 * @argument {Element} element2
1607 * @returns {Element} common offset parent
1608 */
1609function findCommonOffsetParent(element1, element2) {
1610  // This check is needed to avoid errors in case one of the elements isn't defined for any reason
1611  if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
1612    return document.documentElement;
1613  }
1614
1615  // Here we make sure to give as "start" the element that comes first in the DOM
1616  var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
1617  var start = order ? element1 : element2;
1618  var end = order ? element2 : element1;
1619
1620  // Get common ancestor container
1621  var range = document.createRange();
1622  range.setStart(start, 0);
1623  range.setEnd(end, 0);
1624  var commonAncestorContainer = range.commonAncestorContainer;
1625
1626  // Both nodes are inside #document
1627
1628  if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
1629    if (isOffsetContainer(commonAncestorContainer)) {
1630      return commonAncestorContainer;
1631    }
1632
1633    return getOffsetParent(commonAncestorContainer);
1634  }
1635
1636  // one of the nodes is inside shadowDOM, find which one
1637  var element1root = getRoot(element1);
1638  if (element1root.host) {
1639    return findCommonOffsetParent(element1root.host, element2);
1640  } else {
1641    return findCommonOffsetParent(element1, getRoot(element2).host);
1642  }
1643}
1644
1645/**
1646 * Gets the scroll value of the given element in the given side (top and left)
1647 * @method
1648 * @memberof Popper.Utils
1649 * @argument {Element} element
1650 * @argument {String} side `top` or `left`
1651 * @returns {number} amount of scrolled pixels
1652 */
1653function getScroll(element) {
1654  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
1655
1656  var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
1657  var nodeName = element.nodeName;
1658
1659  if (nodeName === 'BODY' || nodeName === 'HTML') {
1660    var html = element.ownerDocument.documentElement;
1661    var scrollingElement = element.ownerDocument.scrollingElement || html;
1662    return scrollingElement[upperSide];
1663  }
1664
1665  return element[upperSide];
1666}
1667
1668/*
1669 * Sum or subtract the element scroll values (left and top) from a given rect object
1670 * @method
1671 * @memberof Popper.Utils
1672 * @param {Object} rect - Rect object you want to change
1673 * @param {HTMLElement} element - The element from the function reads the scroll values
1674 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
1675 * @return {Object} rect - The modifier rect object
1676 */
1677function includeScroll(rect, element) {
1678  var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1679
1680  var scrollTop = getScroll(element, 'top');
1681  var scrollLeft = getScroll(element, 'left');
1682  var modifier = subtract ? -1 : 1;
1683  rect.top += scrollTop * modifier;
1684  rect.bottom += scrollTop * modifier;
1685  rect.left += scrollLeft * modifier;
1686  rect.right += scrollLeft * modifier;
1687  return rect;
1688}
1689
1690/*
1691 * Helper to detect borders of a given element
1692 * @method
1693 * @memberof Popper.Utils
1694 * @param {CSSStyleDeclaration} styles
1695 * Result of `getStyleComputedProperty` on the given element
1696 * @param {String} axis - `x` or `y`
1697 * @return {number} borders - The borders size of the given axis
1698 */
1699
1700function getBordersSize(styles, axis) {
1701  var sideA = a

Large files files are truncated, but you can click here to view the full file