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