!function($){"use strict";var a=function(a,b){this.init("tooltip",a,b)};a.prototype={constructor:a,init:function(f,g,h){var c,d,e,a,b;for(this.type=f,this.$element=$(g),this.options=this.getOptions(h),this.enabled=!0,b=(e=this.options.trigger.split(" ")).length;b--;)"click"==(a=e[b])?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=a&&(c="hover"==a?"mouseenter":"focus",d="hover"==a?"mouseleave":"blur",this.$element.on(c+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(d+"."+this.type,this.options.selector,$.proxy(this.leave,this)));this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(a){return(a=$.extend({},$.fn[this.type].defaults,this.$element.data(),a)).delay&&"number"==typeof a.delay&&(a.delay={show:a.delay,hide:a.delay}),a},enter:function(b){var a,d=$.fn[this.type].defaults,c={};if(this._options&&$.each(this._options,function(a,b){d[a]!=b&&(c[a]=b)},this),!(a=$(b.currentTarget)[this.type](c).data(this.type)).options.delay||!a.options.delay.show)return a.show();clearTimeout(this.timeout),a.hoverState="in",this.timeout=setTimeout(function(){"in"==a.hoverState&&a.show()},a.options.delay.show)},leave:function(b){var a=$(b.currentTarget)[this.type](this._options).data(this.type);if(this.timeout&&clearTimeout(this.timeout),!a.options.delay||!a.options.delay.hide)return a.hide();a.hoverState="out",this.timeout=setTimeout(function(){"out"==a.hoverState&&a.hide()},a.options.delay.hide)},show:function(){var b,a,d,e,f,c,g=$.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(g),g.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.$element.data("tip-class")&&b.addClass(this.$element.data("tip-class")),this.$element.data("tip-id")&&b.attr("id",this.$element.data("tip-id")),this.options.animation&&b.addClass("show"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),a=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":c={top:a.top+a.height,left:a.left+a.width/2-d/2};break;case"top":c={top:a.top-e,left:a.left+a.width/2-d/2};break;case"left":c={top:a.top+a.height/2-e/2,left:a.left-d};break;case"right":c={top:a.top+a.height/2-e/2,left:a.left+a.width}}this.applyPlacement(c,f),this.$element.trigger("shown")}},applyPlacement:function(b,d){var e,c,f,h,a=this.tip(),i=a[0].offsetWidth,g=a[0].offsetHeight;a.offset(b).addClass("bs-tooltip-"+d).addClass("in"),e=a[0].offsetWidth,c=a[0].offsetHeight,"top"==d&&c!=g&&(b.top=b.top+g-c,h=!0),"bottom"==d||"top"==d?(f=0,b.left<0&&(f=-2*b.left,b.left=0,a.offset(b),e=a[0].offsetWidth,c=a[0].offsetHeight),this.replaceArrow(f-i+e,e,"left")):this.replaceArrow(c-g,c,"top"),h&&a.offset(b)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("show in bs-tooltip-top bs-tooltip-bottom bs-tooltip-left bs-tooltip-right")},hide:function(){var c,a=this.tip(),b=$.Event("hide");if(this.$element.trigger(b),!b.isDefaultPrevented())return a.removeClass("in"),$.support.transition&&this.$tip.hasClass("show")?(c=setTimeout(function(){a.off($.support.transition.end).detach()},500),a.one($.support.transition.end,function(){clearTimeout(c),a.detach()})):a.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var a=this.$element[0];return $.extend({},"function"==typeof a.getBoundingClientRect?a.getBoundingClientRect():{width:a.offsetWidth,height:a.offsetHeight},this.$element.offset())},getTitle:function(){var b=this.$element,a=this.options;return b.attr("data-original-title")||("function"==typeof a.title?a.title.call(b[0]):a.title)},tip:function(){return this.$tip=this.$tip||$(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var a=b?$(b.currentTarget)[this.type](this._options).data(this.type):this;a.tip().hasClass("in")?a.hide():a.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var b=$.fn.tooltip;$.fn.tooltip=function(b){return this.each(function(){var d=$(this),c=d.data("tooltip");c||d.data("tooltip",c=new a(this,"object"==typeof b&&b)),"string"==typeof b&&c[b]()})},$.fn.tooltip.Constructor=a,$.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},$.fn.tooltip.noConflict=function(){return $.fn.tooltip=b,this}}(window.jQuery) orthrive