PageSourceSearch

https://www.mondocatania.com/wp/wp-content/plugins/tabs-responsive/assets/js/bootstrap_ver-5.5.1.js

js mondocatania.com collected 2026-10-02 14:03:37 UTC 68,526 bytes, 2,356 lines download raw bytes

vendor: 12,303 bytes, lines 1-431
1/*!
2 * Bootstrap v3.3.6 (http://getbootstrap.com)
3 * Copyright 2011-2015 Twitter, Inc.
4 * Licensed under the MIT license
5 */
6
7if (typeof jQuery === 'undefined') {
8  throw new Error('Bootstrap\'s JavaScript requires jQuery')
9}
10
11+function ($) {
12  'use strict';
13  var version = $.fn.jquery.split(' ')[0].split('.')
14  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
15    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
16  }
17}(jQuery);
18
19
20
21+function ($) {
22  'use strict';
23
24  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
25  // ============================================================
26
27  function transitionEnd() {
28    var el = document.createElement('bootstrap')
29
30    var transEndEventNames = {
31      WebkitTransition : 'webkitTransitionEnd',
32      MozTransition    : 'transitionend',
33      OTransition      : 'oTransitionEnd otransitionend',
34      transition       : 'transitionend'
35    }
36
37    for (var name in transEndEventNames) {
38      if (el.style[name] !== undefined) {
39        return { end: transEndEventNames[name] }
40      }
41    }
42
43    return false // explicit for ie8 (  ._.)
44  }
45
46  // http://blog.alexmaccaw.com/css-transitions
47  $.fn.emulateTransitionEnd = function (duration) {
48    var called = false
49    var $el = this
50    $(this).one('bsTransitionEnd', function () { called = true })
51    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
52    setTimeout(callback, duration)
53    return this
54  }
55
56  $(function () {
57    $.support.transition = transitionEnd()
58
59    if (!$.support.transition) return
60
61    $.event.special.bsTransitionEnd = {
62      bindType: $.support.transition.end,
63      delegateType: $.support.transition.end,
64      handle: function (e) {
65        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
66      }
67    }
68  })
69
70}(jQuery);
71
72/* ========================================================================
73 * Bootstrap: alert.js v3.3.6
74 * http://getbootstrap.com/javascript/#alerts
75 * ========================================================================
76 * Copyright 2011-2015 Twitter, Inc.
77 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
78 * ======================================================================== */
79
80
81+function ($) {
82  'use strict';
83
84  // ALERT CLASS DEFINITION
85  // ======================
86
87  var dismiss = '[data-dismiss="alert"]'
88  var Alert   = function (el) {
89    $(el).on('click', dismiss, this.close)
90  }
91
92  Alert.VERSION = '3.3.6'
93
94  Alert.TRANSITION_DURATION = 150
95
96  Alert.prototype.close = function (e) {
97    var $this    = $(this)
98    var selector = $this.attr('data-target')
99
100    if (!selector) {
101      selector = $this.attr('href')
102      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
103    }
104
105    var $parent = $(selector)
106
107    if (e) e.preventDefault()
108
109    if (!$parent.length) {
110      $parent = $this.closest('.alert')
111    }
112
113    $parent.trigger(e = $.Event('close.bs.alert'))
114
115    if (e.isDefaultPrevented()) return
116
117    $parent.removeClass('in')
118
119    function removeElement() {
120      // detach from parent, fire event then clean up data
121      $parent.detach().trigger('closed.bs.alert').remove()
122    }
123
124    $.support.transition && $parent.hasClass('fade') ?
125      $parent
126        .one('bsTransitionEnd', removeElement)
127        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
128      removeElement()
129  }
130
131
132  // ALERT PLUGIN DEFINITION
133  // =======================
134
135  function Plugin(option) {
136    return this.each(function () {
137      var $this = $(this)
138      var data  = $this.data('bs.alert')
139
140      if (!data) $this.data('bs.alert', (data = new Alert(this)))
141      if (typeof option == 'string') data[option].call($this)
142    })
143  }
144
145  var old = $.fn.alert
146
147  $.fn.alert             = Plugin
148  $.fn.alert.Constructor = Alert
149
150
151  // ALERT NO CONFLICT
152  // =================
153
154  $.fn.alert.noConflict = function () {
155    $.fn.alert = old
156    return this
157  }
158
159
160  // ALERT DATA-API
161  // ==============
162
163  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
164
165}(jQuery);
166
167/* ========================================================================
168 * Bootstrap: button.js v3.3.6
169 * http://getbootstrap.com/javascript/#buttons
170 * ========================================================================
171 * Copyright 2011-2015 Twitter, Inc.
172 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
173 * ======================================================================== */
174
175
176+function ($) {
177  'use strict';
178
179  // BUTTON PUBLIC CLASS DEFINITION
180  // ==============================
181
182  var Button = function (element, options) {
183    this.$element  = $(element)
184    this.options   = $.extend({}, Button.DEFAULTS, options)
185    this.isLoading = false
186  }
187
188  Button.VERSION  = '3.3.6'
189
190  Button.DEFAULTS = {
191    loadingText: 'loading...'
192  }
193
194  Button.prototype.setState = function (state) {
195    var d    = 'disabled'
196    var $el  = this.$element
197    var val  = $el.is('input') ? 'val' : 'html'
198    var data = $el.data()
199
200    state += 'Text'
201
202    if (data.resetText == null) $el.data('resetText', $el[val]())
203
204    // push to event loop to allow forms to submit
205    setTimeout($.proxy(function () {
206      $el[val](data[state] == null ? this.options[state] : data[state])
207
208      if (state == 'loadingText') {
209        this.isLoading = true
210        $el.addClass(d).attr(d, d)
211      } else if (this.isLoading) {
212        this.isLoading = false
213        $el.removeClass(d).removeAttr(d)
214      }
215    }, this), 0)
216  }
217
218  Button.prototype.toggle = function () {
219    var changed = true
220    var $parent = this.$element.closest('[data-toggle="buttons"]')
221
222    if ($parent.length) {
223      var $input = this.$element.find('input')
224      if ($input.prop('type') == 'radio') {
225        if ($input.prop('checked')) changed = false
226        $parent.find('.active').removeClass('active')
227        this.$element.addClass('active')
228      } else if ($input.prop('type') == 'checkbox') {
229        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
230        this.$element.toggleClass('active')
231      }
232      $input.prop('checked', this.$element.hasClass('active'))
233      if (changed) $input.trigger('change')
234    } else {
235      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
236      this.$element.toggleClass('active')
237    }
238  }
239
240
241  // BUTTON PLUGIN DEFINITION
242  // ========================
243
244  function Plugin(option) {
245    return this.each(function () {
246      var $this   = $(this)
247      var data    = $this.data('bs.button')
248      var options = typeof option == 'object' && option
249
250      if (!data) $this.data('bs.button', (data = new Button(this, options)))
251
252      if (option == 'toggle') data.toggle()
253      else if (option) data.setState(option)
254    })
255  }
256
257  var old = $.fn.button
258
259  $.fn.button             = Plugin
260  $.fn.button.Constructor = Button
261
262
263  // BUTTON NO CONFLICT
264  // ==================
265
266  $.fn.button.noConflict = function () {
267    $.fn.button = old
268    return this
269  }
270
271
272  // BUTTON DATA-API
273  // ===============
274
275  $(document)
276    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
277      var $btn = $(e.target)
278      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
279      Plugin.call($btn, 'toggle')
280      if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
281    })
282    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
283      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
284    })
285
286}(jQuery);
287
288/* ========================================================================
289 * Bootstrap: carousel.js v3.3.6
290 * http://getbootstrap.com/javascript/#carousel
291 * ========================================================================
292 * Copyright 2011-2015 Twitter, Inc.
293 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
294 * ======================================================================== */
295
296
297+function ($) {
298  'use strict';
299
300  // CAROUSEL CLASS DEFINITION
301  // =========================
302
303  var Carousel = function (element, options) {
304    this.$element    = $(element)
305    this.$indicators = this.$element.find('.carousel-indicators')
306    this.options     = options
307    this.paused      = null
308    this.sliding     = null
309    this.interval    = null
310    this.$active     = null
311    this.$items      = null
312
313    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
314
315    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
316      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
317      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
318  }
319
320  Carousel.VERSION  = '3.3.6'
321
322  Carousel.TRANSITION_DURATION = 600
323
324  Carousel.DEFAULTS = {
325    interval: 5000,
326    pause: 'hover',
327    wrap: true,
328    keyboard: true
329  }
330
331  Carousel.prototype.keydown = function (e) {
332    if (/input|textarea/i.test(e.target.tagName)) return
333    switch (e.which) {
334      case 37: this.prev(); break
335      case 39: this.next(); break
336      default: return
337    }
338
339    e.preventDefault()
340  }
341
342  Carousel.prototype.cycle = function (e) {
343    e || (this.paused = false)
344
345    this.interval && clearInterval(this.interval)
346
347    this.options.interval
348      && !this.paused
349      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
350
351    return this
352  }
353
354  Carousel.prototype.getItemIndex = function (item) {
355    this.$items = item.parent().children('.item')
356    return this.$items.index(item || this.$active)
357  }
358
359  Carousel.prototype.getItemForDirection = function (direction, active) {
360    var activeIndex = this.getItemIndex(active)
361    var willWrap = (direction == 'prev' && activeIndex === 0)
362                || (direction == 'next' && activeIndex == (this.$items.length - 1))
363    if (willWrap && !this.options.wrap) return active
364    var delta = direction == 'prev' ? -1 : 1
365    var itemIndex = (activeIndex + delta) % this.$items.length
366    return this.$items.eq(itemIndex)
367  }
368
369  Carousel.prototype.to = function (pos) {
370    var that        = this
371    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
372
373    if (pos > (this.$items.length - 1) || pos < 0) return
374
375    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
376    if (activeIndex == pos) return this.pause().cycle()
377
378    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
379  }
380
381  Carousel.prototype.pause = function (e) {
382    e || (this.paused = true)
383
384    if (this.$element.find('.next, .prev').length && $.support.transition) {
385      this.$element.trigger($.support.transition.end)
386      this.cycle(true)
387    }
388
389    this.interval = clearInterval(this.interval)
390
391    return this
392  }
393
394  Carousel.prototype.next = function () {
395    if (this.sliding) return
396    return this.slide('next')
397  }
398
399  Carousel.prototype.prev = function () {
400    if (this.sliding) return
401    return this.slide('prev')
402  }
403
404  Carousel.prototype.slide = function (type, next) {
405    var $active   = this.$element.find('.item.active')
406    var $next     = next || this.getItemForDirection(type, $active)
407    var isCycling = this.interval
408    var direction = type == 'next' ? 'left' : 'right'
409    var that      = this
410
411    if ($next.hasClass('active')) return (this.sliding = false)
412
413    var relatedTarget = $next[0]
414    var slideEvent = $.Event('slide.bs.carousel', {
415      relatedTarget: relatedTarget,
416      direction: direction
417    })
418    this.$element.trigger(slideEvent)
419    if (slideEvent.isDefaultPrevented()) return
420
421    this.sliding = true
422
423    isCycling && this.pause()
424
425    if (this.$indicators.length) {
426      this.$indicators.find('.active').removeClass('active')
427      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
428      $nextIndicator && $nextIndicator.addClass('active')
429    }
430
431    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
vendor: 14,010 bytes, lines 432-922
432    if ($.support.transition && this.$element.hasClass('slide')) {
433      $next.addClass(type)
434      $next[0].offsetWidth // force reflow
435      $active.addClass(direction)
436      $next.addClass(direction)
437      $active
438        .one('bsTransitionEnd', function () {
439          $next.removeClass([type, direction].join(' ')).addClass('active')
440          $active.removeClass(['active', direction].join(' '))
441          that.sliding = false
442          setTimeout(function () {
443            that.$element.trigger(slidEvent)
444          }, 0)
445        })
446        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
447    } else {
448      $active.removeClass('active')
449      $next.addClass('active')
450      this.sliding = false
451      this.$element.trigger(slidEvent)
452    }
453
454    isCycling && this.cycle()
455
456    return this
457  }
458
459
460  // CAROUSEL PLUGIN DEFINITION
461  // ==========================
462
463  function Plugin(option) {
464    return this.each(function () {
465      var $this   = $(this)
466      var data    = $this.data('bs.carousel')
467      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
468      var action  = typeof option == 'string' ? option : options.slide
469
470      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
471      if (typeof option == 'number') data.to(option)
472      else if (action) data[action]()
473      else if (options.interval) data.pause().cycle()
474    })
475  }
476
477  var old = $.fn.carousel
478
479  $.fn.carousel             = Plugin
480  $.fn.carousel.Constructor = Carousel
481
482
483  // CAROUSEL NO CONFLICT
484  // ====================
485
486  $.fn.carousel.noConflict = function () {
487    $.fn.carousel = old
488    return this
489  }
490
491
492  // CAROUSEL DATA-API
493  // =================
494
495  var clickHandler = function (e) {
496    var href
497    var $this   = $(this)
498    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
499    if (!$target.hasClass('carousel')) return
500    var options = $.extend({}, $target.data(), $this.data())
501    var slideIndex = $this.attr('data-slide-to')
502    if (slideIndex) options.interval = false
503
504    Plugin.call($target, options)
505
506    if (slideIndex) {
507      $target.data('bs.carousel').to(slideIndex)
508    }
509
510    e.preventDefault()
511  }
512
513  $(document)
514    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
515    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
516
517  $(window).on('load', function () {
518    $('[data-ride="carousel"]').each(function () {
519      var $carousel = $(this)
520      Plugin.call($carousel, $carousel.data())
521    })
522  })
523
524}(jQuery);
525
526/* ========================================================================
527 * Bootstrap: collapse.js v3.3.6
528 * http://getbootstrap.com/javascript/#collapse
529 * ========================================================================
530 * Copyright 2011-2015 Twitter, Inc.
531 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
532 * ======================================================================== */
533
534
535+function ($) {
536  'use strict';
537
538  // COLLAPSE PUBLIC CLASS DEFINITION
539  // ================================
540
541  var Collapse = function (element, options) {
542    this.$element      = $(element)
543    this.options       = $.extend({}, Collapse.DEFAULTS, options)
544    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
545                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
546    this.transitioning = null
547
548    if (this.options.parent) {
549      this.$parent = this.getParent()
550    } else {
551      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
552    }
553
554    if (this.options.toggle) this.toggle()
555  }
556
557  Collapse.VERSION  = '3.3.6'
558
559  Collapse.TRANSITION_DURATION = 350
560
561  Collapse.DEFAULTS = {
562    toggle: true
563  }
564
565  Collapse.prototype.dimension = function () {
566    var hasWidth = this.$element.hasClass('width')
567    return hasWidth ? 'width' : 'height'
568  }
569
570  Collapse.prototype.show = function () {
571    if (this.transitioning || this.$element.hasClass('in')) return
572
573    var activesData
574    var actives = this.$parent && this.$parent.children('.wpsm_panel').children('.in, .collapsing')
575
576    if (actives && actives.length) {
577      activesData = actives.data('bs.collapse')
578      if (activesData && activesData.transitioning) return
579    }
580
581    var startEvent = $.Event('show.bs.collapse')
582    this.$element.trigger(startEvent)
583    if (startEvent.isDefaultPrevented()) return
584
585    if (actives && actives.length) {
586      Plugin.call(actives, 'hide')
587      activesData || actives.data('bs.collapse', null)
588    }
589
590    var dimension = this.dimension()
591
592    this.$element
593      .removeClass('collapse')
594      .addClass('collapsing')[dimension](0)
595      .attr('aria-expanded', true)
596
597    this.$trigger
598      .removeClass('collapsed')
599      .attr('aria-expanded', true)
600
601    this.transitioning = 1
602
603    var complete = function () {
604      this.$element
605        .removeClass('collapsing')
606        .addClass('collapse in')[dimension]('')
607      this.transitioning = 0
608      this.$element
609        .trigger('shown.bs.collapse')
610    }
611
612    if (!$.support.transition) return complete.call(this)
613
614    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
615
616    this.$element
617      .one('bsTransitionEnd', $.proxy(complete, this))
618      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
619  }
620
621  Collapse.prototype.hide = function () {
622    if (this.transitioning || !this.$element.hasClass('in')) return
623
624    var startEvent = $.Event('hide.bs.collapse')
625    this.$element.trigger(startEvent)
626    if (startEvent.isDefaultPrevented()) return
627
628    var dimension = this.dimension()
629
630    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
631
632    this.$element
633      .addClass('collapsing')
634      .removeClass('collapse in')
635      .attr('aria-expanded', false)
636
637    this.$trigger
638      .addClass('collapsed')
639      .attr('aria-expanded', false)
640
641    this.transitioning = 1
642
643    var complete = function () {
644      this.transitioning = 0
645      this.$element
646        .removeClass('collapsing')
647        .addClass('collapse')
648        .trigger('hidden.bs.collapse')
649    }
650
651    if (!$.support.transition) return complete.call(this)
652
653    this.$element
654      [dimension](0)
655      .one('bsTransitionEnd', $.proxy(complete, this))
656      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
657  }
658
659  Collapse.prototype.toggle = function () {
660    this[this.$element.hasClass('in') ? 'hide' : 'show']()
661  }
662
663  Collapse.prototype.getParent = function () {
664    return $(this.options.parent)
665      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
666      .each($.proxy(function (i, element) {
667        var $element = $(element)
668        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
669      }, this))
670      .end()
671  }
672
673  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
674    var isOpen = $element.hasClass('in')
675
676    $element.attr('aria-expanded', isOpen)
677    $trigger
678      .toggleClass('collapsed', !isOpen)
679      .attr('aria-expanded', isOpen)
680  }
681
682  function getTargetFromTrigger($trigger) {
683    var href
684    var target = $trigger.attr('data-target')
685      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
686
687    return $(target)
688  }
689
690
691  // COLLAPSE PLUGIN DEFINITION
692  // ==========================
693
694  function Plugin(option) {
695    return this.each(function () {
696      var $this   = $(this)
697      var data    = $this.data('bs.collapse')
698      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
699
700      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
701      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
702      if (typeof option == 'string') data[option]()
703    })
704  }
705
706  var old = $.fn.collapse
707
708  $.fn.collapse             = Plugin
709  $.fn.collapse.Constructor = Collapse
710
711
712  // COLLAPSE NO CONFLICT
713  // ====================
714
715  $.fn.collapse.noConflict = function () {
716    $.fn.collapse = old
717    return this
718  }
719
720
721  // COLLAPSE DATA-API
722  // =================
723
724  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
725    var $this   = $(this)
726
727    if (!$this.attr('data-target')) e.preventDefault()
728
729    var $target = getTargetFromTrigger($this)
730    var data    = $target.data('bs.collapse')
731    var option  = data ? 'toggle' : $this.data()
732
733    Plugin.call($target, option)
734  })
735
736}(jQuery);
737
738/* ========================================================================
739 * Bootstrap: dropdown.js v3.3.6
740 * http://getbootstrap.com/javascript/#dropdowns
741 * ========================================================================
742 * Copyright 2011-2015 Twitter, Inc.
743 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
744 * ======================================================================== */
745
746
747+function ($) {
748  'use strict';
749
750  // DROPDOWN CLASS DEFINITION
751  // =========================
752
753  var backdrop = '.dropdown-backdrop'
754  var toggle   = '[data-toggle="dropdown"]'
755  var Dropdown = function (element) {
756    $(element).on('click.bs.dropdown', this.toggle)
757  }
758
759  Dropdown.VERSION = '3.3.6'
760
761  function getParent($this) {
762    var selector = $this.attr('data-target')
763
764    if (!selector) {
765      selector = $this.attr('href')
766      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
767    }
768
769    var $parent = selector && $(selector)
770
771    return $parent && $parent.length ? $parent : $this.parent()
772  }
773
774  function clearMenus(e) {
775    if (e && e.which === 3) return
776    $(backdrop).remove()
777    $(toggle).each(function () {
778      var $this         = $(this)
779      var $parent       = getParent($this)
780      var relatedTarget = { relatedTarget: this }
781
782      if (!$parent.hasClass('open')) return
783
784      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
785
786      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
787
788      if (e.isDefaultPrevented()) return
789
790      $this.attr('aria-expanded', 'false')
791      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
792    })
793  }
794
795  Dropdown.prototype.toggle = function (e) {
796    var $this = $(this)
797
798    if ($this.is('.disabled, :disabled')) return
799
800    var $parent  = getParent($this)
801    var isActive = $parent.hasClass('open')
802
803    clearMenus()
804
805    if (!isActive) {
806      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
807        // if mobile we use a backdrop because click events don't delegate
808        $(document.createElement('div'))
809          .addClass('dropdown-backdrop')
810          .insertAfter($(this))
811          .on('click', clearMenus)
812      }
813
814      var relatedTarget = { relatedTarget: this }
815      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
816
817      if (e.isDefaultPrevented()) return
818
819      $this
820        .trigger('focus')
821        .attr('aria-expanded', 'true')
822
823      $parent
824        .toggleClass('open')
825        .trigger($.Event('shown.bs.dropdown', relatedTarget))
826    }
827
828    return false
829  }
830
831  Dropdown.prototype.keydown = function (e) {
832    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
833
834    var $this = $(this)
835
836    e.preventDefault()
837    e.stopPropagation()
838
839    if ($this.is('.disabled, :disabled')) return
840
841    var $parent  = getParent($this)
842    var isActive = $parent.hasClass('open')
843
844    if (!isActive && e.which != 27 || isActive && e.which == 27) {
845      if (e.which == 27) $parent.find(toggle).trigger('focus')
846      return $this.trigger('click')
847    }
848
849    var desc = ' li:not(.disabled):visible a'
850    var $items = $parent.find('.dropdown-menu' + desc)
851
852    if (!$items.length) return
853
854    var index = $items.index(e.target)
855
856    if (e.which == 38 && index > 0)                 index--         // up
857    if (e.which == 40 && index < $items.length - 1) index++         // down
858    if (!~index)                                    index = 0
859
860    $items.eq(index).trigger('focus')
861  }
862
863
864  // DROPDOWN PLUGIN DEFINITION
865  // ==========================
866
867  function Plugin(option) {
868    return this.each(function () {
869      var $this = $(this)
870      var data  = $this.data('bs.dropdown')
871
872      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
873      if (typeof option == 'string') data[option].call($this)
874    })
875  }
876
877  var old = $.fn.dropdown
878
879  $.fn.dropdown             = Plugin
880  $.fn.dropdown.Constructor = Dropdown
881
882
883  // DROPDOWN NO CONFLICT
884  // ====================
885
886  $.fn.dropdown.noConflict = function () {
887    $.fn.dropdown = old
888    return this
889  }
890
891
892  // APPLY TO STANDARD DROPDOWN ELEMENTS
893  // ===================================
894
895  $(document)
896    .on('click.bs.dropdown.data-api', clearMenus)
897    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
898    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
899    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
900    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
901
902}(jQuery);
903
904/* ========================================================================
905 * Bootstrap: modal.js v3.3.6
906 * http://getbootstrap.com/javascript/#modals
907 * ========================================================================
908 * Copyright 2011-2015 Twitter, Inc.
909 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
910 * ======================================================================== */
911
912
913+function ($) {
914  'use strict';
915
916  // MODAL CLASS DEFINITION
917  // ======================
918
919  var Modal = function (element, options) {
920    this.options             = options
921    this.$body               = $(document.body)
922    this.$element            = $(element)
vendor: 10,154 bytes, lines 923-1270
923    this.$dialog             = this.$element.find('.modal-dialog')
924    this.$backdrop           = null
925    this.isShown             = null
926    this.originalBodyPad     = null
927    this.scrollbarWidth      = 0
928    this.ignoreBackdropClick = false
929
930    if (this.options.remote) {
931      this.$element
932        .find('.modal-content')
933        .load(this.options.remote, $.proxy(function () {
934          this.$element.trigger('loaded.bs.modal')
935        }, this))
936    }
937  }
938
939  Modal.VERSION  = '3.3.6'
940
941  Modal.TRANSITION_DURATION = 300
942  Modal.BACKDROP_TRANSITION_DURATION = 150
943
944  Modal.DEFAULTS = {
945    backdrop: true,
946    keyboard: true,
947    show: true
948  }
949
950  Modal.prototype.toggle = function (_relatedTarget) {
951    return this.isShown ? this.hide() : this.show(_relatedTarget)
952  }
953
954  Modal.prototype.show = function (_relatedTarget) {
955    var that = this
956    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
957
958    this.$element.trigger(e)
959
960    if (this.isShown || e.isDefaultPrevented()) return
961
962    this.isShown = true
963
964    this.checkScrollbar()
965    this.setScrollbar()
966    this.$body.addClass('modal-open')
967
968    this.escape()
969    this.resize()
970
971    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
972
973    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
974      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
975        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
976      })
977    })
978
979    this.backdrop(function () {
980      var transition = $.support.transition && that.$element.hasClass('fade')
981
982      if (!that.$element.parent().length) {
983        that.$element.appendTo(that.$body) // don't move modals dom position
984      }
985
986      that.$element
987        .show()
988        .scrollTop(0)
989
990      that.adjustDialog()
991
992      if (transition) {
993        that.$element[0].offsetWidth // force reflow
994      }
995
996      that.$element.addClass('in')
997
998      that.enforceFocus()
999
1000      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1001
1002      transition ?
1003        that.$dialog // wait for modal to slide in
1004          .one('bsTransitionEnd', function () {
1005            that.$element.trigger('focus').trigger(e)
1006          })
1007          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1008        that.$element.trigger('focus').trigger(e)
1009    })
1010  }
1011
1012  Modal.prototype.hide = function (e) {
1013    if (e) e.preventDefault()
1014
1015    e = $.Event('hide.bs.modal')
1016
1017    this.$element.trigger(e)
1018
1019    if (!this.isShown || e.isDefaultPrevented()) return
1020
1021    this.isShown = false
1022
1023    this.escape()
1024    this.resize()
1025
1026    $(document).off('focusin.bs.modal')
1027
1028    this.$element
1029      .removeClass('in')
1030      .off('click.dismiss.bs.modal')
1031      .off('mouseup.dismiss.bs.modal')
1032
1033    this.$dialog.off('mousedown.dismiss.bs.modal')
1034
1035    $.support.transition && this.$element.hasClass('fade') ?
1036      this.$element
1037        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1038        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1039      this.hideModal()
1040  }
1041
1042  Modal.prototype.enforceFocus = function () {
1043    $(document)
1044      .off('focusin.bs.modal') // guard against infinite focus loop
1045      .on('focusin.bs.modal', $.proxy(function (e) {
1046        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1047          this.$element.trigger('focus')
1048        }
1049      }, this))
1050  }
1051
1052  Modal.prototype.escape = function () {
1053    if (this.isShown && this.options.keyboard) {
1054      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1055        e.which == 27 && this.hide()
1056      }, this))
1057    } else if (!this.isShown) {
1058      this.$element.off('keydown.dismiss.bs.modal')
1059    }
1060  }
1061
1062  Modal.prototype.resize = function () {
1063    if (this.isShown) {
1064      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1065    } else {
1066      $(window).off('resize.bs.modal')
1067    }
1068  }
1069
1070  Modal.prototype.hideModal = function () {
1071    var that = this
1072    this.$element.hide()
1073    this.backdrop(function () {
1074      that.$body.removeClass('modal-open')
1075      that.resetAdjustments()
1076      that.resetScrollbar()
1077      that.$element.trigger('hidden.bs.modal')
1078    })
1079  }
1080
1081  Modal.prototype.removeBackdrop = function () {
1082    this.$backdrop && this.$backdrop.remove()
1083    this.$backdrop = null
1084  }
1085
1086  Modal.prototype.backdrop = function (callback) {
1087    var that = this
1088    var animate = this.$element.hasClass('fade') ? 'fade' : ''
1089
1090    if (this.isShown && this.options.backdrop) {
1091      var doAnimate = $.support.transition && animate
1092
1093      this.$backdrop = $(document.createElement('div'))
1094        .addClass('modal-backdrop ' + animate)
1095        .appendTo(this.$body)
1096
1097      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1098        if (this.ignoreBackdropClick) {
1099          this.ignoreBackdropClick = false
1100          return
1101        }
1102        if (e.target !== e.currentTarget) return
1103        this.options.backdrop == 'static'
1104          ? this.$element[0].focus()
1105          : this.hide()
1106      }, this))
1107
1108      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1109
1110      this.$backdrop.addClass('in')
1111
1112      if (!callback) return
1113
1114      doAnimate ?
1115        this.$backdrop
1116          .one('bsTransitionEnd', callback)
1117          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1118        callback()
1119
1120    } else if (!this.isShown && this.$backdrop) {
1121      this.$backdrop.removeClass('in')
1122
1123      var callbackRemove = function () {
1124        that.removeBackdrop()
1125        callback && callback()
1126      }
1127      $.support.transition && this.$element.hasClass('fade') ?
1128        this.$backdrop
1129          .one('bsTransitionEnd', callbackRemove)
1130          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1131        callbackRemove()
1132
1133    } else if (callback) {
1134      callback()
1135    }
1136  }
1137
1138  // these following methods are used to handle overflowing modals
1139
1140  Modal.prototype.handleUpdate = function () {
1141    this.adjustDialog()
1142  }
1143
1144  Modal.prototype.adjustDialog = function () {
1145    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1146
1147    this.$element.css({
1148      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1149      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1150    })
1151  }
1152
1153  Modal.prototype.resetAdjustments = function () {
1154    this.$element.css({
1155      paddingLeft: '',
1156      paddingRight: ''
1157    })
1158  }
1159
1160  Modal.prototype.checkScrollbar = function () {
1161    var fullWindowWidth = window.innerWidth
1162    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1163      var documentElementRect = document.documentElement.getBoundingClientRect()
1164      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1165    }
1166    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1167    this.scrollbarWidth = this.measureScrollbar()
1168  }
1169
1170  Modal.prototype.setScrollbar = function () {
1171    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1172    this.originalBodyPad = document.body.style.paddingRight || ''
1173    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1174  }
1175
1176  Modal.prototype.resetScrollbar = function () {
1177    this.$body.css('padding-right', this.originalBodyPad)
1178  }
1179
1180  Modal.prototype.measureScrollbar = function () { // thx walsh
1181    var scrollDiv = document.createElement('div')
1182    scrollDiv.className = 'modal-scrollbar-measure'
1183    this.$body.append(scrollDiv)
1184    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1185    this.$body[0].removeChild(scrollDiv)
1186    return scrollbarWidth
1187  }
1188
1189
1190  // MODAL PLUGIN DEFINITION
1191  // =======================
1192
1193  function Plugin(option, _relatedTarget) {
1194    return this.each(function () {
1195      var $this   = $(this)
1196      var data    = $this.data('bs.modal')
1197      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1198
1199      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1200      if (typeof option == 'string') data[option](_relatedTarget)
1201      else if (options.show) data.show(_relatedTarget)
1202    })
1203  }
1204
1205  var old = $.fn.modal
1206
1207  $.fn.modal             = Plugin
1208  $.fn.modal.Constructor = Modal
1209
1210
1211  // MODAL NO CONFLICT
1212  // =================
1213
1214  $.fn.modal.noConflict = function () {
1215    $.fn.modal = old
1216    return this
1217  }
1218
1219
1220  // MODAL DATA-API
1221  // ==============
1222
1223  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1224    var $this   = $(this)
1225    var href    = $this.attr('href')
1226    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1227    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1228
1229    if ($this.is('a')) e.preventDefault()
1230
1231    $target.one('show.bs.modal', function (showEvent) {
1232      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1233      $target.one('hidden.bs.modal', function () {
1234        $this.is(':visible') && $this.trigger('focus')
1235      })
1236    })
1237    Plugin.call($target, option, this)
1238  })
1239
1240}(jQuery);
1241
1242/* ========================================================================
1243 * Bootstrap: tooltip.js v3.3.6
1244 * http://getbootstrap.com/javascript/#tooltip
1245 * Inspired by the original jQuery.tipsy by Jason Frame
1246 * ========================================================================
1247 * Copyright 2011-2015 Twitter, Inc.
1248 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1249 * ======================================================================== */
1250
1251
1252+function ($) {
1253  'use strict';
1254
1255  // TOOLTIP PUBLIC CLASS DEFINITION
1256  // ===============================
1257
1258  var Tooltip = function (element, options) {
1259    this.type       = null
1260    this.options    = null
1261    this.enabled    = null
1262    this.timeout    = null
1263    this.hoverState = null
1264    this.$element   = null
1265    this.inState    = null
1266
1267    this.init('tooltip', element, options)
1268  }
1269
1270  Tooltip.VERSION  = '3.3.6
vendor: 15,550 bytes, lines 1270-1758
1270'
1271
1272  Tooltip.TRANSITION_DURATION = 150
1273
1274  Tooltip.DEFAULTS = {
1275    animation: true,
1276    placement: 'top',
1277    selector: false,
1278    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1279    trigger: 'hover focus',
1280    title: '',
1281    delay: 0,
1282    html: false,
1283    container: false,
1284    viewport: {
1285      selector: 'body',
1286      padding: 0
1287    }
1288  }
1289
1290  Tooltip.prototype.init = function (type, element, options) {
1291    this.enabled   = true
1292    this.type      = type
1293    this.$element  = $(element)
1294    this.options   = this.getOptions(options)
1295    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1296    this.inState   = { click: false, hover: false, focus: false }
1297
1298    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1299      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1300    }
1301
1302    var triggers = this.options.trigger.split(' ')
1303
1304    for (var i = triggers.length; i--;) {
1305      var trigger = triggers[i]
1306
1307      if (trigger == 'click') {
1308        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1309      } else if (trigger != 'manual') {
1310        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
1311        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1312
1313        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1314        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1315      }
1316    }
1317
1318    this.options.selector ?
1319      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1320      this.fixTitle()
1321  }
1322
1323  Tooltip.prototype.getDefaults = function () {
1324    return Tooltip.DEFAULTS
1325  }
1326
1327  Tooltip.prototype.getOptions = function (options) {
1328    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1329
1330    if (options.delay && typeof options.delay == 'number') {
1331      options.delay = {
1332        show: options.delay,
1333        hide: options.delay
1334      }
1335    }
1336
1337    return options
1338  }
1339
1340  Tooltip.prototype.getDelegateOptions = function () {
1341    var options  = {}
1342    var defaults = this.getDefaults()
1343
1344    this._options && $.each(this._options, function (key, value) {
1345      if (defaults[key] != value) options[key] = value
1346    })
1347
1348    return options
1349  }
1350
1351  Tooltip.prototype.enter = function (obj) {
1352    var self = obj instanceof this.constructor ?
1353      obj : $(obj.currentTarget).data('bs.' + this.type)
1354
1355    if (!self) {
1356      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1357      $(obj.currentTarget).data('bs.' + this.type, self)
1358    }
1359
1360    if (obj instanceof $.Event) {
1361      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1362    }
1363
1364    if (self.tip().hasClass('in') || self.hoverState == 'in') {
1365      self.hoverState = 'in'
1366      return
1367    }
1368
1369    clearTimeout(self.timeout)
1370
1371    self.hoverState = 'in'
1372
1373    if (!self.options.delay || !self.options.delay.show) return self.show()
1374
1375    self.timeout = setTimeout(function () {
1376      if (self.hoverState == 'in') self.show()
1377    }, self.options.delay.show)
1378  }
1379
1380  Tooltip.prototype.isInStateTrue = function () {
1381    for (var key in this.inState) {
1382      if (this.inState[key]) return true
1383    }
1384
1385    return false
1386  }
1387
1388  Tooltip.prototype.leave = function (obj) {
1389    var self = obj instanceof this.constructor ?
1390      obj : $(obj.currentTarget).data('bs.' + this.type)
1391
1392    if (!self) {
1393      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1394      $(obj.currentTarget).data('bs.' + this.type, self)
1395    }
1396
1397    if (obj instanceof $.Event) {
1398      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1399    }
1400
1401    if (self.isInStateTrue()) return
1402
1403    clearTimeout(self.timeout)
1404
1405    self.hoverState = 'out'
1406
1407    if (!self.options.delay || !self.options.delay.hide) return self.hide()
1408
1409    self.timeout = setTimeout(function () {
1410      if (self.hoverState == 'out') self.hide()
1411    }, self.options.delay.hide)
1412  }
1413
1414  Tooltip.prototype.show = function () {
1415    var e = $.Event('show.bs.' + this.type)
1416
1417    if (this.hasContent() && this.enabled) {
1418      this.$element.trigger(e)
1419
1420      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1421      if (e.isDefaultPrevented() || !inDom) return
1422      var that = this
1423
1424      var $tip = this.tip()
1425
1426      var tipId = this.getUID(this.type)
1427
1428      this.setContent()
1429      $tip.attr('id', tipId)
1430      this.$element.attr('aria-describedby', tipId)
1431
1432      if (this.options.animation) $tip.addClass('fade')
1433
1434      var placement = typeof this.options.placement == 'function' ?
1435        this.options.placement.call(this, $tip[0], this.$element[0]) :
1436        this.options.placement
1437
1438      var autoToken = /\s?auto?\s?/i
1439      var autoPlace = autoToken.test(placement)
1440      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1441
1442      $tip
1443        .detach()
1444        .css({ top: 0, left: 0, display: 'block' })
1445        .addClass(placement)
1446        .data('bs.' + this.type, this)
1447
1448      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1449      this.$element.trigger('inserted.bs.' + this.type)
1450
1451      var pos          = this.getPosition()
1452      var actualWidth  = $tip[0].offsetWidth
1453      var actualHeight = $tip[0].offsetHeight
1454
1455      if (autoPlace) {
1456        var orgPlacement = placement
1457        var viewportDim = this.getPosition(this.$viewport)
1458
1459        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
1460                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
1461                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
1462                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
1463                    placement
1464
1465        $tip
1466          .removeClass(orgPlacement)
1467          .addClass(placement)
1468      }
1469
1470      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1471
1472      this.applyPlacement(calculatedOffset, placement)
1473
1474      var complete = function () {
1475        var prevHoverState = that.hoverState
1476        that.$element.trigger('shown.bs.' + that.type)
1477        that.hoverState = null
1478
1479        if (prevHoverState == 'out') that.leave(that)
1480      }
1481
1482      $.support.transition && this.$tip.hasClass('fade') ?
1483        $tip
1484          .one('bsTransitionEnd', complete)
1485          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1486        complete()
1487    }
1488  }
1489
1490  Tooltip.prototype.applyPlacement = function (offset, placement) {
1491    var $tip   = this.tip()
1492    var width  = $tip[0].offsetWidth
1493    var height = $tip[0].offsetHeight
1494
1495    // manually read margins because getBoundingClientRect includes difference
1496    var marginTop = parseInt($tip.css('margin-top'), 10)
1497    var marginLeft = parseInt($tip.css('margin-left'), 10)
1498
1499    // we must check for NaN for ie 8/9
1500    if (isNaN(marginTop))  marginTop  = 0
1501    if (isNaN(marginLeft)) marginLeft = 0
1502
1503    offset.top  += marginTop
1504    offset.left += marginLeft
1505
1506    // $.fn.offset doesn't round pixel values
1507    // so we use setOffset directly with our own function B-0
1508    $.offset.setOffset($tip[0], $.extend({
1509      using: function (props) {
1510        $tip.css({
1511          top: Math.round(props.top),
1512          left: Math.round(props.left)
1513        })
1514      }
1515    }, offset), 0)
1516
1517    $tip.addClass('in')
1518
1519    // check to see if placing tip in new offset caused the tip to resize itself
1520    var actualWidth  = $tip[0].offsetWidth
1521    var actualHeight = $tip[0].offsetHeight
1522
1523    if (placement == 'top' && actualHeight != height) {
1524      offset.top = offset.top + height - actualHeight
1525    }
1526
1527    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1528
1529    if (delta.left) offset.left += delta.left
1530    else offset.top += delta.top
1531
1532    var isVertical          = /top|bottom/.test(placement)
1533    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1534    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1535
1536    $tip.offset(offset)
1537    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1538  }
1539
1540  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1541    this.arrow()
1542      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1543      .css(isVertical ? 'top' : 'left', '')
1544  }
1545
1546  Tooltip.prototype.setContent = function () {
1547    var $tip  = this.tip()
1548    var title = this.getTitle()
1549
1550    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1551    $tip.removeClass('fade in top bottom left right')
1552  }
1553
1554  Tooltip.prototype.hide = function (callback) {
1555    var that = this
1556    var $tip = $(this.$tip)
1557    var e    = $.Event('hide.bs.' + this.type)
1558
1559    function complete() {
1560      if (that.hoverState != 'in') $tip.detach()
1561      that.$element
1562        .removeAttr('aria-describedby')
1563        .trigger('hidden.bs.' + that.type)
1564      callback && callback()
1565    }
1566
1567    this.$element.trigger(e)
1568
1569    if (e.isDefaultPrevented()) return
1570
1571    $tip.removeClass('in')
1572
1573    $.support.transition && $tip.hasClass('fade') ?
1574      $tip
1575        .one('bsTransitionEnd', complete)
1576        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1577      complete()
1578
1579    this.hoverState = null
1580
1581    return this
1582  }
1583
1584  Tooltip.prototype.fixTitle = function () {
1585    var $e = this.$element
1586    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1587      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1588    }
1589  }
1590
1591  Tooltip.prototype.hasContent = function () {
1592    return this.getTitle()
1593  }
1594
1595  Tooltip.prototype.getPosition = function ($element) {
1596    $element   = $element || this.$element
1597
1598    var el     = $element[0]
1599    var isBody = el.tagName == 'BODY'
1600
1601    var elRect    = el.getBoundingClientRect()
1602    if (elRect.width == null) {
1603      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1604      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1605    }
1606    var elOffset  = isBody ? { top: 0, left: 0 } : $element.offset()
1607    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1608    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1609
1610    return $.extend({}, elRect, scroll, outerDims, elOffset)
1611  }
1612
1613  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1614    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
1615           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1616           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1617        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1618
1619  }
1620
1621  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1622    var delta = { top: 0, left: 0 }
1623    if (!this.$viewport) return delta
1624
1625    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1626    var viewportDimensions = this.getPosition(this.$viewport)
1627
1628    if (/right|left/.test(placement)) {
1629      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
1630      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1631      if (topEdgeOffset < viewportDimensions.top) { // top overflow
1632        delta.top = viewportDimensions.top - topEdgeOffset
1633      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1634        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1635      }
1636    } else {
1637      var leftEdgeOffset  = pos.left - viewportPadding
1638      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1639      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1640        delta.left = viewportDimensions.left - leftEdgeOffset
1641      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1642        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1643      }
1644    }
1645
1646    return delta
1647  }
1648
1649  Tooltip.prototype.getTitle = function () {
1650    var title
1651    var $e = this.$element
1652    var o  = this.options
1653
1654    title = $e.attr('data-original-title')
1655      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
1656
1657    return title
1658  }
1659
1660  Tooltip.prototype.getUID = function (prefix) {
1661    do prefix += ~~(Math.random() * 1000000)
1662    while (document.getElementById(prefix))
1663    return prefix
1664  }
1665
1666  Tooltip.prototype.tip = function () {
1667    if (!this.$tip) {
1668      this.$tip = $(this.options.template)
1669      if (this.$tip.length != 1) {
1670        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
1671      }
1672    }
1673    return this.$tip
1674  }
1675
1676  Tooltip.prototype.arrow = function () {
1677    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1678  }
1679
1680  Tooltip.prototype.enable = function () {
1681    this.enabled = true
1682  }
1683
1684  Tooltip.prototype.disable = function () {
1685    this.enabled = false
1686  }
1687
1688  Tooltip.prototype.toggleEnabled = function () {
1689    this.enabled = !this.enabled
1690  }
1691
1692  Tooltip.prototype.toggle = function (e) {
1693    var self = this
1694    if (e) {
1695      self = $(e.currentTarget).data('bs.' + this.type)
1696      if (!self) {
1697        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1698        $(e.currentTarget).data('bs.' + this.type, self)
1699      }
1700    }
1701
1702    if (e) {
1703      self.inState.click = !self.inState.click
1704      if (self.isInStateTrue()) self.enter(self)
1705      else self.leave(self)
1706    } else {
1707      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1708    }
1709  }
1710
1711  Tooltip.prototype.destroy = function () {
1712    var that = this
1713    clearTimeout(this.timeout)
1714    this.hide(function () {
1715      that.$element.off('.' + that.type).removeData('bs.' + that.type)
1716      if (that.$tip) {
1717        that.$tip.detach()
1718      }
1719      that.$tip = null
1720      that.$arrow = null
1721      that.$viewport = null
1722    })
1723  }
1724
1725
1726  // TOOLTIP PLUGIN DEFINITION
1727  // =========================
1728
1729  function Plugin(option) {
1730    return this.each(function () {
1731      var $this   = $(this)
1732      var data    = $this.data('bs.tooltip')
1733      var options = typeof option == 'object' && option
1734
1735      if (!data && /destroy|hide/.test(option)) return
1736      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1737      if (typeof option == 'string') data[option]()
1738    })
1739  }
1740
1741  var old = $.fn.tooltip
1742
1743  $.fn.tooltip             = Plugin
1744  $.fn.tooltip.Constructor = Tooltip
1745
1746
1747  // TOOLTIP NO CONFLICT
1748  // ===================
1749
1750  $.fn.tooltip.noConflict = function () {
1751    $.fn.tooltip = old
1752    return this
1753  }
1754
1755}(jQuery);
1756
1757/* ========================================================================
1758 * Bootstrap: popover.js v3.3.
vendor: 14,729 bytes, lines 1758-2280
17586
1759 * http://getbootstrap.com/javascript/#popovers
1760 * ========================================================================
1761 * Copyright 2011-2015 Twitter, Inc.
1762 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1763 * ======================================================================== */
1764
1765
1766+function ($) {
1767  'use strict';
1768
1769  // POPOVER PUBLIC CLASS DEFINITION
1770  // ===============================
1771
1772  var Popover = function (element, options) {
1773    this.init('popover', element, options)
1774  }
1775
1776  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1777
1778  Popover.VERSION  = '3.3.6'
1779
1780  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1781    placement: 'right',
1782    trigger: 'click',
1783    content: '',
1784    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1785  })
1786
1787
1788  // NOTE: POPOVER EXTENDS tooltip.js
1789  // ================================
1790
1791  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1792
1793  Popover.prototype.constructor = Popover
1794
1795  Popover.prototype.getDefaults = function () {
1796    return Popover.DEFAULTS
1797  }
1798
1799  Popover.prototype.setContent = function () {
1800    var $tip    = this.tip()
1801    var title   = this.getTitle()
1802    var content = this.getContent()
1803
1804    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1805    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1806      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1807    ](content)
1808
1809    $tip.removeClass('fade top bottom left right in')
1810
1811    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1812    // this manually by checking the contents.
1813    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1814  }
1815
1816  Popover.prototype.hasContent = function () {
1817    return this.getTitle() || this.getContent()
1818  }
1819
1820  Popover.prototype.getContent = function () {
1821    var $e = this.$element
1822    var o  = this.options
1823
1824    return $e.attr('data-content')
1825      || (typeof o.content == 'function' ?
1826            o.content.call($e[0]) :
1827            o.content)
1828  }
1829
1830  Popover.prototype.arrow = function () {
1831    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1832  }
1833
1834
1835  // POPOVER PLUGIN DEFINITION
1836  // =========================
1837
1838  function Plugin(option) {
1839    return this.each(function () {
1840      var $this   = $(this)
1841      var data    = $this.data('bs.popover')
1842      var options = typeof option == 'object' && option
1843
1844      if (!data && /destroy|hide/.test(option)) return
1845      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1846      if (typeof option == 'string') data[option]()
1847    })
1848  }
1849
1850  var old = $.fn.popover
1851
1852  $.fn.popover             = Plugin
1853  $.fn.popover.Constructor = Popover
1854
1855
1856  // POPOVER NO CONFLICT
1857  // ===================
1858
1859  $.fn.popover.noConflict = function () {
1860    $.fn.popover = old
1861    return this
1862  }
1863
1864}(jQuery);
1865
1866/* ========================================================================
1867 * Bootstrap: scrollspy.js v3.3.6
1868 * http://getbootstrap.com/javascript/#scrollspy
1869 * ========================================================================
1870 * Copyright 2011-2015 Twitter, Inc.
1871 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1872 * ======================================================================== */
1873
1874
1875+function ($) {
1876  'use strict';
1877
1878  // SCROLLSPY CLASS DEFINITION
1879  // ==========================
1880
1881  function ScrollSpy(element, options) {
1882    this.$body          = $(document.body)
1883    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1884    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
1885    this.selector       = (this.options.target || '') + ' .nav li > a'
1886    this.offsets        = []
1887    this.targets        = []
1888    this.activeTarget   = null
1889    this.scrollHeight   = 0
1890
1891    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1892    this.refresh()
1893    this.process()
1894  }
1895
1896  ScrollSpy.VERSION  = '3.3.6'
1897
1898  ScrollSpy.DEFAULTS = {
1899    offset: 10
1900  }
1901
1902  ScrollSpy.prototype.getScrollHeight = function () {
1903    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1904  }
1905
1906  ScrollSpy.prototype.refresh = function () {
1907    var that          = this
1908    var offsetMethod  = 'offset'
1909    var offsetBase    = 0
1910
1911    this.offsets      = []
1912    this.targets      = []
1913    this.scrollHeight = this.getScrollHeight()
1914
1915    if (!$.isWindow(this.$scrollElement[0])) {
1916      offsetMethod = 'position'
1917      offsetBase   = this.$scrollElement.scrollTop()
1918    }
1919
1920    this.$body
1921      .find(this.selector)
1922      .map(function () {
1923        var $el   = $(this)
1924        var href  = $el.data('target') || $el.attr('href')
1925        var $href = /^#./.test(href) && $(href)
1926
1927        return ($href
1928          && $href.length
1929          && $href.is(':visible')
1930          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1931      })
1932      .sort(function (a, b) { return a[0] - b[0] })
1933      .each(function () {
1934        that.offsets.push(this[0])
1935        that.targets.push(this[1])
1936      })
1937  }
1938
1939  ScrollSpy.prototype.process = function () {
1940    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
1941    var scrollHeight = this.getScrollHeight()
1942    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
1943    var offsets      = this.offsets
1944    var targets      = this.targets
1945    var activeTarget = this.activeTarget
1946    var i
1947
1948    if (this.scrollHeight != scrollHeight) {
1949      this.refresh()
1950    }
1951
1952    if (scrollTop >= maxScroll) {
1953      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1954    }
1955
1956    if (activeTarget && scrollTop < offsets[0]) {
1957      this.activeTarget = null
1958      return this.clear()
1959    }
1960
1961    for (i = offsets.length; i--;) {
1962      activeTarget != targets[i]
1963        && scrollTop >= offsets[i]
1964        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1965        && this.activate(targets[i])
1966    }
1967  }
1968
1969  ScrollSpy.prototype.activate = function (target) {
1970    this.activeTarget = target
1971
1972    this.clear()
1973
1974    var selector = this.selector +
1975      '[data-target="' + target + '"],' +
1976      this.selector + '[href="' + target + '"]'
1977
1978    var active = $(selector)
1979      .parents('li')
1980      .addClass('active')
1981
1982    if (active.parent('.dropdown-menu').length) {
1983      active = active
1984        .closest('li.dropdown')
1985        .addClass('active')
1986    }
1987
1988    active.trigger('activate.bs.scrollspy')
1989  }
1990
1991  ScrollSpy.prototype.clear = function () {
1992    $(this.selector)
1993      .parentsUntil(this.options.target, '.active')
1994      .removeClass('active')
1995  }
1996
1997
1998  // SCROLLSPY PLUGIN DEFINITION
1999  // ===========================
2000
2001  function Plugin(option) {
2002    return this.each(function () {
2003      var $this   = $(this)
2004      var data    = $this.data('bs.scrollspy')
2005      var options = typeof option == 'object' && option
2006
2007      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
2008      if (typeof option == 'string') data[option]()
2009    })
2010  }
2011
2012  var old = $.fn.scrollspy
2013
2014  $.fn.scrollspy             = Plugin
2015  $.fn.scrollspy.Constructor = ScrollSpy
2016
2017
2018  // SCROLLSPY NO CONFLICT
2019  // =====================
2020
2021  $.fn.scrollspy.noConflict = function () {
2022    $.fn.scrollspy = old
2023    return this
2024  }
2025
2026
2027  // SCROLLSPY DATA-API
2028  // ==================
2029
2030  $(window).on('load.bs.scrollspy.data-api', function () {
2031    $('[data-spy="scroll"]').each(function () {
2032      var $spy = $(this)
2033      Plugin.call($spy, $spy.data())
2034    })
2035  })
2036
2037}(jQuery);
2038
2039/* ========================================================================
2040 * Bootstrap: tab.js v3.3.6
2041 * http://getbootstrap.com/javascript/#tabs
2042 * ========================================================================
2043 * Copyright 2011-2015 Twitter, Inc.
2044 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2045 * ======================================================================== */
2046
2047
2048+function ($) {
2049  'use strict';
2050
2051  // TAB CLASS DEFINITION
2052  // ====================
2053
2054  var Tab = function (element) {
2055    // jscs:disable requireDollarBeforejQueryAssignment
2056    this.element = $(element)
2057    // jscs:enable requireDollarBeforejQueryAssignment
2058  }
2059
2060  Tab.VERSION = '3.3.6'
2061
2062  Tab.TRANSITION_DURATION = 150
2063
2064  Tab.prototype.show = function () {
2065    var $this    = this.element
2066    var $ul      = $this.closest('ul:not(.dropdown-menu)')
2067    var selector = $this.data('target')
2068
2069    if (!selector) {
2070      selector = $this.attr('href')
2071      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2072    }
2073
2074    if ($this.parent('li').hasClass('active')) return
2075
2076    var $previous = $ul.find('.active:last a')
2077    var hideEvent = $.Event('hide.bs.tab', {
2078      relatedTarget: $this[0]
2079    })
2080    var showEvent = $.Event('show.bs.tab', {
2081      relatedTarget: $previous[0]
2082    })
2083
2084    $previous.trigger(hideEvent)
2085    $this.trigger(showEvent)
2086
2087    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2088
2089    var $target = $(selector)
2090
2091    this.activate($this.closest('li'), $ul)
2092    this.activate($target, $target.parent(), function () {
2093      $previous.trigger({
2094        type: 'hidden.bs.tab',
2095        relatedTarget: $this[0]
2096      })
2097      $this.trigger({
2098        type: 'shown.bs.tab',
2099        relatedTarget: $previous[0]
2100      })
2101    })
2102  }
2103
2104  Tab.prototype.activate = function (element, container, callback) {
2105    var $active    = container.find('> .active')
2106    var transition = callback
2107      && $.support.transition
2108      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2109
2110    function next() {
2111      $active
2112        .removeClass('active')
2113        .find('> .dropdown-menu > .active')
2114          .removeClass('active')
2115        .end()
2116        .find('[data-toggle="tab"]')
2117          .attr('aria-expanded', false)
2118
2119      element
2120        .addClass('active')
2121        .find('[data-toggle="tab"]')
2122          .attr('aria-expanded', true)
2123
2124      if (transition) {
2125        element[0].offsetWidth // reflow for transition
2126        element.addClass('in')
2127      } else {
2128        element.removeClass('fade')
2129      }
2130
2131      if (element.parent('.dropdown-menu').length) {
2132        element
2133          .closest('li.dropdown')
2134            .addClass('active')
2135          .end()
2136          .find('[data-toggle="tab"]')
2137            .attr('aria-expanded', true)
2138      }
2139
2140      callback && callback()
2141    }
2142
2143    $active.length && transition ?
2144      $active
2145        .one('bsTransitionEnd', next)
2146        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2147      next()
2148
2149    $active.removeClass('in')
2150  }
2151
2152
2153  // TAB PLUGIN DEFINITION
2154  // =====================
2155
2156  function Plugin(option) {
2157    return this.each(function () {
2158      var $this = $(this)
2159      var data  = $this.data('bs.tab')
2160
2161      if (!data) $this.data('bs.tab', (data = new Tab(this)))
2162      if (typeof option == 'string') data[option]()
2163    })
2164  }
2165
2166  var old = $.fn.tab
2167
2168  $.fn.tab             = Plugin
2169  $.fn.tab.Constructor = Tab
2170
2171
2172  // TAB NO CONFLICT
2173  // ===============
2174
2175  $.fn.tab.noConflict = function () {
2176    $.fn.tab = old
2177    return this
2178  }
2179
2180
2181  // TAB DATA-API
2182  // ============
2183
2184  var clickHandler = function (e) {
2185    e.preventDefault()
2186    Plugin.call($(this), 'show')
2187  }
2188
2189  $(document)
2190    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2191    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2192
2193}(jQuery);
2194
2195/* ========================================================================
2196 * Bootstrap: affix.js v3.3.6
2197 * http://getbootstrap.com/javascript/#affix
2198 * ========================================================================
2199 * Copyright 2011-2015 Twitter, Inc.
2200 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2201 * ======================================================================== */
2202
2203
2204+function ($) {
2205  'use strict';
2206
2207  // AFFIX CLASS DEFINITION
2208  // ======================
2209
2210  var Affix = function (element, options) {
2211    this.options = $.extend({}, Affix.DEFAULTS, options)
2212
2213    this.$target = $(this.options.target)
2214      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2215      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
2216
2217    this.$element     = $(element)
2218    this.affixed      = null
2219    this.unpin        = null
2220    this.pinnedOffset = null
2221
2222    this.checkPosition()
2223  }
2224
2225  Affix.VERSION  = '3.3.6'
2226
2227  Affix.RESET    = 'affix affix-top affix-bottom'
2228
2229  Affix.DEFAULTS = {
2230    offset: 0,
2231    target: window
2232  }
2233
2234  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2235    var scrollTop    = this.$target.scrollTop()
2236    var position     = this.$element.offset()
2237    var targetHeight = this.$target.height()
2238
2239    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2240
2241    if (this.affixed == 'bottom') {
2242      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2243      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2244    }
2245
2246    var initializing   = this.affixed == null
2247    var colliderTop    = initializing ? scrollTop : position.top
2248    var colliderHeight = initializing ? targetHeight : height
2249
2250    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2251    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2252
2253    return false
2254  }
2255
2256  Affix.prototype.getPinnedOffset = function () {
2257    if (this.pinnedOffset) return this.pinnedOffset
2258    this.$element.removeClass(Affix.RESET).addClass('affix')
2259    var scrollTop = this.$target.scrollTop()
2260    var position  = this.$element.offset()
2261    return (this.pinnedOffset = position.top - scrollTop)
2262  }
2263
2264  Affix.prototype.checkPositionWithEventLoop = function () {
2265    setTimeout($.proxy(this.checkPosition, this), 1)
2266  }
2267
2268  Affix.prototype.checkPosition = function () {
2269    if (!this.$element.is(':visible')) return
2270
2271    var height       = this.$element.height()
2272    var offset       = this.options.offset
2273    var offsetTop    = offset.top
2274    var offsetBottom = offset.bottom
2275    var scrollHeight = Math.max($(document).height(), $(document.body).height())
2276
2277    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
2278    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
2279    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2280
vendor: 1,780 bytes, lines 2281-2356
2281    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2282
2283    if (this.affixed != affix) {
2284      if (this.unpin != null) this.$element.css('top', '')
2285
2286      var affixType = 'affix' + (affix ? '-' + affix : '')
2287      var e         = $.Event(affixType + '.bs.affix')
2288
2289      this.$element.trigger(e)
2290
2291      if (e.isDefaultPrevented()) return
2292
2293      this.affixed = affix
2294      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2295
2296      this.$element
2297        .removeClass(Affix.RESET)
2298        .addClass(affixType)
2299        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2300    }
2301
2302    if (affix == 'bottom') {
2303      this.$element.offset({
2304        top: scrollHeight - height - offsetBottom
2305      })
2306    }
2307  }
2308
2309
2310  // AFFIX PLUGIN DEFINITION
2311  // =======================
2312
2313  function Plugin(option) {
2314    return this.each(function () {
2315      var $this   = $(this)
2316      var data    = $this.data('bs.affix')
2317      var options = typeof option == 'object' && option
2318
2319      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2320      if (typeof option == 'string') data[option]()
2321    })
2322  }
2323
2324  var old = $.fn.affix
2325
2326  $.fn.affix             = Plugin
2327  $.fn.affix.Constructor = Affix
2328
2329
2330  // AFFIX NO CONFLICT
2331  // =================
2332
2333  $.fn.affix.noConflict = function () {
2334    $.fn.affix = old
2335    return this
2336  }
2337
2338
2339  // AFFIX DATA-API
2340  // ==============
2341
2342  $(window).on('load', function () {
2343    $('[data-spy="affix"]').each(function () {
2344      var $spy = $(this)
2345      var data = $spy.data()
2346
2347      data.offset = data.offset || {}
2348
2349      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2350      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
2351
2352      Plugin.call($spy, data)
2353    })
2354  })
2355
2356}(jQuery);

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.