vendor: 45,112 bytes, lines 1-693
1if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')}+function($){'use strict';var version=$.fn.jquery.split(' ')[0].split('.') 2if((version[0]<2&&version[1]<9)||(version[0]==1&&version[1]==9&&version[2]<1)){throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap') 3var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'} 4for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}return false}$.fn.emulateTransitionEnd=function(duration){var called=false 5var $el=this 6$(this).one('bsTransitionEnd',function(){called=true}) 7var callback=function(){if(!called)$($el).trigger($.support.transition.end)} 8setTimeout(callback,duration) 9return this} 10$(function(){$.support.transition=transitionEnd() 11if(!$.support.transition)return 12$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]' 13var Alert=function(el){$(el).on('click',dismiss,this.close)} 14Alert.VERSION='3.3.2' 15Alert.TRANSITION_DURATION=150 16Alert.prototype.close=function(e){var $this=$(this) 17var selector=$this.attr('data-target') 18if(!selector){selector=$this.attr('href') 19selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}var $parent=$(selector) 20if(e)e.preventDefault() 21if(!$parent.length){$parent=$this.closest('.alert')}$parent.trigger(e=$.Event('close.bs.alert')) 22if(e.isDefaultPrevented())return 23$parent.removeClass('in') 24function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()}$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()} 25function Plugin(option){return this.each(function(){var $this=$(this) 26var data=$this.data('bs.alert') 27if(!data)$this.data('bs.alert',(data=new Alert(this))) 28if(typeof option=='string')data[option].call($this)})}var old=$.fn.alert 29$.fn.alert=Plugin 30$.fn.alert.Constructor=Alert 31$.fn.alert.noConflict=function(){$.fn.alert=old 32return this} 33$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element) 34this.options=$.extend({},Button.DEFAULTS,options) 35this.isLoading=false} 36Button.VERSION='3.3.2' 37Button.DEFAULTS={loadingText:'loading...'} 38Button.prototype.setState=function(state){var d='disabled' 39var $el=this.$element 40var val=$el.is('input')?'val':'html' 41var data=$el.data() 42state=state+'Text' 43if(data.resetText==null)$el.data('resetText',$el[val]()) 44setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state]) 45if(state=='loadingText'){this.isLoading=true 46$el.addClass(d).attr(d,d)}else if(this.isLoading){this.isLoading=false 47$el.removeClass(d).removeAttr(d)}},this),0)} 48Button.prototype.toggle=function(){var changed=true 49var $parent=this.$element.closest('[data-toggle="buttons"]') 50if($parent.length){var $input=this.$element.find('input') 51if($input.prop('type')=='radio'){if($input.prop('checked')&&this.$element.hasClass('active'))changed=false 52else $parent.find('.active').removeClass('active')}if(changed)$input.prop('checked',!this.$element.hasClass('active')).trigger('change')}else{this.$element.attr('aria-pressed',!this.$element.hasClass('active'))}if(changed)this.$element.toggleClass('active')} 53function Plugin(option){return this.each(function(){var $this=$(this) 54var data=$this.data('bs.button') 55var options=typeof option=='object'&&option 56if(!data)$this.data('bs.button',(data=new Button(this,options))) 57if(option=='toggle')data.toggle() 58else if(option)data.setState(option)})}var old=$.fn.button 59$.fn.button=Plugin 60$.fn.button.Constructor=Button 61$.fn.button.noConflict=function(){$.fn.button=old 62return this} 63$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target) 64if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn') 65Plugin.call($btn,'toggle') 66e.preventDefault()}).on('focus.bs.button.data-api blur.bs.button.data-api','[data-toggle^="button"]',function(e){$(e.target).closest('.btn').toggleClass('focus',/^focus(in)?$/.test(e.type))})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element) 67this.$indicators=this.$element.find('.carousel-indicators') 68this.options=options 69this.paused=this.sliding=this.interval=this.$active=this.$items=null 70this.options.keyboard&&this.$element.on('keydown.bs.carousel',$.proxy(this.keydown,this)) 71this.options.pause=='hover'&&!('ontouchstart'in document.documentElement)&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))} 72Carousel.VERSION='3.3.2' 73Carousel.TRANSITION_DURATION=600 74Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true,keyboard:true} 75Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return 76switch(e.which){case 37:this.prev();break 77case 39:this.next();break 78default:return}e.preventDefault()} 79Carousel.prototype.cycle=function(e){e||(this.paused=false) 80this.interval&&clearInterval(this.interval) 81this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)) 82return this} 83Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item') 84return this.$items.index(item||this.$active)} 85Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active) 86var willWrap=(direction=='prev'&&activeIndex===0)||(direction=='next'&&activeIndex==(this.$items.length-1)) 87if(willWrap&&!this.options.wrap)return active 88var delta=direction=='prev'?-1:1 89var itemIndex=(activeIndex+delta)%this.$items.length 90return this.$items.eq(itemIndex)} 91Carousel.prototype.to=function(pos){var that=this 92var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active')) 93if(pos>(this.$items.length-1)||pos<0)return 94if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)}) 95if(activeIndex==pos)return this.pause().cycle() 96return this.slide(pos>activeIndex?'next':'prev',this.$items.eq(pos))} 97Carousel.prototype.pause=function(e){e||(this.paused=true) 98if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end) 99this.cycle(true)}this.interval=clearInterval(this.interval) 100return this} 101Carousel.prototype.next=function(){if(this.sliding)return 102return this.slide('next')} 103Carousel.prototype.prev=function(){if(this.sliding)return 104return this.slide('prev')} 105Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active') 106var $next=next||this.getItemForDirection(type,$active) 107var isCycling=this.interval 108var direction=type=='next'?'left':'right' 109var that=this 110if($next.hasClass('active'))return(this.sliding=false) 111var relatedTarget=$next[0] 112var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 113this.$element.trigger(slideEvent) 114if(slideEvent.isDefaultPrevented())return 115this.sliding=true 116isCycling&&this.pause() 117if(this.$indicators.length){this.$indicators.find('.active').removeClass('active') 118var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]) 119$nextIndicator&&$nextIndicator.addClass('active')}var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 120if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type) 121$next[0].offsetWidth 122$active.addClass(direction) 123$next.addClass(direction) 124$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active') 125$active.removeClass(['active',direction].join(' ')) 126that.sliding=false 127setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass('active') 128$next.addClass('active') 129this.sliding=false 130this.$element.trigger(slidEvent)}isCycling&&this.cycle() 131return this} 132function Plugin(option){return this.each(function(){var $this=$(this) 133var data=$this.data('bs.carousel') 134var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option) 135var action=typeof option=='string'?option:options.slide 136if(!data)$this.data('bs.carousel',(data=new Carousel(this,options))) 137if(typeof option=='number')data.to(option) 138else if(action)data[action]() 139else if(options.interval)data.pause().cycle()})}var old=$.fn.carousel 140$.fn.carousel=Plugin 141$.fn.carousel.Constructor=Carousel 142$.fn.carousel.noConflict=function(){$.fn.carousel=old 143return this} 144var clickHandler=function(e){var href 145var $this=$(this) 146var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')) 147if(!$target.hasClass('carousel'))return 148var options=$.extend({},$target.data(),$this.data()) 149var slideIndex=$this.attr('data-slide-to') 150if(slideIndex)options.interval=false 151Plugin.call($target,options) 152if(slideIndex){$target.data('bs.carousel').to(slideIndex)}e.preventDefault()} 153$(document).on('click.bs.carousel.data-api','[data-slide]',clickHandler).on('click.bs.carousel.data-api','[data-slide-to]',clickHandler) 154$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this) 155Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element) 156this.options=$.extend({},Collapse.DEFAULTS,options) 157this.$trigger=$(this.options.trigger).filter('[href="#'+element.id+'"], [data-target="#'+element.id+'"]') 158this.transitioning=null 159if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle)this.toggle()} 160Collapse.VERSION='3.3.2' 161Collapse.TRANSITION_DURATION=350 162Collapse.DEFAULTS={toggle:true,trigger:'[data-toggle="collapse"]'} 163Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width') 164return hasWidth?'width':'height'} 165Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return 166var activesData 167var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing') 168if(actives&&actives.length){activesData=actives.data('bs.collapse') 169if(activesData&&activesData.transitioning)return}var startEvent=$.Event('show.bs.collapse') 170this.$element.trigger(startEvent) 171if(startEvent.isDefaultPrevented())return 172if(actives&&actives.length){Plugin.call(actives,'hide') 173activesData||actives.data('bs.collapse',null)}var dimension=this.dimension() 174this.$element.removeClass('collapse').addClass('collapsing')[dimension](0).attr('aria-expanded',true) 175this.$trigger.removeClass('collapsed').attr('aria-expanded',true) 176this.transitioning=1 177var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('') 178this.transitioning=0 179this.$element.trigger('shown.bs.collapse')} 180if(!$.support.transition)return complete.call(this) 181var scrollSize=$.camelCase(['scroll',dimension].join('-')) 182this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])} 183Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return 184var startEvent=$.Event('hide.bs.collapse') 185this.$element.trigger(startEvent) 186if(startEvent.isDefaultPrevented())return 187var dimension=this.dimension() 188this.$element[dimension](this.$element[dimension]())[0].offsetHeight 189this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded',false) 190this.$trigger.addClass('collapsed').attr('aria-expanded',false) 191this.transitioning=1 192var complete=function(){this.transitioning=0 193this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')} 194if(!$.support.transition)return complete.call(this) 195this.$element 196[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)} 197Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()} 198Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element) 199this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()} 200Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in') 201$element.attr('aria-expanded',isOpen) 202$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)} 203function getTargetFromTrigger($trigger){var href 204var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'') 205return $(target)}function Plugin(option){return this.each(function(){var $this=$(this) 206var data=$this.data('bs.collapse') 207var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option) 208if(!data&&options.toggle&&option=='show')options.toggle=false 209if(!data)$this.data('bs.collapse',(data=new Collapse(this,options))) 210if(typeof option=='string')data[option]()})}var old=$.fn.collapse 211$.fn.collapse=Plugin 212$.fn.collapse.Constructor=Collapse 213$.fn.collapse.noConflict=function(){$.fn.collapse=old 214return this} 215$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this) 216if(!$this.attr('data-target'))e.preventDefault() 217var $target=getTargetFromTrigger($this) 218var data=$target.data('bs.collapse') 219var option=data?'toggle':$.extend({},$this.data(),{trigger:this}) 220Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop' 221var toggle='[data-toggle="dropdown"]' 222var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)} 223Dropdown.VERSION='3.3.2' 224Dropdown.prototype.toggle=function(e){var $this=$(this) 225if($this.is('.disabled, :disabled'))return 226var $parent=getParent($this) 227var isActive=$parent.hasClass('open') 228clearMenus() 229if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click',clearMenus)}var relatedTarget={relatedTarget:this} 230$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget)) 231if(e.isDefaultPrevented())return 232$this.trigger('focus').attr('aria-expanded','true') 233$parent.toggleClass('open').trigger('shown.bs.dropdown',relatedTarget)}return false} 234Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return 235var $this=$(this) 236e.preventDefault() 237e.stopPropagation() 238if($this.is('.disabled, :disabled'))return 239var $parent=getParent($this) 240var isActive=$parent.hasClass('open') 241if((!isActive&&e.which!=27)||(isActive&&e.which==27)){if(e.which==27)$parent.find(toggle).trigger('focus') 242return $this.trigger('click')}var desc=' li:not(.divider):visible a' 243var $items=$parent.find('[role="menu"]'+desc+', [role="listbox"]'+desc) 244if(!$items.length)return 245var index=$items.index(e.target) 246if(e.which==38&&index>0)index-- 247if(e.which==40&&index<$items.length-1)index++ 248if(!~index)index=0 249$items.eq(index).trigger('focus')} 250function clearMenus(e){if(e&&e.which===3)return 251$(backdrop).remove() 252$(toggle).each(function(){var $this=$(this) 253var $parent=getParent($this) 254var relatedTarget={relatedTarget:this} 255if(!$parent.hasClass('open'))return 256$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget)) 257if(e.isDefaultPrevented())return 258$this.attr('aria-expanded','false') 259$parent.removeClass('open').trigger('hidden.bs.dropdown',relatedTarget)})}function getParent($this){var selector=$this.attr('data-target') 260if(!selector){selector=$this.attr('href') 261selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')}var $parent=selector&&$(selector) 262return $parent&&$parent.length?$parent:$this.parent()}function Plugin(option){return this.each(function(){var $this=$(this) 263var data=$this.data('bs.dropdown') 264if(!data)$this.data('bs.dropdown',(data=new Dropdown(this))) 265if(typeof option=='string')data[option].call($this)})}var old=$.fn.dropdown 266$.fn.dropdown=Plugin 267$.fn.dropdown.Constructor=Dropdown 268$.fn.dropdown.noConflict=function(){$.fn.dropdown=old 269return this} 270$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle,Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="menu"]',Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="listbox"]',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options 271this.$body=$(document.body) 272this.$element=$(element) 273this.$backdrop=this.isShown=null 274this.scrollbarWidth=0 275if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}} 276Modal.VERSION='3.3.2' 277Modal.TRANSITION_DURATION=300 278Modal.BACKDROP_TRANSITION_DURATION=150 279Modal.DEFAULTS={backdrop:true,keyboard:true,show:true} 280Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)} 281Modal.prototype.show=function(_relatedTarget){var that=this 282var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget}) 283this.$element.trigger(e) 284if(this.isShown||e.isDefaultPrevented())return 285this.isShown=true 286this.checkScrollbar() 287this.setScrollbar() 288this.$body.addClass('modal-open') 289this.escape() 290this.resize() 291this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this)) 292this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade') 293if(!that.$element.parent().length){that.$element.appendTo(that.$body)}that.$element.show().scrollTop(0) 294if(that.options.backdrop)that.adjustBackdrop() 295that.adjustDialog() 296if(transition){that.$element[0].offsetWidth}that.$element.addClass('in').attr('aria-hidden',false) 297that.enforceFocus() 298var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget}) 299transition?that.$element.find('.modal-dialog').one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})} 300Modal.prototype.hide=function(e){if(e)e.preventDefault() 301e=$.Event('hide.bs.modal') 302this.$element.trigger(e) 303if(!this.isShown||e.isDefaultPrevented())return 304this.isShown=false 305this.escape() 306this.resize() 307$(document).off('focusin.bs.modal') 308this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal') 309$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()} 310Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))} 311Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}} 312Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}} 313Modal.prototype.hideModal=function(){var that=this 314this.$element.hide() 315this.backdrop(function(){that.$body.removeClass('modal-open') 316that.resetAdjustments() 317that.resetScrollbar() 318that.$element.trigger('hidden.bs.modal')})} 319Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove() 320this.$backdrop=null} 321Modal.prototype.backdrop=function(callback){var that=this 322var animate=this.$element.hasClass('fade')?'fade':'' 323if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate 324this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').prependTo(this.$element).on('click.dismiss.bs.modal',$.proxy(function(e){if(e.target!==e.currentTarget)return 325this.options.backdrop=='static'?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)) 326if(doAnimate)this.$backdrop[0].offsetWidth 327this.$backdrop.addClass('in') 328if(!callback)return 329doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in') 330var callbackRemove=function(){that.removeBackdrop() 331callback&&callback()} 332$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}} 333Modal.prototype.handleUpdate=function(){if(this.options.backdrop)this.adjustBackdrop() 334this.adjustDialog()} 335Modal.prototype.adjustBackdrop=function(){this.$backdrop.css('height',0).css('height',this.$element[0].scrollHeight)} 336Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight 337this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})} 338Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})} 339Modal.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight 340this.scrollbarWidth=this.measureScrollbar()} 341Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10) 342if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)} 343Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right','')} 344Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div') 345scrollDiv.className='modal-scrollbar-measure' 346this.$body.append(scrollDiv) 347var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth 348this.$body[0].removeChild(scrollDiv) 349return scrollbarWidth} 350function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this) 351var data=$this.data('bs.modal') 352var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option) 353if(!data)$this.data('bs.modal',(data=new Modal(this,options))) 354if(typeof option=='string')data[option](_relatedTarget) 355else if(options.show)data.show(_relatedTarget)})}var old=$.fn.modal 356$.fn.modal=Plugin 357$.fn.modal.Constructor=Modal 358$.fn.modal.noConflict=function(){$.fn.modal=old 359return this} 360$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this) 361var href=$this.attr('href') 362var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''))) 363var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data()) 364if($this.is('a'))e.preventDefault() 365$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return 366$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})}) 367Plugin.call($target,option,this)})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null 368this.init('tooltip',element,options)} 369Tooltip.VERSION='3.3.2' 370Tooltip.TRANSITION_DURATION=150 371Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0}} 372Tooltip.prototype.init=function(type,element,options){this.enabled=true 373this.type=type 374this.$element=$(element) 375this.options=this.getOptions(options) 376this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport) 377var triggers=this.options.trigger.split(' ') 378for(var i=triggers.length;i--;){var trigger=triggers[i] 379if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin' 380var eventOut=trigger=='hover'?'mouseleave':'focusout' 381this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this)) 382this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()} 383Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS} 384Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options) 385if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}}return options} 386Tooltip.prototype.getDelegateOptions=function(){var options={} 387var defaults=this.getDefaults() 388this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value}) 389return options} 390Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 391if(self&&self.$tip&&self.$tip.is(':visible')){self.hoverState='in' 392return}if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 393$(obj.currentTarget).data('bs.'+this.type,self)}clearTimeout(self.timeout) 394self.hoverState='in' 395if(!self.options.delay||!self.options.delay.show)return self.show() 396self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)} 397Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 398if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 399$(obj.currentTarget).data('bs.'+this.type,self)}clearTimeout(self.timeout) 400self.hoverState='out' 401if(!self.options.delay||!self.options.delay.hide)return self.hide() 402self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)} 403Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type) 404if(this.hasContent()&&this.enabled){this.$element.trigger(e) 405var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]) 406if(e.isDefaultPrevented()||!inDom)return 407var that=this 408var $tip=this.tip() 409var tipId=this.getUID(this.type) 410this.setContent() 411$tip.attr('id',tipId) 412this.$element.attr('aria-describedby',tipId) 413if(this.options.animation)$tip.addClass('fade') 414var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement 415var autoToken=/\s?auto?\s?/i 416var autoPlace=autoToken.test(placement) 417if(autoPlace)placement=placement.replace(autoToken,'')||'top' 418$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this) 419this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element) 420var pos=this.getPosition() 421var actualWidth=$tip[0].offsetWidth 422var actualHeight=$tip[0].offsetHeight 423if(autoPlace){var orgPlacement=placement 424var $container=this.options.container?$(this.options.container):this.$element.parent() 425var containerDim=this.getPosition($container) 426placement=placement=='bottom'&&pos.bottom+actualHeight>containerDim.bottom?'top':placement=='top'&&pos.top-actualHeight<containerDim.top?'bottom':placement=='right'&&pos.right+actualWidth>containerDim.width?'left':placement=='left'&&pos.left-actualWidth<containerDim.left?'right':placement 427$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight) 428this.applyPlacement(calculatedOffset,placement) 429var complete=function(){var prevHoverState=that.hoverState 430that.$element.trigger('shown.bs.'+that.type) 431that.hoverState=null 432if(prevHoverState=='out')that.leave(that)} 433$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}} 434Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip() 435var width=$tip[0].offsetWidth 436var height=$tip[0].offsetHeight 437var marginTop=parseInt($tip.css('margin-top'),10) 438var marginLeft=parseInt($tip.css('margin-left'),10) 439if(isNaN(marginTop))marginTop=0 440if(isNaN(marginLeft))marginLeft=0 441offset.top=offset.top+marginTop 442offset.left=offset.left+marginLeft 443$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0) 444$tip.addClass('in') 445var actualWidth=$tip[0].offsetWidth 446var actualHeight=$tip[0].offsetHeight 447if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight}var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight) 448if(delta.left)offset.left+=delta.left 449else offset.top+=delta.top 450var isVertical=/top|bottom/.test(placement) 451var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight 452var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight' 453$tip.offset(offset) 454this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)} 455Tooltip.prototype.replaceArrow=function(delta,dimension,isHorizontal){this.arrow().css(isHorizontal?'left':'top',50*(1-delta/dimension)+'%').css(isHorizontal?'top':'left','')} 456Tooltip.prototype.setContent=function(){var $tip=this.tip() 457var title=this.getTitle() 458$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title) 459$tip.removeClass('fade in top bottom left right')} 460Tooltip.prototype.hide=function(callback){var that=this 461var $tip=this.tip() 462var e=$.Event('hide.bs.'+this.type) 463function complete(){if(that.hoverState!='in')$tip.detach() 464that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type) 465callback&&callback()}this.$element.trigger(e) 466if(e.isDefaultPrevented())return 467$tip.removeClass('in') 468$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete() 469this.hoverState=null 470return this} 471Tooltip.prototype.fixTitle=function(){var $e=this.$element 472if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}} 473Tooltip.prototype.hasContent=function(){return this.getTitle()} 474Tooltip.prototype.getPosition=function($element){$element=$element||this.$element 475var el=$element[0] 476var isBody=el.tagName=='BODY' 477var elRect=el.getBoundingClientRect() 478if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})}var elOffset=isBody?{top:0,left:0}:$element.offset() 479var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()} 480var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null 481return $.extend({},elRect,scroll,outerDims,elOffset)} 482Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}} 483Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0} 484if(!this.$viewport)return delta 485var viewportPadding=this.options.viewport&&this.options.viewport.padding||0 486var viewportDimensions=this.getPosition(this.$viewport) 487if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll 488var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight 489if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding 490var rightEdgeOffset=pos.left+viewportPadding+actualWidth 491if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.width){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}}return delta} 492Tooltip.prototype.getTitle=function(){var title 493var $e=this.$element 494var o=this.options 495title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title) 496return title} 497Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000) 498while(document.getElementById(prefix))return prefix} 499Tooltip.prototype.tip=function(){return(this.$tip=this.$tip||$(this.options.template))} 500Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))} 501Tooltip.prototype.enable=function(){this.enabled=true} 502Tooltip.prototype.disable=function(){this.enabled=false} 503Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled} 504Tooltip.prototype.toggle=function(e){var self=this 505if(e){self=$(e.currentTarget).data('bs.'+this.type) 506if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions()) 507$(e.currentTarget).data('bs.'+this.type,self)}}self.tip().hasClass('in')?self.leave(self):self.enter(self)} 508Tooltip.prototype.destroy=function(){var that=this 509clearTimeout(this.timeout) 510this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)})} 511function Plugin(option){return this.each(function(){var $this=$(this) 512var data=$this.data('bs.tooltip') 513var options=typeof option=='object'&&option 514if(!data&&option=='destroy')return 515if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options))) 516if(typeof option=='string')data[option]()})}var old=$.fn.tooltip 517$.fn.tooltip=Plugin 518$.fn.tooltip.Constructor=Tooltip 519$.fn.tooltip.noConflict=function(){$.fn.tooltip=old 520return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)} 521if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js') 522Popover.VERSION='3.3.2' 523Popover.DEFAULTS=$.extend({},$.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>'}) 524Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype) 525Popover.prototype.constructor=Popover 526Popover.prototype.getDefaults=function(){return Popover.DEFAULTS} 527Popover.prototype.setContent=function(){var $tip=this.tip() 528var title=this.getTitle() 529var content=this.getContent() 530$tip.find('.popover-title')[this.options.html?'html':'text'](title) 531$tip.find('.popover-content').children().detach().end()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content) 532$tip.removeClass('fade top bottom left right in') 533if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()} 534Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()} 535Popover.prototype.getContent=function(){var $e=this.$element 536var o=this.options 537return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)} 538Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))} 539Popover.prototype.tip=function(){if(!this.$tip)this.$tip=$(this.options.template) 540return this.$tip} 541function Plugin(option){return this.each(function(){var $this=$(this) 542var data=$this.data('bs.popover') 543var options=typeof option=='object'&&option 544if(!data&&option=='destroy')return 545if(!data)$this.data('bs.popover',(data=new Popover(this,options))) 546if(typeof option=='string')data[option]()})}var old=$.fn.popover 547$.fn.popover=Plugin 548$.fn.popover.Constructor=Popover 549$.fn.popover.noConflict=function(){$.fn.popover=old 550return this}}(jQuery);+function($){'use strict';function ScrollSpy(element,options){var process=$.proxy(this.process,this) 551this.$body=$('body') 552this.$scrollElement=$(element).is('body')?$(window):$(element) 553this.options=$.extend({},ScrollSpy.DEFAULTS,options) 554this.selector=(this.options.target||'')+' .nav li > a' 555this.offsets=[] 556this.targets=[] 557this.activeTarget=null 558this.scrollHeight=0 559this.$scrollElement.on('scroll.bs.scrollspy',process) 560this.refresh() 561this.process()}ScrollSpy.VERSION='3.3.2' 562ScrollSpy.DEFAULTS={offset:10} 563ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)} 564ScrollSpy.prototype.refresh=function(){var offsetMethod='offset' 565var offsetBase=0 566if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position' 567offsetBase=this.$scrollElement.scrollTop()}this.offsets=[] 568this.targets=[] 569this.scrollHeight=this.getScrollHeight() 570var self=this 571this.$body.find(this.selector).map(function(){var $el=$(this) 572var href=$el.data('target')||$el.attr('href') 573var $href=/^#./.test(href)&&$(href) 574return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+offsetBase,href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]) 575self.targets.push(this[1])})} 576ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset 577var scrollHeight=this.getScrollHeight() 578var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height() 579var offsets=this.offsets 580var targets=this.targets 581var activeTarget=this.activeTarget 582var i 583if(this.scrollHeight!=scrollHeight){this.refresh()}if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length-1])&&this.activate(i)}if(activeTarget&&scrollTop<offsets[0]){this.activeTarget=null 584return this.clear()}for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])}} 585ScrollSpy.prototype.activate=function(target){this.activeTarget=target 586this.clear() 587var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]' 588var active=$(selector).parents('li').addClass('active') 589if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')}active.trigger('activate.bs.scrollspy')} 590ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')} 591function Plugin(option){return this.each(function(){var $this=$(this) 592var data=$this.data('bs.scrollspy') 593var options=typeof option=='object'&&option 594if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options))) 595if(typeof option=='string')data[option]()})}var old=$.fn.scrollspy 596$.fn.scrollspy=Plugin 597$.fn.scrollspy.Constructor=ScrollSpy 598$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old 599return this} 600$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this) 601Plugin.call($spy,$spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)} 602Tab.VERSION='3.3.2' 603Tab.TRANSITION_DURATION=150 604Tab.prototype.show=function(){var $this=this.element 605var $ul=$this.closest('ul:not(.dropdown-menu)') 606var selector=$this.data('target') 607if(!selector){selector=$this.attr('href') 608selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')}if($this.parent('li').hasClass('active'))return 609var $previous=$ul.find('.active:last a') 610var hideEvent=$.Event('hide.bs.tab',{relatedTarget:$this[0]}) 611var showEvent=$.Event('show.bs.tab',{relatedTarget:$previous[0]}) 612$previous.trigger(hideEvent) 613$this.trigger(showEvent) 614if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return 615var $target=$(selector) 616this.activate($this.closest('li'),$ul) 617this.activate($target,$target.parent(),function(){$previous.trigger({type:'hidden.bs.tab',relatedTarget:$this[0]}) 618$this.trigger({type:'shown.bs.tab',relatedTarget:$previous[0]})})} 619Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active') 620var transition=callback&&$.support.transition&&(($active.length&&$active.hasClass('fade'))||!!container.find('> .fade').length) 621function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',false) 622element.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded',true) 623if(transition){element[0].offsetWidth 624element.addClass('in')}else{element.removeClass('fade')}if(element.parent('.dropdown-menu')){element.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',true)}callback&&callback()}$active.length&&transition?$active.one('bsTransitionEnd',next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next() 625$active.removeClass('in')} 626function Plugin(option){return this.each(function(){var $this=$(this) 627var data=$this.data('bs.tab') 628if(!data)$this.data('bs.tab',(data=new Tab(this))) 629if(typeof option=='string')data[option]()})}var old=$.fn.tab 630$.fn.tab=Plugin 631$.fn.tab.Constructor=Tab 632$.fn.tab.noConflict=function(){$.fn.tab=old 633return this} 634var clickHandler=function(e){e.preventDefault() 635Plugin.call($(this),'show')} 636$(document).on('click.bs.tab.data-api','[data-toggle="tab"]',clickHandler).on('click.bs.tab.data-api','[data-toggle="pill"]',clickHandler)}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options) 637this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this)) 638this.$element=$(element) 639this.affixed=this.unpin=this.pinnedOffset=null 640this.checkPosition()} 641Affix.VERSION='3.3.2' 642Affix.RESET='affix affix-top affix-bottom' 643Affix.DEFAULTS={offset:0,target:window} 644Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop() 645var position=this.$element.offset() 646var targetHeight=this.$target.height() 647if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':false 648if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?false:'bottom' 649return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?false:'bottom'}var initializing=this.affixed==null 650var colliderTop=initializing?scrollTop:position.top 651var colliderHeight=initializing?targetHeight:height 652if(offsetTop!=null&&scrollTop<=offsetTop)return'top' 653if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return'bottom' 654return false} 655Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset 656this.$element.removeClass(Affix.RESET).addClass('affix') 657var scrollTop=this.$target.scrollTop() 658var position=this.$element.offset() 659return(this.pinnedOffset=position.top-scrollTop)} 660Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)} 661Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return 662var height=this.$element.height() 663var offset=this.options.offset 664var offsetTop=offset.top 665var offsetBottom=offset.bottom 666var scrollHeight=$('body').height() 667if(typeof offset!='object')offsetBottom=offsetTop=offset 668if(typeof offsetTop=='function')offsetTop=offset.top(this.$element) 669if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element) 670var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom) 671if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','') 672var affixType='affix'+(affix?'-'+affix:'') 673var e=$.Event(affixType+'.bs.affix') 674this.$element.trigger(e) 675if(e.isDefaultPrevented())return 676this.affixed=affix 677this.unpin=affix=='bottom'?this.getPinnedOffset():null 678this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')}if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}} 679function Plugin(option){return this.each(function(){var $this=$(this) 680var data=$this.data('bs.affix') 681var options=typeof option=='object'&&option 682if(!data)$this.data('bs.affix',(data=new Affix(this,options))) 683if(typeof option=='string')data[option]()})}var old=$.fn.affix 684$.fn.affix=Plugin 685$.fn.affix.Constructor=Affix 686$.fn.affix.noConflict=function(){$.fn.affix=old 687return this} 688$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this) 689var data=$spy.data() 690data.offset=data.offset||{} 691if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom 692if(data.offsetTop!=null)data.offset.top=data.offsetTop 693Plugin.call($spy,data)})})}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.