PageSourceSearch

https://www.emchome.org/cache/js/ca/e1/9f11a194395412a51c5eb469d9413565d98e.js

js emchome.org collected 2026-09-26 20:50:40 UTC 29,619 bytes, 1,052 lines download raw bytes

vendor: 24,107 bytes, lines 1-844
1/* ========================================================================
2 * Bootstrap: alert.js v3.3.5
3 * http://getbootstrap.com/javascript/#alerts
4 * ========================================================================
5 * Copyright 2011-2015 Twitter, Inc.
6 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7 * ======================================================================== */
8
9
10+function ($) {
11  'use strict';
12
13  // ALERT CLASS DEFINITION
14  // ======================
15
16  var dismiss = '[data-dismiss="alert"]'
17  var Alert   = function (el) {
18    $(el).on('click', dismiss, this.close)
19  }
20
21  Alert.VERSION = '3.3.5'
22
23  Alert.TRANSITION_DURATION = 150
24
25  Alert.prototype.close = function (e) {
26    var $this    = $(this)
27    var selector = $this.attr('data-target')
28
29    if (!selector) {
30      selector = $this.attr('href')
31      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32    }
33
34    var $parent = $(selector)
35
36    if (e) e.preventDefault()
37
38    if (!$parent.length) {
39      $parent = $this.closest('.alert')
40    }
41
42    $parent.trigger(e = $.Event('close.bs.alert'))
43
44    if (e.isDefaultPrevented()) return
45
46    $parent.removeClass('in')
47
48    function removeElement() {
49      // detach from parent, fire event then clean up data
50      $parent.detach().trigger('closed.bs.alert').remove()
51    }
52
53    $.support.transition && $parent.hasClass('fade') ?
54      $parent
55        .one('bsTransitionEnd', removeElement)
56        .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
57      removeElement()
58  }
59
60
61  // ALERT PLUGIN DEFINITION
62  // =======================
63
64  function Plugin(option) {
65    return this.each(function () {
66      var $this = $(this)
67      var data  = $this.data('bs.alert')
68
69      if (!data) $this.data('bs.alert', (data = new Alert(this)))
70      if (typeof option == 'string') data[option].call($this)
71    })
72  }
73
74  var old = $.fn.alert
75
76  $.fn.alert             = Plugin
77  $.fn.alert.Constructor = Alert
78
79
80  // ALERT NO CONFLICT
81  // =================
82
83  $.fn.alert.noConflict = function () {
84    $.fn.alert = old
85    return this
86  }
87
88
89  // ALERT DATA-API
90  // ==============
91
92  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
93
94}(jQuery);
95
96/* ========================================================================
97 * Bootstrap: button.js v3.3.5
98 * http://getbootstrap.com/javascript/#buttons
99 * ========================================================================
100 * Copyright 2011-2015 Twitter, Inc.
101 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
102 * ======================================================================== */
103
104
105+function ($) {
106  'use strict';
107
108  // BUTTON PUBLIC CLASS DEFINITION
109  // ==============================
110
111  var Button = function (element, options) {
112    this.$element  = $(element)
113    this.options   = $.extend({}, Button.DEFAULTS, options)
114    this.isLoading = false
115  }
116
117  Button.VERSION  = '3.3.5'
118
119  Button.DEFAULTS = {
120    loadingText: 'loading...'
121  }
122
123  Button.prototype.setState = function (state) {
124    var d    = 'disabled'
125    var $el  = this.$element
126    var val  = $el.is('input') ? 'val' : 'html'
127    var data = $el.data()
128
129    state += 'Text'
130
131    if (data.resetText == null) $el.data('resetText', $el[val]())
132
133    // push to event loop to allow forms to submit
134    setTimeout($.proxy(function () {
135      $el[val](data[state] == null ? this.options[state] : data[state])
136
137      if (state == 'loadingText') {
138        this.isLoading = true
139        $el.addClass(d).attr(d, d)
140      } else if (this.isLoading) {
141        this.isLoading = false
142        $el.removeClass(d).removeAttr(d)
143      }
144    }, this), 0)
145  }
146
147  Button.prototype.toggle = function () {
148    var changed = true
149    var $parent = this.$element.closest('[data-toggle="buttons"]')
150
151    if ($parent.length) {
152      var $input = this.$element.find('input')
153      if ($input.prop('type') == 'radio') {
154        if ($input.prop('checked')) changed = false
155        $parent.find('.active').removeClass('active')
156        this.$element.addClass('active')
157      } else if ($input.prop('type') == 'checkbox') {
158        if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
159        this.$element.toggleClass('active')
160      }
161      $input.prop('checked', this.$element.hasClass('active'))
162      if (changed) $input.trigger('change')
163    } else {
164      this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
165      this.$element.toggleClass('active')
166    }
167  }
168
169
170  // BUTTON PLUGIN DEFINITION
171  // ========================
172
173  function Plugin(option) {
174    return this.each(function () {
175      var $this   = $(this)
176      var data    = $this.data('bs.button')
177      var options = typeof option == 'object' && option
178
179      if (!data) $this.data('bs.button', (data = new Button(this, options)))
180
181      if (option == 'toggle') data.toggle()
182      else if (option) data.setState(option)
183    })
184  }
185
186  var old = $.fn.button
187
188  $.fn.button             = Plugin
189  $.fn.button.Constructor = Button
190
191
192  // BUTTON NO CONFLICT
193  // ==================
194
195  $.fn.button.noConflict = function () {
196    $.fn.button = old
197    return this
198  }
199
200
201  // BUTTON DATA-API
202  // ===============
203
204  $(document)
205    .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
206      var $btn = $(e.target)
207      if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
208      Plugin.call($btn, 'toggle')
209      if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
210    })
211    .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
212      $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
213    })
214
215}(jQuery);
216
217/* ========================================================================
218 * Bootstrap: carousel.js v3.3.5
219 * http://getbootstrap.com/javascript/#carousel
220 * ========================================================================
221 * Copyright 2011-2015 Twitter, Inc.
222 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
223 * ======================================================================== */
224
225
226+function ($) {
227  'use strict';
228
229  // CAROUSEL CLASS DEFINITION
230  // =========================
231
232  var Carousel = function (element, options) {
233    this.$element    = $(element)
234    this.$indicators = this.$element.find('.carousel-indicators')
235    this.options     = options
236    this.paused      = null
237    this.sliding     = null
238    this.interval    = null
239    this.$active     = null
240    this.$items      = null
241
242    this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
243
244    this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
245      .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
246      .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
247  }
248
249  Carousel.VERSION  = '3.3.5'
250
251  Carousel.TRANSITION_DURATION = 600
252
253  Carousel.DEFAULTS = {
254    interval: 5000,
255    pause: 'hover',
256    wrap: true,
257    keyboard: true
258  }
259
260  Carousel.prototype.keydown = function (e) {
261    if (/input|textarea/i.test(e.target.tagName)) return
262    switch (e.which) {
263      case 37: this.prev(); break
264      case 39: this.next(); break
265      default: return
266    }
267
268    e.preventDefault()
269  }
270
271  Carousel.prototype.cycle = function (e) {
272    e || (this.paused = false)
273
274    this.interval && clearInterval(this.interval)
275
276    this.options.interval
277      && !this.paused
278      && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
279
280    return this
281  }
282
283  Carousel.prototype.getItemIndex = function (item) {
284    this.$items = item.parent().children('.item')
285    return this.$items.index(item || this.$active)
286  }
287
288  Carousel.prototype.getItemForDirection = function (direction, active) {
289    var activeIndex = this.getItemIndex(active)
290    var willWrap = (direction == 'prev' && activeIndex === 0)
291                || (direction == 'next' && activeIndex == (this.$items.length - 1))
292    if (willWrap && !this.options.wrap) return active
293    var delta = direction == 'prev' ? -1 : 1
294    var itemIndex = (activeIndex + delta) % this.$items.length
295    return this.$items.eq(itemIndex)
296  }
297
298  Carousel.prototype.to = function (pos) {
299    var that        = this
300    var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
301
302    if (pos > (this.$items.length - 1) || pos < 0) return
303
304    if (this.sliding)       return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
305    if (activeIndex == pos) return this.pause().cycle()
306
307    return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
308  }
309
310  Carousel.prototype.pause = function (e) {
311    e || (this.paused = true)
312
313    if (this.$element.find('.next, .prev').length && $.support.transition) {
314      this.$element.trigger($.support.transition.end)
315      this.cycle(true)
316    }
317
318    this.interval = clearInterval(this.interval)
319
320    return this
321  }
322
323  Carousel.prototype.next = function () {
324    if (this.sliding) return
325    return this.slide('next')
326  }
327
328  Carousel.prototype.prev = function () {
329    if (this.sliding) return
330    return this.slide('prev')
331  }
332
333  Carousel.prototype.slide = function (type, next) {
334    var $active   = this.$element.find('.item.active')
335    var $next     = next || this.getItemForDirection(type, $active)
336    var isCycling = this.interval
337    var direction = type == 'next' ? 'left' : 'right'
338    var that      = this
339
340    if ($next.hasClass('active')) return (this.sliding = false)
341
342    var relatedTarget = $next[0]
343    var slideEvent = $.Event('slide.bs.carousel', {
344      relatedTarget: relatedTarget,
345      direction: direction
346    })
347    this.$element.trigger(slideEvent)
348    if (slideEvent.isDefaultPrevented()) return
349
350    this.sliding = true
351
352    isCycling && this.pause()
353
354    if (this.$indicators.length) {
355      this.$indicators.find('.active').removeClass('active')
356      var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
357      $nextIndicator && $nextIndicator.addClass('active')
358    }
359
360    var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
361    if ($.support.transition && this.$element.hasClass('slide')) {
362      $next.addClass(type)
363      $next[0].offsetWidth // force reflow
364      $active.addClass(direction)
365      $next.addClass(direction)
366      $active
367        .one('bsTransitionEnd', function () {
368          $next.removeClass([type, direction].join(' ')).addClass('active')
369          $active.removeClass(['active', direction].join(' '))
370          that.sliding = false
371          setTimeout(function () {
372            that.$element.trigger(slidEvent)
373          }, 0)
374        })
375        .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
376    } else {
377      $active.removeClass('active')
378      $next.addClass('active')
379      this.sliding = false
380      this.$element.trigger(slidEvent)
381    }
382
383    isCycling && this.cycle()
384
385    return this
386  }
387
388
389  // CAROUSEL PLUGIN DEFINITION
390  // ==========================
391
392  function Plugin(option) {
393    return this.each(function () {
394      var $this   = $(this)
395      var data    = $this.data('bs.carousel')
396      var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
397      var action  = typeof option == 'string' ? option : options.slide
398
399      if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
400      if (typeof option == 'number') data.to(option)
401      else if (action) data[action]()
402      else if (options.interval) data.pause().cycle()
403    })
404  }
405
406  var old = $.fn.carousel
407
408  $.fn.carousel             = Plugin
409  $.fn.carousel.Constructor = Carousel
410
411
412  // CAROUSEL NO CONFLICT
413  // ====================
414
415  $.fn.carousel.noConflict = function () {
416    $.fn.carousel = old
417    return this
418  }
419
420
421  // CAROUSEL DATA-API
422  // =================
423
424  var clickHandler = function (e) {
425    var href
426    var $this   = $(this)
427    var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
428    if (!$target.hasClass('carousel')) return
429    var options = $.extend({}, $target.data(), $this.data())
430    var slideIndex = $this.attr('data-slide-to')
431    if (slideIndex) options.interval = false
432
433    Plugin.call($target, options)
434
435    if (slideIndex) {
436      $target.data('bs.carousel').to(slideIndex)
437    }
438
439    e.preventDefault()
440  }
441
442  $(document)
443    .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
444    .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
445
446  $(window).on('load', function () {
447    $('[data-ride="carousel"]').each(function () {
448      var $carousel = $(this)
449      Plugin.call($carousel, $carousel.data())
450    })
451  })
452
453}(jQuery);
454
455/* ========================================================================
456 * Bootstrap: collapse.js v3.3.5
457 * http://getbootstrap.com/javascript/#collapse
458 * ========================================================================
459 * Copyright 2011-2015 Twitter, Inc.
460 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
461 * ======================================================================== */
462
463
464+function ($) {
465  'use strict';
466
467  // COLLAPSE PUBLIC CLASS DEFINITION
468  // ================================
469
470  var Collapse = function (element, options) {
471    this.$element      = $(element)
472    this.options       = $.extend({}, Collapse.DEFAULTS, options)
473    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
474                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
475    this.transitioning = null
476
477    if (this.options.parent) {
478      this.$parent = this.getParent()
479    } else {
480      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
481    }
482
483    if (this.options.toggle) this.toggle()
484  }
485
486  Collapse.VERSION  = '3.3.5'
487
488  Collapse.TRANSITION_DURATION = 350
489
490  Collapse.DEFAULTS = {
491    toggle: true
492  }
493
494  Collapse.prototype.dimension = function () {
495    var hasWidth = this.$element.hasClass('width')
496    return hasWidth ? 'width' : 'height'
497  }
498
499  Collapse.prototype.show = function () {
500    if (this.transitioning || this.$element.hasClass('in')) return
501
502    var activesData
503    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
504
505    if (actives && actives.length) {
506      activesData = actives.data('bs.collapse')
507      if (activesData && activesData.transitioning) return
508    }
509
510    var startEvent = $.Event('show.bs.collapse')
511    this.$element.trigger(startEvent)
512    if (startEvent.isDefaultPrevented()) return
513
514    if (actives && actives.length) {
515      Plugin.call(actives, 'hide')
516      activesData || actives.data('bs.collapse', null)
517    }
518
519    var dimension = this.dimension()
520
521    this.$element
522      .removeClass('collapse')
523      .addClass('collapsing')[dimension](0)
524      .attr('aria-expanded', true)
525
526    this.$trigger
527      .removeClass('collapsed')
528      .attr('aria-expanded', true)
529
530    this.transitioning = 1
531
532    var complete = function () {
533      this.$element
534        .removeClass('collapsing')
535        .addClass('collapse in')[dimension]('')
536      this.transitioning = 0
537      this.$element
538        .trigger('shown.bs.collapse')
539    }
540
541    if (!$.support.transition) return complete.call(this)
542
543    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
544
545    this.$element
546      .one('bsTransitionEnd', $.proxy(complete, this))
547      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
548  }
549
550  Collapse.prototype.hide = function () {
551    if (this.transitioning || !this.$element.hasClass('in')) return
552
553    var startEvent = $.Event('hide.bs.collapse')
554    this.$element.trigger(startEvent)
555    if (startEvent.isDefaultPrevented()) return
556
557    var dimension = this.dimension()
558
559    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
560
561    this.$element
562      .addClass('collapsing')
563      .removeClass('collapse in')
564      .attr('aria-expanded', false)
565
566    this.$trigger
567      .addClass('collapsed')
568      .attr('aria-expanded', false)
569
570    this.transitioning = 1
571
572    var complete = function () {
573      this.transitioning = 0
574      this.$element
575        .removeClass('collapsing')
576        .addClass('collapse')
577        .trigger('hidden.bs.collapse')
578    }
579
580    if (!$.support.transition) return complete.call(this)
581
582    this.$element
583      [dimension](0)
584      .one('bsTransitionEnd', $.proxy(complete, this))
585      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
586  }
587
588  Collapse.prototype.toggle = function () {
589    this[this.$element.hasClass('in') ? 'hide' : 'show']()
590  }
591
592  Collapse.prototype.getParent = function () {
593    return $(this.options.parent)
594      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
595      .each($.proxy(function (i, element) {
596        var $element = $(element)
597        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
598      }, this))
599      .end()
600  }
601
602  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
603    var isOpen = $element.hasClass('in')
604
605    $element.attr('aria-expanded', isOpen)
606    $trigger
607      .toggleClass('collapsed', !isOpen)
608      .attr('aria-expanded', isOpen)
609  }
610
611  function getTargetFromTrigger($trigger) {
612    var href
613    var target = $trigger.attr('data-target')
614      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
615
616    return $(target)
617  }
618
619
620  // COLLAPSE PLUGIN DEFINITION
621  // ==========================
622
623  function Plugin(option) {
624    return this.each(function () {
625      var $this   = $(this)
626      var data    = $this.data('bs.collapse')
627      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
628
629      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
630      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
631      if (typeof option == 'string') data[option]()
632    })
633  }
634
635  var old = $.fn.collapse
636
637  $.fn.collapse             = Plugin
638  $.fn.collapse.Constructor = Collapse
639
640
641  // COLLAPSE NO CONFLICT
642  // ====================
643
644  $.fn.collapse.noConflict = function () {
645    $.fn.collapse = old
646    return this
647  }
648
649
650  // COLLAPSE DATA-API
651  // =================
652
653  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
654    var $this   = $(this)
655
656    if (!$this.attr('data-target')) e.preventDefault()
657
658    var $target = getTargetFromTrigger($this)
659    var data    = $target.data('bs.collapse')
660    var option  = data ? 'toggle' : $this.data()
661
662    Plugin.call($target, option)
663  })
664
665}(jQuery);
666
667/* ========================================================================
668 * Bootstrap: dropdown.js v3.3.5
669 * http://getbootstrap.com/javascript/#dropdowns
670 * ========================================================================
671 * Copyright 2011-2015 Twitter, Inc.
672 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
673 * ======================================================================== */
674
675
676+function ($) {
677  'use strict';
678
679  // DROPDOWN CLASS DEFINITION
680  // =========================
681
682  var backdrop = '.dropdown-backdrop'
683  var toggle   = '[data-toggle="dropdown"]'
684  var Dropdown = function (element) {
685    $(element).on('click.bs.dropdown', this.toggle)
686  }
687
688  Dropdown.VERSION = '3.3.5'
689
690  function getParent($this) {
691    var selector = $this.attr('data-target')
692
693    if (!selector) {
694      selector = $this.attr('href')
695      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
696    }
697
698    var $parent = selector && $(selector)
699
700    return $parent && $parent.length ? $parent : $this.parent()
701  }
702
703  function clearMenus(e) {
704    if (e && e.which === 3) return
705    $(backdrop).remove()
706    $(toggle).each(function () {
707      var $this         = $(this)
708      var $parent       = getParent($this)
709      var relatedTarget = { relatedTarget: this }
710
711      if (!$parent.hasClass('open')) return
712
713      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
714
715      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
716
717      if (e.isDefaultPrevented()) return
718
719      $this.attr('aria-expanded', 'false')
720      $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
721    })
722  }
723
724  Dropdown.prototype.toggle = function (e) {
725    var $this = $(this)
726
727    if ($this.is('.disabled, :disabled')) return
728
729    var $parent  = getParent($this)
730    var isActive = $parent.hasClass('open')
731
732    clearMenus()
733
734    if (!isActive) {
735      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
736        // if mobile we use a backdrop because click events don't delegate
737        $(document.createElement('div'))
738          .addClass('dropdown-backdrop')
739          .insertAfter($(this))
740          .on('click', clearMenus)
741      }
742
743      var relatedTarget = { relatedTarget: this }
744      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
745
746      if (e.isDefaultPrevented()) return
747
748      $this
749        .trigger('focus')
750        .attr('aria-expanded', 'true')
751
752      $parent
753        .toggleClass('open')
754        .trigger('shown.bs.dropdown', relatedTarget)
755    }
756
757    return false
758  }
759
760  Dropdown.prototype.keydown = function (e) {
761    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
762
763    var $this = $(this)
764
765    e.preventDefault()
766    e.stopPropagation()
767
768    if ($this.is('.disabled, :disabled')) return
769
770    var $parent  = getParent($this)
771    var isActive = $parent.hasClass('open')
772
773    if (!isActive && e.which != 27 || isActive && e.which == 27) {
774      if (e.which == 27) $parent.find(toggle).trigger('focus')
775      return $this.trigger('click')
776    }
777
778    var desc = ' li:not(.disabled):visible a'
779    var $items = $parent.find('.dropdown-menu' + desc)
780
781    if (!$items.length) return
782
783    var index = $items.index(e.target)
784
785    if (e.which == 38 && index > 0)                 index--         // up
786    if (e.which == 40 && index < $items.length - 1) index++         // down
787    if (!~index)                                    index = 0
788
789    $items.eq(index).trigger('focus')
790  }
791
792
793  // DROPDOWN PLUGIN DEFINITION
794  // ==========================
795
796  function Plugin(option) {
797    return this.each(function () {
798      var $this = $(this)
799      var data  = $this.data('bs.dropdown')
800
801      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
802      if (typeof option == 'string') data[option].call($this)
803    })
804  }
805
806  var old = $.fn.dropdown
807
808  $.fn.dropdown             = Plugin
809  $.fn.dropdown.Constructor = Dropdown
810
811
812  // DROPDOWN NO CONFLICT
813  // ====================
814
815  $.fn.dropdown.noConflict = function () {
816    $.fn.dropdown = old
817    return this
818  }
819
820
821  // APPLY TO STANDARD DROPDOWN ELEMENTS
822  // ===================================
823
824  $(document)
825    .on('click.bs.dropdown.data-api', clearMenus)
826    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
827    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
828    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
829    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
830
831}(jQuery);
832
833/* ========================================================================
834 * Bootstrap: transition.js v3.3.5
835 * http://getbootstrap.com/javascript/#transitions
836 * ========================================================================
837 * Copyright 2011-2015 Twitter, Inc.
838 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
839 * ======================================================================== */
840
841
842+function ($) {
843  'use strict';
844
845  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
846  // ============================================================
847
848  function transitionEnd() {
849    var el = document.createElement('bootstrap')
850
851    var transEndEventNames = {
852      WebkitTransition : 'webkitTransitionEnd',
853      MozTransition    : 'transitionend',
854      OTransition      : 'oTransitionEnd otransitionend',
855      transition       : 'transitionend'
856    }
857
858    for (var name in transEndEventNames) {
859      if (el.style[name] !== undefined) {
860        return { end: transEndEventNames[name] }
861      }
862    }
863
864    return false // explicit for ie8 (  ._.)
865  }
866
867  // http://blog.alexmaccaw.com/css-transitions
868  $.fn.emulateTransitionEnd = function (duration) {
869    var called = false
870    var $el = this
871    $(this).one('bsTransitionEnd', function () { called = true })
872    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
873    setTimeout(callback, duration)
874    return this
875  }
876
877  $(function () {
878    $.support.transition = transitionEnd()
879
880    if (!$.support.transition) return
881
882    $.event.special.bsTransitionEnd = {
883      bindType: $.support.transition.end,
884      delegateType: $.support.transition.end,
885      handle: function (e) {
886        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
887      }
888    }
889  })
890
891}(jQuery);
892
893"use strict"; // jshint ;_;
894
895var $;
896$ = jQuery;
897// SU AJAX FORM PUBLIC CLASS DEFINITION
898
899const SUAjaxForm = function (element, options) {
900	this.$submit_button = null;
901	this.$form = $(element);
902	this.setOptions(options);
903	this.$form.ajaxForm({
904		dataType: this.options.data_type,
905		beforeSubmit: $.proxy(this.beforeSubmit, this),
906		success: $.proxy(this.getSuccessClosure(), this),
907	});
908	const $target = this.getSubmitTarget();
909	if ($target) {
910		$target.bind("click.su.form", (e) => {
911			this.$form.submit();
912			e.preventDefault();
913		});
914		this.submit_html = $target.html();
915	}
916	return this;
917};
918
919// Public Methods
920SUAjaxForm.prototype = {
921	constructor: SUAjaxForm,
922	setOptions(options) {
923		return (this.options = $.extend({}, $.fn.suAjaxForm.defaults, this.$form.data(), options));
924	},
925	beforeSubmit(arr, $form, options) {
926		if (this.options.validate) {
927			if (!doesValidate(this.$form)) {
928				return false;
929			}
930		}
931		if (this.options.beforeSubmit) {
932			const result = this.options.beforeSubmit(arr, $form, options);
933			if (result === false) {
934				return false;
935			}
936		}
937		const $target = this.getSubmitTarget();
938		if ($target) {
939			$target.text("loading...");
940			$target.unbind("click.su.form");
941		}
942		return true;
943	},
944	getSuccessClosure() {
945		return SF.action.handle(
946			(data) => {
947				const $target = this.getSubmitTarget();
948				if ($target) {
949					$target.html(this.button_html);
950					$target.addClass("btn-success");
951					$target.text(this.options.success_text ? this.options.success_text : "Success!");
952					setTimeout(function () {
953						if ($target) {
954							$target.removeClass("btn-success");
955							$target.html(this.button_html);
956						}
957					}, 1500);
958				}
959				if (this.options.cache_dirty) {
960					SF.cache.dirty(this.options.cache_dirty, data);
961				}
962				SF.cache.refresh();
963				if ($target) {
964					$target.bind("click.su.form", () => {
965						this.$form.submit();
966					});
967				}
968				if (this.options.success) {
969					return this.options.success(data);
970				}
971			},
972			(error) => {
973				const $target = this.getSubmitTarget();
974				if ($target) {
975					$target.html(this.button_html);
976					$target.bind("click.su.form", () => {
977						this.$form.submit();
978					});
979				}
980				if (error._CSRF_TOKEN) {
981					this.$form.find("[name='_CSRF_INDEX']").val(error._CSRF_INDEX);
982					this.$form.find("[name='_CSRF_TOKEN']").val(error._CSRF_TOKEN);
983				}
984				if (error.type === "SF_exception_controller_input_malformed" && $(`[name='${error.input_name}']`).length) {
985					const $ele = $(`[name='${error.input_name}']`);
986					const message_div = $ele
987						.closest("div.form-group")
988						.addClass("error has-error")
989						.find("span")
990						.filter(function () {
991							try {
992								return $(this)
993									.attr("class")
994									.match(/help-.*/);
995							} catch (error) {
996								return false;
997							}
998						});
999					if (message_div.text() === "") {
1000						message_div.show().text(error.message);
1001					}
1002					const offset = $ele.offset();
1003					window.scroll(0, offset.top - 150);
1004				} else if (error.type === "SF_exception_controller_input_csrf") {
1005					this.$form.append(SF.bootstrap.alert.basic(error.message));
1006					setTimeout("SF.html.reload()", 5000);
1007				} else {
1008					if (this.options.error) {
1009						return this.options.error(error);
1010					} else {
1011						alert(error.message);
1012					}
1013				}
1014			}
1015		);
1016	},
1017	getSubmitTarget() {
1018		if (this.$submit_button) {
1019			return $(this.$submit_button);
1020		}
1021		if (this.options.submit_button) {
1022			return (this.$submit_button = $(this.options.submit_button));
1023		} else {
1024			return (this.$submit_button = this.$form.find("input[type='submit']"));
1025		}
1026	},
1027};
1028
1029// SU AJAX FORM PLUGIN DEFINITION
1030
1031$.fn.suAjaxForm = function (option) {
1032	this.each(function () {
1033		const $this = $(this);
1034		let data = $this.data("su-ajax-form");
1035		const options = typeof option === "object" && option;
1036		if (!data) {
1037			$this.data("su-ajax-form", (data = new SUAjaxForm(this, options)));
1038		}
1039		if (typeof option === "string") {
1040			data[option]();
1041		}
1042	});
1043};
1044
1045$.fn.suAjaxForm.defaults = {
1046	data_type: "json",
1047	validate: true,
1048	cache_dirty: "su-update-table",
1049	submit_button: null,
1050};
1051
1052$.fn.suAjaxForm.Constructor = SUAjaxForm;

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.