PageSourceSearch

https://www.derhund.de/wp-content/themes/derhund.de/dist/all.js.min.js?rand=2628

js derhund.de collected 2026-09-24 20:12:54 UTC 168,279 bytes, 3,577 lines download raw bytes

vendor: 68,890 bytes, lines 1-2363
1/*!
2 * Bootstrap v3.3.5 (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)) {
15    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
16  }
17}(jQuery);
18
19/* ========================================================================
20 * Bootstrap: transition.js v3.3.5
21 * http://getbootstrap.com/javascript/#transitions
22 * ========================================================================
23 * Copyright 2011-2015 Twitter, Inc.
24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25 * ======================================================================== */
26
27
28+function ($) {
29  'use strict';
30
31  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
32  // ============================================================
33
34  function transitionEnd() {
35    var el = document.createElement('bootstrap')
36
37    var transEndEventNames = {
38      WebkitTransition : 'webkitTransitionEnd',
39      MozTransition    : 'transitionend',
40      OTransition      : 'oTransitionEnd otransitionend',
41      transition       : 'transitionend'
42    }
43
44    for (var name in transEndEventNames) {
45      if (el.style[name] !== undefined) {
46        return { end: transEndEventNames[name] }
47      }
48    }
49
50    return false // explicit for ie8 (  ._.)
51  }
52
53  // http://blog.alexmaccaw.com/css-transitions
54  $.fn.emulateTransitionEnd = function (duration) {
55    var called = false
56    var $el = this
57    $(this).one('bsTransitionEnd', function () { called = true })
58    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59    setTimeout(callback, duration)
60    return this
61  }
62
63  $(function () {
64    $.support.transition = transitionEnd()
65
66    if (!$.support.transition) return
67
68    $.event.special.bsTransitionEnd = {
69      bindType: $.support.transition.end,
70      delegateType: $.support.transition.end,
71      handle: function (e) {
72        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73      }
74    }
75  })
76
77}(jQuery);
78
79/* ========================================================================
80 * Bootstrap: alert.js v3.3.5
81 * http://getbootstrap.com/javascript/#alerts
82 * ========================================================================
83 * Copyright 2011-2015 Twitter, Inc.
84 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
85 * ======================================================================== */
86
87
88+function ($) {
89  'use strict';
90
91  // ALERT CLASS DEFINITION
92  // ======================
93
94  var dismiss = '[data-dismiss="alert"]'
95  var Alert   = function (el) {
96    $(el).on('click', dismiss, this.close)
97  }
98
99  Alert.VERSION = '3.3.5'
100
101  Alert.TRANSITION_DURATION = 150
102
103  Alert.prototype.close = function (e) {
104    var $this    = $(this)
105    var selector = $this.attr('data-target')
106
107    if (!selector) {
108      selector = $this.attr('href')
109      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
110    }
111
112    var $parent = $(selector)
113
114    if (e) e.preventDefault()
115
116    if (!$parent.length) {
117      $parent = $this.closest('.alert')
118    }
119
120    $parent.trigger(e = $.Event('close.bs.alert'))
121
122    if (e.isDefaultPrevented()) return
123
124    $parent.removeClass('in')
125
126    function removeElement() {
127      // detach from parent, fire event then clean up data
128      $parent.detach().trigger('closed.bs.alert').remove()
129    }
130
131    $.support.transition && $parent.hasClass('fade') ?
132      $parent
133        .one('bsTransitionEnd', removeElement)
134        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
135      removeElement()
136  }
137
138
139  // ALERT PLUGIN DEFINITION
140  // =======================
141
142  function Plugin(option) {
143    return this.each(function () {
144      var $this = $(this)
145      var data  = $this.data('bs.alert')
146
147      if (!data) $this.data('bs.alert', (data = new Alert(this)))
148      if (typeof option == 'string') data[option].call($this)
149    })
150  }
151
152  var old = $.fn.alert
153
154  $.fn.alert             = Plugin
155  $.fn.alert.Constructor = Alert
156
157
158  // ALERT NO CONFLICT
159  // =================
160
161  $.fn.alert.noConflict = function () {
162    $.fn.alert = old
163    return this
164  }
165
166
167  // ALERT DATA-API
168  // ==============
169
170  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
171
172}(jQuery);
173
174/* ========================================================================
175 * Bootstrap: button.js v3.3.5
176 * http://getbootstrap.com/javascript/#buttons
177 * ========================================================================
178 * Copyright 2011-2015 Twitter, Inc.
179 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
180 * ======================================================================== */
181
182
183+function ($) {
184  'use strict';
185
186  // BUTTON PUBLIC CLASS DEFINITION
187  // ==============================
188
189  var Button = function (element, options) {
190    this.$element  = $(element)
191    this.options   = $.extend({}, Button.DEFAULTS, options)
192    this.isLoading = false
193  }
194
195  Button.VERSION  = '3.3.5'
196
197  Button.DEFAULTS = {
198    loadingText: 'loading...'
199  }
200
201  Button.prototype.setState = function (state) {
202    var d    = 'disabled'
203    var $el  = this.$element
204    var val  = $el.is('input') ? 'val' : 'html'
205    var data = $el.data()
206
207    state += 'Text'
208
209    if (data.resetText == null) $el.data('resetText', $el[val]())
210
211    // push to event loop to allow forms to submit
212    setTimeout($.proxy(function () {
213      $el[val](data[state] == null ? this.options[state] : data[state])
214
215      if (state == 'loadingText') {
216        this.isLoading = true
217        $el.addClass(d).attr(d, d)
218      } else if (this.isLoading) {
219        this.isLoading = false
220        $el.removeClass(d).removeAttr(d)
221      }
222    }, this), 0)
223  }
224
225  Button.prototype.toggle = function () {
226    var changed = true
227    var $parent = this.$element.closest('[data-toggle="buttons"]')
228
229    if ($parent.length) {
230      var $input = this.$element.find('input')
231      if ($input.prop('type') == 'radio') {
232        if ($input.prop('checked')) changed = false
233        $parent.find('.active').removeClass('active')
234        this.$element.addClass('active')
235      } else if ($input.prop('type') == 'checkbox') {
236        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
237        this.$element.toggleClass('active')
238      }
239      $input.prop('checked', this.$element.hasClass('active'))
240      if (changed) $input.trigger('change')
241    } else {
242      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
243      this.$element.toggleClass('active')
244    }
245  }
246
247
248  // BUTTON PLUGIN DEFINITION
249  // ========================
250
251  function Plugin(option) {
252    return this.each(function () {
253      var $this   = $(this)
254      var data    = $this.data('bs.button')
255      var options = typeof option == 'object' && option
256
257      if (!data) $this.data('bs.button', (data = new Button(this, options)))
258
259      if (option == 'toggle') data.toggle()
260      else if (option) data.setState(option)
261    })
262  }
263
264  var old = $.fn.button
265
266  $.fn.button             = Plugin
267  $.fn.button.Constructor = Button
268
269
270  // BUTTON NO CONFLICT
271  // ==================
272
273  $.fn.button.noConflict = function () {
274    $.fn.button = old
275    return this
276  }
277
278
279  // BUTTON DATA-API
280  // ===============
281
282  $(document)
283    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
284      var $btn = $(e.target)
285      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
286      Plugin.call($btn, 'toggle')
287      if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
288    })
289    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
290      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
291    })
292
293}(jQuery);
294
295/* ========================================================================
296 * Bootstrap: carousel.js v3.3.5
297 * http://getbootstrap.com/javascript/#carousel
298 * ========================================================================
299 * Copyright 2011-2015 Twitter, Inc.
300 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
301 * ======================================================================== */
302
303
304+function ($) {
305  'use strict';
306
307  // CAROUSEL CLASS DEFINITION
308  // =========================
309
310  var Carousel = function (element, options) {
311    this.$element    = $(element)
312    this.$indicators = this.$element.find('.carousel-indicators')
313    this.options     = options
314    this.paused      = null
315    this.sliding     = null
316    this.interval    = null
317    this.$active     = null
318    this.$items      = null
319
320    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
321
322    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
323      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
324      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
325  }
326
327  Carousel.VERSION  = '3.3.5'
328
329  Carousel.TRANSITION_DURATION = 600
330
331  Carousel.DEFAULTS = {
332    interval: 5000,
333    pause: 'hover',
334    wrap: true,
335    keyboard: true
336  }
337
338  Carousel.prototype.keydown = function (e) {
339    if (/input|textarea/i.test(e.target.tagName)) return
340    switch (e.which) {
341      case 37: this.prev(); break
342      case 39: this.next(); break
343      default: return
344    }
345
346    e.preventDefault()
347  }
348
349  Carousel.prototype.cycle = function (e) {
350    e || (this.paused = false)
351
352    this.interval && clearInterval(this.interval)
353
354    this.options.interval
355      && !this.paused
356      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
357
358    return this
359  }
360
361  Carousel.prototype.getItemIndex = function (item) {
362    this.$items = item.parent().children('.item')
363    return this.$items.index(item || this.$active)
364  }
365
366  Carousel.prototype.getItemForDirection = function (direction, active) {
367    var activeIndex = this.getItemIndex(active)
368    var willWrap = (direction == 'prev' && activeIndex === 0)
369                || (direction == 'next' && activeIndex == (this.$items.length - 1))
370    if (willWrap && !this.options.wrap) return active
371    var delta = direction == 'prev' ? -1 : 1
372    var itemIndex = (activeIndex + delta) % this.$items.length
373    return this.$items.eq(itemIndex)
374  }
375
376  Carousel.prototype.to = function (pos) {
377    var that        = this
378    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
379
380    if (pos > (this.$items.length - 1) || pos < 0) return
381
382    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
383    if (activeIndex == pos) return this.pause().cycle()
384
385    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
386  }
387
388  Carousel.prototype.pause = function (e) {
389    e || (this.paused = true)
390
391    if (this.$element.find('.next, .prev').length && $.support.transition) {
392      this.$element.trigger($.support.transition.end)
393      this.cycle(true)
394    }
395
396    this.interval = clearInterval(this.interval)
397
398    return this
399  }
400
401  Carousel.prototype.next = function () {
402    if (this.sliding) return
403    return this.slide('next')
404  }
405
406  Carousel.prototype.prev = function () {
407    if (this.sliding) return
408    return this.slide('prev')
409  }
410
411  Carousel.prototype.slide = function (type, next) {
412    var $active   = this.$element.find('.item.active')
413    var $next     = next || this.getItemForDirection(type, $active)
414    var isCycling = this.interval
415    var direction = type == 'next' ? 'left' : 'right'
416    var that      = this
417
418    if ($next.hasClass('active')) return (this.sliding = false)
419
420    var relatedTarget = $next[0]
421    var slideEvent = $.Event('slide.bs.carousel', {
422      relatedTarget: relatedTarget,
423      direction: direction
424    })
425    this.$element.trigger(slideEvent)
426    if (slideEvent.isDefaultPrevented()) return
427
428    this.sliding = true
429
430    isCycling && this.pause()
431
432    if (this.$indicators.length) {
433      this.$indicators.find('.active').removeClass('active')
434      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
435      $nextIndicator && $nextIndicator.addClass('active')
436    }
437
438    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
439    if ($.support.transition && this.$element.hasClass('slide')) {
440      $next.addClass(type)
441      $next[0].offsetWidth // force reflow
442      $active.addClass(direction)
443      $next.addClass(direction)
444      $active
445        .one('bsTransitionEnd', function () {
446          $next.removeClass([type, direction].join(' ')).addClass('active')
447          $active.removeClass(['active', direction].join(' '))
448          that.sliding = false
449          setTimeout(function () {
450            that.$element.trigger(slidEvent)
451          }, 0)
452        })
453        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
454    } else {
455      $active.removeClass('active')
456      $next.addClass('active')
457      this.sliding = false
458      this.$element.trigger(slidEvent)
459    }
460
461    isCycling && this.cycle()
462
463    return this
464  }
465
466
467  // CAROUSEL PLUGIN DEFINITION
468  // ==========================
469
470  function Plugin(option) {
471    return this.each(function () {
472      var $this   = $(this)
473      var data    = $this.data('bs.carousel')
474      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
475      var action  = typeof option == 'string' ? option : options.slide
476
477      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
478      if (typeof option == 'number') data.to(option)
479      else if (action) data[action]()
480      else if (options.interval) data.pause().cycle()
481    })
482  }
483
484  var old = $.fn.carousel
485
486  $.fn.carousel             = Plugin
487  $.fn.carousel.Constructor = Carousel
488
489
490  // CAROUSEL NO CONFLICT
491  // ====================
492
493  $.fn.carousel.noConflict = function () {
494    $.fn.carousel = old
495    return this
496  }
497
498
499  // CAROUSEL DATA-API
500  // =================
501
502  var clickHandler = function (e) {
503    var href
504    var $this   = $(this)
505    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
506    if (!$target.hasClass('carousel')) return
507    var options = $.extend({}, $target.data(), $this.data())
508    var slideIndex = $this.attr('data-slide-to')
509    if (slideIndex) options.interval = false
510
511    Plugin.call($target, options)
512
513    if (slideIndex) {
514      $target.data('bs.carousel').to(slideIndex)
515    }
516
517    e.preventDefault()
518  }
519
520  $(document)
521    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
522    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
523
524  $(window).on('load', function () {
525    $('[data-ride="carousel"]').each(function () {
526      var $carousel = $(this)
527      Plugin.call($carousel, $carousel.data())
528    })
529  })
530
531}(jQuery);
532
533/* ========================================================================
534 * Bootstrap: collapse.js v3.3.5
535 * http://getbootstrap.com/javascript/#collapse
536 * ========================================================================
537 * Copyright 2011-2015 Twitter, Inc.
538 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
539 * ======================================================================== */
540
541
542+function ($) {
543  'use strict';
544
545  // COLLAPSE PUBLIC CLASS DEFINITION
546  // ================================
547
548  var Collapse = function (element, options) {
549    this.$element      = $(element)
550    this.options       = $.extend({}, Collapse.DEFAULTS, options)
551    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
552                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
553    this.transitioning = null
554
555    if (this.options.parent) {
556      this.$parent = this.getParent()
557    } else {
558      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
559    }
560
561    if (this.options.toggle) this.toggle()
562  }
563
564  Collapse.VERSION  = '3.3.5'
565
566  Collapse.TRANSITION_DURATION = 350
567
568  Collapse.DEFAULTS = {
569    toggle: true
570  }
571
572  Collapse.prototype.dimension = function () {
573    var hasWidth = this.$element.hasClass('width')
574    return hasWidth ? 'width' : 'height'
575  }
576
577  Collapse.prototype.show = function () {
578    if (this.transitioning || this.$element.hasClass('in')) return
579
580    var activesData
581    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
582
583    if (actives && actives.length) {
584      activesData = actives.data('bs.collapse')
585      if (activesData && activesData.transitioning) return
586    }
587
588    var startEvent = $.Event('show.bs.collapse')
589    this.$element.trigger(startEvent)
590    if (startEvent.isDefaultPrevented()) return
591
592    if (actives && actives.length) {
593      Plugin.call(actives, 'hide')
594      activesData || actives.data('bs.collapse', null)
595    }
596
597    var dimension = this.dimension()
598
599    this.$element
600      .removeClass('collapse')
601      .addClass('collapsing')[dimension](0)
602      .attr('aria-expanded', true)
603
604    this.$trigger
605      .removeClass('collapsed')
606      .attr('aria-expanded', true)
607
608    this.transitioning = 1
609
610    var complete = function () {
611      this.$element
612        .removeClass('collapsing')
613        .addClass('collapse in')[dimension]('')
614      this.transitioning = 0
615      this.$element
616        .trigger('shown.bs.collapse')
617    }
618
619    if (!$.support.transition) return complete.call(this)
620
621    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
622
623    this.$element
624      .one('bsTransitionEnd', $.proxy(complete, this))
625      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
626  }
627
628  Collapse.prototype.hide = function () {
629    if (this.transitioning || !this.$element.hasClass('in')) return
630
631    var startEvent = $.Event('hide.bs.collapse')
632    this.$element.trigger(startEvent)
633    if (startEvent.isDefaultPrevented()) return
634
635    var dimension = this.dimension()
636
637    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
638
639    this.$element
640      .addClass('collapsing')
641      .removeClass('collapse in')
642      .attr('aria-expanded', false)
643
644    this.$trigger
645      .addClass('collapsed')
646      .attr('aria-expanded', false)
647
648    this.transitioning = 1
649
650    var complete = function () {
651      this.transitioning = 0
652      this.$element
653        .removeClass('collapsing')
654        .addClass('collapse')
655        .trigger('hidden.bs.collapse')
656    }
657
658    if (!$.support.transition) return complete.call(this)
659
660    this.$element
661      [dimension](0)
662      .one('bsTransitionEnd', $.proxy(complete, this))
663      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
664  }
665
666  Collapse.prototype.toggle = function () {
667    this[this.$element.hasClass('in') ? 'hide' : 'show']()
668  }
669
670  Collapse.prototype.getParent = function () {
671    return $(this.options.parent)
672      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
673      .each($.proxy(function (i, element) {
674        var $element = $(element)
675        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
676      }, this))
677      .end()
678  }
679
680  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
681    var isOpen = $element.hasClass('in')
682
683    $element.attr('aria-expanded', isOpen)
684    $trigger
685      .toggleClass('collapsed', !isOpen)
686      .attr('aria-expanded', isOpen)
687  }
688
689  function getTargetFromTrigger($trigger) {
690    var href
691    var target = $trigger.attr('data-target')
692      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
693
694    return $(target)
695  }
696
697
698  // COLLAPSE PLUGIN DEFINITION
699  // ==========================
700
701  function Plugin(option) {
702    return this.each(function () {
703      var $this   = $(this)
704      var data    = $this.data('bs.collapse')
705      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
706
707      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
708      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
709      if (typeof option == 'string') data[option]()
710    })
711  }
712
713  var old = $.fn.collapse
714
715  $.fn.collapse             = Plugin
716  $.fn.collapse.Constructor = Collapse
717
718
719  // COLLAPSE NO CONFLICT
720  // ====================
721
722  $.fn.collapse.noConflict = function () {
723    $.fn.collapse = old
724    return this
725  }
726
727
728  // COLLAPSE DATA-API
729  // =================
730
731  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
732    var $this   = $(this)
733
734    if (!$this.attr('data-target')) e.preventDefault()
735
736    var $target = getTargetFromTrigger($this)
737    var data    = $target.data('bs.collapse')
738    var option  = data ? 'toggle' : $this.data()
739
740    Plugin.call($target, option)
741  })
742
743}(jQuery);
744
745/* ========================================================================
746 * Bootstrap: dropdown.js v3.3.5
747 * http://getbootstrap.com/javascript/#dropdowns
748 * ========================================================================
749 * Copyright 2011-2015 Twitter, Inc.
750 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
751 * ======================================================================== */
752
753
754+function ($) {
755  'use strict';
756
757  // DROPDOWN CLASS DEFINITION
758  // =========================
759
760  var backdrop = '.dropdown-backdrop'
761  var toggle   = '[data-toggle="dropdown"]'
762  var Dropdown = function (element) {
763    $(element).on('click.bs.dropdown', this.toggle)
764  }
765
766  Dropdown.VERSION = '3.3.5'
767
768  function getParent($this) {
769    var selector = $this.attr('data-target')
770
771    if (!selector) {
772      selector = $this.attr('href')
773      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
774    }
775
776    var $parent = selector && $(selector)
777
778    return $parent && $parent.length ? $parent : $this.parent()
779  }
780
781  function clearMenus(e) {
782    if (e && e.which === 3) return
783    $(backdrop).remove()
784    $(toggle).each(function () {
785      var $this         = $(this)
786      var $parent       = getParent($this)
787      var relatedTarget = { relatedTarget: this }
788
789      if (!$parent.hasClass('open')) return
790
791      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
792
793      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
794
795      if (e.isDefaultPrevented()) return
796
797      $this.attr('aria-expanded', 'false')
798      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
799    })
800  }
801
802  Dropdown.prototype.toggle = function (e) {
803    var $this = $(this)
804
805    if ($this.is('.disabled, :disabled')) return
806
807    var $parent  = getParent($this)
808    var isActive = $parent.hasClass('open')
809
810    clearMenus()
811
812    if (!isActive) {
813      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
814        // if mobile we use a backdrop because click events don't delegate
815        $(document.createElement('div'))
816          .addClass('dropdown-backdrop')
817          .insertAfter($(this))
818          .on('click', clearMenus)
819      }
820
821      var relatedTarget = { relatedTarget: this }
822      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
823
824      if (e.isDefaultPrevented()) return
825
826      $this
827        .trigger('focus')
828        .attr('aria-expanded', 'true')
829
830      $parent
831        .toggleClass('open')
832        .trigger('shown.bs.dropdown', relatedTarget)
833    }
834
835    return false
836  }
837
838  Dropdown.prototype.keydown = function (e) {
839    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
840
841    var $this = $(this)
842
843    e.preventDefault()
844    e.stopPropagation()
845
846    if ($this.is('.disabled, :disabled')) return
847
848    var $parent  = getParent($this)
849    var isActive = $parent.hasClass('open')
850
851    if (!isActive && e.which != 27 || isActive && e.which == 27) {
852      if (e.which == 27) $parent.find(toggle).trigger('focus')
853      return $this.trigger('click')
854    }
855
856    var desc = ' li:not(.disabled):visible a'
857    var $items = $parent.find('.dropdown-menu' + desc)
858
859    if (!$items.length) return
860
861    var index = $items.index(e.target)
862
863    if (e.which == 38 && index > 0)                 index--         // up
864    if (e.which == 40 && index < $items.length - 1) index++         // down
865    if (!~index)                                    index = 0
866
867    $items.eq(index).trigger('focus')
868  }
869
870
871  // DROPDOWN PLUGIN DEFINITION
872  // ==========================
873
874  function Plugin(option) {
875    return this.each(function () {
876      var $this = $(this)
877      var data  = $this.data('bs.dropdown')
878
879      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
880      if (typeof option == 'string') data[option].call($this)
881    })
882  }
883
884  var old = $.fn.dropdown
885
886  $.fn.dropdown             = Plugin
887  $.fn.dropdown.Constructor = Dropdown
888
889
890  // DROPDOWN NO CONFLICT
891  // ====================
892
893  $.fn.dropdown.noConflict = function () {
894    $.fn.dropdown = old
895    return this
896  }
897
898
899  // APPLY TO STANDARD DROPDOWN ELEMENTS
900  // ===================================
901
902  $(document)
903    .on('click.bs.dropdown.data-api', clearMenus)
904    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
905    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
906    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
907    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
908
909}(jQuery);
910
911/* ========================================================================
912 * Bootstrap: modal.js v3.3.5
913 * http://getbootstrap.com/javascript/#modals
914 * ========================================================================
915 * Copyright 2011-2015 Twitter, Inc.
916 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
917 * ======================================================================== */
918
919
920+function ($) {
921  'use strict';
922
923  // MODAL CLASS DEFINITION
924  // ======================
925
926  var Modal = function (element, options) {
927    this.options             = options
928    this.$body               = $(document.body)
929    this.$element            = $(element)
930    this.$dialog             = this.$element.find('.modal-dialog')
931    this.$backdrop           = null
932    this.isShown             = null
933    this.originalBodyPad     = null
934    this.scrollbarWidth      = 0
935    this.ignoreBackdropClick = false
936
937    if (this.options.remote) {
938      this.$element
939        .find('.modal-content')
940        .load(this.options.remote, $.proxy(function () {
941          this.$element.trigger('loaded.bs.modal')
942        }, this))
943    }
944  }
945
946  Modal.VERSION  = '3.3.5'
947
948  Modal.TRANSITION_DURATION = 300
949  Modal.BACKDROP_TRANSITION_DURATION = 150
950
951  Modal.DEFAULTS = {
952    backdrop: true,
953    keyboard: true,
954    show: true
955  }
956
957  Modal.prototype.toggle = function (_relatedTarget) {
958    return this.isShown ? this.hide() : this.show(_relatedTarget)
959  }
960
961  Modal.prototype.show = function (_relatedTarget) {
962    var that = this
963    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
964
965    this.$element.trigger(e)
966
967    if (this.isShown || e.isDefaultPrevented()) return
968
969    this.isShown = true
970
971    this.checkScrollbar()
972    this.setScrollbar()
973    this.$body.addClass('modal-open')
974
975    this.escape()
976    this.resize()
977
978    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
979
980    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
981      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
982        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
983      })
984    })
985
986    this.backdrop(function () {
987      var transition = $.support.transition && that.$element.hasClass('fade')
988
989      if (!that.$element.parent().length) {
990        that.$element.appendTo(that.$body) // don't move modals dom position
991      }
992
993      that.$element
994        .show()
995        .scrollTop(0)
996
997      that.adjustDialog()
998
999      if (transition) {
1000        that.$element[0].offsetWidth // force reflow
1001      }
1002
1003      that.$element.addClass('in')
1004
1005      that.enforceFocus()
1006
1007      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
1008
1009      transition ?
1010        that.$dialog // wait for modal to slide in
1011          .one('bsTransitionEnd', function () {
1012            that.$element.trigger('focus').trigger(e)
1013          })
1014          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1015        that.$element.trigger('focus').trigger(e)
1016    })
1017  }
1018
1019  Modal.prototype.hide = function (e) {
1020    if (e) e.preventDefault()
1021
1022    e = $.Event('hide.bs.modal')
1023
1024    this.$element.trigger(e)
1025
1026    if (!this.isShown || e.isDefaultPrevented()) return
1027
1028    this.isShown = false
1029
1030    this.escape()
1031    this.resize()
1032
1033    $(document).off('focusin.bs.modal')
1034
1035    this.$element
1036      .removeClass('in')
1037      .off('click.dismiss.bs.modal')
1038      .off('mouseup.dismiss.bs.modal')
1039
1040    this.$dialog.off('mousedown.dismiss.bs.modal')
1041
1042    $.support.transition && this.$element.hasClass('fade') ?
1043      this.$element
1044        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1045        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1046      this.hideModal()
1047  }
1048
1049  Modal.prototype.enforceFocus = function () {
1050    $(document)
1051      .off('focusin.bs.modal') // guard against infinite focus loop
1052      .on('focusin.bs.modal', $.proxy(function (e) {
1053        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
1054          this.$element.trigger('focus')
1055        }
1056      }, this))
1057  }
1058
1059  Modal.prototype.escape = function () {
1060    if (this.isShown && this.options.keyboard) {
1061      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1062        e.which == 27 && this.hide()
1063      }, this))
1064    } else if (!this.isShown) {
1065      this.$element.off('keydown.dismiss.bs.modal')
1066    }
1067  }
1068
1069  Modal.prototype.resize = function () {
1070    if (this.isShown) {
1071      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1072    } else {
1073      $(window).off('resize.bs.modal')
1074    }
1075  }
1076
1077  Modal.prototype.hideModal = function () {
1078    var that = this
1079    this.$element.hide()
1080    this.backdrop(function () {
1081      that.$body.removeClass('modal-open')
1082      that.resetAdjustments()
1083      that.resetScrollbar()
1084      that.$element.trigger('hidden.bs.modal')
1085    })
1086  }
1087
1088  Modal.prototype.removeBackdrop = function () {
1089    this.$backdrop && this.$backdrop.remove()
1090    this.$backdrop = null
1091  }
1092
1093  Modal.prototype.backdrop = function (callback) {
1094    var that = this
1095    var animate = this.$element.hasClass('fade') ? 'fade' : ''
1096
1097    if (this.isShown && this.options.backdrop) {
1098      var doAnimate = $.support.transition && animate
1099
1100      this.$backdrop = $(document.createElement('div'))
1101        .addClass('modal-backdrop ' + animate)
1102        .appendTo(this.$body)
1103
1104      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1105        if (this.ignoreBackdropClick) {
1106          this.ignoreBackdropClick = false
1107          return
1108        }
1109        if (e.target !== e.currentTarget) return
1110        this.options.backdrop == 'static'
1111          ? this.$element[0].focus()
1112          : this.hide()
1113      }, this))
1114
1115      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1116
1117      this.$backdrop.addClass('in')
1118
1119      if (!callback) return
1120
1121      doAnimate ?
1122        this.$backdrop
1123          .one('bsTransitionEnd', callback)
1124          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1125        callback()
1126
1127    } else if (!this.isShown && this.$backdrop) {
1128      this.$backdrop.removeClass('in')
1129
1130      var callbackRemove = function () {
1131        that.removeBackdrop()
1132        callback && callback()
1133      }
1134      $.support.transition && this.$element.hasClass('fade') ?
1135        this.$backdrop
1136          .one('bsTransitionEnd', callbackRemove)
1137          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1138        callbackRemove()
1139
1140    } else if (callback) {
1141      callback()
1142    }
1143  }
1144
1145  // these following methods are used to handle overflowing modals
1146
1147  Modal.prototype.handleUpdate = function () {
1148    this.adjustDialog()
1149  }
1150
1151  Modal.prototype.adjustDialog = function () {
1152    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1153
1154    this.$element.css({
1155      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1156      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1157    })
1158  }
1159
1160  Modal.prototype.resetAdjustments = function () {
1161    this.$element.css({
1162      paddingLeft: '',
1163      paddingRight: ''
1164    })
1165  }
1166
1167  Modal.prototype.checkScrollbar = function () {
1168    var fullWindowWidth = window.innerWidth
1169    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1170      var documentElementRect = document.documentElement.getBoundingClientRect()
1171      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1172    }
1173    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1174    this.scrollbarWidth = this.measureScrollbar()
1175  }
1176
1177  Modal.prototype.setScrollbar = function () {
1178    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1179    this.originalBodyPad = document.body.style.paddingRight || ''
1180    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
1181  }
1182
1183  Modal.prototype.resetScrollbar = function () {
1184    this.$body.css('padding-right', this.originalBodyPad)
1185  }
1186
1187  Modal.prototype.measureScrollbar = function () { // thx walsh
1188    var scrollDiv = document.createElement('div')
1189    scrollDiv.className = 'modal-scrollbar-measure'
1190    this.$body.append(scrollDiv)
1191    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1192    this.$body[0].removeChild(scrollDiv)
1193    return scrollbarWidth
1194  }
1195
1196
1197  // MODAL PLUGIN DEFINITION
1198  // =======================
1199
1200  function Plugin(option, _relatedTarget) {
1201    return this.each(function () {
1202      var $this   = $(this)
1203      var data    = $this.data('bs.modal')
1204      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1205
1206      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1207      if (typeof option == 'string') data[option](_relatedTarget)
1208      else if (options.show) data.show(_relatedTarget)
1209    })
1210  }
1211
1212  var old = $.fn.modal
1213
1214  $.fn.modal             = Plugin
1215  $.fn.modal.Constructor = Modal
1216
1217
1218  // MODAL NO CONFLICT
1219  // =================
1220
1221  $.fn.modal.noConflict = function () {
1222    $.fn.modal = old
1223    return this
1224  }
1225
1226
1227  // MODAL DATA-API
1228  // ==============
1229
1230  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1231    var $this   = $(this)
1232    var href    = $this.attr('href')
1233    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1234    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1235
1236    if ($this.is('a')) e.preventDefault()
1237
1238    $target.one('show.bs.modal', function (showEvent) {
1239      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1240      $target.one('hidden.bs.modal', function () {
1241        $this.is(':visible') && $this.trigger('focus')
1242      })
1243    })
1244    Plugin.call($target, option, this)
1245  })
1246
1247}(jQuery);
1248
1249/* ========================================================================
1250 * Bootstrap: tooltip.js v3.3.5
1251 * http://getbootstrap.com/javascript/#tooltip
1252 * Inspired by the original jQuery.tipsy by Jason Frame
1253 * ========================================================================
1254 * Copyright 2011-2015 Twitter, Inc.
1255 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1256 * ======================================================================== */
1257
1258
1259+function ($) {
1260  'use strict';
1261
1262  // TOOLTIP PUBLIC CLASS DEFINITION
1263  // ===============================
1264
1265  var Tooltip = function (element, options) {
1266    this.type       = null
1267    this.options    = null
1268    this.enabled    = null
1269    this.timeout    = null
1270    this.hoverState = null
1271    this.$element   = null
1272    this.inState    = null
1273
1274    this.init('tooltip', element, options)
1275  }
1276
1277  Tooltip.VERSION  = '3.3.5'
1278
1279  Tooltip.TRANSITION_DURATION = 150
1280
1281  Tooltip.DEFAULTS = {
1282    animation: true,
1283    placement: 'top',
1284    selector: false,
1285    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1286    trigger: 'hover focus',
1287    title: '',
1288    delay: 0,
1289    html: false,
1290    container: false,
1291    viewport: {
1292      selector: 'body',
1293      padding: 0
1294    }
1295  }
1296
1297  Tooltip.prototype.init = function (type, element, options) {
1298    this.enabled   = true
1299    this.type      = type
1300    this.$element  = $(element)
1301    this.options   = this.getOptions(options)
1302    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1303    this.inState   = { click: false, hover: false, focus: false }
1304
1305    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1306      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1307    }
1308
1309    var triggers = this.options.trigger.split(' ')
1310
1311    for (var i = triggers.length; i--;) {
1312      var trigger = triggers[i]
1313
1314      if (trigger == 'click') {
1315        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1316      } else if (trigger != 'manual') {
1317        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
1318        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1319
1320        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1321        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1322      }
1323    }
1324
1325    this.options.selector ?
1326      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1327      this.fixTitle()
1328  }
1329
1330  Tooltip.prototype.getDefaults = function () {
1331    return Tooltip.DEFAULTS
1332  }
1333
1334  Tooltip.prototype.getOptions = function (options) {
1335    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
1336
1337    if (options.delay && typeof options.delay == 'number') {
1338      options.delay = {
1339        show: options.delay,
1340        hide: options.delay
1341      }
1342    }
1343
1344    return options
1345  }
1346
1347  Tooltip.prototype.getDelegateOptions = function () {
1348    var options  = {}
1349    var defaults = this.getDefaults()
1350
1351    this._options && $.each(this._options, function (key, value) {
1352      if (defaults[key] != value) options[key] = value
1353    })
1354
1355    return options
1356  }
1357
1358  Tooltip.prototype.enter = function (obj) {
1359    var self = obj instanceof this.constructor ?
1360      obj : $(obj.currentTarget).data('bs.' + this.type)
1361
1362    if (!self) {
1363      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1364      $(obj.currentTarget).data('bs.' + this.type, self)
1365    }
1366
1367    if (obj instanceof $.Event) {
1368      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1369    }
1370
1371    if (self.tip().hasClass('in') || self.hoverState == 'in') {
1372      self.hoverState = 'in'
1373      return
1374    }
1375
1376    clearTimeout(self.timeout)
1377
1378    self.hoverState = 'in'
1379
1380    if (!self.options.delay || !self.options.delay.show) return self.show()
1381
1382    self.timeout = setTimeout(function () {
1383      if (self.hoverState == 'in') self.show()
1384    }, self.options.delay.show)
1385  }
1386
1387  Tooltip.prototype.isInStateTrue = function () {
1388    for (var key in this.inState) {
1389      if (this.inState[key]) return true
1390    }
1391
1392    return false
1393  }
1394
1395  Tooltip.prototype.leave = function (obj) {
1396    var self = obj instanceof this.constructor ?
1397      obj : $(obj.currentTarget).data('bs.' + this.type)
1398
1399    if (!self) {
1400      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1401      $(obj.currentTarget).data('bs.' + this.type, self)
1402    }
1403
1404    if (obj instanceof $.Event) {
1405      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1406    }
1407
1408    if (self.isInStateTrue()) return
1409
1410    clearTimeout(self.timeout)
1411
1412    self.hoverState = 'out'
1413
1414    if (!self.options.delay || !self.options.delay.hide) return self.hide()
1415
1416    self.timeout = setTimeout(function () {
1417      if (self.hoverState == 'out') self.hide()
1418    }, self.options.delay.hide)
1419  }
1420
1421  Tooltip.prototype.show = function () {
1422    var e = $.Event('show.bs.' + this.type)
1423
1424    if (this.hasContent() && this.enabled) {
1425      this.$element.trigger(e)
1426
1427      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1428      if (e.isDefaultPrevented() || !inDom) return
1429      var that = this
1430
1431      var $tip = this.tip()
1432
1433      var tipId = this.getUID(this.type)
1434
1435      this.setContent()
1436      $tip.attr('id', tipId)
1437      this.$element.attr('aria-describedby', tipId)
1438
1439      if (this.options.animation) $tip.addClass('fade')
1440
1441      var placement = typeof this.options.placement == 'function' ?
1442        this.options.placement.call(this, $tip[0], this.$element[0]) :
1443        this.options.placement
1444
1445      var autoToken = /\s?auto?\s?/i
1446      var autoPlace = autoToken.test(placement)
1447      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1448
1449      $tip
1450        .detach()
1451        .css({ top: 0, left: 0, display: 'block' })
1452        .addClass(placement)
1453        .data('bs.' + this.type, this)
1454
1455      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
1456      this.$element.trigger('inserted.bs.' + this.type)
1457
1458      var pos          = this.getPosition()
1459      var actualWidth  = $tip[0].offsetWidth
1460      var actualHeight = $tip[0].offsetHeight
1461
1462      if (autoPlace) {
1463        var orgPlacement = placement
1464        var viewportDim = this.getPosition(this.$viewport)
1465
1466        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
1467                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
1468                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
1469                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
1470                    placement
1471
1472        $tip
1473          .removeClass(orgPlacement)
1474          .addClass(placement)
1475      }
1476
1477      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1478
1479      this.applyPlacement(calculatedOffset, placement)
1480
1481      var complete = function () {
1482        var prevHoverState = that.hoverState
1483        that.$element.trigger('shown.bs.' + that.type)
1484        that.hoverState = null
1485
1486        if (prevHoverState == 'out') that.leave(that)
1487      }
1488
1489      $.support.transition && this.$tip.hasClass('fade') ?
1490        $tip
1491          .one('bsTransitionEnd', complete)
1492          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1493        complete()
1494    }
1495  }
1496
1497  Tooltip.prototype.applyPlacement = function (offset, placement) {
1498    var $tip   = this.tip()
1499    var width  = $tip[0].offsetWidth
1500    var height = $tip[0].offsetHeight
1501
1502    // manually read margins because getBoundingClientRect includes difference
1503    var marginTop = parseInt($tip.css('margin-top'), 10)
1504    var marginLeft = parseInt($tip.css('margin-left'), 10)
1505
1506    // we must check for NaN for ie 8/9
1507    if (isNaN(marginTop))  marginTop  = 0
1508    if (isNaN(marginLeft)) marginLeft = 0
1509
1510    offset.top  += marginTop
1511    offset.left += marginLeft
1512
1513    // $.fn.offset doesn't round pixel values
1514    // so we use setOffset directly with our own function B-0
1515    $.offset.setOffset($tip[0], $.extend({
1516      using: function (props) {
1517        $tip.css({
1518          top: Math.round(props.top),
1519          left: Math.round(props.left)
1520        })
1521      }
1522    }, offset), 0)
1523
1524    $tip.addClass('in')
1525
1526    // check to see if placing tip in new offset caused the tip to resize itself
1527    var actualWidth  = $tip[0].offsetWidth
1528    var actualHeight = $tip[0].offsetHeight
1529
1530    if (placement == 'top' && actualHeight != height) {
1531      offset.top = offset.top + height - actualHeight
1532    }
1533
1534    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1535
1536    if (delta.left) offset.left += delta.left
1537    else offset.top += delta.top
1538
1539    var isVertical          = /top|bottom/.test(placement)
1540    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1541    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1542
1543    $tip.offset(offset)
1544    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1545  }
1546
1547  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1548    this.arrow()
1549      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1550      .css(isVertical ? 'top' : 'left', '')
1551  }
1552
1553  Tooltip.prototype.setContent = function () {
1554    var $tip  = this.tip()
1555    var title = this.getTitle()
1556
1557    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1558    $tip.removeClass('fade in top bottom left right')
1559  }
1560
1561  Tooltip.prototype.hide = function (callback) {
1562    var that = this
1563    var $tip = $(this.$tip)
1564    var e    = $.Event('hide.bs.' + this.type)
1565
1566    function complete() {
1567      if (that.hoverState != 'in') $tip.detach()
1568      that.$element
1569        .removeAttr('aria-describedby')
1570        .trigger('hidden.bs.' + that.type)
1571      callback && callback()
1572    }
1573
1574    this.$element.trigger(e)
1575
1576    if (e.isDefaultPrevented()) return
1577
1578    $tip.removeClass('in')
1579
1580    $.support.transition && $tip.hasClass('fade') ?
1581      $tip
1582        .one('bsTransitionEnd', complete)
1583        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1584      complete()
1585
1586    this.hoverState = null
1587
1588    return this
1589  }
1590
1591  Tooltip.prototype.fixTitle = function () {
1592    var $e = this.$element
1593    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1594      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1595    }
1596  }
1597
1598  Tooltip.prototype.hasContent = function () {
1599    return this.getTitle()
1600  }
1601
1602  Tooltip.prototype.getPosition = function ($element) {
1603    $element   = $element || this.$element
1604
1605    var el     = $element[0]
1606    var isBody = el.tagName == 'BODY'
1607
1608    var elRect    = el.getBoundingClientRect()
1609    if (elRect.width == null) {
1610      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1611      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1612    }
1613    var elOffset  = isBody ? { top: 0, left: 0 } : $element.offset()
1614    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1615    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1616
1617    return $.extend({}, elRect, scroll, outerDims, elOffset)
1618  }
1619
1620  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1621    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
1622           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1623           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1624        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1625
1626  }
1627
1628  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1629    var delta = { top: 0, left: 0 }
1630    if (!this.$viewport) return delta
1631
1632    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1633    var viewportDimensions = this.getPosition(this.$viewport)
1634
1635    if (/right|left/.test(placement)) {
1636      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
1637      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1638      if (topEdgeOffset < viewportDimensions.top) { // top overflow
1639        delta.top = viewportDimensions.top - topEdgeOffset
1640      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1641        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1642      }
1643    } else {
1644      var leftEdgeOffset  = pos.left - viewportPadding
1645      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1646      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1647        delta.left = viewportDimensions.left - leftEdgeOffset
1648      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1649        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1650      }
1651    }
1652
1653    return delta
1654  }
1655
1656  Tooltip.prototype.getTitle = function () {
1657    var title
1658    var $e = this.$element
1659    var o  = this.options
1660
1661    title = $e.attr('data-original-title')
1662      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
1663
1664    return title
1665  }
1666
1667  Tooltip.prototype.getUID = function (prefix) {
1668    do prefix += ~~(Math.random() * 1000000)
1669    while (document.getElementById(prefix))
1670    return prefix
1671  }
1672
1673  Tooltip.prototype.tip = function () {
1674    if (!this.$tip) {
1675      this.$tip = $(this.options.template)
1676      if (this.$tip.length != 1) {
1677        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
1678      }
1679    }
1680    return this.$tip
1681  }
1682
1683  Tooltip.prototype.arrow = function () {
1684    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1685  }
1686
1687  Tooltip.prototype.enable = function () {
1688    this.enabled = true
1689  }
1690
1691  Tooltip.prototype.disable = function () {
1692    this.enabled = false
1693  }
1694
1695  Tooltip.prototype.toggleEnabled = function () {
1696    this.enabled = !this.enabled
1697  }
1698
1699  Tooltip.prototype.toggle = function (e) {
1700    var self = this
1701    if (e) {
1702      self = $(e.currentTarget).data('bs.' + this.type)
1703      if (!self) {
1704        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1705        $(e.currentTarget).data('bs.' + this.type, self)
1706      }
1707    }
1708
1709    if (e) {
1710      self.inState.click = !self.inState.click
1711      if (self.isInStateTrue()) self.enter(self)
1712      else self.leave(self)
1713    } else {
1714      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1715    }
1716  }
1717
1718  Tooltip.prototype.destroy = function () {
1719    var that = this
1720    clearTimeout(this.timeout)
1721    this.hide(function () {
1722      that.$element.off('.' + that.type).removeData('bs.' + that.type)
1723      if (that.$tip) {
1724        that.$tip.detach()
1725      }
1726      that.$tip = null
1727      that.$arrow = null
1728      that.$viewport = null
1729    })
1730  }
1731
1732
1733  // TOOLTIP PLUGIN DEFINITION
1734  // =========================
1735
1736  function Plugin(option) {
1737    return this.each(function () {
1738      var $this   = $(this)
1739      var data    = $this.data('bs.tooltip')
1740      var options = typeof option == 'object' && option
1741
1742      if (!data && /destroy|hide/.test(option)) return
1743      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1744      if (typeof option == 'string') data[option]()
1745    })
1746  }
1747
1748  var old = $.fn.tooltip
1749
1750  $.fn.tooltip             = Plugin
1751  $.fn.tooltip.Constructor = Tooltip
1752
1753
1754  // TOOLTIP NO CONFLICT
1755  // ===================
1756
1757  $.fn.tooltip.noConflict = function () {
1758    $.fn.tooltip = old
1759    return this
1760  }
1761
1762}(jQuery);
1763
1764/* ========================================================================
1765 * Bootstrap: popover.js v3.3.5
1766 * http://getbootstrap.com/javascript/#popovers
1767 * ========================================================================
1768 * Copyright 2011-2015 Twitter, Inc.
1769 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1770 * ======================================================================== */
1771
1772
1773+function ($) {
1774  'use strict';
1775
1776  // POPOVER PUBLIC CLASS DEFINITION
1777  // ===============================
1778
1779  var Popover = function (element, options) {
1780    this.init('popover', element, options)
1781  }
1782
1783  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1784
1785  Popover.VERSION  = '3.3.5'
1786
1787  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1788    placement: 'right',
1789    trigger: 'click',
1790    content: '',
1791    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1792  })
1793
1794
1795  // NOTE: POPOVER EXTENDS tooltip.js
1796  // ================================
1797
1798  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1799
1800  Popover.prototype.constructor = Popover
1801
1802  Popover.prototype.getDefaults = function () {
1803    return Popover.DEFAULTS
1804  }
1805
1806  Popover.prototype.setContent = function () {
1807    var $tip    = this.tip()
1808    var title   = this.getTitle()
1809    var content = this.getContent()
1810
1811    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1812    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
1813      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
1814    ](content)
1815
1816    $tip.removeClass('fade top bottom left right in')
1817
1818    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1819    // this manually by checking the contents.
1820    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1821  }
1822
1823  Popover.prototype.hasContent = function () {
1824    return this.getTitle() || this.getContent()
1825  }
1826
1827  Popover.prototype.getContent = function () {
1828    var $e = this.$element
1829    var o  = this.options
1830
1831    return $e.attr('data-content')
1832      || (typeof o.content == 'function' ?
1833            o.content.call($e[0]) :
1834            o.content)
1835  }
1836
1837  Popover.prototype.arrow = function () {
1838    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1839  }
1840
1841
1842  // POPOVER PLUGIN DEFINITION
1843  // =========================
1844
1845  function Plugin(option) {
1846    return this.each(function () {
1847      var $this   = $(this)
1848      var data    = $this.data('bs.popover')
1849      var options = typeof option == 'object' && option
1850
1851      if (!data && /destroy|hide/.test(option)) return
1852      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1853      if (typeof option == 'string') data[option]()
1854    })
1855  }
1856
1857  var old = $.fn.popover
1858
1859  $.fn.popover             = Plugin
1860  $.fn.popover.Constructor = Popover
1861
1862
1863  // POPOVER NO CONFLICT
1864  // ===================
1865
1866  $.fn.popover.noConflict = function () {
1867    $.fn.popover = old
1868    return this
1869  }
1870
1871}(jQuery);
1872
1873/* ========================================================================
1874 * Bootstrap: scrollspy.js v3.3.5
1875 * http://getbootstrap.com/javascript/#scrollspy
1876 * ========================================================================
1877 * Copyright 2011-2015 Twitter, Inc.
1878 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1879 * ======================================================================== */
1880
1881
1882+function ($) {
1883  'use strict';
1884
1885  // SCROLLSPY CLASS DEFINITION
1886  // ==========================
1887
1888  function ScrollSpy(element, options) {
1889    this.$body          = $(document.body)
1890    this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
1891    this.options        = $.extend({}, ScrollSpy.DEFAULTS, options)
1892    this.selector       = (this.options.target || '') + ' .nav li > a'
1893    this.offsets        = []
1894    this.targets        = []
1895    this.activeTarget   = null
1896    this.scrollHeight   = 0
1897
1898    this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
1899    this.refresh()
1900    this.process()
1901  }
1902
1903  ScrollSpy.VERSION  = '3.3.5'
1904
1905  ScrollSpy.DEFAULTS = {
1906    offset: 10
1907  }
1908
1909  ScrollSpy.prototype.getScrollHeight = function () {
1910    return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
1911  }
1912
1913  ScrollSpy.prototype.refresh = function () {
1914    var that          = this
1915    var offsetMethod  = 'offset'
1916    var offsetBase    = 0
1917
1918    this.offsets      = []
1919    this.targets      = []
1920    this.scrollHeight = this.getScrollHeight()
1921
1922    if (!$.isWindow(this.$scrollElement[0])) {
1923      offsetMethod = 'position'
1924      offsetBase   = this.$scrollElement.scrollTop()
1925    }
1926
1927    this.$body
1928      .find(this.selector)
1929      .map(function () {
1930        var $el   = $(this)
1931        var href  = $el.data('target') || $el.attr('href')
1932        var $href = /^#./.test(href) && $(href)
1933
1934        return ($href
1935          && $href.length
1936          && $href.is(':visible')
1937          && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1938      })
1939      .sort(function (a, b) { return a[0] - b[0] })
1940      .each(function () {
1941        that.offsets.push(this[0])
1942        that.targets.push(this[1])
1943      })
1944  }
1945
1946  ScrollSpy.prototype.process = function () {
1947    var scrollTop    = this.$scrollElement.scrollTop() + this.options.offset
1948    var scrollHeight = this.getScrollHeight()
1949    var maxScroll    = this.options.offset + scrollHeight - this.$scrollElement.height()
1950    var offsets      = this.offsets
1951    var targets      = this.targets
1952    var activeTarget = this.activeTarget
1953    var i
1954
1955    if (this.scrollHeight != scrollHeight) {
1956      this.refresh()
1957    }
1958
1959    if (scrollTop >= maxScroll) {
1960      return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
1961    }
1962
1963    if (activeTarget && scrollTop < offsets[0]) {
1964      this.activeTarget = null
1965      return this.clear()
1966    }
1967
1968    for (i = offsets.length; i--;) {
1969      activeTarget != targets[i]
1970        && scrollTop >= offsets[i]
1971        && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1972        && this.activate(targets[i])
1973    }
1974  }
1975
1976  ScrollSpy.prototype.activate = function (target) {
1977    this.activeTarget = target
1978
1979    this.clear()
1980
1981    var selector = this.selector +
1982      '[data-target="' + target + '"],' +
1983      this.selector + '[href="' + target + '"]'
1984
1985    var active = $(selector)
1986      .parents('li')
1987      .addClass('active')
1988
1989    if (active.parent('.dropdown-menu').length) {
1990      active = active
1991        .closest('li.dropdown')
1992        .addClass('active')
1993    }
1994
1995    active.trigger('activate.bs.scrollspy')
1996  }
1997
1998  ScrollSpy.prototype.clear = function () {
1999    $(this.selector)
2000      .parentsUntil(this.options.target, '.active')
2001      .removeClass('active')
2002  }
2003
2004
2005  // SCROLLSPY PLUGIN DEFINITION
2006  // ===========================
2007
2008  function Plugin(option) {
2009    return this.each(function () {
2010      var $this   = $(this)
2011      var data    = $this.data('bs.scrollspy')
2012      var options = typeof option == 'object' && option
2013
2014      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
2015      if (typeof option == 'string') data[option]()
2016    })
2017  }
2018
2019  var old = $.fn.scrollspy
2020
2021  $.fn.scrollspy             = Plugin
2022  $.fn.scrollspy.Constructor = ScrollSpy
2023
2024
2025  // SCROLLSPY NO CONFLICT
2026  // =====================
2027
2028  $.fn.scrollspy.noConflict = function () {
2029    $.fn.scrollspy = old
2030    return this
2031  }
2032
2033
2034  // SCROLLSPY DATA-API
2035  // ==================
2036
2037  $(window).on('load.bs.scrollspy.data-api', function () {
2038    $('[data-spy="scroll"]').each(function () {
2039      var $spy = $(this)
2040      Plugin.call($spy, $spy.data())
2041    })
2042  })
2043
2044}(jQuery);
2045
2046/* ========================================================================
2047 * Bootstrap: tab.js v3.3.5
2048 * http://getbootstrap.com/javascript/#tabs
2049 * ========================================================================
2050 * Copyright 2011-2015 Twitter, Inc.
2051 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2052 * ======================================================================== */
2053
2054
2055+function ($) {
2056  'use strict';
2057
2058  // TAB CLASS DEFINITION
2059  // ====================
2060
2061  var Tab = function (element) {
2062    // jscs:disable requireDollarBeforejQueryAssignment
2063    this.element = $(element)
2064    // jscs:enable requireDollarBeforejQueryAssignment
2065  }
2066
2067  Tab.VERSION = '3.3.5'
2068
2069  Tab.TRANSITION_DURATION = 150
2070
2071  Tab.prototype.show = function () {
2072    var $this    = this.element
2073    var $ul      = $this.closest('ul:not(.dropdown-menu)')
2074    var selector = $this.data('target')
2075
2076    if (!selector) {
2077      selector = $this.attr('href')
2078      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2079    }
2080
2081    if ($this.parent('li').hasClass('active')) return
2082
2083    var $previous = $ul.find('.active:last a')
2084    var hideEvent = $.Event('hide.bs.tab', {
2085      relatedTarget: $this[0]
2086    })
2087    var showEvent = $.Event('show.bs.tab', {
2088      relatedTarget: $previous[0]
2089    })
2090
2091    $previous.trigger(hideEvent)
2092    $this.trigger(showEvent)
2093
2094    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2095
2096    var $target = $(selector)
2097
2098    this.activate($this.closest('li'), $ul)
2099    this.activate($target, $target.parent(), function () {
2100      $previous.trigger({
2101        type: 'hidden.bs.tab',
2102        relatedTarget: $this[0]
2103      })
2104      $this.trigger({
2105        type: 'shown.bs.tab',
2106        relatedTarget: $previous[0]
2107      })
2108    })
2109  }
2110
2111  Tab.prototype.activate = function (element, container, callback) {
2112    var $active    = container.find('> .active')
2113    var transition = callback
2114      && $.support.transition
2115      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2116
2117    function next() {
2118      $active
2119        .removeClass('active')
2120        .find('> .dropdown-menu > .active')
2121          .removeClass('active')
2122        .end()
2123        .find('[data-toggle="tab"]')
2124          .attr('aria-expanded', false)
2125
2126      element
2127        .addClass('active')
2128        .find('[data-toggle="tab"]')
2129          .attr('aria-expanded', true)
2130
2131      if (transition) {
2132        element[0].offsetWidth // reflow for transition
2133        element.addClass('in')
2134      } else {
2135        element.removeClass('fade')
2136      }
2137
2138      if (element.parent('.dropdown-menu').length) {
2139        element
2140          .closest('li.dropdown')
2141            .addClass('active')
2142          .end()
2143          .find('[data-toggle="tab"]')
2144            .attr('aria-expanded', true)
2145      }
2146
2147      callback && callback()
2148    }
2149
2150    $active.length && transition ?
2151      $active
2152        .one('bsTransitionEnd', next)
2153        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2154      next()
2155
2156    $active.removeClass('in')
2157  }
2158
2159
2160  // TAB PLUGIN DEFINITION
2161  // =====================
2162
2163  function Plugin(option) {
2164    return this.each(function () {
2165      var $this = $(this)
2166      var data  = $this.data('bs.tab')
2167
2168      if (!data) $this.data('bs.tab', (data = new Tab(this)))
2169      if (typeof option == 'string') data[option]()
2170    })
2171  }
2172
2173  var old = $.fn.tab
2174
2175  $.fn.tab             = Plugin
2176  $.fn.tab.Constructor = Tab
2177
2178
2179  // TAB NO CONFLICT
2180  // ===============
2181
2182  $.fn.tab.noConflict = function () {
2183    $.fn.tab = old
2184    return this
2185  }
2186
2187
2188  // TAB DATA-API
2189  // ============
2190
2191  var clickHandler = function (e) {
2192    e.preventDefault()
2193    Plugin.call($(this), 'show')
2194  }
2195
2196  $(document)
2197    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2198    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2199
2200}(jQuery);
2201
2202/* ========================================================================
2203 * Bootstrap: affix.js v3.3.5
2204 * http://getbootstrap.com/javascript/#affix
2205 * ========================================================================
2206 * Copyright 2011-2015 Twitter, Inc.
2207 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2208 * ======================================================================== */
2209
2210
2211+function ($) {
2212  'use strict';
2213
2214  // AFFIX CLASS DEFINITION
2215  // ======================
2216
2217  var Affix = function (element, options) {
2218    this.options = $.extend({}, Affix.DEFAULTS, options)
2219
2220    this.$target = $(this.options.target)
2221      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2222      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
2223
2224    this.$element     = $(element)
2225    this.affixed      = null
2226    this.unpin        = null
2227    this.pinnedOffset = null
2228
2229    this.checkPosition()
2230  }
2231
2232  Affix.VERSION  = '3.3.5'
2233
2234  Affix.RESET    = 'affix affix-top affix-bottom'
2235
2236  Affix.DEFAULTS = {
2237    offset: 0,
2238    target: window
2239  }
2240
2241  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2242    var scrollTop    = this.$target.scrollTop()
2243    var position     = this.$element.offset()
2244    var targetHeight = this.$target.height()
2245
2246    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2247
2248    if (this.affixed == 'bottom') {
2249      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2250      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2251    }
2252
2253    var initializing   = this.affixed == null
2254    var colliderTop    = initializing ? scrollTop : position.top
2255    var colliderHeight = initializing ? targetHeight : height
2256
2257    if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2258    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2259
2260    return false
2261  }
2262
2263  Affix.prototype.getPinnedOffset = function () {
2264    if (this.pinnedOffset) return this.pinnedOffset
2265    this.$element.removeClass(Affix.RESET).addClass('affix')
2266    var scrollTop = this.$target.scrollTop()
2267    var position  = this.$element.offset()
2268    return (this.pinnedOffset = position.top - scrollTop)
2269  }
2270
2271  Affix.prototype.checkPositionWithEventLoop = function () {
2272    setTimeout($.proxy(this.checkPosition, this), 1)
2273  }
2274
2275  Affix.prototype.checkPosition = function () {
2276    if (!this.$element.is(':visible')) return
2277
2278    var height       = this.$element.height()
2279    var offset       = this.options.offset
2280    var offsetTop    = offset.top
2281    var offsetBottom = offset.bottom
2282    var scrollHeight = Math.max($(document).height(), $(document.body).height())
2283
2284    if (typeof offset != 'object')         offsetBottom = offsetTop = offset
2285    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)
2286    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2287
2288    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2289
2290    if (this.affixed != affix) {
2291      if (this.unpin != null) this.$element.css('top', '')
2292
2293      var affixType = 'affix' + (affix ? '-' + affix : '')
2294      var e         = $.Event(affixType + '.bs.affix')
2295
2296      this.$element.trigger(e)
2297
2298      if (e.isDefaultPrevented()) return
2299
2300      this.affixed = affix
2301      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2302
2303      this.$element
2304        .removeClass(Affix.RESET)
2305        .addClass(affixType)
2306        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2307    }
2308
2309    if (affix == 'bottom') {
2310      this.$element.offset({
2311        top: scrollHeight - height - offsetBottom
2312      })
2313    }
2314  }
2315
2316
2317  // AFFIX PLUGIN DEFINITION
2318  // =======================
2319
2320  function Plugin(option) {
2321    return this.each(function () {
2322      var $this   = $(this)
2323      var data    = $this.data('bs.affix')
2324      var options = typeof option == 'object' && option
2325
2326      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2327      if (typeof option == 'string') data[option]()
2328    })
2329  }
2330
2331  var old = $.fn.affix
2332
2333  $.fn.affix             = Plugin
2334  $.fn.affix.Constructor = Affix
2335
2336
2337  // AFFIX NO CONFLICT
2338  // =================
2339
2340  $.fn.affix.noConflict = function () {
2341    $.fn.affix = old
2342    return this
2343  }
2344
2345
2346  // AFFIX DATA-API
2347  // ==============
2348
2349  $(window).on('load', function () {
2350    $('[data-spy="affix"]').each(function () {
2351      var $spy = $(this)
2352      var data = $spy.data()
2353
2354      data.offset = data.offset || {}
2355
2356      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2357      if (data.offsetTop    != null) data.offset.top    = data.offsetTop
2358
2359      Plugin.call($spy, data)
2360    })
2361  })
2362
2363}(jQuery);
2364
vendor: 36,816 bytes, lines 2365-2371
2365/*!
2366 * Bootstrap v3.3.5 (http://getbootstrap.com)
2367 * Copyright 2011-2015 Twitter, Inc.
2368 * Licensed under the MIT license
2369 */
2370if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),
2371d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
2371
2372!function(e){"use strict";jQuery.fn.beforeAfter=function(t){var o=jQuery.extend({movable:!0,clickMove:!0,alwaysShow:!0,position:50,opacity:.4,activeOpacity:1,hoverOpacity:.8,separatorColor:"#ffffff",bulletColor:"#ffffff",arrowColor:"#333333"},t);return this.each(function(){!function(t){if(2==jQuery(t).children().length){var r=e(t).children()[0],n=e(t).children()[1],i=e(t).css("position"),s=(e(t).css("z-index"),e(t).css("overflow")),c=e(r).css("position"),a=e(r).css("top"),u=e(r).css("left"),d=e(r).css("width"),l=e(r).css("height"),p=e(r).css("z-Index"),h="position:"+c+";top:"+a+";left:"+u+";width:"+d+";height:"+l+";z-index:"+p+";float:"+e(r).css("float"),y="position:"+e(n).css("position")+";top:"+e(n).css("top")+";left:"+e(n).css("left")+";width:"+e(n).css("width")+";height:"+e(n).css("height")+";z-index:"+e(n).css("z-Index");jQuery(t).attr("data-bareservedstyle","position:"+i+";overflow:"+s),jQuery(r).attr("data-bareservedstyle",h),jQuery(n).attr("data-bareservedstyle",y);var v=isNaN(parseInt(p))?0:parseInt(p),f="-webkit-user-select:none;-ms-user-select:none;user-select:none;";jQuery(t).css({position:"relative",overflow:"hidden"}),jQuery(r).css({position:"relative",top:"0",left:"0",width:"100%"}),jQuery(n).css({position:"absolute",top:"0",right:"0",width:"auto",height:"100%","z-index":v+1});var m=document.createElement("DIV");m.setAttribute("style","position:relative !important;width:100% !important;height:100%  !important;"+f),jQuery(r).clone({withDataAndEvents:!0}).appendTo(m);var j=document.createElement("DIV");j.setAttribute("style","position:absolute !important;width:"+o.position+"% !important;height:100% !important;top:0px !important;right:0px !important;overflow:hidden !important;"+f),jQuery(n).clone({withDataAndEvents:!0}).appendTo(j);var Q=document.createElement("I");Q.setAttribute("style","border:solid black;border-width:0 2px 2px 0;display:inline-block;padding:3px;transform:rotate(135deg);-webkit-transform:rotate(135deg);");var g=document.createElement("I");g.setAttribute("style","border:solid black;border-width:2px 0 0 2px;display:inline-block;padding:3px;transform:rotate(135deg);-webkit-transform:rotate(135deg);");var w=document.createElement("DIV");w.setAttribute("style","position:absolute;width:32px;height:32px;line-height:30px;padding:4xp;text-align:center;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;background-color:#fff;");var b=document.createElement("DIV");b.setAttribute("style","position:relative;width:100%;height:100%;");var x=document.createElement("DIV");x.setAttribute("style","position:absolute !important;width:2px !important;height:100% !important;top:0px !important;right:"+o.position+"% !important;overflow:visible !important;transform:translateX(50%) !important;background-color: #fff;cursor:e-resize;opacity:"+o.opacity+";z-index:"+v+"2;"+f),jQuery(Q).css("border-color",o.arrowColor),jQuery(g).css("border-color",o.arrowColor),jQuery(w).css("background-color",o.bulletColor),jQuery(x).css("background-color",o.separatorColor),w.append(Q),w.append(g),b.append(w),x.append(b),t.append(m),t.append(j),t.append(x),jQuery(r).remove(),jQuery(n).remove();var M=function(){jQuery(m).children().width()>0&&jQuery(j).children().width(jQuery(m).children().width()),jQuery(m).children().height()>0&&jQuery(j).children().height(jQuery(m).children().height())};if(jQuery(window).on("resize",M),o.movable){var k=!1;o.clickMove&&(jQuery(m).on("click",function(){void 0!==o.onMoveStart&&o.onMoveStart();var e=jQuery(t).width(),r=jQuery(x).css("right"),n=((parseInt(r)+Math.min(.05*e,5))/e*100).toFixed(2),i=n>100?100:n<0?0:n;i+="%",jQuery(j).width(i),jQuery(x).css("right",i),void 0!==o.onMoving&&r!=jQuery(x).css("right")&&o.onMoving(),void 0!==o.onMoveEnd&&o.onMoveEnd()}),jQuery(j).on("click",function(){void 0!==o.onMoveStart&&o.onMoveStart();var e=jQuery(t).width(),r=jQuery(x).css("right"),n=((parseInt(r)-Math.min(.05*e,5))/e*100).toFixed(2),i=n>100?100:n<0?0:n;i+="%",jQuery(j).width(i),jQuery(x).css("right",i),void 0!==o.onMoving&&r!=jQuery(x).css("right")&&o.onMoving(),void 0!==o.onMoveEnd&&o.onMoveEnd()})),jQuery(t).on("mouseenter",function(){jQuery(x).css("opacity",o.hoverOpacity)}),jQuery(t).on("mouseleave",function(){jQuery(x).css("opacity",o.opacity)});var E=function(e){var r=e.pageX||e.touches[0].clientX,n=jQuery(t).offset().left,i=jQuery(t).width(),s=jQuery(x).css("right"),c=((n+i-r)/i*100).toFixed(2),a=c>100?100:c<0?0:c;a+="%",jQuery(j).width(a),jQuery(x).css("right",a),void 0!==o.onMoving&&s!=jQuery(x).css("right")&&o.onMoving()},I=function(e){k=!0,jQuery(x).css("opacity",o.opacity),void 0!==o.onMoveEnd&&o.onMoveEnd()};jQuery(x).on("mousedown",function(e){k=!1,jQuery(x).css("opacity",o.activeOpacity),void 0!==o.onMoveStart&&o.onMoveStart(),jQuery(document).on("mousemove",E),jQuery(document).on("mouseup",function(e){jQuery(document).off("mousemove",E),k||I()}),jQuery(window).on("mouseup",function(e){jQuery(document).off("mousemove",E),k||I()})}),jQuery(x).on("touchstart",function(e){k=!1,void 0!==o.onMoveStart&&o.onMoveStart(),jQuery(x).css("opacity",o.activeOpacity),jQuery(document).on("touchmove",E
2372),jQuery(document).on("touchcancel",function(e){jQuery(document).off("touchmove",E),k||I()}),jQuery(window).on("touchcancel",function(e){jQuery(document).off("touchmove",E),k||I()}),jQuery(document).on("touchend",function(e){jQuery(document).off("touchmove",E),k||I()})})}M()}else console.log("%cWarning: %s","color:#e4672e;font-size:200%;","BeforeAfter plugin need absolutely two childrens.")}(this)})}}(jQuery);
2373
2374/**
2375 * Featherlight - ultra slim jQuery lightbox
2376 * Version 1.7.13 - http://noelboss.github.io/featherlight/
2377 *
2378 * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com)
2379 * MIT Licensed.
2380**/
2381!function(a){"use strict";function b(a,c){if(!(this instanceof b)){var d=new b(a,c);return d.open(),d}this.id=b.id++,this.setup(a,c),this.chainCallbacks(b._callbackChain)}function c(a,b){var c={};for(var d in a)d in b&&(c[d]=a[d],delete a[d]);return c}function d(a,b){var c={},d=new RegExp("^"+b+"([A-Z])(.*)");for(var e in a){var f=e.match(d);if(f){var g=(f[1]+f[2].replace(/([A-Z])/g,"-$1")).toLowerCase();c[g]=a[e]}}return c}if("undefined"==typeof a)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));if(a.fn.jquery.match(/-ajax/))return void("console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version."));var e=[],f=function(b){return e=a.grep(e,function(a){return a!==b&&a.$instance.closest("body").length>0})},g={allow:1,allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,mozallowfullscreen:1,name:1,referrerpolicy:1,sandbox:1,scrolling:1,src:1,srcdoc:1,style:1,webkitallowfullscreen:1,width:1}
vendor: 4,103 bytes, line 2381
2381,h={keyup:"onKeyUp",resize:"onResize"},i=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[h[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},j=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(h,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,i)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"&#10005;",loading:"",persist:!1,otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['<div class="'+e+"-loading "+e+'">','<div class="'+e+'-content">','<button class="'+e+"-close-icon "+d.namespace+'-close" aria-label="Close">',d.closeIcon,"</button>",'<div class="'+d.namespace+'-inner">'+d.loading+"</div>","</div>","</div>"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){if(!b.isDefaultPrevented()){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(d.close(b),b.preventDefault())}}),this},getContent:function(){if(this.persist!==!1&&this.$content)return this.$content;var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",b.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(b).slice(1).remove().end().replaceWith(a.contains(this.$instance[0],b[0])?"":b),this.$content=b.addClass(this.namespace+"-inner"),this},open:function(b){var c=this;if(c.$instance.hide().appendTo(c.root),!(b&&b.isDefaultPrevented()||c.beforeOpen(b)===!1)){b&&b.preventDefault();var d=c.getContent();if(d)return e.push(c),j(!0),c.$instance.fadeIn(c.openSpeed),c.beforeContent(b),a.when(d).always(function(a){c.setContent(a),c.afterContent(b)}).then(c.$instance.promise()).done(function(){c.afterOpen(b)})}return c.$instance.detach(),a.Deferred().reject().promise()},close:function(b){var c=this,d=a.Deferred();return c.beforeClose(b)===!1?d.reject():(0===f(c).length&&j(!1),c.$instance.fadeOut(c.closeSpeed,function(){c.$instance.detach(),c.afterClose(b),d.resolve()})),d.promise()},resize:function(a,b){if(a&&b){this.$content.css("width","").css("height","");var c=Math.max(a/(this.$content.parent().width()-1),b/(this.$content.parent().height()-1));c>1&&(c=b/Math.floor(b/c),this.$content.css("width",""+a/c+"px").css("height",""+b/c+"px"))}},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return this.persist!==!1?a(b):a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('<img src="'+b+'" alt="" class="'+c.namespace+'-image" />');
2381return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("<div></div>").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var e=new a.Deferred,f=a("<iframe/>"),h=d(this,"iframe"),i=c(h,g);return f.hide().attr("src",b).attr(i).css(h).on("load",function(){e.resolve(f.show())}).appendTo(this.$instance.find("."+this.namespace+"-content")),e.promise()}},text:{process:function(b){return a("<div>",{text:b})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(b,c){var d=this,e=new RegExp("^data-"+c+"-(.*)"),f={};return b&&b.attributes&&a.each(b.attributes,function(){var b=this.name.match(e);if(b){var c=this.value,g=a.camelCase(b[1]);if(a.inArray(g,d.functionAttributes)>=0)c=new Function(c);else try{c=JSON.parse(c)}catch(h){}f[g]=c}}),f},extend:function(b,c){var d=function(){this.constructor=b};return d.prototype=this.prototype,b.prototype=new d,b.__super__=this.prototype,a.extend(b,this,c),b.defaults=b.prototype,b},attach:function(b,c,d){var e=this;"object"!=typeof c||c instanceof a!=!1||d||(d=c,c=void 0),d=a.extend({},d);var f,g=d.namespace||e.defaults.namespace,h=a.extend({},e.defaults,e.readElementConfig(b[0],g),d),i=function(g){var i=a(g.currentTarget),j=a.extend({$source:b,$currentTarget:i},e.readElementConfig(b[0],h.namespace),e.readElementConfig(g.currentTarget,h.namespace),d),k=f||i.data("featherlight-persisted")||new e(c,j);"shared"===k.persist?f=k:k.persist!==!1&&i.data("featherlight-persisted",k),j.$currentTarget.blur&&j.$currentTarget.blur(),k.open(g)};return b.on(h.openTrigger+"."+h.namespace,h.filter,i),{filter:h.filter,handler:i}},current:function(){var a=this.opened();return a[a.length-1]||null},opened:function(){var b=this;return f(),a.grep(e,function(a){return a instanceof b})},close:function(a){var b=this.current();return b?b.close(a):void 0},_onReady:function(){var b=this;if(b.autoBind){var c=a(b.autoBind);c.each(function(){b.attach(a(this))}),a(document).on("click",b.autoBind,function(d){if(!d.isDefaultPrevented()){var e=a(d.currentTarget),f=c.length;if(c=c.add(e),f!==c.length){var g=b.attach(e);(!g.filter||a(d.target).parentsUntil(e,g.filter).length>0)&&g.handler(d)}}})}},_callbackChain:{onKeyUp:function(b,c){return 27===c.keyCode?(this.closeOnEsc&&a.featherlight.close(c),!1):b(c)},beforeOpen:function(b,c){return a(document.documentElement).addClass("with-featherlight"),this._previouslyActive=document.activeElement,this._$previouslyTabbable=a("a, input, select, textarea, iframe, button, iframe, [contentEditable=true]").not("[tabindex]").not(this.$instance.find("button")),this._$previouslyWithTabIndex=a("[tabindex]").not('[tabindex="-1"]'),this._previousWithTabIndices=this._$previouslyWithTabIndex.map(function(b,c){return a(c).attr("tabindex")}),this._$previouslyWithTabIndex.add(this._$previouslyTabbable).attr("tabindex",-1),document.activeElement.blur&&document.activeElement.blur(),b(c)},afterClose:function(c,d){var e=c(d),f=this;return this._$previouslyTabbable.removeAttr("tabindex"),this._$previouslyWithTabIndex.each(function(b,c){a(c).attr("tabindex",f._previousWithTabIndices[b])}),this._previouslyActive.focus(),0===b.opened().length&&a(document.documentElement).removeClass("with-featherlight"),e},onResize:function(a,b){return this.resize(this.$content.naturalWidth,this.$content.naturalHeight),a(b)},afterContent:function(a,b){var c=a(b);return this.$instance.find("[autofocus]:not([disabled])").focus(),this.onResize(b),c}}}),a.featherlight=b,a.fn.featherlight=function(a,c){return b.attach(this,a,c),this},a(document).ready(function(){b._onReady()})}(jQuery);
2382
2383function hundeCount(id){
2384    console.log('Hochgezählt', id);
2385    deUmlaut(id);
2386    console.log(id);
2387    jQuery.ajax({
2388        type: 'GET',
2389        url: '/wp-content/themes/motive-child/hundeconfigurator/count.php?value=' + id,
2390        success: function (data) {
2391        }
2392    });
2393
2394}
2395
2396function deUmlaut(value){
2397    value = value.toLowerCase();
2398    value = value.replace(/ä/g, 'ae');
2399    value = value.replace(/ö/g, 'oe');
2400    value = value.replace(/ü/g, 'ue');
2401    value = value.replace(/ß/g, 'ss');
2402    value = value.replace(/ /g, '-');
2403    value = value.replace(/\./g, '');
2404    value = value.replace(/,/g, '');
2405    value = value.replace(/\(/g, '');
2406    value = value.replace(/\)/g, '');
2407    return value;
2408}
2409
2410/*! jQuery UI - v1.13.2 - 2023-07-03
2411* http://jqueryui.com
2412* Includes: widget.js
2413* Copyright jQuery Foundation and other contributors; Licensed MIT */
2414
2415!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(u){"use strict";u.ui=u.ui||{};u.ui.version="1.13.2";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;u.cleanData=(n=u.cleanData,function(t){for(var e,i,s=0;null!=(i=t[s]);s++)(e=u._data(i,"events"))&&e.remove&&u(i).triggerHandler("remove");n(t)}),u.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0],l=r+"-"+(t=t.split(".")[1]);return e||(e=i,i=u.Widget),Array.isArray(e)&&(e=u.extend.apply(null,[{}].concat(e))),u.expr.pseudos[l.toLowerCase()]=function(t){return!!u.data(t,l)},u[r]=u[r]||{},s=u[r][t],n=u[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},u.extend(n,s,{version:e.version,_proto:u.extend({},e),_childConstructors:[]}),(o=new i).options=u.widget.extend({},o.options),u.each(e,function(e,s){function n(){return i.prototype[e].apply(this,arguments)}function o(t){return i.prototype[e].apply(this,t)}a[e]="function"==typeof s?function(){var t,e=this._super,i=this._superApply;return this._super=n,this._superApply=o,t=s.apply(this,arguments),this._super=e,this._superApply=i,t}:s}),n.prototype=u.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(u.each(s._childConstructors,function(t,e){var i=e.prototype;u.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),u.widget.bridge(t,n),n}
vendor: 4,405 bytes, line 2415
2415,u.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(u.isPlainObject(i)?t[e]=u.isPlainObject(t[e])?u.widget.extend({},t[e],i):u.widget.extend({},i):t[e]=i);return t},u.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;u.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=u.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?u.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:u.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=u.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=u.data(this,a);t?(t.option(i||{}),t._init&&t._init()):u.data(this,a,new e(i,this))})),n}},u.Widget=function(){},u.Widget._childConstructors=[],u.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=u(e||this.defaultElement||this)[0],this.element=u(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=u(),this.hoverable=u(),this.focusable=u(),this.classesElementLookup={},e!==this&&(u.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=u(e.style?e.ownerDocument:e.document||e),this.window=u(this.document[0].defaultView||this.document[0].parentWindow)),this.options=u.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:u.noop,_create:u.noop,_init:u.noop,destroy:function(){var i=this;this._destroy(),u.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:u.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return u.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=u.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=u(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function t(t,e){for(var i,s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||u(),i=n.add?(function(){var i=[];n.element.each(function(t,e){u.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(u(i),{remove:"_untrackClassesElement"})}(),u(u.uniqueSort(i.get().concat(n.element.get())))):u(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=u.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;u.each(s.classesElementLookup,function(t,e){-1!==u.inArray(i.target,e)&&(s.classesElementLookup[t]=u(e.not(i.target).get()))}),this._off(u(i.target))}
2415,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){var n="string"==typeof t||null===t,i={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s="boolean"==typeof s?s:i};return i.element.toggleClass(this._classes(i),s),this},_on:function(n,o,t){var a,r=this;"boolean"!=typeof n&&(t=o,o=n,n=!1),t?(o=a=u(o),this.bindings=this.bindings.add(o)):(t=o,o=this.element,a=this.widget()),u.each(t,function(t,e){function i(){if(n||!0!==r.options.disabled&&!u(this).hasClass("ui-state-disabled"))return("string"==typeof e?r[e]:e).apply(r,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||u.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),t=s[1]+r.eventNamespace,s=s[2];s?a.on(t,s,i):o.on(t,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=u(this.bindings.not(t).get()),this.focusable=u(this.focusable.not(t).get()),this.hoverable=u(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(u(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(u(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(u(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(u(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=u.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},u.each({show:"fadeIn",hide:"fadeOut"},function(o,a){u.Widget.prototype["_"+o]=function(e,t,i){var s,n=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!u.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&u.effects&&u.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){u(this)[o](),i&&i.call(e[0]),t()})}});u.widget});
2416
2417jQuery(document).ready(function (jQuery){
2418  "use strict";
2419  const memorygameContainer = document.createElement('div');
2420  memorygameContainer.id = 'memory-game';
2421  
2422  if($('.place-memory-game-here').length===0)
2423  {
2424      return;
2425  }
2426  
2427  // document.getElementsByClassName('main-heading')[0].appendChild(memorygameContainer);
2428  (document.getElementsByClassName('place-memory-game-here')[0]).after(memorygameContainer);
2429
2430  let controlsDiv = document.createElement('div')
2431  controlsDiv.id = 'controls'
2432  memorygameContainer.after(controlsDiv)
2433
2434  let timer = document.createElement('div');
2435  timer.id = 'timer';
2436  timer.innerHTML = '00:00:00';
2437  controlsDiv.appendChild(timer);
2438
2439  let verstricheneZeit = document.createElement('div')
2440  verstricheneZeit.id = 'verstricheneZeit'
2441  verstricheneZeit.innerHTML = 'Verstrichene Zeit: '
2442  timer.before(verstricheneZeit)
2443
2444  let stopButton = document.createElement('button');
2445  stopButton.id = 'memoryGameStop';
2446  stopButton.innerHTML = 'Spiel abbrechen';
2447  stopButton.classList.add = 'btn-small';
2448  controlsDiv.appendChild(stopButton);
2449
2450  console.log("Memogame loaded!")
2451
2452  jQuery(function () {
2453    jQuery("#memory-game").memoryGame({
2454      cards: [
2455        {
2456          imageUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img0.jpg',
2457          linkUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img0.jpg'
2458        },
2459        {
2460          imageUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img1.jpg',
2461          linkUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img1.jpg'
2462        },
2463        {
2464          imageUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img2.jpg',
2465          linkUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img2.jpg'
2466        },
2467        {
2468          imageUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img3.jpg',
2469          linkUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img3.jpg'
2470        },
2471        {
2472          imageUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img4.jpg',
2473          linkUrl: 'https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/1_5Paare/Img4.jpg'
2474        },
2475      ],
2476      cardWidth: 100,
2477      cardHeight: 100
2478    });
2479  });
2480
2481  (function (jQuery) {
2482    jQuery.fn.animateScaleX = function (
2483        startScale,
2484        endScale,
2485        duration,
2486        easing,
2487        complete
2488    ) {
2489      var args = jQuery.speed(duration, easing, complete);
2490      var step = args.step;
2491      return this.each(function (i, e) {
2492        args.step = function (now) {
2493          jQuery.style(e, "transform", "scaleX(" + now + ")");
2494          if (step) return step.apply(this, arguments);
2495        };
2496        args.complete = function () {
2497          if (complete) return complete.apply(e, arguments);
2498        };
2499        jQuery({dummyscalex: startScale}).animate({dummyscalex: endScale}, args);
2500      });
2501    };
2502    let res = {
2503      tries: 0,
2504      //gameStart: "",
2505      //gameEnd: "",
2506      gameTime: "",
2507      succesfullyEnded: false,
2508    };
2509    /*
2510    window.onload = function () {
2511      res.gameStart = Date.now();
2512    };
2513  */
2514    jQuery.widget("matteosistisette.memoryGame", {
2515      disclosed: null, //[]
2516      ndisclosed: 0,
2517      elementId: "",
2518      currentCards: null, //[]
2519      timeoutId: null,
2520      ready: false,
2521      innerElement: null,
2522      resetPending: null,
2523      nmoves: 0,
2524      isover: false,
2525
2526      options: {
2527        cards: [],
2528        imagesPath: "",
2529        cardWidth: "auto",
2530        cardHeight: "auto",
2531        preferredAspectRatio: 1,
2532        autoResize: true,
2533        cardFlipDuration: 300,
2534        flipBackTimeout: 1000,
2535        flipAnimationEasing: "linear",
2536
2537        minCardMargin: 10,
2538        maxCardMargin: 50,
2539
2540        subtractTopOffset: false,
2541
2542        maxRotation: 5,
2543
2544        order: null,
2545        alreadyDisclosed: [],
2546
2547        onPairDisclosed: function (object) {
2548        },
2549      },
2550
2551      reset: function (animated, reorder, rebuild) {
2552        // Covers all cards.
2553        // if (reorder) reorders them randomly
2554        // if (rebuild) completely rebuilds the widget
2555        //              (usually only needed after modifying the cards array)
2556
2557        if (animated) {
2558          this.resetPending = {
2559            reorder: reorder,
2560            rebuild: rebuild,
2561          };
2562          this._closeCards();
2563        } else {
2564          this.resetPending = null;
2565          if (rebuild) {
2566            this._cleanUp();
2567            this._build();
2568          } else {
2569            this._resetCards();
2570            if (reorder) this.reorder(true);
2571          }
2572        }
2573      },
2574
2575      reorder: function (keepRotations, useOptions) {
2576        if (keepRotations === undefined) keepRotations = true;
2577        if (
2578            this.options.order === null ||
2579            this.options.order.length != 2 * this.options.cards.length
2580        )
2581          useOptions = false;
2582        if (useOptions) keepRotations = false;
2583
2584        var cards = [];
2585        var rotations = [];
2586        jQuery(this.innerElement)
2587            .children()
2588            .each(function () {
2589              jQuery(this).detach();
2590              if (useOptions) {
2591                var idx = jQuery(this).data("cardIndex");
2592                if (cards[idx] === undefined) cards[idx] = [];
2593                cards[idx].push(jQuery(this));
2594              } else {
2595                cards.push(jQuery(this));
2596                rotations.push(
2597                    jQuery(this).find(".memory-card-wrapper").data("rotation")
2598                );
2599              }
2600            });
2601        if (useOptions) {
2602          for (var i = 0; i < this.options.order.length; i++) {
2603            var jQuerycard = cards[this.options.order[i]].pop();
2604            jQuery(this.innerElement).append(jQuerycard);
2605          }
2606        } else {
2607          var i = 0;
2608          while (cards.length > 0) {
2609            var n = Math.min(
2610                Math.floor(Math.random() * cards.length),
2611                cards.length - 1
2612            );
2613            var jQuerycard = cards[n];
2614            cards.splice(n, 1);
2615            if (keepRotations) {
2616              jQuerycard
2617                  .find(".memory-card-wrapper")
2618                  .data("rotation", rotations[i])
2619                  .css({
2620                    transform: "rotate(" + rotations[i] + "deg)",
2621                  });
2622            }
2623            jQuery(this.innerElement).append(jQuerycard);
2624            i++;
2625          }
2626        }
2627      },
2628
2629      rearrange: function () {
2630        // Sets rotations, positions, etc.
2631        // Shouldn't be needed as a public method.
2632        //   Needed after changing some size options,
2633        //   but it will be done internally already.
2634        this.resize();
2635        this._arrangeCards();
2636      },
2637
2638      destroy: function () {
2639        this._cleanUp();
2640        jQuery.Widget.prototype.destroy.call(this);
2641      },
2642
2643      resize: function (ncalls) {
2644        if (ncalls === undefined) ncalls = 0;
2645        var done = false;
2646
2647        var gameWidth = jQuery(this.element).width() - 1;
2648        var maxHeight = this._getMaxHeight();
2649
2650        // No of columns using full width with minimum margin:
2651        var ncards = this.options.cards.length * 2;
2652        var columns = Math.min(
2653            Math.floor(
2654                gameWidth / (this.options.cardWidth + 2 * this.options.minCardMargin)
2655            ),
2656            ncards
2657        );
2658        var rows = Math.ceil(ncards / columns);
2659
2660        if (
2661            this.options.preferredAspectRatio > 0 &&
2662            rows * (this.options.cardHeight + 2 * this.options.minCardMargin) <
2663            maxHeight
2664        ) {
2665          var squareColumns = Math.ceil(
2666              Math.sqrt(ncards * this.options.preferredAspectRatio)
2667          );
2668          if (squareColumns < columns) {
2669            var squareRows = Math.ceil(ncards / squareColumns);
2670            if (
2671                squareRows *
2672                (this.options.cardHeight + 2 * this.options.minCardMargin) <=
2673                maxHeight
2674            ) {
2675              columns = squareColumns;
2676              rows = squareRows;
2677            } else {
2678              var maxRows = Math.floor(
2679                  maxHeight /
2680                  (this.options.cardHeight + 2 * this.options.minCardMargin)
2681              );
2682              rows = maxRows;
2683              columns = Math.ceil(ncards / rows);
2684            }
2685          }
2686        }
2687
2688        var outerWidth = Math.max(
2689            2 * this.options.minCardMargin + this.options.cardWidth,
2690            Math.min(
2691                2 * this.options.maxCardMargin + this.options.cardWidth,
2692                Math.floor(gameWidth / columns)
2693            )
2694        );
2695
2696        var outerHeight =
2697            this.options.cardHeight + (outerWidth - this.options.cardWidth);
2698        if (outerHeight * rows > maxHeight) {
2699          outerHeight = Math.max(
2700              Math.floor(maxHeight / rows),
2701              this.options.cardHeight + 2 * this.options.minCardMargin
2702          );
2703        }
2704
2705        var boundWidth = outerWidth * columns;
2706        if (gameWidth - boundWidth > outerWidth / 2) {
2707          jQuery(this.innerElement).css({
2708            width: boundWidth,
2709          });
2710        } else {
2711          jQuery(this.innerElement).css({
2712            width: "100%",
2713          });
2714        }
2715
2716        jQuery(this.innerElement).children(".memory-card-container").css({
2717          width: outerWidth,
2718          height: outerHeight,
2719        });
2720
2721        var newGameWidth = jQuery(this.innerElement).width() - 1;
2722        if (newGameWidth != gameWidth) {
2723          ncalls++;
2724          if (ncalls < 10) {
2725            this.resize(ncalls);
2726          }
2727        }
2728      },
2729
2730      _getMaxHeight: function () {
2731        return (
2732            document.documentElement.clientHeight -
2733            (this.options.subtractTopOffset ? jQuery(this.innerElement).offset().top : 0)
2734        );
2735      },
2736
2737      _arrangeCards: function (rotate) {
2738        var game = this;
2739        jQuery(this.innerElement)
2740            .children(".memory-card-container")
2741            .each(function () {
2742              var jQuerya = jQuery(this).find("a");
2743              jQuerya.css({
2744                marginLeft: -game.option("cardWidth") / 2,
2745                marginTop: -game.option("cardHeight") / 2,
2746              });
2747              jQuerya.find(".card").css({
2748                width: game.option("cardWidth"),
2749                height: game.option("cardHeight"),
2750              });
2751              var jQuerywrapper = jQuery(this).find(".memory-card-wrapper");
2752              if (rotate) {
2753                var rotation = (Math.random() * 2 - 1) * game.option("maxRotation");
2754                jQuerywrapper
2755                    .css({
2756                      transform: "rotate(" + rotation + "deg)",
2757                    })
2758                    .data("rotation", rotation);
2759              }
2760            });
2761      },
2762
2763      _setOption: function (key, value) {
2764        this._super(key, value);
2765      },
2766      _setOptions: function (options) {
2767        this._super(options);
2768        if (this.ready) {
2769          if (options.cards !== undefined) {
2770            this.reset(false, true, true);
2771          } else if (
2772              options.cardWidth !== undefined ||
2773              options.cardHeight !== undefined ||
2774              options.maxRotation !== undefined
2775          ) {
2776            this.rearrange();
2777          }
2778        }
2779      },
2780
2781      _create: function () {
2782        this._init(true);
2783        this._build();
2784        var game = this;
2785        if (this.options.autoResize)
2786          jQuery(window).resize(function () {
2787            game.resize();
2788          });
2789      },
2790
2791      _init: function (firstTime) {
2792        this.disclosed = [];
2793        this.ndisclosed = 0;
2794        this.nmoves = 0;
2795        this.currentCards = [];
2796        this.elementId = jQuery(this.element).attr("id");
2797        this.resetPending = null;
2798
2799        if (firstTime) {
2800          if (this.options.cards.length > 0) {
2801            if (
2802                this.options.cardWidth === "auto" ||
2803                this.options.cardHeight === "auto"
2804            ) {
2805              throw new Error(
2806                  "Unspecified card size. When passing in a list of cards via the 'cards' parameter, " +
2807                  "you must specify a numeric value for the 'cardWidth' and 'cardHeight' parameters in pixels. " +
2808                  "You cannot use the 'auto' value or not specify it."
2809              );
2810            } else if (
2811                !(Number(this.options.cardWidth) > 0) ||
2812                !(Number(this.options.cardHeight) > 0)
2813            ) {
2814              throw new Error("Invalid card size.");
2815            }
2816          }
2817          if (
2818              this.options.cards.length == 0 &&
2819              jQuery(this.element).find("a").length > 0
2820          ) {
2821            this._createCardsArrayFromMarkup();
2822          }
2823          this.ndisclosed = this.options.alreadyDisclosed.length;
2824          for (var i = 0; i < this.options.alreadyDisclosed.length; i++) {
2825            this.disclosed[this.options.alreadyDisclosed[i]] = true;
2826          }
2827        }
2828      },
2829
2830      _cleanUp: function () {
2831        jQuery(this.innerElement)
2832            .children()
2833            .each(function () {
2834              jQuery(this).stop(true);
2835            });
2836        jQuery(this.element)
2837            .children()
2838            .each(function () {
2839              if (jQuery(this).hasClass("memory-game-inner"))
2840                jQuery(this).children().remove();
2841            })
2842            .remove();
2843        if (this.timeoutId) {
2844          clearTimeout(this.timeoutId);
2845          this.timeoutId = null;
2846        }
2847        this._init();
2848      },
2849
2850      _build: function () {
2851        jQuery(this.element)
2852            .children()
2853            .each(function () {
2854              if (jQuery(this).hasClass("memory-game-inner"))
2855                jQuery(this).children().remove();
2856            })
2857            .remove();
2858
2859        this.innerElement = jQuery(this.element)
2860            .addClass("memory-game")
2861            .wrapInner('<div class="memory-game-inner"></div>')
2862            .children()[0];
2863
2864        var cards = this.options.cards;
2865        for (var i = 0; i < cards.length; i++) {
2866          this._createCard(i, cards[i]);
2867        }
2868        this.reorder(true, true);
2869        this.resize();
2870        this._arrangeCards(true);
2871        this.ready = true;
2872      },
2873
2874      _createCardsArrayFromMarkup: function () {
2875        var game = this;
2876        var cards = [];
2877        this.options.imagesPath = "";
2878        var first = true;
2879        jQuery(this.element)
2880            .find("a")
2881            .each(function () {
2882              var linkUrl = jQuery(this).attr("href");
2883              var linkTitle = jQuery(this).attr("title");
2884              var jQueryimg = jQuery(this).find("img");
2885              if (jQueryimg.length > 0) {
2886                if (first) {
2887                  if (
2888                      game.options.cardWidth === "auto" ||
2889                      game.options.cardHeight === "auto"
2890                  ) {
2891                    game.options.cardWidth = jQueryimg.width();
2892                    game.options.cardHeight = jQueryimg.height();
2893                    if (
2894                        game.options.cardWidth == 0 ||
2895                        game.options.cardHeight == 0
2896                    ) {
2897                      throw new Error(
2898                          "Card width and/or height appears to be zero. " +
2899                          "When parameters cardWidth and cardHeight are not specified or their value is 'auto', " +
2900                          "you need to make sure that the first image has a measurable width and height when the widget is created, " +
2901                          "either by creating the widget on document load (as opposed to document ready) or by forcing the image size " +
2902                          "via 'width' and 'height' html attributes or CSS"
2903                      );
2904                    }
2905                  }
2906                  first = false;
2907                }
2908                var imageUrl = jQueryimg.attr("src");
2909                var cardObject = {
2910                  linkUrl: linkUrl,
2911                  linkTitle: linkTitle,
2912                  imageUrl: imageUrl,
2913                  data: jQuery(this).data(),
2914                };
2915                cards.push(cardObject);
2916              }
2917            });
2918        this.options.cards = cards;
2919      },
2920
2921      _resetCards: function () {
2922        if (this.timeoutId) {
2923          clearTimeout(this.timeoutId);
2924          this.timeoutId = null;
2925        }
2926        this._init(false);
2927        var game = this;
2928        jQuery(this.innerElement)
2929            .children()
2930            .each(function () {
2931              if (jQuery(this).data("status") > 0) {
2932                jQuery(this).stop(true);
2933                game._setCardStatus(jQuery(this), 0, true);
2934              }
2935            });
2936      },
2937
2938      _closeCards: function () {
2939        if (this.timeoutId) {
2940          clearTimeout(this.timeoutId);
2941          this.timeoutId = null;
2942        }
2943        var game = this;
2944        jQuery(this.innerElement)
2945            .children()
2946            .each(function () {
2947              if (jQuery(this).data("status") > 0) {
2948                if (jQuery(this).data("currentDirection") >= 0) {
2949                  game._startFlip(this, -1);
2950                }
2951              }
2952            });
2953      },
2954
2955      // set backimage in the createcard function
2956      _createCard: function (cardIndex, cardInfo) {
2957        for (var i = 0; i < 2; i++) {
2958          var containerId = this.getCardId(cardIndex, i);
2959          var jQuerycontainer = jQuery(
2960              '<div class="memory-card-container" id="' + containerId + '"></div>'
2961          );
2962          var href = cardInfo.linkUrl;
2963          if (href === undefined || href === null) href = "";
2964
2965          var jQuerywrapper = jQuery('<div class="memory-card-wrapper"></div>');
2966          jQuerycontainer.append(jQuerywrapper);
2967
2968          var jQuerya = jQuery('<a href="" target="_blank"></a>');
2969          jQuerycontainer.data("linkUrl", href);
2970          jQuerycontainer.data("linkTitle", cardInfo.linkTitle);
2971          jQuerycontainer.data("cardIndex", cardIndex);
2972          jQuerycontainer.data("instance", i);
2973          jQuerycontainer.data("game", this);
2974          jQuerycontainer.data("currentDirection", 0);
2975          if (cardInfo.data !== undefined) jQuerya.data(cardInfo.data);
2976          jQuerywrapper.append(jQuerya);
2977          var jQueryimg = jQuery(
2978              '<img src="' +
2979              this.options.imagesPath +
2980              cardInfo.imageUrl +
2981              '" class="card front">'
2982          );
2983          jQuerya.append(jQueryimg);
2984          var jQuerybackimg = jQuery(
2985              '<img src="https://test-wordpress.forum-verlag.com/wp-content/themes/twentytwenty-child/images_memory/front_images/DERHUND_Memo-Game.png" class="card back">'
2986          );
2987          jQuerya.append(jQuerybackimg);
2988          jQuerybackimg.css({
2989            width: this.options.cardWidth,
2990            height: this.options.cardHeight,
2991          });
2992          this._setCardStatus(
2993              jQuerycontainer,
2994              this.disclosed[cardIndex] ? 2 : 0,
2995              true
2996          );
2997          jQuerya.click(function () {
2998            var jQuerycard = jQuery(this).parents(".memory-card-container");
2999            return jQuerycard.data("game")._cardClicked(jQuerycard.get()[0]);
3000          });
3001
3002          jQuery(this.innerElement).append(jQuerycontainer);
3003          if (this.disclosed[cardIndex]) this.enableCardLink(jQuerycontainer);
3004        }
3005      },
3006
3007      getCardId: function (cardIndex, side) {
3008        return this.elementId + "-card" + cardIndex + "-" + side;
3009      },
3010
3011      _setCardStatus: function (jQuerycard, status, store) {
3012        if (store) jQuerycard.data("status", status);
3013        var jQueryfrontImg = jQuerycard.find("img.front");
3014        var jQuerybackImg = jQuerycard.find(".card.back");
3015        var jQuerya = jQuerycard.find("a");
3016        if (status > 0) {
3017          jQuerya.removeClass("back");
3018          jQuerya.addClass("front");
3019        } else {
3020          jQuerya.removeClass("front");
3021          jQuerya.addClass("back");
3022        }
3023      },
3024
3025      _cardClicked: function (card) {
3026        var jQuerycard = jQuery(card);
3027        if (jQuerycard.data("currentDirection") != 0 || this.currentCards.length > 1)
3028          return false;
3029        var cardStatus = jQuerycard.data("status");
3030        switch (cardStatus) {
3031          case 2:
3032            var href = jQuerycard.find("a").attr("href");
3033            if (href !== undefined && href != null && href != "") return true;
3034            else return false;
3035            break;
3036          case 1:
3037            return false;
3038            break;
3039          case 0:
3040            this.nmoves++;
3041            this._startFlip(card, 1);
3042            return false;
3043            break;
3044        }
3045      },
3046
3047      _startFlip: function (card, direction) {
3048        var jQuerycard = jQuery(card);
3049        //jQuerycard.stop(true);
3050        jQuerycard.data("currentDirection", direction);
3051        if (direction > 0) {
3052          this.currentCards.push(card);
3053          jQuerycard.data("status", 1);
3054        } else {
3055        }
3056        this._startFlipAnimation(card, direction);
3057      },
3058
3059      _startFlipAnimation: function (card, direction) {
3060        var jQuerycard = jQuery(card);
3061
3062        var easing = this.options.flipAnimationEasing;
3063
3064        var jQuerya = jQuerycard.find("a");
3065        jQuerya.animateScaleX(
3066            1,
3067            0,
3068            this.options.cardFlipDuration / 2,
3069            easing == "linear" ? "linear" : "easeIn" + easing,
3070            function () {
3071              var jQuerycard = jQuery(this).parents(".memory-card-container");
3072              var game = jQuerycard.data("game");
3073              var direction = jQuerycard.data("currentDirection");
3074              if (direction > 0) {
3075                jQuery(this).addClass("front");
3076                jQuery(this).removeClass("back");
3077              } else {
3078                jQuery(this).addClass("back");
3079                jQuery(this).removeClass("front");
3080              }
3081
3082              jQuery(this).animateScaleX(
3083                  0,
3084                  1,
3085                  game.option("cardFlipDuration") / 2,
3086                  easing == "linear" ? "linear" : "easeOut" + easing,
3087                  function () {
3088                    var jQuerycard = jQuery(this).parents(".memory-card-container");
3089                    var game = jQuerycard.data("game");
3090                    var direction = jQuerycard.data("currentDirection");
3091                    var cardIndex = jQuerycard.data("cardIndex");
3092                    var event = false;
3093                    if (direction > 0) {
3094                      var disclosed = false;
3095                      if (game.getCurrentCardsLength() > 0) {
3096                        var jQuerycurrentCard0 = jQuery(game.getCurrentCard(0));
3097                        if (game.getCurrentCardsLength() > 1) {
3098                          var jQuerycurrentCard1 = jQuery(game.getCurrentCard(1));
3099                          if (
3100                              jQuerycurrentCard1.data("cardIndex") ==
3101                              jQuerycurrentCard0.data("cardIndex")
3102                          ) {
3103                            disclosed = true;
3104                            if (cardIndex != jQuerycurrentCard1.data("cardIndex")) {
3105                              throw "Flipping with direction 1 ended on a card that is not within currentCards. Something's wrong.";
3106                            }
3107                            jQuerycurrentCard1.data("status", 2);
3108                            jQuerycurrentCard0.data("status", 2);
3109                            game.enableCardLink(jQuerycurrentCard0);
3110                            game.enableCardLink(jQuerycurrentCard1);
3111                            game.setDisclosed(cardIndex);
3112                            game.currentCards = [];
3113                            event = true;
3114                          } else {
3115                            game.closeCurrentCards();
3116                          }
3117                        }
3118                      }
3119                    } else {
3120                      jQuerycard.data("status", 0);
3121                      game.popCurrentCard(jQuerycard);
3122                      if (game.resetPending !== null) {
3123                        game.reset(
3124                            false,
3125                            game.resetPending.reorder,
3126                            game.resetPending.rebuild
3127                        );
3128                      }
3129                    }
3130
3131                    jQuerycard.data("currentDirection", 0);
3132
3133                    if (event) {
3134
3135                      var card = this;
3136                      setTimeout(function () {
3137                        game.option("onPairDisclosed").call(game, {
3138                          card: card,
3139                          cardIndex: cardIndex,
3140                          cardInfo: game.option("cards")[cardIndex],
3141                          disclosedPairs: game.ndisclosed,
3142                          totalPairs: game.option("cards").length,
3143                          moves: game.nmoves,
3144                          finished: game.ndisclosed == game.option("cards").length,
3145                        });
3146                      }, 1);
3147                    }
3148                    res.tries = game.nmoves;
3149                  }
3150              );
3151            }
3152        );
3153      },
3154
3155      getCurrentCardsLength: function () {
3156        return this.currentCards.length;
3157      },
3158      getCurrentCard: function (i) {
3159        return this.currentCards[i];
3160      },
3161      setDisclosed: function (idx) {
3162        if (!this.disclosed[idx]) this.ndisclosed++;
3163        this.disclosed[idx] = true;
3164      },
3165
3166      enableCardLink: function (jQuerycard) {
3167        var jQuerya = jQuerycard.find("a");
3168        jQuerya.attr("href", jQuerycard.data("linkUrl"));
3169        var linkTitle = jQuerycard.data("linkTitle");
3170        if (linkTitle !== undefined && linkTitle !== null)
3171          jQuerya.attr("title", linkTitle);
3172      },
3173      popCurrentCard: function (jQuerycard) {
3174        var nclosed = 0;
3175        for (var i = 0; i < this.currentCards.length; i++) {
3176          var jQuerycc = jQuery(this.currentCards[i]);
3177          if (jQuerycc.data("status") == 0) {
3178            nclosed++;
3179          }
3180        }
3181        if (nclosed == this.currentCards.length) this.currentCards = [];
3182      },
3183
3184      closeCurrentCards: function () {
3185        if (this.timeoutId) clearTimeout(this.timeoutId);
3186        var that = this;
3187        this.timeoutId = setTimeout(function () {
3188          that.actuallyCloseCurrentCards();
3189        }, that.option("flipBackTimeout"));
3190      },
3191
3192      actuallyCloseCurrentCards: function () {
3193        for (var i = 0; i < this.currentCards.length; i++) {
3194          this._startFlip(this.currentCards[i], -1);
3195        }
3196      },
3197    });
3198
3199    //after closing the last pair congrats and opens the redirect page in a new tab
3200    jQuery(function () {
3201      jQuery("#memory-game").memoryGame({
3202        onPairDisclosed: function (info) {
3203          if (info.finished) {
3204            /*
3205            alert(
3206              "Congratulations! You have finished the game in " +
3207                info.moves +
3208                " moves!\n\n"
3209            );
3210              */
3211            res.succesfullyEnded = true;
3212            res.gameTime = time;
3213            let triesX2 = res.tries - this.options.cards.length * 2;
3214            res.tries = triesX2 / 2;
3215
3216            sessionStorage.setItem("results", JSON.stringify(res));
3217            alert("Sie haben gewonnen! \n" + "Spiellänge: " + document.getElementById("timer").textContent);
3218
3219            window.open("https://www.derhund.de/memo-game-danke/",'_blank');
3220            this.reset(true, true); // (animated, shuffle cards)
3221          }
3222        },
3223      });
3224    });
3225
3226    jQuery(document).on("click", "#memoryGameStop", function () {
3227      alert("Das Spiel wurde abgebrochen! \n" + "Verstrichene Zeit: " + document.getElementById("timer").textContent);
3228      sessionStorage.setItem("results", JSON.stringify(res));
3229      jQuery(resetTimer());
3230      window.open("https://www.derhund.de/memo-game-danke/",'_blank');
3231    });
3232
3233
3234    //#region timer
3235    jQuery(window).ready(function () {
3236      startTimer();
3237    });
3238
3239    let time = 0, interval;
3240
3241    function showTime() {
3242      time += 1;
3243      timer.innerHTML = toHHMMSS(time);
3244    }
3245
3246    function startTimer() {
3247      interval = setInterval(showTime, 1000);
3248    }
3249
3250    function resetTimer() {
3251      //res.gameTime = time;
3252      clearInterval(interval);
3253      interval = null;
3254      time = 0;
3255      timer.innerHTML = '00:00:00'
3256      timer.innerHTML = toHHMMSS(time);
3257    }
3258
3259    function toHHMMSS(time) {
3260      let hours = Math.floor(time / 3600);
3261      let minutes = Math.floor((time - hours * 3600) / 60);
3262      let seconds = time - hours * 3600 - minutes * 60;
3263
3264      hours = hours.toString();
3265      minutes = minutes.toString();
3266      seconds = seconds.toString();
3267
3268      hours = hours.padStart(2, '0');
3269      minutes = minutes.padStart(2, '0');
3270      seconds = seconds.padStart(2, '0');
3271
3272      return hours + ':' + minutes + ':' + seconds;
3273    }
3274
3275    //#endregion timer
3276
3277
3278    jQuery(function () {
3279      jQuery("#memory-game").memoryGame({
3280        autoResize: false
3281      });
3282      myResize();
3283      jQuery(window).resize(function () {
3284        myResize();
3285      });
3286    });
3287
3288    function myResize() {
3289      var cardSize = Math.min(jQuery("#memory-game").width(), document.documentElement.clientHeight) / 5 / 1.6;
3290      cardSize = Math.max(50, Math.min(200, cardSize));
3291      jQuery("#memory-game").memoryGame("option", {
3292        cardWidth: cardSize,
3293        cardHeight: cardSize,
3294        minCardMargin: cardSize * 0.1,
3295        maxCardMargin: cardSize * 0.25
3296      });
3297    }
3298  })(jQuery);
3299});
3300
3301(function ($)
3302{
3303    
3304    function onResize()
3305    {
3306        $('#mobile-delimeter').css('height',$('#mobile-header').outerHeight());
3307        //$('#mobile-menu-wrapper').css('top',$('#mobile-header').outerHeight()-1);
3308        $('.banners').css('height',$(document).height()-900);
3309    }
3310    
3311    $(window).on('resize',function()
3312    {
3313        onResize();
3314    });
3315    
3316    $(document).ready(function()
3317    {        
3318        
3319        $('.pagination-ul').each(function()
3320        {
3321            if($(this).find('a').length===0)
3322            {
3323                $(this).closest('.pagination').remove();
3324            }
3325        });
3326        
3327           
3328       function setSlider()
3329       {
3330           if(!$('.redaction__videos .row.row-slider').hasClass('slick-slider'))
3331           {
3332                $('.redaction__videos .row.row-slider').slick({
3333           responsive:[
3334               {
3335                   breakpoint:99999,
3336                   settings: 'unslick'
3337               },
3338               {
3339                   breakpoint:576,
3340                   settings:{
3341                        arrows:true,
3342                        dots:true
3343                    }
3344               }
3345           ]
3346       });
3347           }
3348          
3349       }
3350       
3351            $('#createaccount').on('change',function()
3352       {
3353           if($(this).is(':checked'))
3354           {
3355               $('#account_password_field').slideDown(550);
3356           }
3357           else
3358           {
3359               $('#account_password_field').slideUp(550);
3360           }           
3361       });
3362            $('.showcoupon').on('click',function()
3363       {
3364           $('.checkout_coupon').slideToggle(550);
3365       });
3366       
3367       $('#checkout-main-form select').each(function()
3368       {
3369           $(this).wrap($('<span class="select-wrapper"></span>'));
3370       });
3371       
3372       $('#ship-to-different-address-checkbox').on('change',function()
3373       {
3374           if($(this).is(':checked'))
3375           {
3376               $('.shipping_address').slideDown(550);
3377           }
3378           else
3379           {
3380               $('.shipping_address').slideUp(550);
3381           }           
3382       });
3383       
3384       setSlider();
3385       setTimeout(function()
3386       {
3387           setSlider();
3388       },2000)
3389        
3390        setTimeout(function()
3391        {
3392            $('#podcasts-load-more-wrapper iframe').slice(5).addClass('load-it-more');
3393        },1000);
3394        
3395        $('#load-more-podcasts').click(function(e)
3396        {
3397            e.preventDefault();
3398            $('.load-it-more').slice(0,5).removeClass('load-it-more');
3399            if($('.load-it-more').length===0)
3400            {
3401                $(this).remove();
3402            }
3403        });
3404        
3405        $("#schools-categories a").click(function(e)
3406        {
3407            e.preventDefault();
3408            $("#schools-categories li").removeClass('active');
3409            $(this).parent().addClass('active');
3410            
3411            var cat = $(this).attr('data-cat');
3412            $('.one-school-grid').each(function(k,v)
3413            {
3414                var ids = $(this).attr('data-ids').split(',');
3415                if(ids.indexOf(cat)===-1)
3416                {
3417                    $(this).css('display','none');
3418                }
3419                else
3420                {
3421                    $(this).css('display','');
3422                }
3423                
3424            });
3425        });
3426        
3427        $("#schools-categories a").first().trigger('click');
3428        
3429       $('.inner-slider').slick({
3430           dots:true
3431       });
3432    
3433       
3434       $('.add-to-cart-bottom').click(function(e)
3435       {
3436           e.preventDefault();
3437           $('body,html').animate({
3438               scrollTop:0
3439           },900);
3440           $('.single_add_to_cart_button').trigger('click');
3441       });
3442       
3443       $('.one-variation-selector').click(function(e)
3444       {
3445           e.preventDefault();
3446           $('.one-variation-selector').removeClass('active');
3447            var value = $(this).attr('data-value');
3448           $('.one-variation-selector[data-value="'+value+'"]').addClass('active');
3449           
3450           
3451           $('table.variations select').val(value);
3452           $('table.variations select').trigger('change');
3453           
3454           if($('.woocommerce .single_variation_wrap span.price-new').length===0)
3455           {
3456               $('.woocommerce .single_variation_wrap').append($('<span class="price-new"></span>'));
3457               $('.woocommerce .single_variation_wrap span.price-new').html($('#the-prod-desc + .price').html());
3458           }
3459           
3460           $('#price-repeat,span.price-new').html($('#the-prod-desc + .price').html());
3461           setTimeout(function()
3462           {
3463               $('#price-repeat,span.price-new').html($('#the-prod-desc + .price').html());
3464           },1000);
3465           
3466       });
3467       
3468       setTimeout(function()
3469       {
3470           $('#price-repeat').html($('.single_variation_wrap .woocommerce-Price-amount').html());
3471       },2000);
3472       
3473       $('.one-variation-selector').first().trigger('click');
3474       
3475       $('.header__action-group__search .search-btn').click(function(e)
3476       {
3477           e.preventDefault();
3478           $('#search-overlay').fadeIn(550);
3479       });
3480       
3481       $('#search-overlay').click(function(e)
3482       {
3483           e.preventDefault();
3484           $('#search-overlay').fadeOut(550);
3485       });
3486       
3487       $('#search-content form').click(function(e)
3488       {
3489           e.stopPropagation();
3490       });
3491       
3492       $('.close-search').click(function(e)
3493       {
3494           e.preventDefault();
3495           $('#search-overlay').fadeOut(550);
3496       });
3497       
3498       $('.catfish-sticky .close-search').click(function(e)
3499       {
3500           e.preventDefault();
3501           $('.catfish-sticky').fadeOut(550);
3502       });
3503       
3504       
3505       setTimeout(function()
3506       {
3507           onResize();
3508           
3509       },200);
3510       
3511       
3512       $('.menu-toggle').click(function (e)
3513        {
3514            e.preventDefault();
3515            $('#mobile-menu-wrapper,#mobile-header').toggleClass('active');
3516            $('.menu-toggle').toggleClass('open');
3517            $('body').toggleClass('no-scroll');
3518        });
3519       
3520           $('.one-faq-question').click(function (e)
3521        {
3522            e.preventDefault;
3523            var wrapper = $(this).closest('.faq-wrapper');
3524            var tf = $(this).closest('.one-faq');
3525            var of = $(wrapper).find('.one-faq').not(tf);
3526            $(tf).toggleClass('active');
3527            
3528            if ($(tf).hasClass('active'))
3529            {
3530                $(tf).find('.one-faq-answer').slideDown(550);
3531            } else
3532            {
3533                $(tf).find('.one-faq-answer').slideUp(550);
3534            }
3535
3536            $(of).removeClass('active');
3537            $(of).find('.one-faq-answer').slideUp(550);
3538        });
3539        
3540        var svg = '<svg xmlns="http://www.w3.org/2000/svg" width="14.721" height="8.36" viewBox="0 0 14.721 8.36">  <g id="Icon_feather-arrow-down" data-name="Icon feather-arrow-down" transform="translate(1.414 1.414)">    <path id="Path_14" data-name="Path 14" d="M19.392,18l-5.946,5.946L7.5,18" transform="translate(-7.5 -18)" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>  </g></svg>';
3541        $("#mobile-menu-wrapper-inner .menu-item-has-children > a").append(svg);
3542        
3543        $('#mobile-menu-wrapper-inner .menu-item-has-children >a').click(function(e)
3544        {
3545            e.preventDefault();
3546            $(this).parent().find('ul').slideToggle(550);
3547            $(this).parent().toggleClass('active');
3548            var t = $(this).parent();
3549            var others = $(this).closest('#mobile-menu-wrapper-inner').find('.menu-item-has-children').not(t);
3550            $(others).removeClass('active');
3551            $(others).find('ul').slideUp(550);
3552            
3553        });
3554        
3555        
3556        $('.beforeAfter noscript').beforeAfter();
3557        $('.beforeAfter').beforeAfter();
3558        
3559        if($('#put-price-here').length>0)
3560        {
3561            $('#put-price-here').append($('.woocommerce-variation-
3561price'));
3562        }
3563        
3564        setInterval(function(){
3565            $('#remove-buttons a').each(function(k,v)
3566            {
3567                //console.log('test');
3568                var item = $('.cart_item:nth-child('+(k+1)+') .product-total').prepend($(v));
3569            });
3570        });
3571        
3572
3573
3574    });
3575})(jQuery);
3576
3577

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.