PageSourceSearch

https://idaviru.ee/wp-content/themes/ida-viru/css/scss/bootstrap/js/dist/tooltip.js?ver=1

js idaviru.ee collected 2026-09-25 00:34:41 UTC 27,211 bytes, 929 lines download raw bytes

1/*!
2  * Bootstrap tooltip.js v4.4.1 (https://getbootstrap.com/)
3  * Copyright 2011-2019 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' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
8  typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
9  (global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
10}(this, (function ($, Popper, Util) { 'use strict';
11
12  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13  Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
14  Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
15
16  function _defineProperties(target, props) {
17    for (var i = 0; i < props.length; i++) {
18      var descriptor = props[i];
19      descriptor.enumerable = descriptor.enumerable || false;
20      descriptor.configurable = true;
21      if ("value" in descriptor) descriptor.writable = true;
22      Object.defineProperty(target, descriptor.key, descriptor);
23    }
24  }
25
26  function _createClass(Constructor, protoProps, staticProps) {
27    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28    if (staticProps) _defineProperties(Constructor, staticProps);
29    return Constructor;
30  }
31
32  function _defineProperty(obj, key, value) {
33    if (key in obj) {
34      Object.defineProperty(obj, key, {
35        value: value,
36        enumerable: true,
37        configurable: true,
38        writable: true
39      });
40    } else {
41      obj[key] = value;
42    }
43
44    return obj;
45  }
46
47  function ownKeys(object, enumerableOnly) {
48    var keys = Object.keys(object);
49
50    if (Object.getOwnPropertySymbols) {
51      var symbols = Object.getOwnPropertySymbols(object);
52      if (enumerableOnly) symbols = symbols.filter(function (sym) {
53        return Object.getOwnPropertyDescriptor(object, sym).enumerable;
54      });
55      keys.push.apply(keys, symbols);
56    }
57
58    return keys;
59  }
60
61  function _objectSpread2(target) {
62    for (var i = 1; i < arguments.length; i++) {
63      var source = arguments[i] != null ? arguments[i] : {};
64
65      if (i % 2) {
66        ownKeys(Object(source), true).forEach(function (key) {
67          _defineProperty(target, key, source[key]);
68        });
69      } else if (Object.getOwnPropertyDescriptors) {
70        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
71      } else {
72        ownKeys(Object(source)).forEach(function (key) {
73          Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
74        });
75      }
76    }
77
78    return target;
79  }
80
81  /**
82   * --------------------------------------------------------------------------
83   * Bootstrap (v4.4.1): tools/sanitizer.js
84   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
85   * --------------------------------------------------------------------------
86   */
87  var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
88  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
89  var DefaultWhitelist = {
90    // Global attributes allowed on any supplied element below.
91    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
92    a: ['target', 'href', 'title', 'rel'],
93    area: [],
94    b: [],
95    br: [],
96    col: [],
97    code: [],
98    div: [],
99    em: [],
100    hr: [],
101    h1: [],
102    h2: [],
103    h3: [],
104    h4: [],
105    h5: [],
106    h6: [],
107    i: [],
108    img: ['src', 'alt', 'title', 'width', 'height'],
109    li: [],
110    ol: [],
111    p: [],
112    pre: [],
113    s: [],
114    small: [],
115    span: [],
116    sub: [],
117    sup: [],
118    strong: [],
119    u: [],
120    ul: []
121  };
122  /**
123   * A pattern that recognizes a commonly useful subset of URLs that are safe.
124   *
125   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
126   */
127
128  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
129  /**
130   * A pattern that matches safe data URLs. Only matches image, video and audio types.
131   *
132   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
133   */
134
135  var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
136
137  function allowedAttribute(attr, allowedAttributeList) {
138    var attrName = attr.nodeName.toLowerCase();
139
140    if (allowedAttributeList.indexOf(attrName) !== -1) {
141      if (uriAttrs.indexOf(attrName) !== -1) {
142        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
143      }
144
145      return true;
146    }
147
148    var regExp = allowedAttributeList.filter(function (attrRegex) {
149      return attrRegex instanceof RegExp;
150    }); // Check if a regular expression validates the attribute.
151
152    for (var i = 0, l = regExp.length; i < l; i++) {
153      if (attrName.match(regExp[i])) {
154        return true;
155      }
156    }
157
158    return false;
159  }
160
161  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
162    if (unsafeHtml.length === 0) {
163      return unsafeHtml;
164    }
165
166    if (sanitizeFn && typeof sanitizeFn === 'function') {
167      return sanitizeFn(unsafeHtml);
168    }
169
170    var domParser = new window.DOMParser();
171    var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
172    var whitelistKeys = Object.keys(whiteList);
173    var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
174
175    var _loop = function _loop(i, len) {
176      var el = elements[i];
177      var elName = el.nodeName.toLowerCase();
178
179      if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
180        el.parentNode.removeChild(el);
181        return "continue";
182      }
183
184      var attributeList = [].slice.call(el.attributes);
185      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
186      attributeList.forEach(function (attr) {
187        if (!allowedAttribute(attr, whitelistedAttributes)) {
188          el.removeAttribute(attr.nodeName);
189        }
190      });
191    };
192
193    for (var i = 0, len = elements.length; i < len; i++) {
194      var _ret = _loop(i);
195
196      if (_ret === "continue") continue;
197    }
198
199    return createdDocument.body.innerHTML;
200  }
201
202  /**
203   * ------------------------------------------------------------------------
204   * Constants
205   * ------------------------------------------------------------------------
206   */
207
208  var NAME = 'tooltip';
209  var VERSION = '4.4.1';
210  var DATA_KEY = 'bs.tooltip';
211  var EVENT_KEY = "." + DATA_KEY;
212  var JQUERY_NO_CONFLICT = $.fn[NAME];
213  var CLASS_PREFIX = 'bs-tooltip';
214  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
215  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
216  var DefaultType = {
217    animation: 'boolean',
218    template: 'string',
219    title: '(string|element|function)',
220    trigger: 'string',
221    delay: '(number|object)',
222    html: 'boolean',
223    selector: '(string|boolean)',
224    placement: '(string|function)',
225    offset: '(number|string|function)',
226    container: '(string|element|boolean)',
227    fallbackPlacement: '(string|array)',
228    boundary: '(string|element)',
229    sanitize: 'boolean',
230    sanitizeFn: '(null|function)',
231    whiteList: 'object',
232    popperConfig: '(null|object)'
233  };
234  var AttachmentMap = {
235    AUTO: 'auto',
236    TOP: 'top',
237    RIGHT: 'right',
238    BOTTOM: 'bottom',
239    LEFT: 'left'
240  };
241  var Default = {
242    animation: true,
243    template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
244    trigger: 'hover focus',
245    title: '',
246    delay: 0,
247    html: false,
248    selector: false,
249    placement: 'top',
250    offset: 0,
251    container: false,
252    fallbackPlacement: 'flip',
253    boundary: 'scrollParent',
254    sanitize: true,
255    sanitizeFn: null,
256    whiteList: DefaultWhitelist,
257    popperConfig: null
258  };
259  var HoverState = {
260    SHOW: 'show',
261    OUT: 'out'
262  };
263  var Event = {
264    HIDE: "hide" + EVENT_KEY,
265    HIDDEN: "hidden" + EVENT_KEY,
266    SHOW: "show" + EVENT_KEY,
267    SHOWN: "shown" + EVENT_KEY,
268    INSERTED: "inserted" + EVENT_KEY,
269    CLICK: "click" + EVENT_KEY,
270    FOCUSIN: "focusin" + EVENT_KEY,
271    FOCUSOUT: "focusout" + EVENT_KEY,
272    MOUSEENTER: "mouseenter" + EVENT_KEY,
273    MOUSELEAVE: "mouseleave" + EVENT_KEY
274  };
275  var ClassName = {
276    FADE: 'fade',
277    SHOW: 'show'
278  };
279  var Selector = {
280    TOOLTIP: '.tooltip',
281    TOOLTIP_INNER: '.tooltip-inner',
282    ARROW: '.arrow'
283  };
284  var Trigger = {
285    HOVER: 'hover',
286    FOCUS: 'focus',
287    CLICK: 'click',
288    MANUAL: 'manual'
289  };
290  /**
291   * ------------------------------------------------------------------------
292   * Class Definition
293   * ------------------------------------------------------------------------
294   */
295
296  var Tooltip =
297  /*#__PURE__*/
298  function () {
299    function Tooltip(element, config) {
300      if (typeof Popper === 'undefined') {
301        throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
302      } // private
303
304
305      this._isEnabled = true;
306      this._timeout = 0;
307      this._hoverState = '';
308      this._activeTrigger = {};
309      this._popper = null; // Protected
310
311      this.element = element;
312      this.config = this._getConfig(config);
313      this.tip = null;
314
315      this._setListeners();
316    } // Getters
317
318
319    var _proto = Tooltip.prototype;
320
321    // Public
322    _proto.enable = function enable() {
323      this._isEnabled = true;
324    };
325
326    _proto.disable = function disable() {
327      this._isEnabled = false;
328    };
329
330    _proto.toggleEnabled = function toggleEnabled() {
331      this._isEnabled = !this._isEnabled;
332    };
333
334    _proto.toggle = function toggle(event) {
335      if (!this._isEnabled) {
336        return;
337      }
338
339      if (event) {
340        var dataKey = this.constructor.DATA_KEY;
341        var context = $(event.currentTarget).data(dataKey);
342
343        if (!context) {
344          context = new this.constructor(event.currentTarget, this._getDelegateConfig());
345          $(event.currentTarget).data(dataKey, context);
346        }
347
348        context._activeTrigger.click = !context._activeTrigger.click;
349
350        if (context._isWithActiveTrigger()) {
351          context._enter(null, context);
352        } else {
353          context._leave(null, context);
354        }
355      } else {
356        if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
357          this._leave(null, this);
358
359          return;
360        }
361
362        this._enter(null, this);
363      }
364    };
365
366    _proto.dispose = function dispose() {
367      clearTimeout(this._timeout);
368      $.removeData(this.element, this.constructor.DATA_KEY);
369      $(this.element).off(this.constructor.EVENT_KEY);
370      $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
371
372      if (this.tip) {
373        $(this.tip).remove();
374      }
375
376      this._isEnabled = null;
377      this._timeout = null;
378      this._hoverState = null;
379      this._activeTrigger = null;
380
381      if (this._popper) {
382        this._popper.destroy();
383      }
384
385      this._popper = null;
386      this.element = null;
387      this.config = null;
388      this.tip = null;
389    };
390
391    _proto.show = function show() {
392      var _this = this;
393
394      if ($(this.element).css('display') === 'none') {
395        throw new Error('Please use show on visible elements');
396      }
397
398      var showEvent = $.Event(this.constructor.Event.SHOW);
399
400      if (this.isWithContent() && this._isEnabled) {
401        $(this.element).trigger(showEvent);
402        var shadowRoot = Util.findShadowRoot(this.element);
403        var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
404
405        if (showEvent.isDefaultPrevented() || !isInTheDom) {
406          return;
407        }
408
409        var tip = this.getTipElement();
410        var tipId = Util.getUID(this.constructor.NAME);
411        tip.setAttribute('id', tipId);
412        this.element.setAttribute('aria-describedby', tipId);
413        this.setContent();
414
415        if (this.config.animation) {
416          $(tip).addClass(ClassName.FADE);
417        }
418
419        var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
420
421        var attachment = this._getAttachment(placement);
422
423        this.addAttachmentClass(attachment);
424
425        var container = this._getContainer();
426
427        $(tip).data(this.constructor.DATA_KEY, this);
428
429        if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
430          $(tip).appendTo(container);
431        }
432
433        $(this.element).trigger(this.constructor.Event.INSERTED);
434        this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
435        $(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
436        // empty mouseover listeners to the body's immediate children;
437        // only needed because of broken event delegation on iOS
438        // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
439
440        if ('ontouchstart' in document.documentElement) {
441          $(document.body).children().on('mouseover', null, $.noop);
442        }
443
444        var complete = function complete() {
445          if (_this.config.animation) {
446            _this._fixTransition();
447          }
448
449          var prevHoverState = _this._hoverState;
450          _this._hoverState = null;
451          $(_this.element).trigger(_this.constructor.Event.SHOWN);
452
453          if (prevHoverState === HoverState.OUT) {
454            _this._leave(null, _this);
455          }
456        };
457
458        if ($(this.tip).hasClass(ClassName.FADE)) {
459          var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
460          $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
461        } else {
462          complete();
463        }
464      }
465    };
466
467    _proto.hide = function hide(callback) {
468      var _this2 = this;
469
470      var tip = this.getTipElement();
471      var hideEvent = $.Event(this.constructor.Event.HIDE);
472
473      var complete = function complete() {
474        if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
475          tip.parentNode.removeChild(tip);
476        }
477
478        _this2._cleanTipClass();
479
480        _this2.element.removeAttribute('aria-describedby');
481
482        $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
483
484        if (_this2._popper !== null) {
485          _this2._popper.destroy();
486        }
487
488        if (callback) {
489          callback();
490        }
491      };
492
493      $(this.element).trigger(hideEvent);
494
495      if (hideEvent.isDefaultPrevented()) {
496        return;
497      }
498
499      $(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
500      // empty mouseover listeners we added for iOS support
501
502      if ('ontouchstart' in document.documentElement) {
503        $(document.body).children().off('mouseover', null, $.noop);
504      }
505
506      this._activeTrigger[Trigger.CLICK] = false;
507      this._activeTrigger[Trigger.FOCUS] = false;
508      this._activeTrigger[Trigger.HOVER] = false;
509
510      if ($(this.tip).hasClass(ClassName.FADE)) {
511        var transitionDuration = Util.getTransitionDurationFromElement(tip);
512        $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
513      } else {
514        complete();
515      }
516
517      this._hoverState = '';
518    };
519
520    _proto.update = function update() {
521      if (this._popper !== null) {
522        this._popper.scheduleUpdate();
523      }
524    } // Protected
525    ;
526
527    _proto.isWithContent = function isWithContent() {
528      return Boolean(this.getTitle());
529    };
530
531    _proto.addAttachmentClass = function addAttachmentClass(attachment) {
532      $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
533    };
534
535    _proto.getTipElement = function getTipElement() {
536      this.tip = this.tip || $(this.config.template)[0];
537      return this.tip;
538    };
539
540    _proto.setContent = function setContent() {
541      var tip = this.getTipElement();
542      this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
543      $(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
544    };
545
546    _proto.setElementContent = function setElementContent($element, content) {
547      if (typeof content === 'object' && (content.nodeType || content.jquery)) {
548        // Content is a DOM node or a jQuery
549        if (this.config.html) {
550          if (!$(content).parent().is($element)) {
551            $element.empty().append(content);
552          }
553        } else {
554          $element.text($(content).text());
555        }
556
557        return;
558      }
559
560      if (this.config.html) {
561        if (this.config.sanitize) {
562          content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
563        }
564
565        $element.html(content);
566      } else {
567        $element.text(content);
568      }
569    };
570
571    _proto.getTitle = function getTitle() {
572      var title = this.element.getAttribute('data-original-title');
573
574      if (!title) {
575        title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
576      }
577
578      return title;
579    } // Private
580    ;
581
582    _proto._getPopperConfig = function _getPopperConfig(attachment) {
583      var _this3 = this;
584
585      var defaultBsConfig = {
586        placement: attachment,
587        modifiers: {
588          offset: this._getOffset(),
589          flip: {
590            behavior: this.config.fallbackPlacement
591          },
592          arrow: {
593            element: Selector.ARROW
594          },
595          preventOverflow: {
596            boundariesElement: this.config.boundary
597          }
598        },
599        onCreate: function onCreate(data) {
600          if (data.originalPlacement !== data.placement) {
601            _this3._handlePopperPlacementChange(data);
602          }
603        },
604        onUpdate: function onUpdate(data) {
605          return _this3._handlePopperPlacementChange(data);
606        }
607      };
608      return _objectSpread2({}, defaultBsConfig, {}, this.config.popperConfig);
609    };
610
611    _proto._getOffset = function _getOffset() {
612      var _this4 = this;
613
614      var offset = {};
615
616      if (typeof this.config.offset === 'function') {
617        offset.fn = function (data) {
618          data.offsets = _objectSpread2({}, data.offsets, {}, _this4.config.offset(data.offsets, _this4.element) || {});
619          return data;
620        };
621      } else {
622        offset.offset = this.config.offset;
623      }
624
625      return offset;
626    };
627
628    _proto._getContainer = function _getContainer() {
629      if (this.config.container === false) {
630        return document.body;
631      }
632
633      if (Util.isElement(this.config.container)) {
634        return $(this.config.container);
635      }
636
637      return $(document).find(this.config.container);
638    };
639
640    _proto._getAttachment = function _getAttachment(placement) {
641      return AttachmentMap[placement.toUpperCase()];
642    };
643
644    _proto._setListeners = function _setListeners() {
645      var _this5 = this;
646
647      var triggers = this.config.trigger.split(' ');
648      triggers.forEach(function (trigger) {
649        if (trigger === 'click') {
650          $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
651            return _this5.toggle(event);
652          });
653        } else if (trigger !== Trigger.MANUAL) {
654          var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
655          var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
656          $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
657            return _this5._enter(event);
658          }).on(eventOut, _this5.config.selector, function (event) {
659            return _this5._leave(event);
660          });
661        }
662      });
663
664      this._hideModalHandler = function () {
665        if (_this5.element) {
666          _this5.hide();
667        }
668      };
669
670      $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
671
672      if (this.config.selector) {
673        this.config = _objectSpread2({}, this.config, {
674          trigger: 'manual',
675          selector: ''
676        });
677      } else {
678        this._fixTitle();
679      }
680    };
681
682    _proto._fixTitle = function _fixTitle() {
683      var titleType = typeof this.element.getAttribute('data-original-title');
684
685      if (this.element.getAttribute('title') || titleType !== 'string') {
686        this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
687        this.element.setAttribute('title', '');
688      }
689    };
690
691    _proto._enter = function _enter(event, context) {
692      var dataKey = this.constructor.DATA_KEY;
693      context = context || $(event.currentTarget).data(dataKey);
694
695      if (!context) {
696        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
697        $(event.currentTarget).data(dataKey, context);
698      }
699
700      if (event) {
701        context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
702      }
703
704      if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
705        context._hoverState = HoverState.SHOW;
706        return;
707      }
708
709      clearTimeout(context._timeout);
710      context._hoverState = HoverState.SHOW;
711
712      if (!context.config.delay || !context.config.delay.show) {
713        context.show();
714        return;
715      }
716
717      context._timeout = setTimeout(function () {
718        if (context._hoverState === HoverState.SHOW) {
719          context.show();
720        }
721      }, context.config.delay.show);
722    };
723
724    _proto._leave = function _leave(event, context) {
725      var dataKey = this.constructor.DATA_KEY;
726      context = context || $(event.currentTarget).data(dataKey);
727
728      if (!context) {
729        context = new this.constructor(event.currentTarget, this._getDelegateConfig());
730        $(event.currentTarget).data(dataKey, context);
731      }
732
733      if (event) {
734        context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
735      }
736
737      if (context._isWithActiveTrigger()) {
738        return;
739      }
740
741      clearTimeout(context._timeout);
742      context._hoverState = HoverState.OUT;
743
744      if (!context.config.delay || !context.config.delay.hide) {
745        context.hide();
746        return;
747      }
748
749      context._timeout = setTimeout(function () {
750        if (context._hoverState === HoverState.OUT) {
751          context.hide();
752        }
753      }, context.config.delay.hide);
754    };
755
756    _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
757      for (var trigger in this._activeTrigger) {
758        if (this._activeTrigger[trigger]) {
759          return true;
760        }
761      }
762
763      return false;
764    };
765
766    _proto._getConfig = function _getConfig(config) {
767      var dataAttributes = $(this.element).data();
768      Object.keys(dataAttributes).forEach(function (dataAttr) {
769        if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
770          delete dataAttributes[dataAttr];
771        }
772      });
773      config = _objectSpread2({}, this.constructor.Default, {}, dataAttributes, {}, typeof config === 'object' && config ? config : {});
774
775      if (typeof config.delay === 'number') {
776        config.delay = {
777          show: config.delay,
778          hide: config.delay
779        };
780      }
781
782      if (typeof config.title === 'number') {
783        config.title = config.title.toString();
784      }
785
786      if (typeof config.content === 'number') {
787        config.content = config.content.toString();
788      }
789
790      Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
791
792      if (config.sanitize) {
793        config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
794      }
795
796      return config;
797    };
798
799    _proto._getDelegateConfig = function _getDelegateConfig() {
800      var config = {};
801
802      if (this.config) {
803        for (var key in this.config) {
804          if (this.constructor.Default[key] !== this.config[key]) {
805            config[key] = this.config[key];
806          }
807        }
808      }
809
810      return config;
811    };
812
813    _proto._cleanTipClass = function _cleanTipClass() {
814      var $tip = $(this.getTipElement());
815      var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
816
817      if (tabClass !== null && tabClass.length) {
818        $tip.removeClass(tabClass.join(''));
819      }
820    };
821
822    _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
823      var popperInstance = popperData.instance;
824      this.tip = popperInstance.popper;
825
826      this._cleanTipClass();
827
828      this.addAttachmentClass(this._getAttachment(popperData.placement));
829    };
830
831    _proto._fixTransition = function _fixTransition() {
832      var tip = this.getTipElement();
833      var initConfigAnimation = this.config.animation;
834
835      if (tip.getAttribute('x-placement') !== null) {
836        return;
837      }
838
839      $(tip).removeClass(ClassName.FADE);
840      this.config.animation = false;
841      this.hide();
842      this.show();
843      this.config.animation = initConfigAnimation;
844    } // Static
845    ;
846
847    Tooltip._jQueryInterface = function _jQueryInterface(config) {
848      return this.each(function () {
849        var data = $(this).data(DATA_KEY);
850
851        var _config = typeof config === 'object' && config;
852
853        if (!data && /dispose|hide/.test(config)) {
854          return;
855        }
856
857        if (!data) {
858          data = new Tooltip(this, _config);
859          $(this).data(DATA_KEY, data);
860        }
861
862        if (typeof config === 'string') {
863          if (typeof data[config] === 'undefined') {
864            throw new TypeError("No method named \"" + config + "\"");
865          }
866
867          data[config]();
868        }
869      });
870    };
871
872    _createClass(Tooltip, null, [{
873      key: "VERSION",
874      get: function get() {
875        return VERSION;
876      }
877    }, {
878      key: "Default",
879      get: function get() {
880        return Default;
881      }
882    }, {
883      key: "NAME",
884      get: function get() {
885        return NAME;
886      }
887    }, {
888      key: "DATA_KEY",
889      get: function get() {
890        return DATA_KEY;
891      }
892    }, {
893      key: "Event",
894      get: function get() {
895        return Event;
896      }
897    }, {
898      key: "EVENT_KEY",
899      get: function get() {
900        return EVENT_KEY;
901      }
902    }, {
903      key: "DefaultType",
904      get: function get() {
905        return DefaultType;
906      }
907    }]);
908
909    return Tooltip;
910  }();
911  /**
912   * ------------------------------------------------------------------------
913   * jQuery
914   * ------------------------------------------------------------------------
915   */
916
917
918  $.fn[NAME] = Tooltip._jQueryInterface;
919  $.fn[NAME].Constructor = Tooltip;
920
921  $.fn[NAME].noConflict = function () {
922    $.fn[NAME] = JQUERY_NO_CONFLICT;
923    return Tooltip._jQueryInterface;
924  };
925
926  return Tooltip;
927
928})));
929//# sourceMappingURL=tooltip.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.