if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");+function($){var t=$.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),function(){function t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;nthis._items.length-1||e<0)){if(this._isSliding)return void $(this._element).one(p.SLID,function(){return n.to(e)});if(i===e)return this.pause(),void this.cycle();var o=e>i?g.NEXT:g.PREVIOUS;this._slide(o,this._items[e])}},l.prototype.dispose=function t(){$(this._element).off(a),$.removeData(this._element,s),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function e(n){return n=$.extend({},f,n),r.typeCheckConfig(t,n,_),n},l.prototype._addEventListeners=function t(){var e=this;this._config.keyboard&&$(this._element).on(p.KEYDOWN,function(t){return e._keydown(t)}),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||$(this._element).on(p.MOUSEENTER,function(t){return e.pause(t)}).on(p.MOUSELEAVE,function(t){return e.cycle(t)})},l.prototype._keydown=function t(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function t(e){return this._items=$.makeArray($(e).parent().find(E.ITEM)),this._items.indexOf(e)},l.prototype._getItemByDirection=function t(e,n){var i=e===g.NEXT,o=e===g.PREVIOUS,r=this._getItemIndex(n),s=this._items.length-1;if((o&&0===r||i&&r===s)&&!this._config.wrap)return n;var a=e===g.PREVIOUS?-1:1,l=(r+a)%this._items.length;return-1===l?this._items[this._items.length-1]:this._items[l]},l.prototype._triggerSlideEvent=function t(e,n){var i=$.Event(p.SLIDE,{relatedTarget:e,direction:n});return $(this._element).trigger(i),i},l.prototype._setActiveIndicatorElement=function t(e){if(this._indicatorsElement){$(this._indicatorsElement).find(E.ACTIVE).removeClass(m.ACTIVE);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&$(n).addClass(m.ACTIVE)}},l.prototype._slide=function t(e,n){var i=this,o=$(this._element).find(E.ACTIVE_ITEM)[0],s=n||o&&this._getItemByDirection(e,o),a=Boolean(this._interval),l=void 0,h=void 0,c=void 0;if(e===g.NEXT?(l=m.LEFT,h=m.NEXT,c=g.LEFT):(l=m.RIGHT,h=m.PREV,c=g.RIGHT),s&&$(s).hasClass(m.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(s,c).isDefaultPrevented()&&o&&s){this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(s);var u=$.Event(p.SLID,{relatedTarget:s,direction:c});r.supportsTransitionEnd()&&$(this._element).hasClass(m.SLIDE)?($(s).addClass(h),r.reflow(s),$(o).addClass(l),$(s).addClass(l),$(o).one(r.TRANSITION_END,function(){$(s).removeClass(l+" "+h).addClass(m.ACTIVE),$(o).removeClass(m.ACTIVE+" "+h+" "+l),i._isSliding=!1,setTimeout(function(){return $(i._element).trigger(u)},0)}).emulateTransitionEnd(600)):($(o).removeClass(m.ACTIVE),$(s).addClass(m.ACTIVE),this._isSliding=!1,$(this._element).trigger(u)),a&&this.cycle()}},l._jQueryInterface=function t(e){return this.each(function(){var t=$(this).data(s),n=$.extend({},f,$(this).data());"object"===(void 0===e?"undefined":i(e))&&$.extend(n,e);var o="string"==typeof e?e:n.slide;if(t||(t=new l(this,n),$(this).data(s,t)),"number"==typeof e)t.to(e);else if("string"==typeof o){if(void 0===t[o])throw new Error('No method named "'+o+'"');t[o]()}else n.interval&&(t.pause(),t.cycle())})},l._dataApiClickHandler=function t(e){var n=r.getSelectorFromElement(this);if(n){var i=$(n)[0];if(i&&$(i).hasClass(m.CAROUSEL)){var o=$.extend({},$(i).data(),$(this).data()),a=this.getAttribute("data-slide-to");a&&(o.interval=!1),l._jQueryInterface.call($(i),o),a&&$(i).data(s).to(a),e.preventDefault()}}},o(l,null,[{key:"VERSION",get:function t(){return e}},{key:"Default",get:function t(){return f}}]),l}();return $(document).on(p.CLICK_DATA_API,E.DATA_SLIDE,v._dataApiClickHandler),$(window).on(p.LOAD_DATA_API,function(){$(E.DATA_RIDE).each(function(){var t=$(this);v._jQueryInterface.call(t,t.data())})}),$.fn[t]=v._jQueryInterface,$.fn[t].Constructor=v,$.fn[t].noConflict=function(){return $.fn[t]=h,v._jQueryInterface},v}(jQuery),h=function($){var t="collapse",e="4.0.0-alpha.6",s="bs.collapse",a="."+s,l=".data-api",h=$.fn[t],c=600,u={toggle:!0,parent:""},d={toggle:"boolean",parent:"string"},f={SHOW:"show"+a,SHOWN:"shown"+a,HIDE:"hide"+a,HIDDEN:"hidden"+a,CLICK_DATA_API:"click.bs.collapse.data-api"},_={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},g={WIDTH:"width",HEIGHT:"height"},p={ACTIVES:".card > .show, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function a(t,e){n(this,a),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=$.makeArray($('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return a.prototype.toggle=function t(){$(this._element).hasClass(_.SHOW)?this.hide():this.show()},a.prototype.show=function t(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!$(this._element).hasClass(_.SHOW)){var n=void 0,i=void 0;if(this._parent&&(n=$.makeArray($(this._parent).find(p.ACTIVES)),n.length||(n=null)),!(n&&(i=$(n).data(s))&&i._isTransitioning)){var o=$.Event(f.SHOW);if($(this._element).trigger(o),!o.isDefaultPrevented()){n&&(a._jQueryInterface.call($(n),"hide"),i||$(n).data(s,null));var l=this._getDimension();$(this._element).removeClass(_.COLLAPSE).addClass(_.COLLAPSING),this._element.style[l]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&$(this._triggerArray).removeClass(_.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var h=function t(){$(e._element).removeClass(_.COLLAPSING).addClass(_.COLLAPSE).addClass(_.SHOW),e._element.style[l]="",e.setTransitioning(!1),$(e._element).trigger(f.SHOWN)};if(!r.supportsTransitionEnd())return void h();var c=l[0].toUpperCase()+l.slice(1),u="scroll"+c;$(this._element).one(r.TRANSITION_END,h).emulateTransitionEnd(600),this._element.style[l]=this._element[u]+"px"}}}},a.prototype.hide=function t(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if($(this._element).hasClass(_.SHOW)){var n=$.Event(f.HIDE);if($(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension(),o=i===g.WIDTH?"offsetWidth":"offsetHeight";this._element.style[i]=this._element[o]+"px",r.reflow(this._element),$(this._element).addClass(_.COLLAPSING).removeClass(_.COLLAPSE).removeClass(_.SHOW),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&$(this._triggerArray).addClass(_.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var s=function t(){e.setTransitioning(!1),$(e._element).removeClass(_.COLLAPSING).addClass(_.COLLAPSE).trigger(f.HIDDEN)};if(this._element.style[i]="",!r.supportsTransitionEnd())return void s();$(this._element).one(r.TRANSITION_END,s).emulateTransitionEnd(600)}}},a.prototype.setTransitioning=function t(e){this._isTransitioning=e},a.prototype.dispose=function t(){$.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a.prototype._getConfig=function e(n){return n=$.extend({},u,n),n.toggle=Boolean(n.toggle),r.typeCheckConfig(t,n,d),n},a.prototype._getDimension=function t(){return $(this._element).hasClass(g.WIDTH)?g.WIDTH:g.HEIGHT},a.prototype._getParent=function t(){var e=this,n=$(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return $(n).find(i).each(function(t,n){e._addAriaAndCollapsedClass(a._getTargetFromElement(n),[n])}),n},a.prototype._addAriaAndCollapsedClass=function t(e,n){if(e){var i=$(e).hasClass(_.SHOW);e.setAttribute("aria-expanded",i),n.length&&$(n).toggleClass(_.COLLAPSED,!i).attr("aria-expanded",i)}},a._getTargetFromElement=function t(e){var n=r.getSelectorFromElement(e);return n?$(n)[0]:null},a._jQueryInterface=function t(e){return this.each(function(){var t=$(this),n=t.data(s),o=$.extend({},u,t.data(),"object"===(void 0===e?"undefined":i(e))&&e);if(!n&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),n||(n=new a(this,o),t.data(s,n)),"string"==typeof e){if(void 0===n[e])throw new Error('No method named "'+e+'"');n[e]()}})},o(a,null,[{key:"VERSION",get:function t(){return e}},{key:"Default",get:function t(){return u}}]),a}();return $(document).on(f.CLICK_DATA_API,p.DATA_TOGGLE,function(t){t.preventDefault();var e=m._getTargetFromElement(this),n=$(e).data(s),i=n?"toggle":$(this).data();m._jQueryInterface.call($(e),i)}),$.fn[t]=m._jQueryInterface,$.fn[t].Constructor=m,$.fn[t].noConflict=function(){return $.fn[t]=h,m._jQueryInterface},m}(jQuery),c=function($){var t="dropdown",e="4.0.0-alpha.6",i="bs.dropdown",s="."+i,a=".data-api",l=$.fn[t],h=27,c=38,u=40,d=3,f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,CLICK:"click"+s,CLICK_DATA_API:"click.bs.dropdown.data-api",FOCUSIN_DATA_API:"focusin.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api"},_={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",SHOW:"show"},g={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},p=function(){function t(e){n(this,t),this._element=e,this._addEventListeners()}return t.prototype.toggle=function e(){if(this.disabled||$(this).hasClass(_.DISABLED))return!1;var n=t._getParentFromElement(this),i=$(n).hasClass(_.SHOW);if(t._clearMenus(),i)return!1;if("ontouchstart"in document.documentElement&&!$(n).closest(g.NAVBAR_NAV).length){var o=document.createElement("div");o.className=_.BACKDROP,$(o).insertBefore(this),$(o).on("click",t._clearMenus)}var r={relatedTarget:this},s=$.Event(f.SHOW,r);return $(n).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),$(n).toggleClass(_.SHOW),$(n).trigger($.Event(f.SHOWN,r)),!1)},t.prototype.dispose=function t(){$.removeData(this._element,i),$(this._element).off(s),this._element=null},t.prototype._addEventListeners=function t(){$(this._element).on(f.CLICK,this.toggle)},t._jQueryInterface=function e(n){return this.each(function(){var e=$(this).data(i);if(e||(e=new t(this),$(this).data(i,e)),"string"==typeof n){if(void 0===e[n])throw new Error('No method named "'+n+'"');e[n].call(this)}})},t._clearMenus=function e(n){if(!n||3!==n.which){var i=$(g.BACKDROP)[0];i&&i.parentNode.removeChild(i);for(var o=$.makeArray($(g.DATA_TOGGLE)),r=0;r0&&a--,40===n.which&&adocument.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},l.prototype._resetAdjustments=function t(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},l.prototype._checkScrollbar=function t(){this._isBodyOverflowing=document.body.clientWidth=i){var o=this._targets[this._targets.length-1];return void(this._activeTarget!==o&&this._activate(o))}if(this._activeTarget&&e0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e "+_.NAV_LINKS).addClass(f.ACTIVE),$(this._scrollElement).trigger(d.ACTIVATE,{relatedTarget:e})},l.prototype._clear=function t(){$(this._selector).filter(_.ACTIVE).removeClass(f.ACTIVE)},l._jQueryInterface=function t(e){return this.each(function(){var t=$(this).data(s),n="object"===(void 0===e?"undefined":i(e))&&e;if(t||(t=new l(this,n),$(this).data(s,t)),"string"==typeof e){if(void 0===t[e])throw new Error('No method named "'+e+'"');t[e]()}})},o(l,null,[{key:"VERSION",get:function t(){return e}},{key:"Default",get:function t(){return c}}]),l}();return $(window).on(d.LOAD_DATA_API,function(){for(var t=$.makeArray($(_.DATA_SPY)),e=t.length;e--;){var n=$(t[e]);p._jQueryInterface.call(n,n.data())}}),$.fn[t]=p._jQueryInterface,$.fn[t].Constructor=p,$.fn[t].noConflict=function(){return $.fn[t]=h,p._jQueryInterface},p}(jQuery),f=function($){var t="tab",e="4.0.0-alpha.6",i="bs.tab",s=".bs.tab",a=".data-api",l=$.fn[t],h=150,c={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},u={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},d={A:"a",LI:"li",DROPDOWN:".dropdown",LIST:"ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},f=function(){function t(e){n(this,t),this._element=e}return t.prototype.show=function t(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(u.ACTIVE)||$(this._element).hasClass(u.DISABLED))){var n=void 0,i=void 0,o=$(this._element).closest(d.LIST)[0],s=r.getSelectorFromElement(this._element);o&&(i=$.makeArray($(o).find(d.ACTIVE)),i=i[i.length-1]);var a=$.Event(c.HIDE,{relatedTarget:this._element}),l=$.Event(c.SHOW,{relatedTarget:i});if(i&&$(i).trigger(a),$(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){s&&(n=$(s)[0]),this._activate(this._element,o);var h=function t(){var n=$.Event(c.HIDDEN,{relatedTarget:e._element}),o=$.Event(c.SHOWN,{relatedTarget:i});$(i).trigger(n),$(e._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},t.prototype.dispose=function t(){$.removeClass(this._element,"bs.tab"),this._element=null},t.prototype._activate=function t(e,n,i){var o=this,s=$(n).find(d.ACTIVE_CHILD)[0],a=i&&r.supportsTransitionEnd()&&(s&&$(s).hasClass(u.FADE)||Boolean($(n).find(d.FADE_CHILD)[0])),l=function t(){return o._transitionComplete(e,s,a,i)};s&&a?$(s).one(r.TRANSITION_END,l).emulateTransitionEnd(150):l(),s&&$(s).removeClass(u.SHOW)},t.prototype._transitionComplete=function t(e,n,i,o){if(n){$(n).removeClass(u.ACTIVE);var s=$(n.parentNode).find(d.DROPDOWN_ACTIVE_CHILD)[0];s&&$(s).removeClass(u.ACTIVE),n.setAttribute("aria-expanded",!1)}if($(e).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0),i?(r.reflow(e),$(e).addClass(u.SHOW)):$(e).removeClass(u.FADE),e.parentNode&&$(e.parentNode).hasClass(u.DROPDOWN_MENU)){var a=$(e).closest(d.DROPDOWN)[0];a&&$(a).find(d.DROPDOWN_TOGGLE).addClass(u.ACTIVE),e.setAttribute("aria-expanded",!0)}o&&o()},t._jQueryInterface=function e(n){return this.each(function(){var e=$(this),i=e.data("bs.tab");if(i||(i=new t(this),e.data("bs.tab",i)),"string"==typeof n){if(void 0===i[n])throw new Error('No method named "'+n+'"');i[n]()}})},o(t,null,[{key:"VERSION",get:function t(){return e}}]),t}();return $(document).on(c.CLICK_DATA_API,d.DATA_TOGGLE,function(t){t.preventDefault(),f._jQueryInterface.call($(this),"show")}),$.fn[t]=f._jQueryInterface,$.fn[t].Constructor=f,$.fn[t].noConflict=function(){return $.fn[t]=l,f._jQueryInterface},f}(jQuery),_=function($){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var t="tooltip",e="4.0.0-alpha.6",s="bs.tooltip",a="."+s,l=$.fn[t],h=150,c="bs-tether",u={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},d={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},f={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},_={SHOW:"show",OUT:"out"},g={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},p={FADE:"fade",SHOW:"show"},m={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},E={element:!1,enabled:!1},v={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},T=function(){function l(t,e){n(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}return l.prototype.enable=function t(){this._isEnabled=!0},l.prototype.disable=function t(){this._isEnabled=!1},l.prototype.toggleEnabled=function t(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function t(e){if(e){var n=this.constructor.DATA_KEY,i=$(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),$(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if($(this.getTipElement()).hasClass(p.SHOW))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function t(){clearTimeout(this._timeout),this.cleanupTether(),$.removeData(this.element,this.constructor.DATA_KEY),$(this.element).off(this.constructor.EVENT_KEY),$(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&$(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function t(){var e=this;if("none"===$(this.element).css("display"))throw new Error("Please use show on visible elements");var n=$.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");$(this.element).trigger(n);var i=$.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!i)return;var o=this.getTipElement(),s=r.getUID(this.constructor.NAME);o.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&$(o).addClass(p.FADE);var a="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,h=this._getAttachment(a),c=!1===this.config.container?document.body:$(this.config.container);$(o).data(this.constructor.DATA_KEY,this).appendTo(c),$(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:h,element:o,target:this.element,classes:E,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),r.reflow(o),this._tether.position(),$(o).addClass(p.SHOW);var u=function t(){var n=e._hoverState;e._hoverState=null,e._isTransitioning=!1,$(e.element).trigger(e.constructor.Event.SHOWN),n===_.OUT&&e._leave(null,e)};if(r.supportsTransitionEnd()&&$(this.tip).hasClass(p.FADE))return this._isTransitioning=!0,void $(this.tip).one(r.TRANSITION_END,u).emulateTransitionEnd(l._TRANSITION_DURATION);u()}},l.prototype.hide=function t(e){var n=this,i=this.getTipElement(),o=$.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var s=function t(){n._hoverState!==_.SHOW&&i.parentNode&&i.parentNode.removeChild(i),n.element.removeAttribute("aria-describedby"),$(n.element).trigger(n.constructor.Event.HIDDEN),n._isTransitioning=!1,n.cleanupTether(),e&&e()};$(this.element).trigger(o),o.isDefaultPrevented()||($(i).removeClass(p.SHOW),this._activeTrigger[v.CLICK]=!1,this._activeTrigger[v.FOCUS]=!1,this._activeTrigger[v.HOVER]=!1,r.supportsTransitionEnd()&&$(this.tip).hasClass(p.FADE)?(this._isTransitioning=!0,$(i).one(r.TRANSITION_END,s).emulateTransitionEnd(150)):s(),this._hoverState="")},l.prototype.isWithContent=function t(){return Boolean(this.getTitle())},l.prototype.getTipElement=function t(){return this.tip=this.tip||$(this.config.template)[0]},l.prototype.setContent=function t(){var e=$(this.getTipElement());this.setElementContent(e.find(m.TOOLTIP_INNER),this.getTitle()),e.removeClass(p.FADE+" "+p.SHOW),this.cleanupTether()},l.prototype.setElementContent=function t(e,n){var o=this.config.html;"object"===(void 0===n?"undefined":i(n))&&(n.nodeType||n.jquery)?o?$(n).parent().is(e)||e.empty().append(n):e.text($(n).text()):e[o?"html":"text"](n)},l.prototype.getTitle=function t(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},l.prototype.cleanupTether=function t(){this._tether&&this._tether.destroy()},l.prototype._getAttachment=function t(e){return f[e.toUpperCase()]},l.prototype._setListeners=function t(){var e=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)$(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(t!==v.MANUAL){var n=t===v.HOVER?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,i=t===v.HOVER?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;$(e.element).on(n,e.config.selector,function(t){return e._enter(t)}).on(i,e.config.selector,function(t){return e._leave(t)})}$(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=$.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function t(){var e=i(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function t(e,n){var i=this.constructor.DATA_KEY;return n=n||$(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),$(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?v.FOCUS:v.HOVER]=!0),$(n.getTipElement()).hasClass(p.SHOW)||n._hoverState===_.SHOW?void(n._hoverState=_.SHOW):(clearTimeout(n._timeout),n._hoverState=_.SHOW,n.config.delay&&n.config.delay.show?void(n._timeout=setTimeout(function(){n._hoverState===_.SHOW&&n.show()},n.config.delay.show)):void n.show())},l.prototype._leave=function t(e,n){var i=this.constructor.DATA_KEY;if(n=n||$(e.currentTarget).data(i),n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),$(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?v.FOCUS:v.HOVER]=!1),!n._isWithActiveTrigger()){if(clearTimeout(n._timeout),n._hoverState=_.OUT,!n.config.delay||!n.config.delay.hide)return void n.hide();n._timeout=setTimeout(function(){n._hoverState===_.OUT&&n.hide()},n.config.delay.hide)}},l.prototype._isWithActiveTrigger=function t(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},l.prototype._getConfig=function e(n){return n=$.extend({},this.constructor.Default,$(this.element).data(),n),n.delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),r.typeCheckConfig(t,n,this.constructor.DefaultType),n},l.prototype._getDelegateConfig=function t(){var e={};if(this.config)for(var n in this.config)this.constructor.Default[n]!==this.config[n]&&(e[n]=this.config[n]);return e},l._jQueryInterface=function t(e){return this.each(function(){var t=$(this).data(s),n="object"===(void 0===e?"undefined":i(e))&&e;if((t||!/dispose|hide/.test(e))&&(t||(t=new l(this,n),$(this).data(s,t)),"string"==typeof e)){if(void 0===t[e])throw new Error('No method named "'+e+'"');t[e]()}})},o(l,null,[{key:"VERSION",get:function t(){return e}},{key:"Default",get:function t(){return u}},{key:"NAME",get:function e(){return t}},{key:"DATA_KEY",get:function t(){return s}},{key:"Event",get:function t(){return g}},{key:"EVENT_KEY",get:function t(){return a}},{key:"DefaultType",get:function t(){return d}}]),l}();return $.fn[t]=T._jQueryInterface,$.fn[t].Constructor=T,$.fn[t].noConflict=function(){return $.fn[t]=l,T._jQueryInterface},T}(jQuery),g=function($){var r="popover",s="4.0.0-alpha.6",a="bs.popover",l="."+a,h=$.fn[r],c=$.extend({},_.Default,{placement:"right",trigger:"click",content:"",template:''}),u=$.extend({},_.DefaultType,{content:"(string|element|function)"}),d={FADE:"fade",SHOW:"show"},f={TITLE:".popover-title",CONTENT:".popover-content"},g={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,INSERTED:"inserted"+l,CLICK:"click"+l,FOCUSIN:"focusin"+l,FOCUSOUT:"focusout"+l,MOUSEENTER:"mouseenter"+l,MOUSELEAVE:"mouseleave"+l},p=function(h){function _(){return n(this,_),t(this,h.apply(this,arguments))}return e(_,h),_.prototype.isWithContent=function t(){return this.getTitle()||this._getContent()},_.prototype.getTipElement=function t(){return this.tip=this.tip||$(this.config.template)[0]},_.prototype.setContent=function t(){var e=$(this.getTipElement());this.setElementContent(e.find(f.TITLE),this.getTitle()),this.setElementContent(e.find(f.CONTENT),this._getContent()),e.removeClass(d.FADE+" "+d.SHOW),this.cleanupTether()},_.prototype._getContent=function t(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},_._jQueryInterface=function t(e){return this.each(function(){var t=$(this).data(a),n="object"===(void 0===e?"undefined":i(e))?e:null;if((t||!/destroy|hide/.test(e))&&(t||(t=new _(this,n),$(this).data(a,t)),"string"==typeof e)){if(void 0===t[e])throw new Error('No method named "'+e+'"');t[e]()}})},o(_,null,[{key:"VERSION",get:function t(){return s}},{key:"Default",get:function t(){return c}},{key:"NAME",get:function t(){return r}},{key:"DATA_KEY",get:function t(){return a}},{key:"Event",get:function t(){return g}},{key:"EVENT_KEY",get:function t(){return l}},{key:"DefaultType",get:function t(){return u}}]),_}(_);return $.fn[r]=p._jQueryInterface,$.fn[r].Constructor=p,$.fn[r].noConflict=function(){return $.fn[r]=h,p._jQueryInterface},p}(jQuery)}();