text: /*
   * tooltip - v1.0.0 - 2018-07-13 13:33:05 Friday
   * https://github.com/heanes/tooltip.js
   * Copyright (c) 2018 Heanes
   * Licensed MIT License
   */
  
  !function(a,i,o,s){"use strict";var h="tooltip";a.fn.extend({animateCss:function(t,i){var e=function(t){var i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var e in i)if(t.style[e]!==s)return i[e]}(o.createElement("div"));return this.addClass("animated "+t).one(e,function(){a(this).removeClass("animated "+t),"function"==typeof i&&i()}),this}});var r=function(t,i){return this._defaults=this.getDefaults(),this.options=null,this.$element=null,this.inState=null,this.init(t,i),{options:this.options,init:a.proxy(this.init,this),destroy:a.proxy(this.destroy,this),refreshOption:a.proxy(this.refreshOption,this),show:a.proxy(this.show,this),hide:a.proxy(this.hide,this),toggle:a.proxy(this.toggle,this),tip:a.proxy(this.tip,this),title:a.proxy(this.title,this),getDefaults:a.proxy(this.getDefaults,this)}};function p(t){i.console&&i.console.error(t)}r.V=r.VERSION="1.0.0",r.DEFAULTS={delay:{show:1e3,hide:1e3},theme:"default",title:"Tooltip",placement:"top-center",opacity:1,enableAnimation:!0,animation:s,trigger:"hover",keepShowWhenOnTip:!0,keepShowWhenClickTip:!1,cancelKeepShowWhenClickOtherPlace:!1,positionOffset:s,$container:!1,template:'<div class="tooltip-wrap" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',beforeShow:s,afterShow:s,beforeHide:s,afterHide:s,onToggle:s},r.prototype.init=function(t,i){return this.$element=a(t),this.$el_=this.$element.clone(!0),this.options=this.getOptions(i),this.inState={show:!1,click:!1,hover:!1,keepShow:!1,tipClick:!1,tipHover:!1},this.timer={timerDetach:s},this.tipUId=s,this.tipPosition={},this.animation=s,this.bindEvent(),this.fixTitle(),this},r.prototype.getOptions=function(t){return this.handleToStandardOption(t)},r.prototype.handleToStandardOption=function(t){var i=this.getDefaults();return(t=a.extend({},i,this.$element.data(),t)).delay&&("number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"object"==typeof t.delay&&(t.delay=a.extend({},i.delay,t.delay))),t},r.prototype.refreshOption=function(t){return this.options=a.extend(!0,{},this.options,t),this.getOptions(this.options),this.destroy(),this.init(),this},r.prototype.destroy=function(){return this.$element.html(this.$el_.html()),this},r.prototype.bindEvent=function(){for(var t=this.$element,i=this.options.trigger.split(" "),e=i.length;e--;){var o=i[e];if("click"===o)t.off("click."+this.type).on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!==o){var n="hover"===o?"mouseenter":"focusin",s="hover"===o?"mouseleave":"focusout";t.off(n+"."+this.type).on(n+"."+this.type,this.options.selector,a.proxy(this.enter,this)),t.off(s+"."+this.type).on(s+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}return(this.options.keepShowWhenOnTip||this.options.keepShowWhenClickTip)&&this.bindTipEvent(),this},r.prototype.bindTipEvent=function(){var o=this.tip(),n=this;return this.options.keepShowWhenOnTip&&(o.on("mouseenter",function(t){n.inState.show=n.inState.keepShow=n.inState.tipHover=!0,o.stop(!0),n.setStyle(),o.show()}),o.on("mouseleave",function(t){n.inState.tipHover=!1,n.inState.tipClick||(n.inState.keepShow=!1,n.inState.show&&(n.inState.show=!1,n.hide()))})),this.options.keepShowWhenClickTip&&o.on("click",function(t){n.inState.tipClick?(n.inState.tipClick=n.inState.keepShow=!1,n.inState.show&&!n.inState.tipHover&&o.detach()):(n.inState.show=n.inState.tipClick=n.inState.keepShow=!0,o.stop(!0).show(),n.setStyle())}),n.options.cancelKeepShowWhenClickOtherPlace&&a("body").on("click",function(t){if(n.inState.show){var i=a(t.target),e=n.getTipUId();i.is(n.$element)||i.is(o)||i.closest("#"+e).is(o)||n.inState.tipClick&&(n.inState.tipClick=!1,n.inState.keepShow=!1,n.inState.tipHover||n.hide())}}),this},r.prototype.enter=function(){return this.inState.hover=!0,this.show(),this.$element.trigger("enter"),this},r.prototype.leave=function(){return this.inState.hover=!1,this.inState.keepShow||this.hide(),this.$element.trigger("leave"),this},r.prototype.toggle=function(t){t=t||this.options,this.$element.trigger("tooltip.toggle");var i=this.tip();return t.onToggle&&"function"==typeof t.onToggle&&t.onToggle(i),this.inState.show?(this.inState.show=!1,this.inState.click=!1,this.hide()):(this.inState.show=!0,this.inState.click=!0,this.show()),this},r.prototype.show=function(t){t=t||this.options,this.$element.trigger("tooltip.beforeShow");var i=this.tip();i.detach();var e=this.tipUId||this.getUID(h);return this.tipUId=e,i.attr("id",e),this.setContent(),t.$container?t.$container.append(i):a("body").append(i),this.setStyle(),this.setPosition(),t.beforeShow&&"function"==typeof t.beforeShow&&t.beforeShow(i),this.inState.show=!0,this.showWithAnimation(),this.$element.trigger("tooltip.show"),t.afterShow&&"function"==typeof t.afterShow&&t.afterShow(i),this},r.prototype.setStyle=function(t,i){t=this.$element,i=i||this.options;var e=t.attr("data-tooltip-opacity")||i.opacity||this.getDefaults().opacity,o=this.tip();return o.addClass(this.options.theme),o.css({opacity:e}),this},r.prototype.showWithAnimation=function(t,i){i=i||this.options,t=t||this.tip(),i.enableAnimation?(t.stop(!0).fadeIn(this.options.delay.show),i.animation&&"object"==typeof i.animation&&t.animateCss(i.animation.show)):t.stop(!0).show()},r.prototype.hide=function(t){t=t||this.options,this.inState.show=!1,this.$element.trigger("tooltip.beforeHide");var i=this.tip();return t.beforeHide&&"function"==typeof t.beforeHide&&t.beforeHide(i),this.hideTipAction(),this.$element.trigger("tooltip.hide"),t.afterHide&&"function"==typeof t.afterHide&&t.afterHide(i),this},r.prototype.hideTipAction=function(){var t=this.tip();this.setStyle(),this.hideWithAnimation();var i=this;return i.options.enableAnimation?(clearTimeout(i.timer.timerDetach),i.timer.timerDetach=setTimeout(function(){i.inState.hover||i.inState.keepShow||(t.detach(),i.inState.keepShow=!1)},this.options.delay.hide)):i.inState.hover||i.inState.keepShow||(t.detach(),i.inState.keepShow=!1),this},r.prototype.hideWithAnimation=function(t,i){if(i=i||this.options,t=t||this.tip(),i.enableAnimation){t.stop(!0).fadeOut(this.options.delay.hide);var e=this.getAnimation();e&&"object"==typeof e&&t.animateCss(i.animation.hide)}else t.stop(!0).show()},r.prototype.getElementPosition=function(t){var i=(t=t||this.$element).position(),e=this.getElementSize(t);return a.extend({},i,e)},r.prototype.getElementPositionIgnoreMargin=function(t){var i=(t=t||this.$element).offset(),e=this.getElementSize(t);return a.extend({},i,e)},r.prototype.setPosition=function(t,i){t=t||this.tip(),i=i||this.getElementPositionIgnoreMargin();var e=this.getElementSize(t),o=this.getPlacement(),n=this.getSuitablePosition(o,i,e.width,e.height),s=this.options;return s.positionOffset&&"object"==typeof s.positionOffset&&(n=this.setPositionOffset(t,n)),t.css(n),t.addClass(o),this.tipPosition=n,this},r.prototype.setPositionOffset=function(t,i){var e=this.options,o={top:(i=i||this.getTipPosition()).top,left:i.left};return this.calculatePositionOffset(o,-parseInt(e.positionOffset.left),-parseInt(e.positionOffset.top))},r.prototype.getPlacement=function(t){var i=this.options;return(t=t||this.$element).attr("data-tooltip-placement")||t.attr("tooltip-placement")||i.placement},r.prototype.getElementSize=function(t){return{width:(t=t||this.tip()).outerWidth(),height:t.outerHeight()}},r.prototype.getSuitablePosition=function(t,i,e,o){var n={};switch(t){case"top":n.top=this.calculatePositionOffset(i,null,o).top,n.left=this.calculatePositionOffset(i,(e-i.width)/2,null).left;break;case"left":n.top=this.calculatePositionOffset(i,null,(o-i.height)/2).top,n.left=this.calculatePositionOffset(i,e,null).left;break;case"right":n.top=this.calculatePositionOffset(i,null,(o-i.height)/2).top,n.left=this.calculatePositionOffset(i,-i.width,null).left;break;case"bottom":n.top=this.calculatePositionOffset(i,null,-i.height).top,n.left=this.calculatePositionOffset(i,(e-i.width)/2,null).left;break;case"top-left":n.top=this.calculatePositionOffset(i,null,o).top,n.left=this.calculatePositionOffset(i,e/2,null).left;break;case"top-right":n.top=this.calculatePositionOffset(i,null,o).top,n.left=this.calculatePositionOffset(i,-(i.width-e/2),null).left;break;case"bottom-left":n.top=this.calculatePositionOffset(i,null,-i.height).top,n.left=this.calculatePositionOffset(i,e/2,null).left;break;case"bottom-right":n.top=this.calculatePositionOffset(i,null,-i.height).top,n.left=this.calculatePositionOffset(i,-(i.width-e/2),null).left;break;default:n.top=this.calculatePositionOffset(i,null,o).top,n.left=this.calculatePositionOffset(i,(e-i.width)/2,null).left}return n},r.prototype.calculatePositionOffset=function(t,i,e){var o=a.extend({},t);return o.top=e?parseInt(t.top)-parseInt(e):parseInt(t.top),o.left=i?parseInt(t.left)-parseInt(i):parseInt(t.left),o},r.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!==this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},r.prototype.getTipPosition=function(){return this.tipPosition},r.prototype.getAnimation=function(t){if(!this.animation){t=t||this.options;var i=s;t.animation&&"object"==typeof t.animation&&(i=t.animation);var e=this.$element,o=e.attr("data-tooltip-animation-show")||e.attr("data-tooltip-animation")||s,n=e.attr("data-tooltip-animation-hide")||e.attr("data-tooltip-animation")||s;i=(o&&n?{show:o,hide:n}:s)||i,this.animation=i}return this.animation},r.prototype.getTipUId=function(){return this.tipUId},r.prototype.title=function(){var t=this.$element,i=this.options;return t.attr("title")||t.attr("data-original-title")||("function"==typeof i.title?i.title.call(t[0]):i.title)||"Tooltip"},r.prototype.fixTitle=function(){var t=this.$element;return(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title",""),this},r.prototype.setContent=function(){var t=this.tip(),i=this.title();return t.find(".tooltip-inner")[this.options.html?"html":"text"](i),t.attr("class","").addClass("tooltip-wrap"),this},r.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},r.prototype.getDefaults=function(){return r.DEFAULTS},r.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),o.getElementById(t););return t},a.fn[h]=function(e,o){var n=s;return this.each(function(){var t=a(this),i=a.data(this,h);"string"==typeof e?i?a.isFunction(i[e])&&"_"!==e.charAt(0)?("destroy"===e&&t.removeData(h),o instanceof Array||(o=[o]),n=i[e].apply(i,o)):p("No such method : "+e):p("Not initialized, can not call method : "+e):"boolean"==typeof e?n=i:a.data(this,h,new r(this,a.extend(!0,{},e)))}),n||this}}(jQuery,window,document);
  //# sourceMappingURL=tooltip.js.map