bootstrap-magnus.min.js 35 KB

1
  1. function _extends(){return _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_extends.apply(this,arguments)}function _defineProperties(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function _createClass(n,t,i){return t&&_defineProperties(n.prototype,t),i&&_defineProperties(n,i),n}function _extends(){return _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_extends.apply(this,arguments)}function _defineProperties(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function _createClass(n,t,i){return t&&_defineProperties(n.prototype,t),i&&_defineProperties(n,i),n}function _defineProperties(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function _createClass(n,t,i){return t&&_defineProperties(n.prototype,t),i&&_defineProperties(n,i),n}function _extends(){return _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_extends.apply(this,arguments)}function _defineProperties(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function _createClass(n,t,i){return t&&_defineProperties(n.prototype,t),i&&_defineProperties(n,i),n}function _extends(){return _extends=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},_extends.apply(this,arguments)}function _defineProperties(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function _createClass(n,t,i){return t&&_defineProperties(n.prototype,t),i&&_defineProperties(n,i),n}var Util=function(n){function u(n){return{}.toString.call(n).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function f(){return{bindType:i.end,delegateType:i.end,handle:function(t){return n(t.target).is(this)?t.handleObj.handler.apply(this,arguments):undefined}}}function e(){return typeof window!="undefined"&&window.QUnit?!1:{end:"transitionend"}}function o(i){var u=this,r=!1;n(this).one(t.TRANSITION_END,function(){r=!0});return setTimeout(function(){r||t.triggerTransitionEnd(u)},i),this}function s(){i=e();n.fn.emulateTransitionEnd=o;t.supportsTransitionEnd()&&(n.event.special[t.TRANSITION_END]=f())}function h(t){return typeof n.escapeSelector=="function"?n.escapeSelector(t).substr(1):t.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")}var i=!1,r=1e6,t={TRANSITION_END:"bsTransitionEnd",getUID:function(n){do n+=~~(Math.random()*r);while(document.getElementById(n));return n},getSelectorFromElement:function(t){var i=t.getAttribute("data-target"),r;i&&i!=="#"||(i=t.getAttribute("href")||"");i.charAt(0)==="#"&&(i=h(i));try{return r=n(document).find(i),r.length>0?i:null}catch(u){return null}},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(t){n(t).trigger(i.end)},supportsTransitionEnd:function(){return Boolean(i)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,i,r){for(var f in r)if(Object.prototype.hasOwnProperty.call(r,f)){var o=r[f],e=i[f],s=e&&t.isElement(e)?"element":u(e);if(!new RegExp(o).test(s))throw new Error(n.toUpperCase()+": "+('Option "'+f+'" provided type "'+s+'" ')+('but expected type "'+o+'".'));}}};return s(),t}($),Collapse=function(n){var r="collapse",l="4.0.0",i="bs.collapse",u="."+i,a=n.fn[r],c=600,o={toggle:!0,parent:""},v={toggle:"boolean",parent:"(string|element)"},f={SHOW:"show"+u,SHOWN:"shown"+u,HIDE:"hide"+u,HIDDEN:"hidden"+u,CLICK_DATA_API:"click"+u+".data-api"},t={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},s={WIDTH:"width",HEIGHT:"height"},h={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},e=function(){function e(t,i){var f,r,e,u;for(this._isTransitioning=!1,this._element=t,this._config=this._getConfig(i),this._triggerArray=n.makeArray(n('[data-toggle="collapse"][href="#'+t.id+'"],'+('[data-toggle="collapse"][data-target="#'+t.id+'"]'))),f=n(h.DATA_TOGGLE),r=0;r<f.length;r++)e=f[r],u=Util.getSelectorFromElement(e),u!==null&&n(u).filter(t).length>0&&(this._selector=u,this._triggerArray.push(e));this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var u=e.prototype;return u.toggle=function(){n(this._element).hasClass(t.SHOW)?this.hide():this.show()},u.show=function(){var o=this,r,s,l,u,a,v,y;if(!this._isTransitioning&&!n(this._element).hasClass(t.SHOW)&&(this._parent&&(r=n.makeArray(n(this._parent).find(h.ACTIVES).filter('[data-parent="'+this._config.parent+'"]')),r.length===0&&(r=null)),!r||(s=n(r).not(this._selector).data(i),!s||!s._isTransitioning))&&(l=n.Event(f.SHOW),n(this._element).trigger(l),!l.isDefaultPrevented())){if(r&&(e._jQueryInterface.call(n(r).not(this._selector),"hide"),s||n(r).data(i,null)),u=this._getDimension(),n(this._element).removeClass(t.COLLAPSE).addClass(t.COLLAPSING),this._element.style[u]=0,this._triggerArray.length>0&&n(this._triggerArray).removeClass(t.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0),a=function(){n(o._element).removeClass(t.COLLAPSING).addClass(t.COLLAPSE).addClass(t.SHOW);o._element.style[u]="";o.setTransitioning(!1);n(o._element).trigger(f.SHOWN)},!Util.supportsTransitionEnd()){a();return}v=u[0].toUpperCase()+u.slice(1);y="scroll"+v;n(this._element).one(Util.TRANSITION_END,a).emulateTransitionEnd(c);this._element.style[u]=this._element[y]+"px"}},u.hide=function(){var h=this,u,i,r,e,o,l,s;if(!this._isTransitioning&&n(this._element).hasClass(t.SHOW)&&(u=n.Event(f.HIDE),n(this._element).trigger(u),!u.isDefaultPrevented())){if(i=this._getDimension(),this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",Util.reflow(this._element),n(this._element).addClass(t.COLLAPSING).removeClass(t.COLLAPSE).removeClass(t.SHOW),this._triggerArray.length>0)for(r=0;r<this._triggerArray.length;r++)e=this._triggerArray[r],o=Util.getSelectorFromElement(e),o!==null&&(l=n(o),l.hasClass(t.SHOW)||n(e).addClass(t.COLLAPSED).attr("aria-expanded",!1));if(this.setTransitioning(!0),s=function(){h.setTransitioning(!1);n(h._element).removeClass(t.COLLAPSING).addClass(t.COLLAPSE).trigger(f.HIDDEN)},this._element.style[i]="",!Util.supportsTransitionEnd()){s();return}n(this._element).one(Util.TRANSITION_END,s).emulateTransitionEnd(c)}},u.setTransitioning=function(n){this._isTransitioning=n},u.dispose=function(){n.removeData(this._element,i);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},u._getConfig=function(n){return n=_extends({},o,n),n.toggle=Boolean(n.toggle),Util.typeCheckConfig(r,n,v),n},u._getDimension=function(){var t=n(this._element).hasClass(s.WIDTH);return t?s.WIDTH:s.HEIGHT},u._getParent=function(){var r=this,t=null,i;return Util.isElement(this._config.parent)?(t=this._config.parent,typeof this._config.parent.jquery!="undefined"&&(t=this._config.parent[0])):t=n(this._config.parent)[0],i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',n(t).find(i).each(function(n,t){r._addAriaAndCollapsedClass(e._getTargetFromElement(t),[t])}),t},u._addAriaAndCollapsedClass=function(i,r){if(i){var u=n(i).hasClass(t.SHOW);r.length>0&&n(r).toggleClass(t.COLLAPSED,!u).attr("aria-expanded",u)}},e._getTargetFromElement=function(t){var i=Util.getSelectorFromElement(t);return i?n(i)[0]:null},e._jQueryInterface=function(t){return this.each(function(){var u=n(this),r=u.data(i),f=_extends({},o,u.data(),typeof t=="object"&&t);if(!r&&f.toggle&&/show|hide/.test(t)&&(f.toggle=!1),r||(r=new e(this,f),u.data(i,r)),typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError('No method named "'+t+'"');r[t]()}})},_createClass(e,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return o}}]),e}();n(document).on(f.CLICK_DATA_API,h.DATA_TOGGLE,function(t){t.currentTarget.tagName==="A"&&t.preventDefault();var r=n(this),u=Util.getSelectorFromElement(this);n(u).each(function(){var t=n(this),u=t.data(i),f=u?"toggle":r.data();e._jQueryInterface.call(t,f)})});return n.fn[r]=e._jQueryInterface,n.fn[r].Constructor=e,n.fn[r].noConflict=function(){return n.fn[r]=a,e._jQueryInterface},e}($),Dropdown=function(n){var e="dropdown",p="4.0.0",s="bs.dropdown",u="."+s,c=".data-api",w=n.fn[e],h=27,l=32,y=9,a=38,v=40,b=3,k=new RegExp(a+"|"+v+"|"+h),i={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,CLICK:"click"+u,CLICK_DATA_API:"click"+u+c,KEYDOWN_DATA_API:"keydown"+u+c,KEYUP_DATA_API:"keyup"+u+c},t={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",DROPRIGHT:"dropright",DROPLEFT:"dropleft",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",POSITION_STATIC:"position-static"},r={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},o={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end",RIGHT:"right-start",RIGHTEND:"right-end",LEFT:"left-start",LEFTEND:"left-end"},d={offset:0,flip:!0,boundary:"scrollParent"},g={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},f=function(){function f(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var c=f.prototype;return c.toggle=function(){var u,h,e,o,s;if(!this._element.disabled&&!n(this._element).hasClass(t.DISABLED)&&(u=f._getParentFromElement(this._element),h=n(this._menu).hasClass(t.SHOW),f._clearMenus(),!h)&&(e={relatedTarget:this._element},o=n.Event(i.SHOW,e),n(u).trigger(o),!o.isDefaultPrevented())){if(!this._inNavbar){if(typeof Popper=="undefined")throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");s=this._element;n(u).hasClass(t.DROPUP)&&(n(this._menu).hasClass(t.MENULEFT)||n(this._menu).hasClass(t.MENURIGHT))&&(s=u);this._config.boundary!=="scrollParent"&&n(u).addClass(t.POSITION_STATIC);this._popper=new Popper(s,this._menu,this._getPopperConfig())}if("ontouchstart"in document.documentElement&&n(u).closest(r.NAVBAR_NAV).length===0)n("body").children().on("mouseover",null,n.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);n(this._menu).toggleClass(t.SHOW);n(u).toggleClass(t.SHOW).trigger(n.Event(i.SHOWN,e))}},c.dispose=function(){n.removeData(this._element,s);n(this._element).off(u);this._element=null;this._menu=null;this._popper!==null&&(this._popper.destroy(),this._popper=null)},c.update=function(){this._inNavbar=this._detectNavbar();this._popper!==null&&this._popper.scheduleUpdate()},c._addEventListeners=function(){var t=this;n(this._element).on(i.CLICK,function(n){n.preventDefault();n.stopPropagation();t.toggle()})},c._getConfig=function(t){return t=_extends({},this.constructor.Default,n(this._element).data(),t),Util.typeCheckConfig(e,t,this.constructor.DefaultType),t},c._getMenuElement=function(){if(!this._menu){var t=f._getParentFromElement(this._element);this._menu=n(t).find(r.MENU)[0]}return this._menu},c._getPlacement=function(){var r=n(this._element).parent(),i=o.BOTTOM;return r.hasClass(t.DROPUP)?(i=o.TOP,n(this._menu).hasClass(t.MENURIGHT)&&(i=o.TOPEND)):r.hasClass(t.DROPRIGHT)?i=o.RIGHT:r.hasClass(t.DROPLEFT)?i=o.LEFT:n(this._menu).hasClass(t.MENURIGHT)&&(i=o.BOTTOMEND),i},c._detectNavbar=function(){return n(this._element).closest(".navbar").length>0},c._getPopperConfig=function(){var t=this,n={};return typeof this._config.offset=="function"?n.fn=function(n){return n.offsets=_extends({},n.offsets,t._config.offset(n.offsets)||{}),n}:n.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:n,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},f._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(s),r=typeof t=="object"?t:null;if(i||(i=new f(this,r),n(this).data(s,i)),typeof t=="string"){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},f._clearMenus=function(u){var o,e,v,c;if(!u||u.which!==b&&(u.type!=="keyup"||u.which===y))for(o=n.makeArray(n(r.DATA_TOGGLE)),e=0;e<o.length;e++){var h=f._getParentFromElement(o[e]),l=n(o[e]).data(s),a={relatedTarget:o[e]};l&&(v=l._menu,n(h).hasClass(t.SHOW))&&(u&&(u.type==="click"&&/input|textarea/i.test(u.target.tagName)||u.type==="keyup"&&u.which===y)&&n.contains(h,u.target)||(c=n.Event(i.HIDE,a),n(h).trigger(c),c.isDefaultPrevented())||("ontouchstart"in document.documentElement&&n("body").children().off("mouseover",null,n.noop),o[e].setAttribute("aria-expanded","false"),n(v).removeClass(t.SHOW),n(h).removeClass(t.SHOW).trigger(n.Event(i.HIDDEN,a))))}},f._getParentFromElement=function(t){var i,r=Util.getSelectorFromElement(t);return r&&(i=n(r)[0]),i||t.parentNode},f._dataApiKeydownHandler=function(i){var o,s,c,e,u;if((/input|textarea/i.test(i.target.tagName)?i.which!==l&&(i.which===h||(i.which===v||i.which===a)&&!n(i.target).closest(r.MENU).length):k.test(i.which))&&(i.preventDefault(),i.stopPropagation(),!this.disabled&&!n(this).hasClass(t.DISABLED))){if(o=f._getParentFromElement(this),s=n(o).hasClass(t.SHOW),!s&&(i.which!==h||i.which!==l)||s&&(i.which===h||i.which===l)){i.which===h&&(c=n(o).find(r.DATA_TOGGLE)[0],n(c).trigger("focus"));n(this).trigger("click");return}(e=n(o).find(r.VISIBLE_ITEMS).get(),e.length!==0)&&(u=e.indexOf(i.target),i.which===a&&u>0&&u--,i.which===v&&u<e.length-1&&u++,u<0&&(u=0),e[u].focus())}},_createClass(f,null,[{key:"VERSION",get:function(){return p}},{key:"Default",get:function(){return d}},{key:"DefaultType",get:function(){return g}}]),f}();n(document).on(i.KEYDOWN_DATA_API,r.DATA_TOGGLE,f._dataApiKeydownHandler).on(i.KEYDOWN_DATA_API,r.MENU,f._dataApiKeydownHandler).on(i.CLICK_DATA_API+" "+i.KEYUP_DATA_API,f._clearMenus).on(i.CLICK_DATA_API,r.DATA_TOGGLE,function(t){t.preventDefault();t.stopPropagation();f._jQueryInterface.call(n(this),"toggle")}).on(i.CLICK_DATA_API,r.FORM_CHILD,function(n){n.stopPropagation()});return n.fn[e]=f._jQueryInterface,n.fn[e].Constructor=f,n.fn[e].noConflict=function(){return n.fn[e]=w,f._jQueryInterface},f}($,Popper),Tab=function(n){var r="tab",s="4.0.0",o="bs.tab",u="."+o,h=n.fn[r],c=150,f={HIDE:"hide"+u,HIDDEN:"hidden"+u,SHOW:"show"+u,SHOWN:"shown"+u,CLICK_DATA_API:"click"+u+".data-api"},t={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},i={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},e=function(){function r(n){this._element=n}var u=r.prototype;return u.show=function(){var l=this,e,r,u,o,a,s,h,c;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&n(this._element).hasClass(t.ACTIVE)||n(this._element).hasClass(t.DISABLED)||(u=n(this._element).closest(i.NAV_LIST_GROUP)[0],o=Util.getSelectorFromElement(this._element),u&&(a=u.nodeName==="UL"?i.ACTIVE_UL:i.ACTIVE,r=n.makeArray(n(u).find(a)),r=r[r.length-1]),s=n.Event(f.HIDE,{relatedTarget:this._element}),h=n.Event(f.SHOW,{relatedTarget:r}),r&&n(r).trigger(s),n(this._element).trigger(h),h.isDefaultPrevented()||s.isDefaultPrevented())||(o&&(e=n(o)[0]),this._activate(this._element,u),c=function(){var t=n.Event(f.HIDDEN,{relatedTarget:l._element}),i=n.Event(f.SHOWN,{relatedTarget:r});n(r).trigger(t);n(l._element).trigger(i)},e?this._activate(e,e.parentNode,c):c())},u.dispose=function(){n.removeData(this._element,o);this._element=null},u._activate=function(r,u,f){var s=this,h=u.nodeName==="UL"?n(u).find(i.ACTIVE_UL):n(u).children(i.ACTIVE);var e=h[0],l=f&&Util.supportsTransitionEnd()&&e&&n(e).hasClass(t.FADE),o=function(){return s._transitionComplete(r,e,f)};e&&l?n(e).one(Util.TRANSITION_END,o).emulateTransitionEnd(c):o()},u._transitionComplete=function(r,u,f){var e,o;u&&(n(u).removeClass(t.SHOW+" "+t.ACTIVE),e=n(u.parentNode).find(i.DROPDOWN_ACTIVE_CHILD)[0],e&&n(e).removeClass(t.ACTIVE),u.getAttribute("role")==="tab"&&u.setAttribute("aria-selected",!1));n(r).addClass(t.ACTIVE);r.getAttribute("role")==="tab"&&r.setAttribute("aria-selected",!0);Util.reflow(r);n(r).addClass(t.SHOW);r.parentNode&&n(r.parentNode).hasClass(t.DROPDOWN_MENU)&&(o=n(r).closest(i.DROPDOWN)[0],o&&n(o).find(i.DROPDOWN_TOGGLE).addClass(t.ACTIVE),r.setAttribute("aria-expanded",!0));f&&f()},r._jQueryInterface=function(t){return this.each(function(){var u=n(this),i=u.data(o);if(i||(i=new r(this),u.data(o,i)),typeof t=="string"){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},_createClass(r,null,[{key:"VERSION",get:function(){return s}}]),r}();n(document).on(f.CLICK_DATA_API,i.DATA_TOGGLE,function(t){t.preventDefault();e._jQueryInterface.call(n(this),"show")});return n.fn[r]=e._jQueryInterface,n.fn[r].Constructor=e,n.fn[r].noConflict=function(){return n.fn[r]=h,e._jQueryInterface},e}($),Tooltip=function(n){var f="tooltip",c="4.0.0",e="bs.tooltip",t="."+e,l=n.fn[f],a=150,s="bs-tooltip",v=new RegExp("(^|\\s)"+s+"\\S+","g"),y={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},p={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},w={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},u={SHOW:"show",OUT:"out"},b={HIDE:"hide"+t,HIDDEN:"hidden"+t,SHOW:"show"+t,SHOWN:"shown"+t,INSERTED:"inserted"+t,CLICK:"click"+t,FOCUSIN:"focusin"+t,FOCUSOUT:"focusout"+t,MOUSEENTER:"mouseenter"+t,MOUSELEAVE:"mouseleave"+t},i={FADE:"fade",SHOW:"show"},h={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},r={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},o=function(){function l(n,t){if(typeof Popper=="undefined")throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var o=l.prototype;return o.enable=function(){this._isEnabled=!0},o.disable=function(){this._isEnabled=!1},o.toggleEnabled=function(){this._isEnabled=!this._isEnabled},o.toggle=function(t){if(this._isEnabled)if(t){var u=this.constructor.DATA_KEY,r=n(t.currentTarget).data(u);r||(r=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(u,r));r._activeTrigger.click=!r._activeTrigger.click;r._isWithActiveTrigger()?r._enter(null,r):r._leave(null,r)}else{if(n(this.getTipElement()).hasClass(i.SHOW)){this._leave(null,this);return}this._enter(null,this)}},o.dispose=function(){clearTimeout(this._timeout);n.removeData(this.element,this.constructor.DATA_KEY);n(this.element).off(this.constructor.EVENT_KEY);n(this.element).closest(".modal").off("hide.bs.modal");this.tip&&n(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;this._popper!==null&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},o.show=function(){var t=this,f,c,r,e,a,o,v,s;if(n(this.element).css("display")==="none")throw new Error("Please use show on visible elements");if(f=n.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(n(this.element).trigger(f),c=n.contains(this.element.ownerDocument.documentElement,this.element),f.isDefaultPrevented()||!c)return;if(r=this.getTipElement(),e=Util.getUID(this.constructor.NAME),r.setAttribute("id",e),this.element.setAttribute("aria-describedby",e),this.setContent(),this.config.animation&&n(r).addClass(i.FADE),a=typeof this.config.placement=="function"?this.config.placement.call(this,r,this.element):this.config.placement,o=this._getAttachment(a),this.addAttachmentClass(o),v=this.config.container===!1?document.body:n(this.config.container),n(r).data(this.constructor.DATA_KEY,this),n.contains(this.element.ownerDocument.documentElement,this.tip)||n(r).appendTo(v),n(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new Popper(this.element,r,{placement:o,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:h.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(n){n.originalPlacement!==n.placement&&t._handlePopperPlacementChange(n)},onUpdate:function(n){t._handlePopperPlacementChange(n)}}),n(r).addClass(i.SHOW),"ontouchstart"in document.documentElement)n("body").children().on("mouseover",null,n.noop);s=function(){t.config.animation&&t._fixTransition();var i=t._hoverState;t._hoverState=null;n(t.element).trigger(t.constructor.Event.SHOWN);i===u.OUT&&t._leave(null,t)};Util.supportsTransitionEnd()&&n(this.tip).hasClass(i.FADE)?n(this.tip).one(Util.TRANSITION_END,s).emulateTransitionEnd(l._TRANSITION_DURATION):s()}},o.hide=function(t){var f=this,e=this.getTipElement(),o=n.Event(this.constructor.Event.HIDE),s=function(){f._hoverState!==u.SHOW&&e.parentNode&&e.parentNode.removeChild(e);f._cleanTipClass();f.element.removeAttribute("aria-describedby");n(f.element).trigger(f.constructor.Event.HIDDEN);f._popper!==null&&f._popper.destroy();t&&t()};(n(this.element).trigger(o),o.isDefaultPrevented())||(n(e).removeClass(i.SHOW),"ontouchstart"in document.documentElement&&n("body").children().off("mouseover",null,n.noop),this._activeTrigger[r.CLICK]=!1,this._activeTrigger[r.FOCUS]=!1,this._activeTrigger[r.HOVER]=!1,Util.supportsTransitionEnd()&&n(this.tip).hasClass(i.FADE)?n(e).one(Util.TRANSITION_END,s).emulateTransitionEnd(a):s(),this._hoverState="")},o.update=function(){this._popper!==null&&this._popper.scheduleUpdate()},o.isWithContent=function(){return Boolean(this.getTitle())},o.addAttachmentClass=function(t){n(this.getTipElement()).addClass(s+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||n(this.config.template)[0],this.tip},o.setContent=function(){var t=n(this.getTipElement());this.setElementContent(t.find(h.TOOLTIP_INNER),this.getTitle());t.removeClass(i.FADE+" "+i.SHOW)},o.setElementContent=function(t,i){var r=this.config.html;typeof i=="object"&&(i.nodeType||i.jquery)?r?n(i).parent().is(t)||t.empty().append(i):t.text(n(i).text()):t[r?"html":"text"](i)},o.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n=typeof this.config.title=="function"?this.config.title.call(this.element):this.config.title),n},o._getAttachment=function(n){return p[n.toUpperCase()]},o._setListeners=function(){var t=this,i=this.config.trigger.split(" ");i.forEach(function(i){if(i==="click")n(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(n){return t.toggle(n)});else if(i!==r.MANUAL){var u=i===r.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,f=i===r.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;n(t.element).on(u,t.config.selector,function(n){return t._enter(n)}).on(f,t.config.selector,function(n){return t._leave(n)})}n(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})});this.config.selector?this.config=_extends({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},o._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||n!=="string")&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},o._enter=function(t,f){var e=this.constructor.DATA_KEY;if(f=f||n(t.currentTarget).data(e),f||(f=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(e,f)),t&&(f._activeTrigger[t.type==="focusin"?r.FOCUS:r.HOVER]=!0),n(f.getTipElement()).hasClass(i.SHOW)||f._hoverState===u.SHOW){f._hoverState=u.SHOW;return}if(clearTimeout(f._timeout),f._hoverState=u.SHOW,!f.config.delay||!f.config.delay.show){f.show();return}f._timeout=setTimeout(function(){f._hoverState===u.SHOW&&f.show()},f.config.delay.show)},o._leave=function(t,i){var f=this.constructor.DATA_KEY;if(i=i||n(t.currentTarget).data(f),i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),n(t.currentTarget).data(f,i)),t&&(i._activeTrigger[t.type==="focusout"?r.FOCUS:r.HOVER]=!1),!i._isWithActiveTrigger()){if(clearTimeout(i._timeout),i._hoverState=u.OUT,!i.config.delay||!i.config.delay.hide){i.hide();return}i._timeout=setTimeout(function(){i._hoverState===u.OUT&&i.hide()},i.config.delay.hide)}},o._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},o._getConfig=function(t){return t=_extends({},this.constructor.Default,n(this.element).data(),t),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),Util.typeCheckConfig(f,t,this.constructor.DefaultType),t},o._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},o._cleanTipClass=function(){var i=n(this.getTipElement()),t=i.attr("class").match(v);t!==null&&t.length>0&&i.removeClass(t.join(""))},o._handlePopperPlacementChange=function(n){this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},o._fixTransition=function(){var t=this.getTipElement(),r=this.config.animation;t.getAttribute("x-placement")===null&&(n(t).removeClass(i.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=r)},l._jQueryInterface=function(t){return this.each(function(){var i=n(this).data(e),r=typeof t=="object"&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new l(this,r),n(this).data(e,i)),typeof t=="string")){if(typeof i[t]=="undefined")throw new TypeError('No method named "'+t+'"');i[t]()}})},_createClass(l,null,[{key:"VERSION",get:function(){return c}},{key:"Default",get:function(){return w}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return e}},{key:"Event",get:function(){return b}},{key:"EVENT_KEY",get:function(){return t}},{key:"DefaultType",get:function(){return y}}]),l}();return n.fn[f]=o._jQueryInterface,n.fn[f].Constructor=o,n.fn[f].noConflict=function(){return n.fn[f]=l,o._jQueryInterface},o}($,Popper),Modal=function(n){var f="modal",l="4.0.0",e="bs.modal",r="."+e,a=n.fn[f],s=300,h=150,v=27,c={backdrop:!0,keyboard:!0,focus:!0,show:!0},y={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},t={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,FOCUSIN:"focusin"+r,RESIZE:"resize"+r,CLICK_DISMISS:"click.dismiss"+r,KEYDOWN_DISMISS:"keydown.dismiss"+r,MOUSEUP_DISMISS:"mouseup.dismiss"+r,MOUSEDOWN_DISMISS:"mousedown.dismiss"+r,CLICK_DATA_API:"click"+r+".data-api"},i={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},u={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},o=function(){function a(t,i){this._config=this._getConfig(i);this._element=t;this._dialog=n(t).find(u.DIALOG)[0];this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._originalBodyPadding=0;this._scrollbarWidth=0}var o=a.prototype;return o.toggle=function(n){return this._isShown?this.hide():this.show(n)},o.show=function(r){var f=this,e;if(!this._isTransitioning&&!this._isShown&&(Util.supportsTransitionEnd()&&n(this._element).hasClass(i.FADE)&&(this._isTransitioning=!0),e=n.Event(t.SHOW,{relatedTarget:r}),n(this._element).trigger(e),!this._isShown&&!e.isDefaultPrevented())){this._isShown=!0;this._checkScrollbar();this._setScrollbar();this._adjustDialog();n(document.body).addClass(i.OPEN);this._setEscapeEvent();this._setResizeEvent();n(this._element).on(t.CLICK_DISMISS,u.DATA_DISMISS,function(n){return f.hide(n)});n(this._dialog).on(t.MOUSEDOWN_DISMISS,function(){n(f._element).one(t.MOUSEUP_DISMISS,function(t){n(t.target).is(f._element)&&(f._ignoreBackdropClick=!0)})});this._showBackdrop(function(){return f._showElement(r)})}},o.hide=function(r){var e=this,u,f;(r&&r.preventDefault(),!this._isTransitioning&&this._isShown)&&(u=n.Event(t.HIDE),n(this._element).trigger(u),this._isShown&&!u.isDefaultPrevented())&&(this._isShown=!1,f=Util.supportsTransitionEnd()&&n(this._element).hasClass(i.FADE),f&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),n(document).off(t.FOCUSIN),n(this._element).removeClass(i.SHOW),n(this._element).off(t.CLICK_DISMISS),n(this._dialog).off(t.MOUSEDOWN_DISMISS),f?n(this._element).one(Util.TRANSITION_END,function(n){return e._hideModal(n)}).emulateTransitionEnd(s):this._hideModal())},o.dispose=function(){n.removeData(this._element,e);n(window,document,this._element,this._backdrop).off(r);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._scrollbarWidth=null},o.handleUpdate=function(){this._adjustDialog()},o._getConfig=function(n){return n=_extends({},c,n),Util.typeCheckConfig(f,n,y),n},o._showElement=function(r){var u=this,e=Util.supportsTransitionEnd()&&n(this._element).hasClass(i.FADE),o,f;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.scrollTop=0;e&&Util.reflow(this._element);n(this._element).addClass(i.SHOW);this._config.focus&&this._enforceFocus();o=n.Event(t.SHOWN,{relatedTarget:r});f=function(){u._config.focus&&u._element.focus();u._isTransitioning=!1;n(u._element).trigger(o)};e?n(this._dialog).one(Util.TRANSITION_END,f).emulateTransitionEnd(s):f()},o._enforceFocus=function(){var i=this;n(document).off(t.FOCUSIN).on(t.FOCUSIN,function(t){document!==t.target&&i._element!==t.target&&n(i._element).has(t.target).length===0&&i._element.focus()})},o._setEscapeEvent=function(){var i=this;if(this._isShown&&this._config.keyboard)n(this._element).on(t.KEYDOWN_DISMISS,function(n){n.which===v&&(n.preventDefault(),i.hide())});else this._isShown||n(this._element).off(t.KEYDOWN_DISMISS)},o._setResizeEvent=function(){var i=this;if(this._isShown)n(window).on(t.RESIZE,function(n){return i.handleUpdate(n)});else n(window).off(t.RESIZE)},o._hideModal=function(){var r=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._isTransitioning=!1;this._showBackdrop(function(){n(document.body).removeClass(i.OPEN);r._resetAdjustments();r._resetScrollbar();n(r._element).trigger(t.HIDDEN)})},o._removeBackdrop=function(){this._backdrop&&(n(this._backdrop).remove(),this._backdrop=null)},o._showBackdrop=function(r){var u=this,f=n(this._element).hasClass(i.FADE)?i.FADE:"",e,o;if(this._isShown&&this._config.backdrop){e=Util.supportsTransitionEnd()&&f;this._backdrop=document.createElement("div");this._backdrop.className=i.BACKDROP;f&&n(this._backdrop).addClass(f);n(this._backdrop).appendTo(document.body);n(this._element).on(t.CLICK_DISMISS,function(n){if(u._ignoreBackdropClick){u._ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(u._config.backdrop==="static"?u._element.focus():u.hide())});if(e&&Util.reflow(this._backdrop),n(this._backdrop).addClass(i.SHOW),!r)return;if(!e){r();return}n(this._backdrop).one(Util.TRANSITION_END,r).emulateTransitionEnd(h)}else!this._isShown&&this._backdrop?(n(this._backdrop).removeClass(i.SHOW),o=function(){u._removeBackdrop();r&&r()},Util.supportsTransitionEnd()&&n(this._element).hasClass(i.FADE)?n(this._backdrop).one(Util.TRANSITION_END,o).emulateTransitionEnd(h):o()):r&&r()},o._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},o._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},o._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},o._setScrollbar=function(){var t=this,i,r;this._isBodyOverflowing&&(n(u.FIXED_CONTENT).each(function(i,r){var u=n(r)[0].style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t._scrollbarWidth+"px")}),n(u.STICKY_CONTENT).each(function(i,r){var u=n(r)[0].style.marginRight,f=n(r).css("margin-right");n(r).data("margin-right",u).css("margin-right",parseFloat(f)-t._scrollbarWidth+"px")}),n(u.NAVBAR_TOGGLER).each(function(i,r){var u=n(r)[0].style.marginRight,f=n(r).css("margin-right");n(r).data("margin-right",u).css("margin-right",parseFloat(f)+t._scrollbarWidth+"px")}),i=document.body.style.paddingRight,r=n("body").css("padding-right"),n("body").data("padding-right",i).css("padding-right",parseFloat(r)+this._scrollbarWidth+"px"))},o._resetScrollbar=function(){n(u.FIXED_CONTENT).each(function(t,i){var r=n(i).data("padding-right");typeof r!="undefined"&&n(i).css("padding-right",r).removeData("padding-right")});n(u.STICKY_CONTENT+", "+u.NAVBAR_TOGGLER).each(function(t,i){var r=n(i).data("margin-right");typeof r!="undefined"&&n(i).css("margin-right",r).removeData("margin-right")});var t=n("body").data("padding-right");typeof t!="undefined"&&n("body").css("padding-right",t).removeData("padding-right")},o._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=i.SCROLLBAR_MEASURER,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},a._jQueryInterface=function(t,i){return this.each(function(){var r=n(this).data(e),u=_extends({},a.Default,n(this).data(),typeof t=="object"&&t);if(r||(r=new a(this,u),n(this).data(e,r)),typeof t=="string"){if(typeof r[t]=="undefined")throw new TypeError('No method named "'+t+'"');r[t](i)}else u.show&&r.show(i)})},_createClass(a,null,[{key:"VERSION",get:function(){return l}},{key:"Default",get:function(){return c}}]),a}();n(document).on(t.CLICK_DATA_API,u.DATA_TOGGLE,function(i){var u=this,r,f=Util.getSelectorFromElement(this),s,h;f&&(r=n(f)[0]);s=n(r).data(e)?"toggle":_extends({},n(r).data(),n(this).data());(this.tagName==="A"||this.tagName==="AREA")&&i.preventDefault();h=n(r).one(t.SHOW,function(i){if(!i.isDefaultPrevented())h.one(t.HIDDEN,function(){n(u).is(":visible")&&u.focus()})});o._jQueryInterface.call(n(r),s,this)});return n.fn[f]=o._jQueryInterface,n.fn[f].Constructor=o,n.fn[f].noConflict=function(){return n.fn[f]=a,o._jQueryInterface},o}($);