Comparing version 4.0.0-alpha.4 to 4.0.0-alpha.5
@@ -5,2 +5,2 @@ Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs. | ||
Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. | ||
Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. |
/*! | ||
* Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com) | ||
* Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com) | ||
* Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
*/ | ||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(a){"use strict";function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=function(a,b,c){for(var d=!0;d;){var e=a,f=b,g=c;d=!1,null===e&&(e=Function.prototype);var h=Object.getOwnPropertyDescriptor(e,f);if(void 0!==h){if("value"in h)return h.value;var i=h.get;if(void 0===i)return;return i.call(g)}var j=Object.getPrototypeOf(e);if(null===j)return;a=j,b=f,c=g,d=!0,h=j=void 0}},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(a){return(a[0]||a).nodeType}function d(){return{bindType:h.end,delegateType:h.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function e(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in j)if(void 0!==a.style[b])return{end:j[b]};return!1}function f(b){var c=this,d=!1;return a(this).one(k.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||k.triggerTransitionEnd(c)},b),this}function g(){h=e(),a.fn.emulateTransitionEnd=f,k.supportsTransitionEnd()&&(a.event.special[k.TRANSITION_END]=d())}var h=!1,i=1e6,j={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},k={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(Math.random()*i);while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},typeCheckConfig:function(a,d,e){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=d[f],i=void 0;if(i=h&&c(h)?"element":b(h),!new RegExp(g).test(i))throw new Error(a.toUpperCase()+": "+('Option "'+f+'" provided type "'+i+'" ')+('but expected type "'+g+'".'))}}};return g(),k}(jQuery),g=(function(a){var b="alert",d="4.0.0-alpha.4",g="bs.alert",h="."+g,i=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+i},n={ALERT:"alert",FADE:"fade",IN:"in"},o=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,g),this._element=null}},{key:"_getRootElement",value:function(b){var c=f.getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest("."+n.ALERT)[0]),d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){return a(b).removeClass(n.IN),f.supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(f.TRANSITION_END,a.proxy(this._destroyElement,this,b)).emulateTransitionEnd(k):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);e||(e=new b(this),d.data(g,e)),"close"===c&&e[c](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){var b="button",d="4.0.0-alpha.4",f="bs.button",g="."+f,h=".data-api",i=a.fn[b],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click"+g+h,FOCUS_BLUR_DATA_API:"focus"+g+h+" "+("blur"+g+h)},m=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"toggle",value:function(){var b=!0,c=a(this._element).closest(k.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(k.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var e=a(c).find(k.ACTIVE)[0];e&&a(e).removeClass(j.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(j.ACTIVE),a(this._element).trigger("change")),d.focus()}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE));b&&a(this._element).toggleClass(j.ACTIVE)}},{key:"dispose",value:function(){a.removeData(this._element,f),this._element=null}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(f);d||(d=new b(this),a(this).data(f,d)),"toggle"===c&&d[c]()})}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[b]=m._jQueryInterface,a.fn[b].Constructor=m,a.fn[b].noConflict=function(){return a.fn[b]=i,m._jQueryInterface},m}(jQuery),function(a){var b="carousel",d="4.0.0-alpha.4",g="bs.carousel",h="."+g,i=".data-api",j=a.fn[b],k=600,l=37,m=39,n={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},o={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},p={NEXT:"next",PREVIOUS:"prev"},q={SLIDE:"slide"+h,SLID:"slid"+h,KEYDOWN:"keydown"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h,LOAD_DATA_API:"load"+h+i,CLICK_DATA_API:"click"+h+i},r={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},s={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},t=function(){function i(b,d){c(this,i),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(d),this._element=a(b)[0],this._indicatorsElement=a(this._element).find(s.INDICATORS)[0],this._addEventListeners()}return e(i,[{key:"next",value:function(){this._isSliding||this._slide(p.NEXT)}},{key:"nextWhenVisible",value:function(){document.hidden||this.next()}},{key:"prev",value:function(){this._isSliding||this._slide(p.PREVIOUS)}},{key:"pause",value:function(b){b||(this._isPaused=!0),a(this._element).find(s.NEXT_PREV)[0]&&f.supportsTransitionEnd()&&(f.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function(b){b||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(a.proxy(document.visibilityState?this.nextWhenVisible:this.next,this),this._config.interval))}},{key:"to",value:function(b){var c=this;this._activeElement=a(this._element).find(s.ACTIVE_ITEM)[0];var d=this._getItemIndex(this._activeElement);if(!(b>this._items.length-1||b<0)){if(this._isSliding)return void a(this._element).one(q.SLID,function(){return c.to(b)});if(d===b)return this.pause(),void this.cycle();var e=b>d?p.NEXT:p.PREVIOUS;this._slide(e,this._items[b])}}},{key:"dispose",value:function(){a(this._element).off(h),a.removeData(this._element,g),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null}},{key:"_getConfig",value:function(c){return c=a.extend({},n,c),f.typeCheckConfig(b,c,o),c}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on(q.KEYDOWN,a.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(q.MOUSEENTER,a.proxy(this.pause,this)).on(q.MOUSELEAVE,a.proxy(this.cycle,this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case l:this.prev();break;case m:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(s.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===p.NEXT,d=a===p.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e===f;if(g&&!this._config.wrap)return b;var h=a===p.PREVIOUS?-1:1,i=(e+h)%this._items.length;return i===-1?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(q.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(s.ACTIVE).removeClass(r.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(r.ACTIVE)}}},{key:"_slide",value:function(b,c){var d=this,e=a(this._element).find(s.ACTIVE_ITEM)[0],g=c||e&&this._getItemByDirection(b,e),h=Boolean(this._interval),i=b===p.NEXT?r.LEFT:r.RIGHT;if(g&&a(g).hasClass(r.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&e&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var l=a.Event(q.SLID,{relatedTarget:g,direction:i});f.supportsTransitionEnd()&&a(this._element).hasClass(r.SLIDE)?(a(g).addClass(b),f.reflow(g),a(e).addClass(i),a(g).addClass(i),a(e).one(f.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(r.ACTIVE),a(e).removeClass(r.ACTIVE).removeClass(b).removeClass(i),d._isSliding=!1,setTimeout(function(){return a(d._element).trigger(l)},0)}).emulateTransitionEnd(k)):(a(e).removeClass(r.ACTIVE),a(g).addClass(r.ACTIVE),this._isSliding=!1,a(this._element).trigger(l)),h&&this.cycle()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},n,a(this).data());"object"==typeof b&&a.extend(d,b);var e="string"==typeof b?b:d.slide;if(c||(c=new i(this,d),a(this).data(g,c)),"number"==typeof b)c.to(b);else if("string"==typeof e){if(void 0===c[e])throw new Error('No method named "'+e+'"');c[e]()}else d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=f.getSelectorFromElement(this);if(c){var d=a(c)[0];if(d&&a(d).hasClass(r.CAROUSEL)){var e=a.extend({},a(d).data(),a(this).data()),h=this.getAttribute("data-slide-to");h&&(e.interval=!1),i._jQueryInterface.call(a(d),e),h&&a(d).data(g).to(h),b.preventDefault()}}}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return n}}]),i}();return a(document).on(q.CLICK_DATA_API,s.DATA_SLIDE,t._dataApiClickHandler),a(window).on(q.LOAD_DATA_API,function(){a(s.DATA_RIDE).each(function(){var b=a(this);t._jQueryInterface.call(b,b.data())})}),a.fn[b]=t._jQueryInterface,a.fn[b].Constructor=t,a.fn[b].noConflict=function(){return a.fn[b]=j,t._jQueryInterface},t}(jQuery),function(a){var b="collapse",d="4.0.0-alpha.4",g="bs.collapse",h="."+g,i=".data-api",j=a.fn[b],k=600,l={toggle:!0,parent:""},m={toggle:"boolean",parent:"string"},n={SHOW:"show"+h,SHOWN:"shown"+h,HIDE:"hide"+h,HIDDEN:"hidden"+h,CLICK_DATA_API:"click"+h+i},o={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},q={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},r=function(){function h(b,d){c(this,h),this._isTransitioning=!1,this._element=b,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+b.id+'"],'+('[data-toggle="collapse"][data-target="#'+b.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return e(h,[{key:"toggle",value:function(){a(this._element).hasClass(o.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(o.IN)){var c=void 0,d=void 0;if(this._parent&&(c=a.makeArray(a(q.ACTIVES)),c.length||(c=null)),!(c&&(d=a(c).data(g),d&&d._isTransitioning))){var e=a.Event(n.SHOW);if(a(this._element).trigger(e),!e.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c),"hide"),d||a(c).data(g,null));var i=this._getDimension();a(this._element).removeClass(o.COLLAPSE).addClass(o.COLLAPSING),this._element.style[i]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(o.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).addClass(o.IN),b._element.style[i]="",b.setTransitioning(!1),a(b._element).trigger(n.SHOWN)};if(!f.supportsTransitionEnd())return void j();var l=i[0].toUpperCase()+i.slice(1),m="scroll"+l;a(this._element).one(f.TRANSITION_END,j).emulateTransitionEnd(k),this._element.style[i]=this._element[m]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(o.IN)){var c=a.Event(n.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension(),e=d===p.WIDTH?"offsetWidth":"offsetHeight";this._element.style[d]=this._element[e]+"px",f.reflow(this._element),a(this._element).addClass(o.COLLAPSING).removeClass(o.COLLAPSE).removeClass(o.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(o.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(o.COLLAPSING).addClass(o.COLLAPSE).trigger(n.HIDDEN)};return this._element.style[d]=0,f.supportsTransitionEnd()?void a(this._element).one(f.TRANSITION_END,g).emulateTransitionEnd(k):void g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"dispose",value:function(){a.removeData(this._element,g),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null}},{key:"_getConfig",value:function(c){return c=a.extend({},l,c),c.toggle=Boolean(c.toggle),f.typeCheckConfig(b,c,m),c}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(p.WIDTH);return b?p.WIDTH:p.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(h._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(o.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(o.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"_getTargetFromElement",value:function(b){var c=f.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),e=a.extend({},l,c.data(),"object"==typeof b&&b);if(!d&&e.toggle&&/show|hide/.test(b)&&(e.toggle=!1),d||(d=new h(this,e),c.data(g,d)),"string"==typeof b){if(void 0===d[b])throw new Error('No method named "'+b+'"');d[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}}]),h}();return a(document).on(n.CLICK_DATA_API,q.DATA_TOGGLE,function(b){b.preventDefault();var c=r._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();r._jQueryInterface.call(a(c),e)}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="dropdown",d="4.0.0-alpha.4",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[b],k=27,l=38,m=40,n=3,o={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},p={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},q={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'},r=function(){function b(a){c(this,b),this._element=a,this._addEventListeners()}return e(b,[{key:"toggle",value:function(){if(this.disabled||a(this).hasClass(p.DISABLED))return!1;var c=b._getParentFromElement(this),d=a(c).hasClass(p.OPEN);if(b._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(c).closest(q.NAVBAR_NAV).length){var e=document.createElement("div");e.className=p.BACKDROP,a(e).insertBefore(this),a(e).on("click",b._clearMenus)}var f={relatedTarget:this},g=a.Event(o.SHOW,f);return a(c).trigger(g),!g.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),a(c).toggleClass(p.OPEN),a(c).trigger(a.Event(o.SHOWN,f)),!1)}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null}},{key:"_addEventListeners",value:function(){a(this._element).on(o.CLICK,this.toggle)}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(g);if(d||a(this).data(g,d=new b(this)),"string"==typeof c){if(void 0===d[c])throw new Error('No method named "'+c+'"');d[c].call(this)}})}},{key:"_clearMenus",value:function(c){if(!c||c.which!==n){var d=a(q.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(q.DATA_TOGGLE)),f=0;f<e.length;f++){var g=b._getParentFromElement(e[f]),h={relatedTarget:e[f]};if(a(g).hasClass(p.OPEN)&&!(c&&"click"===c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(g,c.target))){var i=a.Event(o.HIDE,h);a(g).trigger(i),i.isDefaultPrevented()||(e[f].setAttribute("aria-expanded","false"),a(g).removeClass(p.OPEN).trigger(a.Event(o.HIDDEN,h)))}}}}},{key:"_getParentFromElement",value:function(b){var c=void 0,d=f.getSelectorFromElement(b);return d&&(c=a(d)[0]),c||b.parentNode}},{key:"_dataApiKeydownHandler",value:function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)&&(c.preventDefault(),c.stopPropagation(),!this.disabled&&!a(this).hasClass(p.DISABLED))){var d=b._getParentFromElement(this),e=a(d).hasClass(p.OPEN);if(!e&&c.which!==k||e&&c.which===k){if(c.which===k){var f=a(d).find(q.DATA_TOGGLE)[0];a(f).trigger("focus")}return void a(this).trigger("click")}var g=a.makeArray(a(q.VISIBLE_ITEMS));if(g=g.filter(function(a){return a.offsetWidth||a.offsetHeight}),g.length){var h=g.indexOf(c.target);c.which===l&&h>0&&h--,c.which===m&&h<g.length-1&&h++,h<0&&(h=0),g[h].focus()}}}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(o.KEYDOWN_DATA_API,q.DATA_TOGGLE,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_MENU,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_LISTBOX,r._dataApiKeydownHandler).on(o.CLICK_DATA_API,r._clearMenus).on(o.CLICK_DATA_API,q.DATA_TOGGLE,r.prototype.toggle).on(o.CLICK_DATA_API,q.FORM_CHILD,function(a){a.stopPropagation()}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="modal",d="4.0.0-alpha.4",g="bs.modal",h="."+g,i=".data-api",j=a.fn[b],k=300,l=150,m=27,n={backdrop:!0,keyboard:!0,focus:!0,show:!0},o={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,FOCUSIN:"focusin"+h,RESIZE:"resize"+h,CLICK_DISMISS:"click.dismiss"+h,KEYDOWN_DISMISS:"keydown.dismiss"+h,MOUSEUP_DISMISS:"mouseup.dismiss"+h,MOUSEDOWN_DISMISS:"mousedown.dismiss"+h,CLICK_DATA_API:"click"+h+i},q={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},r={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},s=function(){function i(b,d){c(this,i),this._config=this._getConfig(d),this._element=b,this._dialog=a(b).find(r.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return e(i,[{key:"toggle",value:function(a){return this._isShown?this.hide():this.show(a)}},{key:"show",value:function(b){var c=this,d=a.Event(p.SHOW,{relatedTarget:b});a(this._element).trigger(d),this._isShown||d.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),a(document.body).addClass(q.OPEN),this._setEscapeEvent(),this._setResizeEvent(),a(this._element).on(p.CLICK_DISMISS,r.DATA_DISMISS,a.proxy(this.hide,this)),a(this._dialog).on(p.MOUSEDOWN_DISMISS,function(){a(c._element).one(p.MOUSEUP_DISMISS,function(b){a(b.target).is(c._element)&&(c._ignoreBackdropClick=!0)})}),this._showBackdrop(a.proxy(this._showElement,this,b)))}},{key:"hide",value:function(b){b&&b.preventDefault();var c=a.Event(p.HIDE);a(this._element).trigger(c),this._isShown&&!c.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),a(document).off(p.FOCUSIN),a(this._element).removeClass(q.IN),a(this._element).off(p.CLICK_DISMISS),a(this._dialog).off(p.MOUSEDOWN_DISMISS),f.supportsTransitionEnd()&&a(this._element).hasClass(q.FADE)?a(this._element).one(f.TRANSITION_END,a.proxy(this._hideModal,this)).emulateTransitionEnd(k):this._hideModal())}},{key:"dispose",value:function(){a.removeData(this._element,g),a(window).off(h),a(document).off(h),a(this._element).off(h),a(this._backdrop).off(h),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null}},{key:"_getConfig",value:function(c){return c=a.extend({},n,c),f.typeCheckConfig(b,c,o),c}},{key:"_showElement",value:function(b){var c=this,d=f.supportsTransitionEnd()&&a(this._element).hasClass(q.FADE);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,d&&f.reflow(this._element),a(this._element).addClass(q.IN),this._config.focus&&this._enforceFocus();var e=a.Event(p.SHOWN,{relatedTarget:b}),g=function(){c._config.focus&&c._element.focus(),a(c._element).trigger(e)};d?a(this._dialog).one(f.TRANSITION_END,g).emulateTransitionEnd(k):g()}},{key:"_enforceFocus",value:function(){var b=this;a(document).off(p.FOCUSIN).on(p.FOCUSIN,function(c){document===c.target||b._element===c.target||a(b._element).has(c.target).length||b._element.focus()})}},{key:"_setEscapeEvent",value:function(){var b=this;this._isShown&&this._config.keyboard?a(this._element).on(p.KEYDOWN_DISMISS,function(a){a.which===m&&b.hide()}):this._isShown||a(this._element).off(p.KEYDOWN_DISMISS)}},{key:"_setResizeEvent",value:function(){this._isShown?a(window).on(p.RESIZE,a.proxy(this._handleUpdate,this)):a(window).off(p.RESIZE)}},{key:"_hideModal",value:function(){var b=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._showBackdrop(function(){a(document.body).removeClass(q.OPEN),b._resetAdjustments(),b._resetScrollbar(),a(b._element).trigger(p.HIDDEN)})}},{key:"_removeBackdrop",value:function(){this._backdrop&&(a(this._backdrop).remove(),this._backdrop=null)}},{key:"_showBackdrop",value:function(b){var c=this,d=a(this._element).hasClass(q.FADE)?q.FADE:"";if(this._isShown&&this._config.backdrop){var e=f.supportsTransitionEnd()&&d;if(this._backdrop=document.createElement("div"),this._backdrop.className=q.BACKDROP,d&&a(this._backdrop).addClass(d),a(this._backdrop).appendTo(document.body),a(this._element).on(p.CLICK_DISMISS,function(a){return c._ignoreBackdropClick?void(c._ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"===c._config.backdrop?c._element.focus():c.hide()))}),e&&f.reflow(this._backdrop),a(this._backdrop).addClass(q.IN),!b)return;if(!e)return void b();a(this._backdrop).one(f.TRANSITION_END,b).emulateTransitionEnd(l)}else if(!this._isShown&&this._backdrop){a(this._backdrop).removeClass(q.IN);var g=function(){c._removeBackdrop(),b&&b()};f.supportsTransitionEnd()&&a(this._element).hasClass(q.FADE)?a(this._backdrop).one(f.TRANSITION_END,g).emulateTransitionEnd(l):g()}else b&&b()}},{key:"_handleUpdate",value:function(){this._adjustDialog()}},{key:"_adjustDialog",value:function(){var a=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()}},{key:"_setScrollbar",value:function(){var b=parseInt(a(r.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=b+this._scrollbarWidth+"px")}},{key:"_resetScrollbar",value:function(){document.body.style.paddingRight=this._originalBodyPadding}},{key:"_getScrollbarWidth",value:function(){var a=document.createElement("div");a.className=q.SCROLLBAR_MEASURER,document.body.appendChild(a);var b=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),b}}],[{key:"_jQueryInterface",value:function(b,c){return this.each(function(){var d=a(this).data(g),e=a.extend({},i.Default,a(this).data(),"object"==typeof b&&b);if(d||(d=new i(this,e),a(this).data(g,d)),"string"==typeof b){if(void 0===d[b])throw new Error('No method named "'+b+'"');d[b](c)}else e.show&&d.show(c)})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return n}}]),i}();return a(document).on(p.CLICK_DATA_API,r.DATA_TOGGLE,function(b){var c=this,d=void 0,e=f.getSelectorFromElement(this);e&&(d=a(e)[0]);var h=a(d).data(g)?"toggle":a.extend({},a(d).data(),a(this).data());"A"===this.tagName&&b.preventDefault();var i=a(d).one(p.SHOW,function(b){b.isDefaultPrevented()||i.one(p.HIDDEN,function(){a(c).is(":visible")&&c.focus()})});s._jQueryInterface.call(a(d),h,this)}),a.fn[b]=s._jQueryInterface,a.fn[b].Constructor=s,a.fn[b].noConflict=function(){return a.fn[b]=j,s._jQueryInterface},s}(jQuery),function(a){var b="scrollspy",d="4.0.0-alpha.4",g="bs.scrollspy",h="."+g,i=".data-api",j=a.fn[b],k={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},m={ACTIVATE:"activate"+h,SCROLL:"scroll"+h,LOAD_DATA_API:"load"+h+i},n={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},o={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},p={OFFSET:"offset",POSITION:"position"},q=function(){function i(b,d){c(this,i),this._element=b,this._scrollElement="BODY"===b.tagName?window:b,this._config=this._getConfig(d),this._selector=this._config.target+" "+o.NAV_LINKS+","+(this._config.target+" "+o.DROPDOWN_ITEMS),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(m.SCROLL,a.proxy(this._process,this)),this.refresh(),this._process()}return e(i,[{key:"refresh",value:function(){var b=this,c=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,d="auto"===this._config.method?c:this._config.method,e=d===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var g=a.makeArray(a(this._selector));g.map(function(b){var c=void 0,g=f.getSelectorFromElement(b);return g&&(c=a(g)[0]),c&&(c.offsetWidth||c.offsetHeight)?[a(c)[d]().top+e,g]:null}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})}},{key:"dispose",value:function(){a.removeData(this._element,g),a(this._scrollElement).off(h),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(c){if(c=a.extend({},k,c),"string"!=typeof c.target){var d=a(c.target).attr("id");d||(d=f.getUID(b),a(c.target).attr("id",d)),c.target="#"+d}return f.typeCheckConfig(b,c,l),c}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a<this._offsets[0])return this._activeTarget=null,void this._clear();for(var e=this._offsets.length;e--;){var f=this._activeTarget!==this._targets[e]&&a>=this._offsets[e]&&(void 0===this._offsets[e+1]||a<this._offsets[e+1]);f&&this._activate(this._targets[e])}}},{key:"_activate",value:function(b){this._activeTarget=b,this._clear();var c=this._selector.split(",");c=c.map(function(a){return a+'[data-target="'+b+'"],'+(a+'[href="'+b+'"]')});var d=a(c.join(","));d.hasClass(n.DROPDOWN_ITEM)?(d.closest(o.DROPDOWN).find(o.DROPDOWN_TOGGLE).addClass(n.ACTIVE),d.addClass(n.ACTIVE)):d.parents(o.LI).find(o.NAV_LINKS).addClass(n.ACTIVE),a(this._scrollElement).trigger(m.ACTIVATE,{relatedTarget:b})}},{key:"_clear",value:function(){a(this._selector).filter(o.ACTIVE).removeClass(n.ACTIVE)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b&&b||null;if(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return k}}]),i}();return a(window).on(m.LOAD_DATA_API,function(){for(var b=a.makeArray(a(o.DATA_SPY)),c=b.length;c--;){var d=a(b[c]);q._jQueryInterface.call(d,d.data())}}),a.fn[b]=q._jQueryInterface,a.fn[b].Constructor=q,a.fn[b].noConflict=function(){return a.fn[b]=j,q._jQueryInterface},q}(jQuery),function(a){var b="tab",d="4.0.0-alpha.4",g="bs.tab",h="."+g,i=".data-api",j=a.fn[b],k=150,l={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK_DATA_API:"click"+h+i},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},n={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul: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"},o=function(){function b(a){c(this,b),this._element=a}return e(b,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,e=a(this._element).closest(n.UL)[0],g=f.getSelectorFromElement(this._element);e&&(d=a.makeArray(a(e).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,e);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}}},{key:"dispose",value:function(){a.removeClass(this._element,g),this._element=null}},{key:"_activate",value:function(b,c,d){var e=a(c).find(n.ACTIVE_CHILD)[0],g=d&&f.supportsTransitionEnd()&&(e&&a(e).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,e,g,d);e&&g?a(e).one(f.TRANSITION_END,h).emulateTransitionEnd(k):h(),e&&a(e).removeClass(m.IN)}},{key:"_transitionComplete",value:function(b,c,d,e){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(f.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}e&&e()}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})}},{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)");var b="tooltip",d="4.0.0-alpha.4",g="bs.tooltip",h="."+g,i=a.fn[b],j=150,k="bs-tether",l={animation:!0,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,selector:!1,placement:"top",offset:"0 0",constraints:[]},m={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"},n={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},o={IN:"in",OUT:"out"},p={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,INSERTED:"inserted"+h,CLICK:"click"+h,FOCUSIN:"focusin"+h,FOCUSOUT:"focusout"+h,MOUSEENTER:"mouseenter"+h,MOUSELEAVE:"mouseleave"+h},q={FADE:"fade",IN:"in"},r={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},s={element:!1,enabled:!1},t={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},u=function(){function i(a,b){c(this,i),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(b),this.tip=null,this._setListeners()}return e(i,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){if(b){var c=this.constructor.DATA_KEY,d=a(b.currentTarget).data(c);d||(d=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(c,d)),d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(a(this.getTipElement()).hasClass(q.IN))return void this._leave(null,this);this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(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}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var d=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!d)return;var e=this.getTipElement(),g=f.getUID(this.constructor.NAME);e.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(e).addClass(q.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,j=this._getAttachment(h);a(e).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:j,element:e,target:this.element,classes:s,classPrefix:k,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),f.reflow(e),this._tether.position(),a(e).addClass(q.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===o.OUT&&b._leave(null,b)};if(f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE))return void a(this.tip).one(f.TRANSITION_END,l).emulateTransitionEnd(i._TRANSITION_DURATION);l()}}},{key:"hide",value:function(b){var c=this,d=this.getTipElement(),e=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==o.IN&&d.parentNode&&d.parentNode.removeChild(d),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(e),e.isDefaultPrevented()||(a(d).removeClass(q.IN),f.supportsTransitionEnd()&&a(this.tip).hasClass(q.FADE)?a(d).one(f.TRANSITION_END,g).emulateTransitionEnd(j):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return Boolean(this.getTitle())}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(r.TOOLTIP_INNER),this.getTitle()),b.removeClass(q.FADE).removeClass(q.IN),this.cleanupTether()}},{key:"setElementContent",value:function(b,c){var d=this.config.html;"object"==typeof c&&(c.nodeType||c.jquery)?d?a(c).parent().is(b)||b.empty().append(c):b.text(a(c).text()):b[d?"html":"text"](c)}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&this._tether.destroy()}},{key:"_getAttachment",value:function(a){return n[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==t.MANUAL){var d=c===t.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===t.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"===b.type?t.FOCUS:t.HOVER]=!0),a(c.getTipElement()).hasClass(q.IN)||c._hoverState===o.IN?void(c._hoverState=o.IN):(clearTimeout(c._timeout),c._hoverState=o.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===o.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;if(c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"===b.type?t.FOCUS:t.HOVER]=!1),!c._isWithActiveTrigger())return clearTimeout(c._timeout),c._hoverState=o.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===o.OUT&&c.hide()},c.config.delay.hide)):void c.hide()}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(c){return c=a.extend({},this.constructor.Default,a(this.element).data(),c),c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay}),f.typeCheckConfig(b,c,this.constructor.DefaultType),c}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config)this.constructor.Default[b]!==this.config[b]&&(a[b]=this.config[b]);return a}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new i(this,d),a(this).data(g,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return d}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return h}},{key:"DefaultType",get:function(){return m}}]),i}();return a.fn[b]=u._jQueryInterface,a.fn[b].Constructor=u,a.fn[b].noConflict=function(){return a.fn[b]=i,u._jQueryInterface},u}(jQuery));(function(a){var f="popover",h="4.0.0-alpha.4",i="bs.popover",j="."+i,k=a.fn[f],l=a.extend({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),m=a.extend({},g.DefaultType,{content:"(string|element|function)"}),n={FADE:"fade",IN:"in"},o={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},p={HIDE:"hide"+j,HIDDEN:"hidden"+j,SHOW:"show"+j,SHOWN:"shown"+j,INSERTED:"inserted"+j,CLICK:"click"+j,FOCUSIN:"focusin"+j,FOCUSOUT:"focusout"+j,MOUSEENTER:"mouseenter"+j,MOUSELEAVE:"mouseleave"+j},q=function(g){function k(){c(this,k),d(Object.getPrototypeOf(k.prototype),"constructor",this).apply(this,arguments)}return b(k,g),e(k,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(o.TITLE),this.getTitle()),this.setElementContent(b.find(o.CONTENT),this._getContent()),b.removeClass(n.FADE).removeClass(n.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(i),d="object"==typeof b?b:null;if((c||!/destroy|hide/.test(b))&&(c||(c=new k(this,d),a(this).data(i,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})}},{key:"VERSION",get:function(){return h}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return p}},{key:"EVENT_KEY",get:function(){return j}},{key:"DefaultType",get:function(){return m}}]),k}(g);return a.fn[f]=q._jQueryInterface,a.fn[f].Constructor=q,a.fn[f].noConflict=function(){return a.fn[f]=k,q._jQueryInterface},q})(jQuery)}(jQuery); | ||
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(jQuery),+function(){function a(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function b(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),f=function(a){function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(a){return(a[0]||a).nodeType}function d(){return{bindType:h.end,delegateType:h.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function e(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in j)if(void 0!==a.style[b])return{end:j[b]};return!1}function f(b){var c=this,d=!1;return a(this).one(k.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||k.triggerTransitionEnd(c)},b),this}function g(){h=e(),a.fn.emulateTransitionEnd=f,k.supportsTransitionEnd()&&(a.event.special[k.TRANSITION_END]=d())}var h=!1,i=1e6,j={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},k={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(Math.random()*i);while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(h.end)},supportsTransitionEnd:function(){return Boolean(h)},typeCheckConfig:function(a,d,e){for(var f in e)if(e.hasOwnProperty(f)){var g=e[f],h=d[f],i=void 0;if(i=h&&c(h)?"element":b(h),!new RegExp(g).test(i))throw new Error(a.toUpperCase()+": "+('Option "'+f+'" provided type "'+i+'" ')+('but expected type "'+g+'".'))}}};return g(),k}(jQuery),g=(function(a){var b="alert",d="4.0.0-alpha.5",g="bs.alert",h="."+g,i=".data-api",j=a.fn[b],k=150,l={DISMISS:'[data-dismiss="alert"]'},m={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+i},n={ALERT:"alert",FADE:"fade",IN:"in"},o=function(){function b(a){c(this,b),this._element=a}return b.prototype.close=function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)},b.prototype.dispose=function(){a.removeData(this._element,g),this._element=null},b.prototype._getRootElement=function(b){var c=f.getSelectorFromElement(b),d=!1;return c&&(d=a(c)[0]),d||(d=a(b).closest("."+n.ALERT)[0]),d},b.prototype._triggerCloseEvent=function(b){var c=a.Event(m.CLOSE);return a(b).trigger(c),c},b.prototype._removeElement=function(b){return a(b).removeClass(n.IN),f.supportsTransitionEnd()&&a(b).hasClass(n.FADE)?void a(b).one(f.TRANSITION_END,a.proxy(this._destroyElement,this,b)).emulateTransitionEnd(k):void this._destroyElement(b)},b.prototype._destroyElement=function(b){a(b).detach().trigger(m.CLOSED).remove()},b._jQueryInterface=function(c){return this.each(function(){var d=a(this),e=d.data(g);e||(e=new b(this),d.data(g,e)),"close"===c&&e[c](this)})},b._handleDismiss=function(a){return function(b){b&&b.preventDefault(),a.close(this)}},e(b,null,[{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(m.CLICK_DATA_API,l.DISMISS,o._handleDismiss(new o)),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){var b="button",d="4.0.0-alpha.5",f="bs.button",g="."+f,h=".data-api",i=a.fn[b],j={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},k={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},l={CLICK_DATA_API:"click"+g+h,FOCUS_BLUR_DATA_API:"focus"+g+h+" "+("blur"+g+h)},m=function(){function b(a){c(this,b),this._element=a}return b.prototype.toggle=function(){var b=!0,c=a(this._element).closest(k.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(k.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(j.ACTIVE))b=!1;else{var e=a(c).find(k.ACTIVE)[0];e&&a(e).removeClass(j.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(j.ACTIVE),a(this._element).trigger("change")),d.focus()}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(j.ACTIVE));b&&a(this._element).toggleClass(j.ACTIVE)},b.prototype.dispose=function(){a.removeData(this._element,f),this._element=null},b._jQueryInterface=function(c){return this.each(function(){var d=a(this).data(f);d||(d=new b(this),a(this).data(f,d)),"toggle"===c&&d[c]()})},e(b,null,[{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,k.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(j.BUTTON)||(c=a(c).closest(k.BUTTON)),m._jQueryInterface.call(a(c),"toggle")}).on(l.FOCUS_BLUR_DATA_API,k.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(k.BUTTON)[0];a(c).toggleClass(j.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[b]=m._jQueryInterface,a.fn[b].Constructor=m,a.fn[b].noConflict=function(){return a.fn[b]=i,m._jQueryInterface},m}(jQuery),function(a){var b="carousel",g="4.0.0-alpha.5",h="bs.carousel",i="."+h,j=".data-api",k=a.fn[b],l=600,m=37,n=39,o={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},p={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q={NEXT:"next",PREVIOUS:"prev"},r={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,LOAD_DATA_API:"load"+i+j,CLICK_DATA_API:"click"+i+j},s={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},t={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},u=function(){function j(b,d){c(this,j),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(d),this._element=a(b)[0],this._indicatorsElement=a(this._element).find(t.INDICATORS)[0],this._addEventListeners()}return j.prototype.next=function(){this._isSliding||this._slide(q.NEXT)},j.prototype.nextWhenVisible=function(){document.hidden||this.next()},j.prototype.prev=function(){this._isSliding||this._slide(q.PREVIOUS)},j.prototype.pause=function(b){b||(this._isPaused=!0),a(this._element).find(t.NEXT_PREV)[0]&&f.supportsTransitionEnd()&&(f.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},j.prototype.cycle=function(b){b||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(a.proxy(document.visibilityState?this.nextWhenVisible:this.next,this),this._config.interval))},j.prototype.to=function(b){var c=this;this._activeElement=a(this._element).find(t.ACTIVE_ITEM)[0];var d=this._getItemIndex(this._activeElement);if(!(b>this._items.length-1||b<0)){if(this._isSliding)return void a(this._element).one(r.SLID,function(){return c.to(b)});if(d===b)return this.pause(),void this.cycle();var e=b>d?q.NEXT:q.PREVIOUS;this._slide(e,this._items[b])}},j.prototype.dispose=function(){a(this._element).off(i),a.removeData(this._element,h),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},j.prototype._getConfig=function(c){return c=a.extend({},o,c),f.typeCheckConfig(b,c,p),c},j.prototype._addEventListeners=function(){this._config.keyboard&&a(this._element).on(r.KEYDOWN,a.proxy(this._keydown,this)),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on(r.MOUSEENTER,a.proxy(this.pause,this)).on(r.MOUSELEAVE,a.proxy(this.cycle,this))},j.prototype._keydown=function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case m:this.prev();break;case n:this.next();break;default:return}},j.prototype._getItemIndex=function(b){return this._items=a.makeArray(a(b).parent().find(t.ITEM)),this._items.indexOf(b)},j.prototype._getItemByDirection=function(a,b){var c=a===q.NEXT,d=a===q.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e===f;if(g&&!this._config.wrap)return b;var h=a===q.PREVIOUS?-1:1,i=(e+h)%this._items.length;return i===-1?this._items[this._items.length-1]:this._items[i]},j.prototype._triggerSlideEvent=function(b,c){var d=a.Event(r.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d},j.prototype._setActiveIndicatorElement=function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(t.ACTIVE).removeClass(s.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(s.ACTIVE)}},j.prototype._slide=function(b,c){var d=this,e=a(this._element).find(t.ACTIVE_ITEM)[0],g=c||e&&this._getItemByDirection(b,e),h=Boolean(this._interval),i=b===q.NEXT?s.LEFT:s.RIGHT;if(g&&a(g).hasClass(s.ACTIVE))return void(this._isSliding=!1);var j=this._triggerSlideEvent(g,i);if(!j.isDefaultPrevented()&&e&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var k=a.Event(r.SLID,{relatedTarget:g,direction:i});f.supportsTransitionEnd()&&a(this._element).hasClass(s.SLIDE)?(a(g).addClass(b),f.reflow(g),a(e).addClass(i),a(g).addClass(i),a(e).one(f.TRANSITION_END,function(){a(g).removeClass(i).removeClass(b),a(g).addClass(s.ACTIVE),a(e).removeClass(s.ACTIVE).removeClass(b).removeClass(i),d._isSliding=!1,setTimeout(function(){return a(d._element).trigger(k)},0)}).emulateTransitionEnd(l)):(a(e).removeClass(s.ACTIVE),a(g).addClass(s.ACTIVE),this._isSliding=!1,a(this._element).trigger(k)),h&&this.cycle()}},j._jQueryInterface=function(b){return this.each(function(){var c=a(this).data(h),e=a.extend({},o,a(this).data());"object"===("undefined"==typeof b?"undefined":d(b))&&a.extend(e,b);var f="string"==typeof b?b:e.slide;if(c||(c=new j(this,e),a(this).data(h,c)),"number"==typeof b)c.to(b);else if("string"==typeof f){if(void 0===c[f])throw new Error('No method named "'+f+'"');c[f]()}else e.interval&&(c.pause(),c.cycle())})},j._dataApiClickHandler=function(b){var c=f.getSelectorFromElement(this);if(c){var d=a(c)[0];if(d&&a(d).hasClass(s.CAROUSEL)){var e=a.extend({},a(d).data(),a(this).data()),g=this.getAttribute("data-slide-to");g&&(e.interval=!1),j._jQueryInterface.call(a(d),e),g&&a(d).data(h).to(g),b.preventDefault()}}},e(j,null,[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return o}}]),j}();return a(document).on(r.CLICK_DATA_API,t.DATA_SLIDE,u._dataApiClickHandler),a(window).on(r.LOAD_DATA_API,function(){a(t.DATA_RIDE).each(function(){var b=a(this);u._jQueryInterface.call(b,b.data())})}),a.fn[b]=u._jQueryInterface,a.fn[b].Constructor=u,a.fn[b].noConflict=function(){return a.fn[b]=k,u._jQueryInterface},u}(jQuery),function(a){var b="collapse",g="4.0.0-alpha.5",h="bs.collapse",i="."+h,j=".data-api",k=a.fn[b],l=600,m={toggle:!0,parent:""},n={toggle:"boolean",parent:"string"},o={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+j},p={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},q={WIDTH:"width",HEIGHT:"height"},r={ACTIVES:".card > .in, .card > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},s=function(){function i(b,d){c(this,i),this._isTransitioning=!1,this._element=b,this._config=this._getConfig(d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+b.id+'"],'+('[data-toggle="collapse"][data-target="#'+b.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return i.prototype.toggle=function(){a(this._element).hasClass(p.IN)?this.hide():this.show()},i.prototype.show=function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(p.IN)){var c=void 0,d=void 0;if(this._parent&&(c=a.makeArray(a(r.ACTIVES)),c.length||(c=null)),!(c&&(d=a(c).data(h),d&&d._isTransitioning))){var e=a.Event(o.SHOW);if(a(this._element).trigger(e),!e.isDefaultPrevented()){c&&(i._jQueryInterface.call(a(c),"hide"),d||a(c).data(h,null));var g=this._getDimension();a(this._element).removeClass(p.COLLAPSE).addClass(p.COLLAPSING),this._element.style[g]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(p.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var j=function(){a(b._element).removeClass(p.COLLAPSING).addClass(p.COLLAPSE).addClass(p.IN),b._element.style[g]="",b.setTransitioning(!1),a(b._element).trigger(o.SHOWN)};if(!f.supportsTransitionEnd())return void j();var k=g[0].toUpperCase()+g.slice(1),m="scroll"+k;a(this._element).one(f.TRANSITION_END,j).emulateTransitionEnd(l),this._element.style[g]=this._element[m]+"px"}}}},i.prototype.hide=function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(p.IN)){var c=a.Event(o.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension(),e=d===q.WIDTH?"offsetWidth":"offsetHeight";this._element.style[d]=this._element[e]+"px",f.reflow(this._element),a(this._element).addClass(p.COLLAPSING).removeClass(p.COLLAPSE).removeClass(p.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(p.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(p.COLLAPSING).addClass(p.COLLAPSE).trigger(o.HIDDEN)};return this._element.style[d]="",f.supportsTransitionEnd()?void a(this._element).one(f.TRANSITION_END,g).emulateTransitionEnd(l):void g()}}},i.prototype.setTransitioning=function(a){this._isTransitioning=a},i.prototype.dispose=function(){a.removeData(this._element,h),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},i.prototype._getConfig=function(c){return c=a.extend({},m,c),c.toggle=Boolean(c.toggle),f.typeCheckConfig(b,c,n),c},i.prototype._getDimension=function(){var b=a(this._element).hasClass(q.WIDTH);return b?q.WIDTH:q.HEIGHT},i.prototype._getParent=function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(i._getTargetFromElement(c),[c])}),c},i.prototype._addAriaAndCollapsedClass=function(b,c){if(b){var d=a(b).hasClass(p.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(p.COLLAPSED,!d).attr("aria-expanded",d)}},i._getTargetFromElement=function(b){var c=f.getSelectorFromElement(b);return c?a(c)[0]:null},i._jQueryInterface=function(b){return this.each(function(){var c=a(this),e=c.data(h),f=a.extend({},m,c.data(),"object"===("undefined"==typeof b?"undefined":d(b))&&b);if(!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||(e=new i(this,f),c.data(h,e)),"string"==typeof b){if(void 0===e[b])throw new Error('No method named "'+b+'"');e[b]()}})},e(i,null,[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return m}}]),i}();return a(document).on(o.CLICK_DATA_API,r.DATA_TOGGLE,function(b){b.preventDefault();var c=s._getTargetFromElement(this),d=a(c).data(h),e=d?"toggle":a(this).data();s._jQueryInterface.call(a(c),e)}),a.fn[b]=s._jQueryInterface,a.fn[b].Constructor=s,a.fn[b].noConflict=function(){return a.fn[b]=k,s._jQueryInterface},s}(jQuery),function(a){var b="dropdown",d="4.0.0-alpha.5",g="bs.dropdown",h="."+g,i=".data-api",j=a.fn[b],k=27,l=38,m=40,n=3,o={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK:"click"+h,CLICK_DATA_API:"click"+h+i,KEYDOWN_DATA_API:"keydown"+h+i},p={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},q={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'},r=function(){function b(a){c(this,b),this._element=a,this._addEventListeners()}return b.prototype.toggle=function(){if(this.disabled||a(this).hasClass(p.DISABLED))return!1;var c=b._getParentFromElement(this),d=a(c).hasClass(p.OPEN);if(b._clearMenus(),d)return!1;if("ontouchstart"in document.documentElement&&!a(c).closest(q.NAVBAR_NAV).length){var e=document.createElement("div");e.className=p.BACKDROP,a(e).insertBefore(this),a(e).on("click",b._clearMenus)}var f={relatedTarget:this},g=a.Event(o.SHOW,f);return a(c).trigger(g),!g.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded","true"),a(c).toggleClass(p.OPEN),a(c).trigger(a.Event(o.SHOWN,f)),!1)},b.prototype.dispose=function(){a.removeData(this._element,g),a(this._element).off(h),this._element=null},b.prototype._addEventListeners=function(){a(this._element).on(o.CLICK,this.toggle)},b._jQueryInterface=function(c){return this.each(function(){var d=a(this).data(g);if(d||a(this).data(g,d=new b(this)),"string"==typeof c){if(void 0===d[c])throw new Error('No method named "'+c+'"');d[c].call(this)}})},b._clearMenus=function(c){if(!c||c.which!==n){var d=a(q.BACKDROP)[0];d&&d.parentNode.removeChild(d);for(var e=a.makeArray(a(q.DATA_TOGGLE)),f=0;f<e.length;f++){var g=b._getParentFromElement(e[f]),h={relatedTarget:e[f]};if(a(g).hasClass(p.OPEN)&&!(c&&"click"===c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(g,c.target))){var i=a.Event(o.HIDE,h);a(g).trigger(i),i.isDefaultPrevented()||(e[f].setAttribute("aria-expanded","false"),a(g).removeClass(p.OPEN).trigger(a.Event(o.HIDDEN,h)))}}}},b._getParentFromElement=function(b){var c=void 0,d=f.getSelectorFromElement(b);return d&&(c=a(d)[0]),c||b.parentNode},b._dataApiKeydownHandler=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)&&(c.preventDefault(),c.stopPropagation(),!this.disabled&&!a(this).hasClass(p.DISABLED))){var d=b._getParentFromElement(this),e=a(d).hasClass(p.OPEN);if(!e&&c.which!==k||e&&c.which===k){if(c.which===k){var f=a(d).find(q.DATA_TOGGLE)[0];a(f).trigger("focus")}return void a(this).trigger("click")}var g=a.makeArray(a(q.VISIBLE_ITEMS));if(g=g.filter(function(a){return a.offsetWidth||a.offsetHeight}),g.length){var h=g.indexOf(c.target);c.which===l&&h>0&&h--,c.which===m&&h<g.length-1&&h++,h<0&&(h=0),g[h].focus()}}},e(b,null,[{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(o.KEYDOWN_DATA_API,q.DATA_TOGGLE,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_MENU,r._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,q.ROLE_LISTBOX,r._dataApiKeydownHandler).on(o.CLICK_DATA_API,r._clearMenus).on(o.CLICK_DATA_API,q.DATA_TOGGLE,r.prototype.toggle).on(o.CLICK_DATA_API,q.FORM_CHILD,function(a){a.stopPropagation()}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=j,r._jQueryInterface},r}(jQuery),function(a){var b="modal",g="4.0.0-alpha.5",h="bs.modal",i="."+h,j=".data-api",k=a.fn[b],l=300,m=150,n=27,o={backdrop:!0,keyboard:!0,focus:!0,show:!0},p={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},q={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,FOCUSIN:"focusin"+i,RESIZE:"resize"+i,CLICK_DISMISS:"click.dismiss"+i,KEYDOWN_DISMISS:"keydown.dismiss"+i,MOUSEUP_DISMISS:"mouseup.dismiss"+i,MOUSEDOWN_DISMISS:"mousedown.dismiss"+i,CLICK_DATA_API:"click"+i+j},r={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},s={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".navbar-fixed-top, .navbar-fixed-bottom, .is-fixed"},t=function(){function j(b,d){c(this,j),this._config=this._getConfig(d),this._element=b,this._dialog=a(b).find(s.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return j.prototype.toggle=function(a){return this._isShown?this.hide():this.show(a)},j.prototype.show=function(b){var c=this,d=a.Event(q.SHOW,{relatedTarget:b});a(this._element).trigger(d),this._isShown||d.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),a(document.body).addClass(r.OPEN),this._setEscapeEvent(),this._setResizeEvent(),a(this._element).on(q.CLICK_DISMISS,s.DATA_DISMISS,a.proxy(this.hide,this)),a(this._dialog).on(q.MOUSEDOWN_DISMISS,function(){a(c._element).one(q.MOUSEUP_DISMISS,function(b){a(b.target).is(c._element)&&(c._ignoreBackdropClick=!0)})}),this._showBackdrop(a.proxy(this._showElement,this,b)))},j.prototype.hide=function(b){b&&b.preventDefault();var c=a.Event(q.HIDE);a(this._element).trigger(c),this._isShown&&!c.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),a(document).off(q.FOCUSIN),a(this._element).removeClass(r.IN),a(this._element).off(q.CLICK_DISMISS),a(this._dialog).off(q.MOUSEDOWN_DISMISS),f.supportsTransitionEnd()&&a(this._element).hasClass(r.FADE)?a(this._element).one(f.TRANSITION_END,a.proxy(this._hideModal,this)).emulateTransitionEnd(l):this._hideModal())},j.prototype.dispose=function(){a.removeData(this._element,h),a(window).off(i),a(document).off(i),a(this._element).off(i),a(this._backdrop).off(i),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},j.prototype._getConfig=function(c){return c=a.extend({},o,c),f.typeCheckConfig(b,c,p),c},j.prototype._showElement=function(b){var c=this,d=f.supportsTransitionEnd()&&a(this._element).hasClass(r.FADE);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,d&&f.reflow(this._element),a(this._element).addClass(r.IN),this._config.focus&&this._enforceFocus();var e=a.Event(q.SHOWN,{relatedTarget:b}),g=function(){c._config.focus&&c._element.focus(),a(c._element).trigger(e)};d?a(this._dialog).one(f.TRANSITION_END,g).emulateTransitionEnd(l):g()},j.prototype._enforceFocus=function(){var b=this;a(document).off(q.FOCUSIN).on(q.FOCUSIN,function(c){document===c.target||b._element===c.target||a(b._element).has(c.target).length||b._element.focus()})},j.prototype._setEscapeEvent=function(){var b=this;this._isShown&&this._config.keyboard?a(this._element).on(q.KEYDOWN_DISMISS,function(a){a.which===n&&b.hide()}):this._isShown||a(this._element).off(q.KEYDOWN_DISMISS)},j.prototype._setResizeEvent=function(){this._isShown?a(window).on(q.RESIZE,a.proxy(this._handleUpdate,this)):a(window).off(q.RESIZE)},j.prototype._hideModal=function(){var b=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._showBackdrop(function(){a(document.body).removeClass(r.OPEN),b._resetAdjustments(),b._resetScrollbar(),a(b._element).trigger(q.HIDDEN)})},j.prototype._removeBackdrop=function(){this._backdrop&&(a(this._backdrop).remove(),this._backdrop=null)},j.prototype._showBackdrop=function(b){var c=this,d=a(this._element).hasClass(r.FADE)?r.FADE:"";if(this._isShown&&this._config.backdrop){var e=f.supportsTransitionEnd()&&d;if(this._backdrop=document.createElement("div"),this._backdrop.className=r.BACKDROP,d&&a(this._backdrop).addClass(d),a(this._backdrop).appendTo(document.body),a(this._element).on(q.CLICK_DISMISS,function(a){return c._ignoreBackdropClick?void(c._ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"===c._config.backdrop?c._element.focus():c.hide()))}),e&&f.reflow(this._backdrop),a(this._backdrop).addClass(r.IN),!b)return;if(!e)return void b();a(this._backdrop).one(f.TRANSITION_END,b).emulateTransitionEnd(m)}else if(!this._isShown&&this._backdrop){a(this._backdrop).removeClass(r.IN);var g=function(){c._removeBackdrop(),b&&b()};f.supportsTransitionEnd()&&a(this._element).hasClass(r.FADE)?a(this._backdrop).one(f.TRANSITION_END,g).emulateTransitionEnd(m):g()}else b&&b()},j.prototype._handleUpdate=function(){this._adjustDialog()},j.prototype._adjustDialog=function(){var a=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},j.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},j.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},j.prototype._setScrollbar=function(){var b=parseInt(a(s.FIXED_CONTENT).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=b+this._scrollbarWidth+"px")},j.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},j.prototype._getScrollbarWidth=function(){var a=document.createElement("div");a.className=r.SCROLLBAR_MEASURER,document.body.appendChild(a);var b=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),b},j._jQueryInterface=function(b,c){return this.each(function(){var e=a(this).data(h),f=a.extend({},j.Default,a(this).data(),"object"===("undefined"==typeof b?"undefined":d(b))&&b);if(e||(e=new j(this,f),a(this).data(h,e)),"string"==typeof b){if(void 0===e[b])throw new Error('No method named "'+b+'"');e[b](c)}else f.show&&e.show(c)})},e(j,null,[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return o}}]),j}();return a(document).on(q.CLICK_DATA_API,s.DATA_TOGGLE,function(b){var c=this,d=void 0,e=f.getSelectorFromElement(this);e&&(d=a(e)[0]);var g=a(d).data(h)?"toggle":a.extend({},a(d).data(),a(this).data());"A"===this.tagName&&b.preventDefault();var i=a(d).one(q.SHOW,function(b){b.isDefaultPrevented()||i.one(q.HIDDEN,function(){a(c).is(":visible")&&c.focus()})});t._jQueryInterface.call(a(d),g,this)}),a.fn[b]=t._jQueryInterface,a.fn[b].Constructor=t,a.fn[b].noConflict=function(){return a.fn[b]=k,t._jQueryInterface},t}(jQuery),function(a){var b="scrollspy",g="4.0.0-alpha.5",h="bs.scrollspy",i="."+h,j=".data-api",k=a.fn[b],l={offset:10,method:"auto",target:""},m={offset:"number",method:"string",target:"(string|element)"},n={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+j},o={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",NAV_LINK:"nav-link",NAV:"nav",ACTIVE:"active"},p={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LIST_ITEM:".list-item",LI:"li",LI_DROPDOWN:"li.dropdown",NAV_LINKS:".nav-link",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},q={OFFSET:"offset",POSITION:"position"},r=function(){function j(b,d){c(this,j),this._element=b,this._scrollElement="BODY"===b.tagName?window:b,this._config=this._getConfig(d),this._selector=this._config.target+" "+p.NAV_LINKS+","+(this._config.target+" "+p.DROPDOWN_ITEMS),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(n.SCROLL,a.proxy(this._process,this)),this.refresh(),this._process()}return j.prototype.refresh=function(){var b=this,c=this._scrollElement!==this._scrollElement.window?q.POSITION:q.OFFSET,d="auto"===this._config.method?c:this._config.method,e=d===q.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var g=a.makeArray(a(this._selector));g.map(function(b){var c=void 0,g=f.getSelectorFromElement(b);return g&&(c=a(g)[0]),c&&(c.offsetWidth||c.offsetHeight)?[a(c)[d]().top+e,g]:null}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})},j.prototype.dispose=function(){a.removeData(this._element,h),a(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},j.prototype._getConfig=function(c){if(c=a.extend({},l,c),"string"!=typeof c.target){var d=a(c.target).attr("id");d||(d=f.getUID(b),a(c.target).attr("id",d)),c.target="#"+d}return f.typeCheckConfig(b,c,m),c},j.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop},j.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},j.prototype._process=function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a<this._offsets[0])return this._activeTarget=null,void this._clear();for(var e=this._offsets.length;e--;){var f=this._activeTarget!==this._targets[e]&&a>=this._offsets[e]&&(void 0===this._offsets[e+1]||a<this._offsets[e+1]);f&&this._activate(this._targets[e])}},j.prototype._activate=function(b){this._activeTarget=b,this._clear();var c=this._selector.split(",");c=c.map(function(a){return a+'[data-target="'+b+'"],'+(a+'[href="'+b+'"]')});var d=a(c.join(","));d.hasClass(o.DROPDOWN_ITEM)?(d.closest(p.DROPDOWN).find(p.DROPDOWN_TOGGLE).addClass(o.ACTIVE),d.addClass(o.ACTIVE)):d.parents(p.LI).find(p.NAV_LINKS).addClass(o.ACTIVE),a(this._scrollElement).trigger(n.ACTIVATE,{relatedTarget:b})},j.prototype._clear=function(){a(this._selector).filter(p.ACTIVE).removeClass(o.ACTIVE)},j._jQueryInterface=function(b){return this.each(function(){var c=a(this).data(h),e="object"===("undefined"==typeof b?"undefined":d(b))&&b||null;if(c||(c=new j(this,e),a(this).data(h,c)),"string"==typeof b){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})},e(j,null,[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return l}}]),j}();return a(window).on(n.LOAD_DATA_API,function(){for(var b=a.makeArray(a(p.DATA_SPY)),c=b.length;c--;){var d=a(b[c]);r._jQueryInterface.call(d,d.data())}}),a.fn[b]=r._jQueryInterface,a.fn[b].Constructor=r,a.fn[b].noConflict=function(){return a.fn[b]=k,r._jQueryInterface},r}(jQuery),function(a){var b="tab",d="4.0.0-alpha.5",g="bs.tab",h="."+g,i=".data-api",j=a.fn[b],k=150,l={HIDE:"hide"+h,HIDDEN:"hidden"+h,SHOW:"show"+h,SHOWN:"shown"+h,CLICK_DATA_API:"click"+h+i},m={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},n={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul: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"},o=function(){function b(a){c(this,b),this._element=a}return b.prototype.show=function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!a(this._element).hasClass(m.ACTIVE)){var c=void 0,d=void 0,e=a(this._element).closest(n.UL)[0],g=f.getSelectorFromElement(this._element);e&&(d=a.makeArray(a(e).find(n.ACTIVE)),d=d[d.length-1]);var h=a.Event(l.HIDE,{relatedTarget:this._element}),i=a.Event(l.SHOW,{relatedTarget:d});if(d&&a(d).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(this._element,e);var j=function(){var c=a.Event(l.HIDDEN,{relatedTarget:b._element}),e=a.Event(l.SHOWN,{relatedTarget:d});a(d).trigger(c),a(b._element).trigger(e)};c?this._activate(c,c.parentNode,j):j()}}},b.prototype.dispose=function(){a.removeClass(this._element,g),this._element=null},b.prototype._activate=function(b,c,d){var e=a(c).find(n.ACTIVE_CHILD)[0],g=d&&f.supportsTransitionEnd()&&(e&&a(e).hasClass(m.FADE)||Boolean(a(c).find(n.FADE_CHILD)[0])),h=a.proxy(this._transitionComplete,this,b,e,g,d);e&&g?a(e).one(f.TRANSITION_END,h).emulateTransitionEnd(k):h(),e&&a(e).removeClass(m.IN)},b.prototype._transitionComplete=function(b,c,d,e){if(c){a(c).removeClass(m.ACTIVE);var g=a(c).find(n.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(m.ACTIVE),c.setAttribute("aria-expanded",!1)}if(a(b).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0),d?(f.reflow(b),a(b).addClass(m.IN)):a(b).removeClass(m.FADE),b.parentNode&&a(b.parentNode).hasClass(m.DROPDOWN_MENU)){var h=a(b).closest(n.DROPDOWN)[0];h&&a(h).find(n.DROPDOWN_TOGGLE).addClass(m.ACTIVE),b.setAttribute("aria-expanded",!0)}e&&e()},b._jQueryInterface=function(c){return this.each(function(){var d=a(this),e=d.data(g);if(e||(e=e=new b(this),d.data(g,e)),"string"==typeof c){if(void 0===e[c])throw new Error('No method named "'+c+'"');e[c]()}})},e(b,null,[{key:"VERSION",get:function(){return d}}]),b}();return a(document).on(l.CLICK_DATA_API,n.DATA_TOGGLE,function(b){b.preventDefault(),o._jQueryInterface.call(a(this),"show")}),a.fn[b]=o._jQueryInterface,a.fn[b].Constructor=o,a.fn[b].noConflict=function(){return a.fn[b]=j,o._jQueryInterface},o}(jQuery),function(a){if(void 0===window.Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var b="tooltip",g="4.0.0-alpha.5",h="bs.tooltip",i="."+h,j=a.fn[b],k=150,l="bs-tether",m={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[]},n={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"},o={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},p={IN:"in",OUT:"out"},q={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},r={FADE:"fade",IN:"in"},s={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},t={element:!1,enabled:!1},u={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},v=function(){function j(a,b){c(this,j),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(b),this.tip=null,this._setListeners()}return j.prototype.enable=function(){this._isEnabled=!0},j.prototype.disable=function(){this._isEnabled=!1},j.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},j.prototype.toggle=function(b){if(b){var c=this.constructor.DATA_KEY,d=a(b.currentTarget).data(c);d||(d=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(c,d)),d._activeTrigger.click=!d._activeTrigger.click,d._isWithActiveTrigger()?d._enter(null,d):d._leave(null,d)}else{if(a(this.getTipElement()).hasClass(r.IN))return void this._leave(null,this);this._enter(null,this)}},j.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),a.removeData(this.element,this.constructor.DATA_KEY),a(this.element).off(this.constructor.EVENT_KEY),this.tip&&a(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},j.prototype.show=function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var d=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!d)return;var e=this.getTipElement(),g=f.getUID(this.constructor.NAME);e.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(e).addClass(r.FADE);var h="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,i=this._getAttachment(h);a(e).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:i,element:e,target:this.element,classes:t,classPrefix:l,offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),f.reflow(e),this._tether.position(),a(e).addClass(r.IN);var k=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===p.OUT&&b._leave(null,b)};if(f.supportsTransitionEnd()&&a(this.tip).hasClass(r.FADE))return void a(this.tip).one(f.TRANSITION_END,k).emulateTransitionEnd(j._TRANSITION_DURATION);k()}},j.prototype.hide=function(b){var c=this,d=this.getTipElement(),e=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==p.IN&&d.parentNode&&d.parentNode.removeChild(d),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(e),e.isDefaultPrevented()||(a(d).removeClass(r.IN),f.supportsTransitionEnd()&&a(this.tip).hasClass(r.FADE)?a(d).one(f.TRANSITION_END,g).emulateTransitionEnd(k):g(),this._hoverState="")},j.prototype.isWithContent=function(){return Boolean(this.getTitle())},j.prototype.getTipElement=function(){return this.tip=this.tip||a(this.config.template)[0]},j.prototype.setContent=function(){var b=a(this.getTipElement());this.setElementContent(b.find(s.TOOLTIP_INNER),this.getTitle()),b.removeClass(r.FADE).removeClass(r.IN),this.cleanupTether()},j.prototype.setElementContent=function(b,c){var e=this.config.html;"object"===("undefined"==typeof c?"undefined":d(c))&&(c.nodeType||c.jquery)?e?a(c).parent().is(b)||b.empty().append(c):b.text(a(c).text()):b[e?"html":"text"](c)},j.prototype.getTitle=function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a},j.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},j.prototype._getAttachment=function(a){return o[a.toUpperCase()]},j.prototype._setListeners=function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,a.proxy(b.toggle,b));else if(c!==u.MANUAL){var d=c===u.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c===u.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,a.proxy(b._enter,b)).on(e,b.config.selector,a.proxy(b._leave,b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},j.prototype._fixTitle=function(){var a=d(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},j.prototype._enter=function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"===b.type?u.FOCUS:u.HOVER]=!0),a(c.getTipElement()).hasClass(r.IN)||c._hoverState===p.IN?void(c._hoverState=p.IN):(clearTimeout(c._timeout),c._hoverState=p.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===p.IN&&c.show()},c.config.delay.show)):void c.show())},j.prototype._leave=function(b,c){var d=this.constructor.DATA_KEY;if(c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"===b.type?u.FOCUS:u.HOVER]=!1),!c._isWithActiveTrigger())return clearTimeout(c._timeout),c._hoverState=p.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===p.OUT&&c.hide()},c.config.delay.hide)):void c.hide()},j.prototype._isWithActiveTrigger=function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1},j.prototype._getConfig=function(c){return c=a.extend({},this.constructor.Default,a(this.element).data(),c),c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay}),f.typeCheckConfig(b,c,this.constructor.DefaultType),c},j.prototype._getDelegateConfig=function(){var a={};if(this.config)for(var b in this.config)this.constructor.Default[b]!==this.config[b]&&(a[b]=this.config[b]);return a},j._jQueryInterface=function(b){return this.each(function(){var c=a(this).data(h),e="object"===("undefined"==typeof b?"undefined":d(b))?b:null;if((c||!/dispose|hide/.test(b))&&(c||(c=new j(this,e),a(this).data(h,c)),"string"==typeof b)){if(void 0===c[b])throw new Error('No method named "'+b+'"');c[b]()}})},e(j,null,[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return m}},{key:"NAME",get:function(){return b}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return q}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return n}}]),j}();return a.fn[b]=v._jQueryInterface,a.fn[b].Constructor=v,a.fn[b].noConflict=function(){return a.fn[b]=j,v._jQueryInterface},v}(jQuery));(function(f){var h="popover",i="4.0.0-alpha.5",j="bs.popover",k="."+j,l=f.fn[h],m=f.extend({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n=f.extend({},g.DefaultType,{content:"(string|element|function)"}),o={FADE:"fade",IN:"in"},p={TITLE:".popover-title",CONTENT:".popover-content"},q={HIDE:"hide"+k,HIDDEN:"hidden"+k,SHOW:"show"+k,SHOWN:"shown"+k,INSERTED:"inserted"+k,CLICK:"click"+k,FOCUSIN:"focusin"+k,FOCUSOUT:"focusout"+k,MOUSEENTER:"mouseenter"+k,MOUSELEAVE:"mouseleave"+k},r=function(g){function l(){return c(this,l),a(this,g.apply(this,arguments))}return b(l,g),l.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},l.prototype.getTipElement=function(){return this.tip=this.tip||f(this.config.template)[0]},l.prototype.setContent=function(){var a=f(this.getTipElement());this.setElementContent(a.find(p.TITLE),this.getTitle()),this.setElementContent(a.find(p.CONTENT),this._getContent()),a.removeClass(o.FADE).removeClass(o.IN),this.cleanupTether()},l.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},l._jQueryInterface=function(a){return this.each(function(){var b=f(this).data(j),c="object"===("undefined"==typeof a?"undefined":d(a))?a:null;if((b||!/destroy|hide/.test(a))&&(b||(b=new l(this,c),f(this).data(j,b)),"string"==typeof a)){if(void 0===b[a])throw new Error('No method named "'+a+'"');b[a]()}})},e(l,null,[{key:"VERSION",get:function(){return i}},{key:"Default",get:function(){return m}},{key:"NAME",get:function(){return h}},{key:"DATA_KEY",get:function(){return j}},{key:"Event",get:function(){return q}},{key:"EVENT_KEY",get:function(){return k}},{key:"DefaultType",get:function(){return n}}]),l}(g);return f.fn[h]=r._jQueryInterface,f.fn[h].Constructor=r,f.fn[h].noConflict=function(){return f.fn[h]=l,r._jQueryInterface},r})(jQuery)}(); |
@@ -15,3 +15,3 @@ module.exports = { | ||
// Official browser support policy: | ||
// http://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers | ||
// https://v4-alpha.getbootstrap.com/getting-started/browsers-devices/#supported-browsers | ||
// | ||
@@ -18,0 +18,0 @@ 'Chrome >= 35', // Exact version number here is kinda arbitrary |
/*! | ||
* Bootstrap's Gruntfile | ||
* http://getbootstrap.com | ||
* https://getbootstrap.com | ||
* Copyright 2013-2016 The Bootstrap Authors | ||
@@ -61,4 +61,3 @@ * Copyright 2013-2016 Twitter, Inc. | ||
options: { | ||
sourceMap: true, | ||
modules: 'ignore' | ||
sourceMap: true | ||
}, | ||
@@ -81,3 +80,3 @@ files: { | ||
options: { | ||
modules: 'ignore' | ||
extends: '../../js/.babelrc' | ||
}, | ||
@@ -92,4 +91,4 @@ files: { | ||
options: { | ||
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function ($) {\n', | ||
footer: '\n}(jQuery);' | ||
banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function () {\n', | ||
footer: '\n}();' | ||
}, | ||
@@ -108,4 +107,3 @@ bootstrap: { | ||
return src.replace(/^(export|import).*/gm, ''); | ||
}, | ||
stripBanners: false | ||
} | ||
}, | ||
@@ -172,7 +170,5 @@ bootstrap: { | ||
options: { | ||
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released | ||
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly | ||
compatibility: 'ie9', | ||
keepSpecialComments: '*', | ||
compatibility: 'ie9,-properties.zeroUnits', | ||
sourceMap: true, | ||
// sourceMapInlineSources: true, | ||
advanced: false | ||
@@ -393,3 +389,3 @@ }, | ||
// grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']); | ||
grunt.registerTask('sass-compile', ['sass:core', 'sass:docs']); | ||
grunt.registerTask('sass-compile', ['sass:core', 'sass:extras', 'sass:docs']); | ||
@@ -396,0 +392,0 @@ grunt.registerTask('dist-css', ['sass-compile', 'exec:postcss', 'cssmin:core', 'cssmin:docs']); |
@@ -1,10 +0,8 @@ | ||
'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): alert.js | ||
* Bootstrap (v4.0.0-alpha.5): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +12,3 @@ * -------------------------------------------------------------------------- | ||
var Alert = (function ($) { | ||
var Alert = function ($) { | ||
@@ -24,3 +22,3 @@ /** | ||
var NAME = 'alert'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.alert'; | ||
@@ -54,3 +52,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Alert = (function () { | ||
var Alert = function () { | ||
function Alert(element) { | ||
@@ -62,109 +60,92 @@ _classCallCheck(this, Alert); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Alert, [{ | ||
key: 'close', | ||
// public | ||
// public | ||
Alert.prototype.close = function close(element) { | ||
element = element || this._element; | ||
value: function close(element) { | ||
element = element || this._element; | ||
var rootElement = this._getRootElement(element); | ||
var customEvent = this._triggerCloseEvent(rootElement); | ||
var rootElement = this._getRootElement(element); | ||
var customEvent = this._triggerCloseEvent(rootElement); | ||
if (customEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (customEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
this._removeElement(rootElement); | ||
}; | ||
this._removeElement(rootElement); | ||
Alert.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._element = null; | ||
}; | ||
// private | ||
Alert.prototype._getRootElement = function _getRootElement(element) { | ||
var selector = Util.getSelectorFromElement(element); | ||
var parent = false; | ||
if (selector) { | ||
parent = $(selector)[0]; | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._element = null; | ||
if (!parent) { | ||
parent = $(element).closest('.' + ClassName.ALERT)[0]; | ||
} | ||
// private | ||
return parent; | ||
}; | ||
}, { | ||
key: '_getRootElement', | ||
value: function _getRootElement(element) { | ||
var selector = Util.getSelectorFromElement(element); | ||
var parent = false; | ||
Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) { | ||
var closeEvent = $.Event(Event.CLOSE); | ||
if (selector) { | ||
parent = $(selector)[0]; | ||
} | ||
$(element).trigger(closeEvent); | ||
return closeEvent; | ||
}; | ||
if (!parent) { | ||
parent = $(element).closest('.' + ClassName.ALERT)[0]; | ||
} | ||
Alert.prototype._removeElement = function _removeElement(element) { | ||
$(element).removeClass(ClassName.IN); | ||
return parent; | ||
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { | ||
this._destroyElement(element); | ||
return; | ||
} | ||
}, { | ||
key: '_triggerCloseEvent', | ||
value: function _triggerCloseEvent(element) { | ||
var closeEvent = $.Event(Event.CLOSE); | ||
$(element).trigger(closeEvent); | ||
return closeEvent; | ||
} | ||
}, { | ||
key: '_removeElement', | ||
value: function _removeElement(element) { | ||
$(element).removeClass(ClassName.IN); | ||
$(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION); | ||
}; | ||
if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { | ||
this._destroyElement(element); | ||
return; | ||
} | ||
Alert.prototype._destroyElement = function _destroyElement(element) { | ||
$(element).detach().trigger(Event.CLOSED).remove(); | ||
}; | ||
$(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION); | ||
} | ||
}, { | ||
key: '_destroyElement', | ||
value: function _destroyElement(element) { | ||
$(element).detach().trigger(Event.CLOSED).remove(); | ||
} | ||
// static | ||
// static | ||
Alert._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $element = $(this); | ||
var data = $element.data(DATA_KEY); | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $element = $(this); | ||
var data = $element.data(DATA_KEY); | ||
if (!data) { | ||
data = new Alert(this); | ||
$element.data(DATA_KEY, data); | ||
} | ||
if (!data) { | ||
data = new Alert(this); | ||
$element.data(DATA_KEY, data); | ||
} | ||
if (config === 'close') { | ||
data[config](this); | ||
} | ||
}); | ||
}; | ||
if (config === 'close') { | ||
data[config](this); | ||
} | ||
}); | ||
} | ||
}, { | ||
key: '_handleDismiss', | ||
value: function _handleDismiss(alertInstance) { | ||
return function (event) { | ||
if (event) { | ||
event.preventDefault(); | ||
} | ||
Alert._handleDismiss = function _handleDismiss(alertInstance) { | ||
return function (event) { | ||
if (event) { | ||
event.preventDefault(); | ||
} | ||
alertInstance.close(this); | ||
}; | ||
} | ||
}, { | ||
alertInstance.close(this); | ||
}; | ||
}; | ||
_createClass(Alert, null, [{ | ||
key: 'VERSION', | ||
@@ -177,4 +158,10 @@ get: function get() { | ||
return Alert; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); | ||
@@ -196,3 +183,3 @@ | ||
return Alert; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=alert.js.map |
@@ -0,4 +1,8 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): button.js | ||
* Bootstrap (v4.0.0-alpha.5): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -8,10 +12,4 @@ * -------------------------------------------------------------------------- | ||
'use strict'; | ||
var Button = function ($) { | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
var Button = (function ($) { | ||
/** | ||
@@ -24,3 +22,3 @@ * ------------------------------------------------------------------------ | ||
var NAME = 'button'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.button'; | ||
@@ -56,3 +54,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Button = (function () { | ||
var Button = function () { | ||
function Button(element) { | ||
@@ -64,76 +62,65 @@ _classCallCheck(this, Button); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Button, [{ | ||
key: 'toggle', | ||
// public | ||
// public | ||
Button.prototype.toggle = function toggle() { | ||
var triggerChangeEvent = true; | ||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; | ||
value: function toggle() { | ||
var triggerChangeEvent = true; | ||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; | ||
if (rootElement) { | ||
var input = $(this._element).find(Selector.INPUT)[0]; | ||
if (rootElement) { | ||
var input = $(this._element).find(Selector.INPUT)[0]; | ||
if (input) { | ||
if (input.type === 'radio') { | ||
if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { | ||
triggerChangeEvent = false; | ||
} else { | ||
var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; | ||
if (input) { | ||
if (input.type === 'radio') { | ||
if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { | ||
triggerChangeEvent = false; | ||
} else { | ||
var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; | ||
if (activeElement) { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
} | ||
if (activeElement) { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
} | ||
} | ||
} | ||
if (triggerChangeEvent) { | ||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE); | ||
$(this._element).trigger('change'); | ||
} | ||
input.focus(); | ||
if (triggerChangeEvent) { | ||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE); | ||
$(this._element).trigger('change'); | ||
} | ||
} else { | ||
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); | ||
} | ||
if (triggerChangeEvent) { | ||
$(this._element).toggleClass(ClassName.ACTIVE); | ||
input.focus(); | ||
} | ||
} else { | ||
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._element = null; | ||
if (triggerChangeEvent) { | ||
$(this._element).toggleClass(ClassName.ACTIVE); | ||
} | ||
}; | ||
// static | ||
Button.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._element = null; | ||
}; | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
// static | ||
if (!data) { | ||
data = new Button(this); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
Button._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
if (config === 'toggle') { | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
if (!data) { | ||
data = new Button(this); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (config === 'toggle') { | ||
data[config](); | ||
} | ||
}); | ||
}; | ||
_createClass(Button, null, [{ | ||
key: 'VERSION', | ||
@@ -146,4 +133,10 @@ get: function get() { | ||
return Button; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { | ||
@@ -178,3 +171,3 @@ event.preventDefault(); | ||
return Button; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=button.js.map |
@@ -1,10 +0,10 @@ | ||
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): carousel.js | ||
* Bootstrap (v4.0.0-alpha.5): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +14,3 @@ * -------------------------------------------------------------------------- | ||
var Carousel = (function ($) { | ||
var Carousel = function ($) { | ||
@@ -24,3 +24,3 @@ /** | ||
var NAME = 'carousel'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.carousel'; | ||
@@ -90,3 +90,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Carousel = (function () { | ||
var Carousel = function () { | ||
function Carousel(element, config) { | ||
@@ -109,340 +109,314 @@ _classCallCheck(this, Carousel); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Carousel, [{ | ||
key: 'next', | ||
// public | ||
// public | ||
Carousel.prototype.next = function next() { | ||
if (!this._isSliding) { | ||
this._slide(Direction.NEXT); | ||
} | ||
}; | ||
value: function next() { | ||
if (!this._isSliding) { | ||
this._slide(Direction.NEXT); | ||
} | ||
Carousel.prototype.nextWhenVisible = function nextWhenVisible() { | ||
// Don't call next when the page isn't visible | ||
if (!document.hidden) { | ||
this.next(); | ||
} | ||
}, { | ||
key: 'nextWhenVisible', | ||
value: function nextWhenVisible() { | ||
// Don't call next when the page isn't visible | ||
if (!document.hidden) { | ||
this.next(); | ||
} | ||
}; | ||
Carousel.prototype.prev = function prev() { | ||
if (!this._isSliding) { | ||
this._slide(Direction.PREVIOUS); | ||
} | ||
}, { | ||
key: 'prev', | ||
value: function prev() { | ||
if (!this._isSliding) { | ||
this._slide(Direction.PREVIOUS); | ||
} | ||
}; | ||
Carousel.prototype.pause = function pause(event) { | ||
if (!event) { | ||
this._isPaused = true; | ||
} | ||
}, { | ||
key: 'pause', | ||
value: function pause(event) { | ||
if (!event) { | ||
this._isPaused = true; | ||
} | ||
if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { | ||
Util.triggerTransitionEnd(this._element); | ||
this.cycle(true); | ||
} | ||
if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { | ||
Util.triggerTransitionEnd(this._element); | ||
this.cycle(true); | ||
} | ||
clearInterval(this._interval); | ||
this._interval = null; | ||
}; | ||
Carousel.prototype.cycle = function cycle(event) { | ||
if (!event) { | ||
this._isPaused = false; | ||
} | ||
if (this._interval) { | ||
clearInterval(this._interval); | ||
this._interval = null; | ||
} | ||
}, { | ||
key: 'cycle', | ||
value: function cycle(event) { | ||
if (!event) { | ||
this._isPaused = false; | ||
} | ||
if (this._interval) { | ||
clearInterval(this._interval); | ||
this._interval = null; | ||
} | ||
if (this._config.interval && !this._isPaused) { | ||
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval); | ||
} | ||
}; | ||
if (this._config.interval && !this._isPaused) { | ||
this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval); | ||
} | ||
Carousel.prototype.to = function to(index) { | ||
var _this = this; | ||
this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; | ||
var activeIndex = this._getItemIndex(this._activeElement); | ||
if (index > this._items.length - 1 || index < 0) { | ||
return; | ||
} | ||
}, { | ||
key: 'to', | ||
value: function to(index) { | ||
var _this = this; | ||
this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; | ||
if (this._isSliding) { | ||
$(this._element).one(Event.SLID, function () { | ||
return _this.to(index); | ||
}); | ||
return; | ||
} | ||
var activeIndex = this._getItemIndex(this._activeElement); | ||
if (activeIndex === index) { | ||
this.pause(); | ||
this.cycle(); | ||
return; | ||
} | ||
if (index > this._items.length - 1 || index < 0) { | ||
return; | ||
} | ||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; | ||
if (this._isSliding) { | ||
$(this._element).one(Event.SLID, function () { | ||
return _this.to(index); | ||
}); | ||
return; | ||
} | ||
this._slide(direction, this._items[index]); | ||
}; | ||
if (activeIndex === index) { | ||
this.pause(); | ||
this.cycle(); | ||
return; | ||
} | ||
Carousel.prototype.dispose = function dispose() { | ||
$(this._element).off(EVENT_KEY); | ||
$.removeData(this._element, DATA_KEY); | ||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; | ||
this._items = null; | ||
this._config = null; | ||
this._element = null; | ||
this._interval = null; | ||
this._isPaused = null; | ||
this._isSliding = null; | ||
this._activeElement = null; | ||
this._indicatorsElement = null; | ||
}; | ||
this._slide(direction, this._items[index]); | ||
// private | ||
Carousel.prototype._getConfig = function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
}; | ||
Carousel.prototype._addEventListeners = function _addEventListeners() { | ||
if (this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$(this._element).off(EVENT_KEY); | ||
$.removeData(this._element, DATA_KEY); | ||
this._items = null; | ||
this._config = null; | ||
this._element = null; | ||
this._interval = null; | ||
this._isPaused = null; | ||
this._isSliding = null; | ||
this._activeElement = null; | ||
this._indicatorsElement = null; | ||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) { | ||
$(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); | ||
} | ||
}; | ||
// private | ||
Carousel.prototype._keydown = function _keydown(event) { | ||
event.preventDefault(); | ||
}, { | ||
key: '_getConfig', | ||
value: function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
if (/input|textarea/i.test(event.target.tagName)) { | ||
return; | ||
} | ||
}, { | ||
key: '_addEventListeners', | ||
value: function _addEventListeners() { | ||
if (this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); | ||
} | ||
if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) { | ||
$(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); | ||
} | ||
switch (event.which) { | ||
case ARROW_LEFT_KEYCODE: | ||
this.prev(); | ||
break; | ||
case ARROW_RIGHT_KEYCODE: | ||
this.next(); | ||
break; | ||
default: | ||
return; | ||
} | ||
}, { | ||
key: '_keydown', | ||
value: function _keydown(event) { | ||
event.preventDefault(); | ||
}; | ||
if (/input|textarea/i.test(event.target.tagName)) { | ||
return; | ||
} | ||
Carousel.prototype._getItemIndex = function _getItemIndex(element) { | ||
this._items = $.makeArray($(element).parent().find(Selector.ITEM)); | ||
return this._items.indexOf(element); | ||
}; | ||
switch (event.which) { | ||
case ARROW_LEFT_KEYCODE: | ||
this.prev(); | ||
break; | ||
case ARROW_RIGHT_KEYCODE: | ||
this.next(); | ||
break; | ||
default: | ||
return; | ||
} | ||
Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) { | ||
var isNextDirection = direction === Direction.NEXT; | ||
var isPrevDirection = direction === Direction.PREVIOUS; | ||
var activeIndex = this._getItemIndex(activeElement); | ||
var lastItemIndex = this._items.length - 1; | ||
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; | ||
if (isGoingToWrap && !this._config.wrap) { | ||
return activeElement; | ||
} | ||
}, { | ||
key: '_getItemIndex', | ||
value: function _getItemIndex(element) { | ||
this._items = $.makeArray($(element).parent().find(Selector.ITEM)); | ||
return this._items.indexOf(element); | ||
} | ||
}, { | ||
key: '_getItemByDirection', | ||
value: function _getItemByDirection(direction, activeElement) { | ||
var isNextDirection = direction === Direction.NEXT; | ||
var isPrevDirection = direction === Direction.PREVIOUS; | ||
var activeIndex = this._getItemIndex(activeElement); | ||
var lastItemIndex = this._items.length - 1; | ||
var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; | ||
if (isGoingToWrap && !this._config.wrap) { | ||
return activeElement; | ||
} | ||
var delta = direction === Direction.PREVIOUS ? -1 : 1; | ||
var itemIndex = (activeIndex + delta) % this._items.length; | ||
var delta = direction === Direction.PREVIOUS ? -1 : 1; | ||
var itemIndex = (activeIndex + delta) % this._items.length; | ||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; | ||
}; | ||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; | ||
} | ||
}, { | ||
key: '_triggerSlideEvent', | ||
value: function _triggerSlideEvent(relatedTarget, directionalClassname) { | ||
var slideEvent = $.Event(Event.SLIDE, { | ||
relatedTarget: relatedTarget, | ||
direction: directionalClassname | ||
}); | ||
Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, directionalClassname) { | ||
var slideEvent = $.Event(Event.SLIDE, { | ||
relatedTarget: relatedTarget, | ||
direction: directionalClassname | ||
}); | ||
$(this._element).trigger(slideEvent); | ||
$(this._element).trigger(slideEvent); | ||
return slideEvent; | ||
} | ||
}, { | ||
key: '_setActiveIndicatorElement', | ||
value: function _setActiveIndicatorElement(element) { | ||
if (this._indicatorsElement) { | ||
$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); | ||
return slideEvent; | ||
}; | ||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; | ||
Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { | ||
if (this._indicatorsElement) { | ||
$(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); | ||
if (nextIndicator) { | ||
$(nextIndicator).addClass(ClassName.ACTIVE); | ||
} | ||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; | ||
if (nextIndicator) { | ||
$(nextIndicator).addClass(ClassName.ACTIVE); | ||
} | ||
} | ||
}, { | ||
key: '_slide', | ||
value: function _slide(direction, element) { | ||
var _this2 = this; | ||
}; | ||
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; | ||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); | ||
Carousel.prototype._slide = function _slide(direction, element) { | ||
var _this2 = this; | ||
var isCycling = Boolean(this._interval); | ||
var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; | ||
var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); | ||
var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; | ||
var isCycling = Boolean(this._interval); | ||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { | ||
this._isSliding = false; | ||
return; | ||
} | ||
var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; | ||
var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); | ||
if (slideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { | ||
this._isSliding = false; | ||
return; | ||
} | ||
if (!activeElement || !nextElement) { | ||
// some weirdness is happening, so we bail | ||
return; | ||
} | ||
var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); | ||
if (slideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
this._isSliding = true; | ||
if (!activeElement || !nextElement) { | ||
// some weirdness is happening, so we bail | ||
return; | ||
} | ||
if (isCycling) { | ||
this.pause(); | ||
} | ||
this._isSliding = true; | ||
this._setActiveIndicatorElement(nextElement); | ||
if (isCycling) { | ||
this.pause(); | ||
} | ||
var slidEvent = $.Event(Event.SLID, { | ||
relatedTarget: nextElement, | ||
direction: directionalClassName | ||
}); | ||
this._setActiveIndicatorElement(nextElement); | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { | ||
var slidEvent = $.Event(Event.SLID, { | ||
relatedTarget: nextElement, | ||
direction: directionalClassName | ||
}); | ||
$(nextElement).addClass(direction); | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { | ||
Util.reflow(nextElement); | ||
$(nextElement).addClass(direction); | ||
$(activeElement).addClass(directionalClassName); | ||
$(nextElement).addClass(directionalClassName); | ||
Util.reflow(nextElement); | ||
$(activeElement).one(Util.TRANSITION_END, function () { | ||
$(nextElement).removeClass(directionalClassName).removeClass(direction); | ||
$(activeElement).addClass(directionalClassName); | ||
$(nextElement).addClass(directionalClassName); | ||
$(nextElement).addClass(ClassName.ACTIVE); | ||
$(activeElement).one(Util.TRANSITION_END, function () { | ||
$(nextElement).removeClass(directionalClassName).removeClass(direction); | ||
$(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); | ||
$(nextElement).addClass(ClassName.ACTIVE); | ||
_this2._isSliding = false; | ||
$(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); | ||
setTimeout(function () { | ||
return $(_this2._element).trigger(slidEvent); | ||
}, 0); | ||
}).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
$(nextElement).addClass(ClassName.ACTIVE); | ||
_this2._isSliding = false; | ||
this._isSliding = false; | ||
$(this._element).trigger(slidEvent); | ||
} | ||
setTimeout(function () { | ||
return $(_this2._element).trigger(slidEvent); | ||
}, 0); | ||
}).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
$(activeElement).removeClass(ClassName.ACTIVE); | ||
$(nextElement).addClass(ClassName.ACTIVE); | ||
if (isCycling) { | ||
this.cycle(); | ||
} | ||
this._isSliding = false; | ||
$(this._element).trigger(slidEvent); | ||
} | ||
// static | ||
if (isCycling) { | ||
this.cycle(); | ||
} | ||
}; | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = $.extend({}, Default, $(this).data()); | ||
// static | ||
if (typeof config === 'object') { | ||
$.extend(_config, config); | ||
} | ||
Carousel._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = $.extend({}, Default, $(this).data()); | ||
var action = typeof config === 'string' ? config : _config.slide; | ||
if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') { | ||
$.extend(_config, config); | ||
} | ||
if (!data) { | ||
data = new Carousel(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
var action = typeof config === 'string' ? config : _config.slide; | ||
if (!data) { | ||
data = new Carousel(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'number') { | ||
data.to(config); | ||
} else if (typeof action === 'string') { | ||
if (data[action] === undefined) { | ||
throw new Error('No method named "' + action + '"'); | ||
} | ||
data[action](); | ||
} else if (_config.interval) { | ||
data.pause(); | ||
data.cycle(); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'number') { | ||
data.to(config); | ||
} else if (typeof action === 'string') { | ||
if (data[action] === undefined) { | ||
throw new Error('No method named "' + action + '"'); | ||
} | ||
data[action](); | ||
} else if (_config.interval) { | ||
data.pause(); | ||
data.cycle(); | ||
} | ||
}); | ||
Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { | ||
var selector = Util.getSelectorFromElement(this); | ||
if (!selector) { | ||
return; | ||
} | ||
}, { | ||
key: '_dataApiClickHandler', | ||
value: function _dataApiClickHandler(event) { | ||
var selector = Util.getSelectorFromElement(this); | ||
if (!selector) { | ||
return; | ||
} | ||
var target = $(selector)[0]; | ||
var target = $(selector)[0]; | ||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { | ||
return; | ||
} | ||
if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { | ||
return; | ||
} | ||
var config = $.extend({}, $(target).data(), $(this).data()); | ||
var slideIndex = this.getAttribute('data-slide-to'); | ||
var config = $.extend({}, $(target).data(), $(this).data()); | ||
var slideIndex = this.getAttribute('data-slide-to'); | ||
if (slideIndex) { | ||
config.interval = false; | ||
} | ||
if (slideIndex) { | ||
config.interval = false; | ||
} | ||
Carousel._jQueryInterface.call($(target), config); | ||
Carousel._jQueryInterface.call($(target), config); | ||
if (slideIndex) { | ||
$(target).data(DATA_KEY).to(slideIndex); | ||
} | ||
if (slideIndex) { | ||
$(target).data(DATA_KEY).to(slideIndex); | ||
} | ||
event.preventDefault(); | ||
}; | ||
event.preventDefault(); | ||
} | ||
}, { | ||
_createClass(Carousel, null, [{ | ||
key: 'VERSION', | ||
@@ -460,4 +434,10 @@ get: function get() { | ||
return Carousel; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); | ||
@@ -486,3 +466,3 @@ | ||
return Carousel; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=carousel.js.map |
@@ -1,10 +0,10 @@ | ||
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): collapse.js | ||
* Bootstrap (v4.0.0-alpha.5): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +14,3 @@ * -------------------------------------------------------------------------- | ||
var Collapse = (function ($) { | ||
var Collapse = function ($) { | ||
@@ -24,3 +24,3 @@ /** | ||
var NAME = 'collapse'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.collapse'; | ||
@@ -63,3 +63,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Selector = { | ||
ACTIVES: '.panel > .in, .panel > .collapsing', | ||
ACTIVES: '.card > .in, .card > .collapsing', | ||
DATA_TOGGLE: '[data-toggle="collapse"]' | ||
@@ -74,3 +74,3 @@ }; | ||
var Collapse = (function () { | ||
var Collapse = function () { | ||
function Collapse(element, config) { | ||
@@ -95,236 +95,216 @@ _classCallCheck(this, Collapse); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Collapse, [{ | ||
key: 'toggle', | ||
// public | ||
// public | ||
Collapse.prototype.toggle = function toggle() { | ||
if ($(this._element).hasClass(ClassName.IN)) { | ||
this.hide(); | ||
} else { | ||
this.show(); | ||
} | ||
}; | ||
value: function toggle() { | ||
if ($(this._element).hasClass(ClassName.IN)) { | ||
this.hide(); | ||
} else { | ||
this.show(); | ||
Collapse.prototype.show = function show() { | ||
var _this = this; | ||
if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { | ||
return; | ||
} | ||
var actives = void 0; | ||
var activesData = void 0; | ||
if (this._parent) { | ||
actives = $.makeArray($(Selector.ACTIVES)); | ||
if (!actives.length) { | ||
actives = null; | ||
} | ||
} | ||
}, { | ||
key: 'show', | ||
value: function show() { | ||
var _this = this; | ||
if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { | ||
if (actives) { | ||
activesData = $(actives).data(DATA_KEY); | ||
if (activesData && activesData._isTransitioning) { | ||
return; | ||
} | ||
} | ||
var actives = undefined; | ||
var activesData = undefined; | ||
var startEvent = $.Event(Event.SHOW); | ||
$(this._element).trigger(startEvent); | ||
if (startEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (this._parent) { | ||
actives = $.makeArray($(Selector.ACTIVES)); | ||
if (!actives.length) { | ||
actives = null; | ||
} | ||
if (actives) { | ||
Collapse._jQueryInterface.call($(actives), 'hide'); | ||
if (!activesData) { | ||
$(actives).data(DATA_KEY, null); | ||
} | ||
} | ||
if (actives) { | ||
activesData = $(actives).data(DATA_KEY); | ||
if (activesData && activesData._isTransitioning) { | ||
return; | ||
} | ||
} | ||
var dimension = this._getDimension(); | ||
var startEvent = $.Event(Event.SHOW); | ||
$(this._element).trigger(startEvent); | ||
if (startEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); | ||
if (actives) { | ||
Collapse._jQueryInterface.call($(actives), 'hide'); | ||
if (!activesData) { | ||
$(actives).data(DATA_KEY, null); | ||
} | ||
} | ||
this._element.style[dimension] = 0; | ||
this._element.setAttribute('aria-expanded', true); | ||
var dimension = this._getDimension(); | ||
if (this._triggerArray.length) { | ||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); | ||
} | ||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); | ||
this.setTransitioning(true); | ||
this._element.style[dimension] = 0; | ||
this._element.setAttribute('aria-expanded', true); | ||
var complete = function complete() { | ||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); | ||
if (this._triggerArray.length) { | ||
$(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); | ||
} | ||
_this._element.style[dimension] = ''; | ||
this.setTransitioning(true); | ||
_this.setTransitioning(false); | ||
var complete = function complete() { | ||
$(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); | ||
$(_this._element).trigger(Event.SHOWN); | ||
}; | ||
_this._element.style[dimension] = ''; | ||
if (!Util.supportsTransitionEnd()) { | ||
complete(); | ||
return; | ||
} | ||
_this.setTransitioning(false); | ||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); | ||
var scrollSize = 'scroll' + capitalizedDimension; | ||
$(_this._element).trigger(Event.SHOWN); | ||
}; | ||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
if (!Util.supportsTransitionEnd()) { | ||
complete(); | ||
return; | ||
} | ||
this._element.style[dimension] = this._element[scrollSize] + 'px'; | ||
}; | ||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); | ||
var scrollSize = 'scroll' + capitalizedDimension; | ||
Collapse.prototype.hide = function hide() { | ||
var _this2 = this; | ||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { | ||
return; | ||
} | ||
this._element.style[dimension] = this._element[scrollSize] + 'px'; | ||
var startEvent = $.Event(Event.HIDE); | ||
$(this._element).trigger(startEvent); | ||
if (startEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
}, { | ||
key: 'hide', | ||
value: function hide() { | ||
var _this2 = this; | ||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { | ||
return; | ||
} | ||
var dimension = this._getDimension(); | ||
var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; | ||
var startEvent = $.Event(Event.HIDE); | ||
$(this._element).trigger(startEvent); | ||
if (startEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
this._element.style[dimension] = this._element[offsetDimension] + 'px'; | ||
var dimension = this._getDimension(); | ||
var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; | ||
Util.reflow(this._element); | ||
this._element.style[dimension] = this._element[offsetDimension] + 'px'; | ||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); | ||
Util.reflow(this._element); | ||
this._element.setAttribute('aria-expanded', false); | ||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); | ||
if (this._triggerArray.length) { | ||
$(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); | ||
} | ||
this._element.setAttribute('aria-expanded', false); | ||
this.setTransitioning(true); | ||
if (this._triggerArray.length) { | ||
$(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); | ||
} | ||
var complete = function complete() { | ||
_this2.setTransitioning(false); | ||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); | ||
}; | ||
this.setTransitioning(true); | ||
this._element.style[dimension] = ''; | ||
var complete = function complete() { | ||
_this2.setTransitioning(false); | ||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); | ||
}; | ||
if (!Util.supportsTransitionEnd()) { | ||
complete(); | ||
return; | ||
} | ||
this._element.style[dimension] = 0; | ||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
}; | ||
if (!Util.supportsTransitionEnd()) { | ||
complete(); | ||
return; | ||
} | ||
Collapse.prototype.setTransitioning = function setTransitioning(isTransitioning) { | ||
this._isTransitioning = isTransitioning; | ||
}; | ||
$(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} | ||
}, { | ||
key: 'setTransitioning', | ||
value: function setTransitioning(isTransitioning) { | ||
this._isTransitioning = isTransitioning; | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
Collapse.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._config = null; | ||
this._parent = null; | ||
this._element = null; | ||
this._triggerArray = null; | ||
this._isTransitioning = null; | ||
} | ||
this._config = null; | ||
this._parent = null; | ||
this._element = null; | ||
this._triggerArray = null; | ||
this._isTransitioning = null; | ||
}; | ||
// private | ||
// private | ||
}, { | ||
key: '_getConfig', | ||
value: function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
config.toggle = Boolean(config.toggle); // coerce string values | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
} | ||
}, { | ||
key: '_getDimension', | ||
value: function _getDimension() { | ||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH); | ||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; | ||
} | ||
}, { | ||
key: '_getParent', | ||
value: function _getParent() { | ||
var _this3 = this; | ||
Collapse.prototype._getConfig = function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
config.toggle = Boolean(config.toggle); // coerce string values | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
}; | ||
var parent = $(this._config.parent)[0]; | ||
var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; | ||
Collapse.prototype._getDimension = function _getDimension() { | ||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH); | ||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; | ||
}; | ||
$(parent).find(selector).each(function (i, element) { | ||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); | ||
}); | ||
Collapse.prototype._getParent = function _getParent() { | ||
var _this3 = this; | ||
return parent; | ||
} | ||
}, { | ||
key: '_addAriaAndCollapsedClass', | ||
value: function _addAriaAndCollapsedClass(element, triggerArray) { | ||
if (element) { | ||
var isOpen = $(element).hasClass(ClassName.IN); | ||
element.setAttribute('aria-expanded', isOpen); | ||
var parent = $(this._config.parent)[0]; | ||
var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; | ||
if (triggerArray.length) { | ||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); | ||
} | ||
$(parent).find(selector).each(function (i, element) { | ||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); | ||
}); | ||
return parent; | ||
}; | ||
Collapse.prototype._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { | ||
if (element) { | ||
var isOpen = $(element).hasClass(ClassName.IN); | ||
element.setAttribute('aria-expanded', isOpen); | ||
if (triggerArray.length) { | ||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); | ||
} | ||
} | ||
}; | ||
// static | ||
// static | ||
}], [{ | ||
key: '_getTargetFromElement', | ||
value: function _getTargetFromElement(element) { | ||
var selector = Util.getSelectorFromElement(element); | ||
return selector ? $(selector)[0] : null; | ||
} | ||
}, { | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $this = $(this); | ||
var data = $this.data(DATA_KEY); | ||
var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); | ||
Collapse._getTargetFromElement = function _getTargetFromElement(element) { | ||
var selector = Util.getSelectorFromElement(element); | ||
return selector ? $(selector)[0] : null; | ||
}; | ||
if (!data && _config.toggle && /show|hide/.test(config)) { | ||
_config.toggle = false; | ||
} | ||
Collapse._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $this = $(this); | ||
var data = $this.data(DATA_KEY); | ||
var _config = $.extend({}, Default, $this.data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config); | ||
if (!data) { | ||
data = new Collapse(this, _config); | ||
$this.data(DATA_KEY, data); | ||
if (!data && _config.toggle && /show|hide/.test(config)) { | ||
_config.toggle = false; | ||
} | ||
if (!data) { | ||
data = new Collapse(this, _config); | ||
$this.data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(Collapse, null, [{ | ||
key: 'VERSION', | ||
@@ -342,4 +322,10 @@ get: function get() { | ||
return Collapse; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
@@ -369,3 +355,3 @@ event.preventDefault(); | ||
return Collapse; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=collapse.js.map |
@@ -1,10 +0,8 @@ | ||
'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): dropdown.js | ||
* Bootstrap (v4.0.0-alpha.5): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +12,3 @@ * -------------------------------------------------------------------------- | ||
var Dropdown = (function ($) { | ||
var Dropdown = function ($) { | ||
@@ -24,3 +22,3 @@ /** | ||
var NAME = 'dropdown'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.dropdown'; | ||
@@ -67,3 +65,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Dropdown = (function () { | ||
var Dropdown = function () { | ||
function Dropdown(element) { | ||
@@ -77,197 +75,181 @@ _classCallCheck(this, Dropdown); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Dropdown, [{ | ||
key: 'toggle', | ||
// public | ||
// public | ||
Dropdown.prototype.toggle = function toggle() { | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
return false; | ||
} | ||
value: function toggle() { | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
return false; | ||
} | ||
var parent = Dropdown._getParentFromElement(this); | ||
var isActive = $(parent).hasClass(ClassName.OPEN); | ||
var parent = Dropdown._getParentFromElement(this); | ||
var isActive = $(parent).hasClass(ClassName.OPEN); | ||
Dropdown._clearMenus(); | ||
Dropdown._clearMenus(); | ||
if (isActive) { | ||
return false; | ||
} | ||
if (isActive) { | ||
return false; | ||
} | ||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { | ||
if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { | ||
// if mobile we use a backdrop because click events don't delegate | ||
var dropdown = document.createElement('div'); | ||
dropdown.className = ClassName.BACKDROP; | ||
$(dropdown).insertBefore(this); | ||
$(dropdown).on('click', Dropdown._clearMenus); | ||
} | ||
// if mobile we use a backdrop because click events don't delegate | ||
var dropdown = document.createElement('div'); | ||
dropdown.className = ClassName.BACKDROP; | ||
$(dropdown).insertBefore(this); | ||
$(dropdown).on('click', Dropdown._clearMenus); | ||
} | ||
var relatedTarget = { relatedTarget: this }; | ||
var showEvent = $.Event(Event.SHOW, relatedTarget); | ||
var relatedTarget = { relatedTarget: this }; | ||
var showEvent = $.Event(Event.SHOW, relatedTarget); | ||
$(parent).trigger(showEvent); | ||
$(parent).trigger(showEvent); | ||
if (showEvent.isDefaultPrevented()) { | ||
return false; | ||
} | ||
if (showEvent.isDefaultPrevented()) { | ||
return false; | ||
} | ||
this.focus(); | ||
this.setAttribute('aria-expanded', 'true'); | ||
this.focus(); | ||
this.setAttribute('aria-expanded', 'true'); | ||
$(parent).toggleClass(ClassName.OPEN); | ||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); | ||
$(parent).toggleClass(ClassName.OPEN); | ||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget)); | ||
return false; | ||
}; | ||
return false; | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
$(this._element).off(EVENT_KEY); | ||
this._element = null; | ||
} | ||
Dropdown.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
$(this._element).off(EVENT_KEY); | ||
this._element = null; | ||
}; | ||
// private | ||
// private | ||
}, { | ||
key: '_addEventListeners', | ||
value: function _addEventListeners() { | ||
$(this._element).on(Event.CLICK, this.toggle); | ||
} | ||
Dropdown.prototype._addEventListeners = function _addEventListeners() { | ||
$(this._element).on(Event.CLICK, this.toggle); | ||
}; | ||
// static | ||
// static | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
Dropdown._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
if (!data) { | ||
$(this).data(DATA_KEY, data = new Dropdown(this)); | ||
} | ||
if (!data) { | ||
$(this).data(DATA_KEY, data = new Dropdown(this)); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config].call(this); | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
}); | ||
} | ||
}, { | ||
key: '_clearMenus', | ||
value: function _clearMenus(event) { | ||
if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) { | ||
return; | ||
data[config].call(this); | ||
} | ||
}); | ||
}; | ||
var backdrop = $(Selector.BACKDROP)[0]; | ||
if (backdrop) { | ||
backdrop.parentNode.removeChild(backdrop); | ||
} | ||
Dropdown._clearMenus = function _clearMenus(event) { | ||
if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) { | ||
return; | ||
} | ||
var toggles = $.makeArray($(Selector.DATA_TOGGLE)); | ||
var backdrop = $(Selector.BACKDROP)[0]; | ||
if (backdrop) { | ||
backdrop.parentNode.removeChild(backdrop); | ||
} | ||
for (var i = 0; i < toggles.length; i++) { | ||
var _parent = Dropdown._getParentFromElement(toggles[i]); | ||
var relatedTarget = { relatedTarget: toggles[i] }; | ||
var toggles = $.makeArray($(Selector.DATA_TOGGLE)); | ||
if (!$(_parent).hasClass(ClassName.OPEN)) { | ||
continue; | ||
} | ||
for (var i = 0; i < toggles.length; i++) { | ||
var parent = Dropdown._getParentFromElement(toggles[i]); | ||
var relatedTarget = { relatedTarget: toggles[i] }; | ||
if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { | ||
continue; | ||
} | ||
if (!$(parent).hasClass(ClassName.OPEN)) { | ||
continue; | ||
} | ||
var hideEvent = $.Event(Event.HIDE, relatedTarget); | ||
$(_parent).trigger(hideEvent); | ||
if (hideEvent.isDefaultPrevented()) { | ||
continue; | ||
} | ||
if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(parent, event.target)) { | ||
continue; | ||
} | ||
toggles[i].setAttribute('aria-expanded', 'false'); | ||
var hideEvent = $.Event(Event.HIDE, relatedTarget); | ||
$(parent).trigger(hideEvent); | ||
if (hideEvent.isDefaultPrevented()) { | ||
continue; | ||
} | ||
$(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); | ||
} | ||
toggles[i].setAttribute('aria-expanded', 'false'); | ||
$(parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); | ||
} | ||
}, { | ||
key: '_getParentFromElement', | ||
value: function _getParentFromElement(element) { | ||
var parent = undefined; | ||
var selector = Util.getSelectorFromElement(element); | ||
}; | ||
if (selector) { | ||
parent = $(selector)[0]; | ||
} | ||
Dropdown._getParentFromElement = function _getParentFromElement(element) { | ||
var parent = void 0; | ||
var selector = Util.getSelectorFromElement(element); | ||
return parent || element.parentNode; | ||
if (selector) { | ||
parent = $(selector)[0]; | ||
} | ||
}, { | ||
key: '_dataApiKeydownHandler', | ||
value: function _dataApiKeydownHandler(event) { | ||
if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { | ||
return; | ||
} | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
return parent || element.parentNode; | ||
}; | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
return; | ||
} | ||
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { | ||
if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { | ||
return; | ||
} | ||
var parent = Dropdown._getParentFromElement(this); | ||
var isActive = $(parent).hasClass(ClassName.OPEN); | ||
event.preventDefault(); | ||
event.stopPropagation(); | ||
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { | ||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { | ||
return; | ||
} | ||
if (event.which === ESCAPE_KEYCODE) { | ||
var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; | ||
$(toggle).trigger('focus'); | ||
} | ||
var parent = Dropdown._getParentFromElement(this); | ||
var isActive = $(parent).hasClass(ClassName.OPEN); | ||
$(this).trigger('click'); | ||
return; | ||
if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; | ||
$(toggle).trigger('focus'); | ||
} | ||
var items = $.makeArray($(Selector.VISIBLE_ITEMS)); | ||
$(this).trigger('click'); | ||
return; | ||
} | ||
items = items.filter(function (item) { | ||
return item.offsetWidth || item.offsetHeight; | ||
}); | ||
var items = $.makeArray($(Selector.VISIBLE_ITEMS)); | ||
if (!items.length) { | ||
return; | ||
} | ||
items = items.filter(function (item) { | ||
return item.offsetWidth || item.offsetHeight; | ||
}); | ||
var index = items.indexOf(event.target); | ||
if (!items.length) { | ||
return; | ||
} | ||
if (event.which === ARROW_UP_KEYCODE && index > 0) { | ||
// up | ||
index--; | ||
} | ||
var index = items.indexOf(event.target); | ||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { | ||
// down | ||
index++; | ||
} | ||
if (event.which === ARROW_UP_KEYCODE && index > 0) { | ||
// up | ||
index--; | ||
} | ||
if (index < 0) { | ||
index = 0; | ||
} | ||
if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { | ||
// down | ||
index++; | ||
} | ||
items[index].focus(); | ||
if (index < 0) { | ||
index = 0; | ||
} | ||
}, { | ||
items[index].focus(); | ||
}; | ||
_createClass(Dropdown, null, [{ | ||
key: 'VERSION', | ||
@@ -280,4 +262,10 @@ get: function get() { | ||
return Dropdown; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { | ||
@@ -301,3 +289,3 @@ e.stopPropagation(); | ||
return Dropdown; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=dropdown.js.map |
@@ -1,10 +0,10 @@ | ||
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): modal.js | ||
* Bootstrap (v4.0.0-alpha.5): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +14,3 @@ * -------------------------------------------------------------------------- | ||
var Modal = (function ($) { | ||
var Modal = function ($) { | ||
@@ -24,3 +24,3 @@ /** | ||
var NAME = 'modal'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.modal'; | ||
@@ -83,3 +83,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Modal = (function () { | ||
var Modal = function () { | ||
function Modal(element, config) { | ||
@@ -99,378 +99,348 @@ _classCallCheck(this, Modal); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Modal, [{ | ||
key: 'toggle', | ||
// public | ||
// public | ||
Modal.prototype.toggle = function toggle(relatedTarget) { | ||
return this._isShown ? this.hide() : this.show(relatedTarget); | ||
}; | ||
value: function toggle(relatedTarget) { | ||
return this._isShown ? this.hide() : this.show(relatedTarget); | ||
} | ||
}, { | ||
key: 'show', | ||
value: function show(relatedTarget) { | ||
var _this = this; | ||
Modal.prototype.show = function show(relatedTarget) { | ||
var _this = this; | ||
var showEvent = $.Event(Event.SHOW, { | ||
relatedTarget: relatedTarget | ||
}); | ||
var showEvent = $.Event(Event.SHOW, { | ||
relatedTarget: relatedTarget | ||
}); | ||
$(this._element).trigger(showEvent); | ||
$(this._element).trigger(showEvent); | ||
if (this._isShown || showEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (this._isShown || showEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
this._isShown = true; | ||
this._isShown = true; | ||
this._checkScrollbar(); | ||
this._setScrollbar(); | ||
this._checkScrollbar(); | ||
this._setScrollbar(); | ||
$(document.body).addClass(ClassName.OPEN); | ||
$(document.body).addClass(ClassName.OPEN); | ||
this._setEscapeEvent(); | ||
this._setResizeEvent(); | ||
this._setEscapeEvent(); | ||
this._setResizeEvent(); | ||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); | ||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); | ||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { | ||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { | ||
if ($(event.target).is(_this._element)) { | ||
_this._ignoreBackdropClick = true; | ||
} | ||
}); | ||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { | ||
$(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { | ||
if ($(event.target).is(_this._element)) { | ||
_this._ignoreBackdropClick = true; | ||
} | ||
}); | ||
}); | ||
this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); | ||
this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); | ||
}; | ||
Modal.prototype.hide = function hide(event) { | ||
if (event) { | ||
event.preventDefault(); | ||
} | ||
}, { | ||
key: 'hide', | ||
value: function hide(event) { | ||
if (event) { | ||
event.preventDefault(); | ||
} | ||
var hideEvent = $.Event(Event.HIDE); | ||
var hideEvent = $.Event(Event.HIDE); | ||
$(this._element).trigger(hideEvent); | ||
$(this._element).trigger(hideEvent); | ||
if (!this._isShown || hideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (!this._isShown || hideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
this._isShown = false; | ||
this._isShown = false; | ||
this._setEscapeEvent(); | ||
this._setResizeEvent(); | ||
this._setEscapeEvent(); | ||
this._setResizeEvent(); | ||
$(document).off(Event.FOCUSIN); | ||
$(document).off(Event.FOCUSIN); | ||
$(this._element).removeClass(ClassName.IN); | ||
$(this._element).removeClass(ClassName.IN); | ||
$(this._element).off(Event.CLICK_DISMISS); | ||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); | ||
$(this._element).off(Event.CLICK_DISMISS); | ||
$(this._dialog).off(Event.MOUSEDOWN_DISMISS); | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { | ||
$(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
this._hideModal(); | ||
} | ||
$(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
this._hideModal(); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
}; | ||
$(window).off(EVENT_KEY); | ||
$(document).off(EVENT_KEY); | ||
$(this._element).off(EVENT_KEY); | ||
$(this._backdrop).off(EVENT_KEY); | ||
Modal.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
this._config = null; | ||
this._element = null; | ||
this._dialog = null; | ||
this._backdrop = null; | ||
this._isShown = null; | ||
this._isBodyOverflowing = null; | ||
this._ignoreBackdropClick = null; | ||
this._originalBodyPadding = null; | ||
this._scrollbarWidth = null; | ||
} | ||
$(window).off(EVENT_KEY); | ||
$(document).off(EVENT_KEY); | ||
$(this._element).off(EVENT_KEY); | ||
$(this._backdrop).off(EVENT_KEY); | ||
// private | ||
this._config = null; | ||
this._element = null; | ||
this._dialog = null; | ||
this._backdrop = null; | ||
this._isShown = null; | ||
this._isBodyOverflowing = null; | ||
this._ignoreBackdropClick = null; | ||
this._originalBodyPadding = null; | ||
this._scrollbarWidth = null; | ||
}; | ||
}, { | ||
key: '_getConfig', | ||
value: function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
// private | ||
Modal.prototype._getConfig = function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
}; | ||
Modal.prototype._showElement = function _showElement(relatedTarget) { | ||
var _this2 = this; | ||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); | ||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { | ||
// don't move modals dom position | ||
document.body.appendChild(this._element); | ||
} | ||
}, { | ||
key: '_showElement', | ||
value: function _showElement(relatedTarget) { | ||
var _this2 = this; | ||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); | ||
this._element.style.display = 'block'; | ||
this._element.removeAttribute('aria-hidden'); | ||
this._element.scrollTop = 0; | ||
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { | ||
// don't move modals dom position | ||
document.body.appendChild(this._element); | ||
} | ||
if (transition) { | ||
Util.reflow(this._element); | ||
} | ||
this._element.style.display = 'block'; | ||
this._element.removeAttribute('aria-hidden'); | ||
this._element.scrollTop = 0; | ||
$(this._element).addClass(ClassName.IN); | ||
if (transition) { | ||
Util.reflow(this._element); | ||
} | ||
if (this._config.focus) { | ||
this._enforceFocus(); | ||
} | ||
$(this._element).addClass(ClassName.IN); | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
relatedTarget: relatedTarget | ||
}); | ||
if (this._config.focus) { | ||
this._enforceFocus(); | ||
var transitionComplete = function transitionComplete() { | ||
if (_this2._config.focus) { | ||
_this2._element.focus(); | ||
} | ||
$(_this2._element).trigger(shownEvent); | ||
}; | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
relatedTarget: relatedTarget | ||
}); | ||
if (transition) { | ||
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
transitionComplete(); | ||
} | ||
}; | ||
var transitionComplete = function transitionComplete() { | ||
if (_this2._config.focus) { | ||
_this2._element.focus(); | ||
} | ||
$(_this2._element).trigger(shownEvent); | ||
}; | ||
Modal.prototype._enforceFocus = function _enforceFocus() { | ||
var _this3 = this; | ||
if (transition) { | ||
$(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
transitionComplete(); | ||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop | ||
.on(Event.FOCUSIN, function (event) { | ||
if (document !== event.target && _this3._element !== event.target && !$(_this3._element).has(event.target).length) { | ||
_this3._element.focus(); | ||
} | ||
} | ||
}, { | ||
key: '_enforceFocus', | ||
value: function _enforceFocus() { | ||
var _this3 = this; | ||
}); | ||
}; | ||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop | ||
.on(Event.FOCUSIN, function (event) { | ||
if (document !== event.target && _this3._element !== event.target && !$(_this3._element).has(event.target).length) { | ||
_this3._element.focus(); | ||
Modal.prototype._setEscapeEvent = function _setEscapeEvent() { | ||
var _this4 = this; | ||
if (this._isShown && this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
_this4.hide(); | ||
} | ||
}); | ||
} else if (!this._isShown) { | ||
$(this._element).off(Event.KEYDOWN_DISMISS); | ||
} | ||
}, { | ||
key: '_setEscapeEvent', | ||
value: function _setEscapeEvent() { | ||
var _this4 = this; | ||
}; | ||
if (this._isShown && this._config.keyboard) { | ||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) { | ||
if (event.which === ESCAPE_KEYCODE) { | ||
_this4.hide(); | ||
} | ||
}); | ||
} else if (!this._isShown) { | ||
$(this._element).off(Event.KEYDOWN_DISMISS); | ||
} | ||
Modal.prototype._setResizeEvent = function _setResizeEvent() { | ||
if (this._isShown) { | ||
$(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); | ||
} else { | ||
$(window).off(Event.RESIZE); | ||
} | ||
}, { | ||
key: '_setResizeEvent', | ||
value: function _setResizeEvent() { | ||
if (this._isShown) { | ||
$(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); | ||
} else { | ||
$(window).off(Event.RESIZE); | ||
} | ||
} | ||
}, { | ||
key: '_hideModal', | ||
value: function _hideModal() { | ||
var _this5 = this; | ||
}; | ||
this._element.style.display = 'none'; | ||
this._element.setAttribute('aria-hidden', 'true'); | ||
this._showBackdrop(function () { | ||
$(document.body).removeClass(ClassName.OPEN); | ||
_this5._resetAdjustments(); | ||
_this5._resetScrollbar(); | ||
$(_this5._element).trigger(Event.HIDDEN); | ||
}); | ||
} | ||
}, { | ||
key: '_removeBackdrop', | ||
value: function _removeBackdrop() { | ||
if (this._backdrop) { | ||
$(this._backdrop).remove(); | ||
this._backdrop = null; | ||
} | ||
} | ||
}, { | ||
key: '_showBackdrop', | ||
value: function _showBackdrop(callback) { | ||
var _this6 = this; | ||
Modal.prototype._hideModal = function _hideModal() { | ||
var _this5 = this; | ||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; | ||
this._element.style.display = 'none'; | ||
this._element.setAttribute('aria-hidden', 'true'); | ||
this._showBackdrop(function () { | ||
$(document.body).removeClass(ClassName.OPEN); | ||
_this5._resetAdjustments(); | ||
_this5._resetScrollbar(); | ||
$(_this5._element).trigger(Event.HIDDEN); | ||
}); | ||
}; | ||
if (this._isShown && this._config.backdrop) { | ||
var doAnimate = Util.supportsTransitionEnd() && animate; | ||
Modal.prototype._removeBackdrop = function _removeBackdrop() { | ||
if (this._backdrop) { | ||
$(this._backdrop).remove(); | ||
this._backdrop = null; | ||
} | ||
}; | ||
this._backdrop = document.createElement('div'); | ||
this._backdrop.className = ClassName.BACKDROP; | ||
Modal.prototype._showBackdrop = function _showBackdrop(callback) { | ||
var _this6 = this; | ||
if (animate) { | ||
$(this._backdrop).addClass(animate); | ||
} | ||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; | ||
$(this._backdrop).appendTo(document.body); | ||
if (this._isShown && this._config.backdrop) { | ||
var doAnimate = Util.supportsTransitionEnd() && animate; | ||
$(this._element).on(Event.CLICK_DISMISS, function (event) { | ||
if (_this6._ignoreBackdropClick) { | ||
_this6._ignoreBackdropClick = false; | ||
return; | ||
} | ||
if (event.target !== event.currentTarget) { | ||
return; | ||
} | ||
if (_this6._config.backdrop === 'static') { | ||
_this6._element.focus(); | ||
} else { | ||
_this6.hide(); | ||
} | ||
}); | ||
this._backdrop = document.createElement('div'); | ||
this._backdrop.className = ClassName.BACKDROP; | ||
if (doAnimate) { | ||
Util.reflow(this._backdrop); | ||
} | ||
if (animate) { | ||
$(this._backdrop).addClass(animate); | ||
} | ||
$(this._backdrop).addClass(ClassName.IN); | ||
$(this._backdrop).appendTo(document.body); | ||
if (!callback) { | ||
$(this._element).on(Event.CLICK_DISMISS, function (event) { | ||
if (_this6._ignoreBackdropClick) { | ||
_this6._ignoreBackdropClick = false; | ||
return; | ||
} | ||
if (!doAnimate) { | ||
callback(); | ||
if (event.target !== event.currentTarget) { | ||
return; | ||
} | ||
if (_this6._config.backdrop === 'static') { | ||
_this6._element.focus(); | ||
} else { | ||
_this6.hide(); | ||
} | ||
}); | ||
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); | ||
} else if (!this._isShown && this._backdrop) { | ||
$(this._backdrop).removeClass(ClassName.IN); | ||
if (doAnimate) { | ||
Util.reflow(this._backdrop); | ||
} | ||
var callbackRemove = function callbackRemove() { | ||
_this6._removeBackdrop(); | ||
if (callback) { | ||
callback(); | ||
} | ||
}; | ||
$(this._backdrop).addClass(ClassName.IN); | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { | ||
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); | ||
} else { | ||
callbackRemove(); | ||
} | ||
} else if (callback) { | ||
if (!callback) { | ||
return; | ||
} | ||
if (!doAnimate) { | ||
callback(); | ||
return; | ||
} | ||
} | ||
// ---------------------------------------------------------------------- | ||
// the following methods are used to handle overflowing modals | ||
// todo (fat): these should probably be refactored out of modal.js | ||
// ---------------------------------------------------------------------- | ||
$(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); | ||
} else if (!this._isShown && this._backdrop) { | ||
$(this._backdrop).removeClass(ClassName.IN); | ||
}, { | ||
key: '_handleUpdate', | ||
value: function _handleUpdate() { | ||
this._adjustDialog(); | ||
} | ||
}, { | ||
key: '_adjustDialog', | ||
value: function _adjustDialog() { | ||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; | ||
var callbackRemove = function callbackRemove() { | ||
_this6._removeBackdrop(); | ||
if (callback) { | ||
callback(); | ||
} | ||
}; | ||
if (!this._isBodyOverflowing && isModalOverflowing) { | ||
this._element.style.paddingLeft = this._scrollbarWidth + 'px'; | ||
if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { | ||
$(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); | ||
} else { | ||
callbackRemove(); | ||
} | ||
} else if (callback) { | ||
callback(); | ||
} | ||
}; | ||
if (this._isBodyOverflowing && !isModalOverflowing) { | ||
this._element.style.paddingRight = this._scrollbarWidth + 'px'; | ||
} | ||
// ---------------------------------------------------------------------- | ||
// the following methods are used to handle overflowing modals | ||
// todo (fat): these should probably be refactored out of modal.js | ||
// ---------------------------------------------------------------------- | ||
Modal.prototype._handleUpdate = function _handleUpdate() { | ||
this._adjustDialog(); | ||
}; | ||
Modal.prototype._adjustDialog = function _adjustDialog() { | ||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; | ||
if (!this._isBodyOverflowing && isModalOverflowing) { | ||
this._element.style.paddingLeft = this._scrollbarWidth + 'px'; | ||
} | ||
}, { | ||
key: '_resetAdjustments', | ||
value: function _resetAdjustments() { | ||
this._element.style.paddingLeft = ''; | ||
this._element.style.paddingRight = ''; | ||
if (this._isBodyOverflowing && !isModalOverflowing) { | ||
this._element.style.paddingRight = this._scrollbarWidth + 'px'; | ||
} | ||
}, { | ||
key: '_checkScrollbar', | ||
value: function _checkScrollbar() { | ||
this._isBodyOverflowing = document.body.clientWidth < window.innerWidth; | ||
this._scrollbarWidth = this._getScrollbarWidth(); | ||
} | ||
}, { | ||
key: '_setScrollbar', | ||
value: function _setScrollbar() { | ||
var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10); | ||
}; | ||
this._originalBodyPadding = document.body.style.paddingRight || ''; | ||
Modal.prototype._resetAdjustments = function _resetAdjustments() { | ||
this._element.style.paddingLeft = ''; | ||
this._element.style.paddingRight = ''; | ||
}; | ||
if (this._isBodyOverflowing) { | ||
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; | ||
} | ||
Modal.prototype._checkScrollbar = function _checkScrollbar() { | ||
this._isBodyOverflowing = document.body.clientWidth < window.innerWidth; | ||
this._scrollbarWidth = this._getScrollbarWidth(); | ||
}; | ||
Modal.prototype._setScrollbar = function _setScrollbar() { | ||
var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10); | ||
this._originalBodyPadding = document.body.style.paddingRight || ''; | ||
if (this._isBodyOverflowing) { | ||
document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; | ||
} | ||
}, { | ||
key: '_resetScrollbar', | ||
value: function _resetScrollbar() { | ||
document.body.style.paddingRight = this._originalBodyPadding; | ||
} | ||
}, { | ||
key: '_getScrollbarWidth', | ||
value: function _getScrollbarWidth() { | ||
// thx d.walsh | ||
var scrollDiv = document.createElement('div'); | ||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER; | ||
document.body.appendChild(scrollDiv); | ||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; | ||
document.body.removeChild(scrollDiv); | ||
return scrollbarWidth; | ||
} | ||
}; | ||
// static | ||
Modal.prototype._resetScrollbar = function _resetScrollbar() { | ||
document.body.style.paddingRight = this._originalBodyPadding; | ||
}; | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config, relatedTarget) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); | ||
Modal.prototype._getScrollbarWidth = function _getScrollbarWidth() { | ||
// thx d.walsh | ||
var scrollDiv = document.createElement('div'); | ||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER; | ||
document.body.appendChild(scrollDiv); | ||
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; | ||
document.body.removeChild(scrollDiv); | ||
return scrollbarWidth; | ||
}; | ||
if (!data) { | ||
data = new Modal(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
// static | ||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = $.extend({}, Modal.Default, $(this).data(), (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config); | ||
if (!data) { | ||
data = new Modal(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](relatedTarget); | ||
} else if (_config.show) { | ||
data.show(relatedTarget); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](relatedTarget); | ||
} else if (_config.show) { | ||
data.show(relatedTarget); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(Modal, null, [{ | ||
key: 'VERSION', | ||
@@ -488,8 +458,14 @@ get: function get() { | ||
return Modal; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
var _this7 = this; | ||
var target = undefined; | ||
var target = void 0; | ||
var selector = Util.getSelectorFromElement(this); | ||
@@ -537,3 +513,3 @@ | ||
return Modal; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=modal.js.map |
@@ -1,14 +0,14 @@ | ||
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): popover.js | ||
* Bootstrap (v4.0.0-alpha.5): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -18,3 +18,3 @@ * -------------------------------------------------------------------------- | ||
var Popover = (function ($) { | ||
var Popover = function ($) { | ||
@@ -28,3 +28,3 @@ /** | ||
var NAME = 'popover'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.popover'; | ||
@@ -38,3 +38,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
content: '', | ||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>' | ||
template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>' | ||
}); | ||
@@ -53,4 +53,3 @@ | ||
TITLE: '.popover-title', | ||
CONTENT: '.popover-content', | ||
ARROW: '.popover-arrow' | ||
CONTENT: '.popover-content' | ||
}; | ||
@@ -77,3 +76,3 @@ | ||
var Popover = (function (_Tooltip) { | ||
var Popover = function (_Tooltip) { | ||
_inherits(Popover, _Tooltip); | ||
@@ -84,75 +83,62 @@ | ||
_get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments); | ||
return _possibleConstructorReturn(this, _Tooltip.apply(this, arguments)); | ||
} | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* jQuery | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// overrides | ||
_createClass(Popover, [{ | ||
key: 'isWithContent', | ||
Popover.prototype.isWithContent = function isWithContent() { | ||
return this.getTitle() || this._getContent(); | ||
}; | ||
// overrides | ||
Popover.prototype.getTipElement = function getTipElement() { | ||
return this.tip = this.tip || $(this.config.template)[0]; | ||
}; | ||
value: function isWithContent() { | ||
return this.getTitle() || this._getContent(); | ||
} | ||
}, { | ||
key: 'getTipElement', | ||
value: function getTipElement() { | ||
return this.tip = this.tip || $(this.config.template)[0]; | ||
} | ||
}, { | ||
key: 'setContent', | ||
value: function setContent() { | ||
var $tip = $(this.getTipElement()); | ||
Popover.prototype.setContent = function setContent() { | ||
var $tip = $(this.getTipElement()); | ||
// we use append for html objects to maintain js events | ||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); | ||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); | ||
// we use append for html objects to maintain js events | ||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); | ||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); | ||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); | ||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); | ||
this.cleanupTether(); | ||
} | ||
this.cleanupTether(); | ||
}; | ||
// private | ||
// private | ||
}, { | ||
key: '_getContent', | ||
value: function _getContent() { | ||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); | ||
} | ||
Popover.prototype._getContent = function _getContent() { | ||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); | ||
}; | ||
// static | ||
// static | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = typeof config === 'object' ? config : null; | ||
Popover._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null; | ||
if (!data && /destroy|hide/.test(config)) { | ||
return; | ||
} | ||
if (!data && /destroy|hide/.test(config)) { | ||
return; | ||
} | ||
if (!data) { | ||
data = new Popover(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
if (!data) { | ||
data = new Popover(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(Popover, null, [{ | ||
key: 'VERSION', | ||
// getters | ||
@@ -196,4 +182,10 @@ | ||
return Popover; | ||
})(Tooltip); | ||
}(Tooltip); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* jQuery | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$.fn[NAME] = Popover._jQueryInterface; | ||
@@ -207,3 +199,3 @@ $.fn[NAME].Constructor = Popover; | ||
return Popover; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=popover.js.map |
@@ -1,10 +0,10 @@ | ||
'use strict'; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): scrollspy.js | ||
* Bootstrap (v4.0.0-alpha.5): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +14,3 @@ * -------------------------------------------------------------------------- | ||
var ScrollSpy = (function ($) { | ||
var ScrollSpy = function ($) { | ||
@@ -24,3 +24,3 @@ /** | ||
var NAME = 'scrollspy'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.scrollspy'; | ||
@@ -80,3 +80,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var ScrollSpy = (function () { | ||
var ScrollSpy = function () { | ||
function ScrollSpy(element, config) { | ||
@@ -100,188 +100,170 @@ _classCallCheck(this, ScrollSpy); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(ScrollSpy, [{ | ||
key: 'refresh', | ||
// public | ||
// public | ||
ScrollSpy.prototype.refresh = function refresh() { | ||
var _this = this; | ||
value: function refresh() { | ||
var _this = this; | ||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; | ||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; | ||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; | ||
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; | ||
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; | ||
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; | ||
this._offsets = []; | ||
this._targets = []; | ||
this._offsets = []; | ||
this._targets = []; | ||
this._scrollHeight = this._getScrollHeight(); | ||
this._scrollHeight = this._getScrollHeight(); | ||
var targets = $.makeArray($(this._selector)); | ||
var targets = $.makeArray($(this._selector)); | ||
targets.map(function (element) { | ||
var target = void 0; | ||
var targetSelector = Util.getSelectorFromElement(element); | ||
targets.map(function (element) { | ||
var target = undefined; | ||
var targetSelector = Util.getSelectorFromElement(element); | ||
if (targetSelector) { | ||
target = $(targetSelector)[0]; | ||
} | ||
if (targetSelector) { | ||
target = $(targetSelector)[0]; | ||
} | ||
if (target && (target.offsetWidth || target.offsetHeight)) { | ||
// todo (fat): remove sketch reliance on jQuery position/offset | ||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; | ||
} | ||
return null; | ||
}).filter(function (item) { | ||
return item; | ||
}).sort(function (a, b) { | ||
return a[0] - b[0]; | ||
}).forEach(function (item) { | ||
_this._offsets.push(item[0]); | ||
_this._targets.push(item[1]); | ||
}); | ||
}; | ||
if (target && (target.offsetWidth || target.offsetHeight)) { | ||
// todo (fat): remove sketch reliance on jQuery position/offset | ||
return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; | ||
} | ||
return null; | ||
}).filter(function (item) { | ||
return item; | ||
}).sort(function (a, b) { | ||
return a[0] - b[0]; | ||
}).forEach(function (item) { | ||
_this._offsets.push(item[0]); | ||
_this._targets.push(item[1]); | ||
}); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
$(this._scrollElement).off(EVENT_KEY); | ||
ScrollSpy.prototype.dispose = function dispose() { | ||
$.removeData(this._element, DATA_KEY); | ||
$(this._scrollElement).off(EVENT_KEY); | ||
this._element = null; | ||
this._scrollElement = null; | ||
this._config = null; | ||
this._selector = null; | ||
this._offsets = null; | ||
this._targets = null; | ||
this._activeTarget = null; | ||
this._scrollHeight = null; | ||
} | ||
this._element = null; | ||
this._scrollElement = null; | ||
this._config = null; | ||
this._selector = null; | ||
this._offsets = null; | ||
this._targets = null; | ||
this._activeTarget = null; | ||
this._scrollHeight = null; | ||
}; | ||
// private | ||
// private | ||
}, { | ||
key: '_getConfig', | ||
value: function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
ScrollSpy.prototype._getConfig = function _getConfig(config) { | ||
config = $.extend({}, Default, config); | ||
if (typeof config.target !== 'string') { | ||
var id = $(config.target).attr('id'); | ||
if (!id) { | ||
id = Util.getUID(NAME); | ||
$(config.target).attr('id', id); | ||
} | ||
config.target = '#' + id; | ||
if (typeof config.target !== 'string') { | ||
var id = $(config.target).attr('id'); | ||
if (!id) { | ||
id = Util.getUID(NAME); | ||
$(config.target).attr('id', id); | ||
} | ||
config.target = '#' + id; | ||
} | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
Util.typeCheckConfig(NAME, config, DefaultType); | ||
return config; | ||
} | ||
}, { | ||
key: '_getScrollTop', | ||
value: function _getScrollTop() { | ||
return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; | ||
} | ||
}, { | ||
key: '_getScrollHeight', | ||
value: function _getScrollHeight() { | ||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); | ||
} | ||
}, { | ||
key: '_process', | ||
value: function _process() { | ||
var scrollTop = this._getScrollTop() + this._config.offset; | ||
var scrollHeight = this._getScrollHeight(); | ||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; | ||
return config; | ||
}; | ||
if (this._scrollHeight !== scrollHeight) { | ||
this.refresh(); | ||
} | ||
ScrollSpy.prototype._getScrollTop = function _getScrollTop() { | ||
return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; | ||
}; | ||
if (scrollTop >= maxScroll) { | ||
var target = this._targets[this._targets.length - 1]; | ||
ScrollSpy.prototype._getScrollHeight = function _getScrollHeight() { | ||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); | ||
}; | ||
if (this._activeTarget !== target) { | ||
this._activate(target); | ||
} | ||
} | ||
ScrollSpy.prototype._process = function _process() { | ||
var scrollTop = this._getScrollTop() + this._config.offset; | ||
var scrollHeight = this._getScrollHeight(); | ||
var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; | ||
if (this._activeTarget && scrollTop < this._offsets[0]) { | ||
this._activeTarget = null; | ||
this._clear(); | ||
return; | ||
} | ||
if (this._scrollHeight !== scrollHeight) { | ||
this.refresh(); | ||
} | ||
for (var i = this._offsets.length; i--;) { | ||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); | ||
if (scrollTop >= maxScroll) { | ||
var target = this._targets[this._targets.length - 1]; | ||
if (isActiveTarget) { | ||
this._activate(this._targets[i]); | ||
} | ||
if (this._activeTarget !== target) { | ||
this._activate(target); | ||
} | ||
} | ||
}, { | ||
key: '_activate', | ||
value: function _activate(target) { | ||
this._activeTarget = target; | ||
if (this._activeTarget && scrollTop < this._offsets[0]) { | ||
this._activeTarget = null; | ||
this._clear(); | ||
return; | ||
} | ||
var queries = this._selector.split(','); | ||
queries = queries.map(function (selector) { | ||
return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]'); | ||
}); | ||
for (var i = this._offsets.length; i--;) { | ||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); | ||
var $link = $(queries.join(',')); | ||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { | ||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); | ||
$link.addClass(ClassName.ACTIVE); | ||
} else { | ||
// todo (fat) this is kinda sus... | ||
// recursively add actives to tested nav-links | ||
$link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); | ||
if (isActiveTarget) { | ||
this._activate(this._targets[i]); | ||
} | ||
} | ||
}; | ||
$(this._scrollElement).trigger(Event.ACTIVATE, { | ||
relatedTarget: target | ||
}); | ||
ScrollSpy.prototype._activate = function _activate(target) { | ||
this._activeTarget = target; | ||
this._clear(); | ||
var queries = this._selector.split(','); | ||
queries = queries.map(function (selector) { | ||
return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]'); | ||
}); | ||
var $link = $(queries.join(',')); | ||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { | ||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); | ||
$link.addClass(ClassName.ACTIVE); | ||
} else { | ||
// todo (fat) this is kinda sus... | ||
// recursively add actives to tested nav-links | ||
$link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); | ||
} | ||
}, { | ||
key: '_clear', | ||
value: function _clear() { | ||
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); | ||
} | ||
// static | ||
$(this._scrollElement).trigger(Event.ACTIVATE, { | ||
relatedTarget: target | ||
}); | ||
}; | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = typeof config === 'object' && config || null; | ||
ScrollSpy.prototype._clear = function _clear() { | ||
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); | ||
}; | ||
if (!data) { | ||
data = new ScrollSpy(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
// static | ||
ScrollSpy._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' && config || null; | ||
if (!data) { | ||
data = new ScrollSpy(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(ScrollSpy, null, [{ | ||
key: 'VERSION', | ||
@@ -299,4 +281,10 @@ get: function get() { | ||
return ScrollSpy; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(window).on(Event.LOAD_DATA_API, function () { | ||
@@ -325,3 +313,3 @@ var scrollSpys = $.makeArray($(Selector.DATA_SPY)); | ||
return ScrollSpy; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=scrollspy.js.map |
@@ -1,10 +0,8 @@ | ||
'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): tab.js | ||
* Bootstrap (v4.0.0-alpha.5): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -14,3 +12,3 @@ * -------------------------------------------------------------------------- | ||
var Tab = (function ($) { | ||
var Tab = function ($) { | ||
@@ -24,3 +22,3 @@ /** | ||
var NAME = 'tab'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.tab'; | ||
@@ -66,3 +64,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
var Tab = (function () { | ||
var Tab = function () { | ||
function Tab(element) { | ||
@@ -74,165 +72,151 @@ _classCallCheck(this, Tab); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Tab, [{ | ||
key: 'show', | ||
// public | ||
// public | ||
Tab.prototype.show = function show() { | ||
var _this = this; | ||
value: function show() { | ||
var _this = this; | ||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) { | ||
return; | ||
} | ||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) { | ||
return; | ||
} | ||
var target = void 0; | ||
var previous = void 0; | ||
var ulElement = $(this._element).closest(Selector.UL)[0]; | ||
var selector = Util.getSelectorFromElement(this._element); | ||
var target = undefined; | ||
var previous = undefined; | ||
var ulElement = $(this._element).closest(Selector.UL)[0]; | ||
var selector = Util.getSelectorFromElement(this._element); | ||
if (ulElement) { | ||
previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); | ||
previous = previous[previous.length - 1]; | ||
} | ||
if (ulElement) { | ||
previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); | ||
previous = previous[previous.length - 1]; | ||
} | ||
var hideEvent = $.Event(Event.HIDE, { | ||
relatedTarget: this._element | ||
}); | ||
var hideEvent = $.Event(Event.HIDE, { | ||
relatedTarget: this._element | ||
var showEvent = $.Event(Event.SHOW, { | ||
relatedTarget: previous | ||
}); | ||
if (previous) { | ||
$(previous).trigger(hideEvent); | ||
} | ||
$(this._element).trigger(showEvent); | ||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
if (selector) { | ||
target = $(selector)[0]; | ||
} | ||
this._activate(this._element, ulElement); | ||
var complete = function complete() { | ||
var hiddenEvent = $.Event(Event.HIDDEN, { | ||
relatedTarget: _this._element | ||
}); | ||
var showEvent = $.Event(Event.SHOW, { | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
relatedTarget: previous | ||
}); | ||
if (previous) { | ||
$(previous).trigger(hideEvent); | ||
} | ||
$(previous).trigger(hiddenEvent); | ||
$(_this._element).trigger(shownEvent); | ||
}; | ||
$(this._element).trigger(showEvent); | ||
if (target) { | ||
this._activate(target, target.parentNode, complete); | ||
} else { | ||
complete(); | ||
} | ||
}; | ||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
Tab.prototype.dispose = function dispose() { | ||
$.removeClass(this._element, DATA_KEY); | ||
this._element = null; | ||
}; | ||
if (selector) { | ||
target = $(selector)[0]; | ||
} | ||
// private | ||
this._activate(this._element, ulElement); | ||
Tab.prototype._activate = function _activate(element, container, callback) { | ||
var active = $(container).find(Selector.ACTIVE_CHILD)[0]; | ||
var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0])); | ||
var complete = function complete() { | ||
var hiddenEvent = $.Event(Event.HIDDEN, { | ||
relatedTarget: _this._element | ||
}); | ||
var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); | ||
var shownEvent = $.Event(Event.SHOWN, { | ||
relatedTarget: previous | ||
}); | ||
if (active && isTransitioning) { | ||
$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
complete(); | ||
} | ||
$(previous).trigger(hiddenEvent); | ||
$(_this._element).trigger(shownEvent); | ||
}; | ||
if (target) { | ||
this._activate(target, target.parentNode, complete); | ||
} else { | ||
complete(); | ||
} | ||
if (active) { | ||
$(active).removeClass(ClassName.IN); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
$.removeClass(this._element, DATA_KEY); | ||
this._element = null; | ||
} | ||
}; | ||
// private | ||
Tab.prototype._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) { | ||
if (active) { | ||
$(active).removeClass(ClassName.ACTIVE); | ||
}, { | ||
key: '_activate', | ||
value: function _activate(element, container, callback) { | ||
var active = $(container).find(Selector.ACTIVE_CHILD)[0]; | ||
var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0])); | ||
var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; | ||
var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); | ||
if (active && isTransitioning) { | ||
$(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
complete(); | ||
if (dropdownChild) { | ||
$(dropdownChild).removeClass(ClassName.ACTIVE); | ||
} | ||
if (active) { | ||
$(active).removeClass(ClassName.IN); | ||
} | ||
active.setAttribute('aria-expanded', false); | ||
} | ||
}, { | ||
key: '_transitionComplete', | ||
value: function _transitionComplete(element, active, isTransitioning, callback) { | ||
if (active) { | ||
$(active).removeClass(ClassName.ACTIVE); | ||
var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; | ||
$(element).addClass(ClassName.ACTIVE); | ||
element.setAttribute('aria-expanded', true); | ||
if (dropdownChild) { | ||
$(dropdownChild).removeClass(ClassName.ACTIVE); | ||
} | ||
if (isTransitioning) { | ||
Util.reflow(element); | ||
$(element).addClass(ClassName.IN); | ||
} else { | ||
$(element).removeClass(ClassName.FADE); | ||
} | ||
active.setAttribute('aria-expanded', false); | ||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { | ||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; | ||
if (dropdownElement) { | ||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); | ||
} | ||
$(element).addClass(ClassName.ACTIVE); | ||
element.setAttribute('aria-expanded', true); | ||
} | ||
if (isTransitioning) { | ||
Util.reflow(element); | ||
$(element).addClass(ClassName.IN); | ||
} else { | ||
$(element).removeClass(ClassName.FADE); | ||
} | ||
if (callback) { | ||
callback(); | ||
} | ||
}; | ||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { | ||
// static | ||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; | ||
if (dropdownElement) { | ||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); | ||
} | ||
Tab._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $this = $(this); | ||
var data = $this.data(DATA_KEY); | ||
element.setAttribute('aria-expanded', true); | ||
if (!data) { | ||
data = data = new Tab(this); | ||
$this.data(DATA_KEY, data); | ||
} | ||
if (callback) { | ||
callback(); | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
} | ||
}); | ||
}; | ||
// static | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var $this = $(this); | ||
var data = $this.data(DATA_KEY); | ||
if (!data) { | ||
data = data = new Tab(this); | ||
$this.data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(Tab, null, [{ | ||
key: 'VERSION', | ||
@@ -245,4 +229,10 @@ get: function get() { | ||
return Tab; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* Data Api implementation | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { | ||
@@ -267,3 +257,3 @@ event.preventDefault(); | ||
return Tab; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=tab.js.map |
@@ -1,12 +0,10 @@ | ||
/* global Tether */ | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
'use strict'; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } | ||
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): tooltip.js | ||
* Bootstrap (v4.0.0-alpha.5): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -16,10 +14,10 @@ * -------------------------------------------------------------------------- | ||
var Tooltip = (function ($) { | ||
var Tooltip = function ($) { | ||
/** | ||
* Check for Tether dependency | ||
* Tether - http://github.hubspot.com/tether/ | ||
* Tether - http://tether.io/ | ||
*/ | ||
if (window.Tether === undefined) { | ||
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)'); | ||
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)'); | ||
} | ||
@@ -34,3 +32,3 @@ | ||
var NAME = 'tooltip'; | ||
var VERSION = '4.0.0-alpha.4'; | ||
var VERSION = '4.0.0-alpha.5'; | ||
var DATA_KEY = 'bs.tooltip'; | ||
@@ -44,3 +42,3 @@ var EVENT_KEY = '.' + DATA_KEY; | ||
animation: true, | ||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>', | ||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>', | ||
trigger: 'hover focus', | ||
@@ -122,3 +120,3 @@ title: '', | ||
var Tooltip = (function () { | ||
var Tooltip = function () { | ||
function Tooltip(element, config) { | ||
@@ -142,435 +140,403 @@ _classCallCheck(this, Tooltip); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* jQuery | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
// getters | ||
_createClass(Tooltip, [{ | ||
key: 'enable', | ||
// public | ||
// public | ||
Tooltip.prototype.enable = function enable() { | ||
this._isEnabled = true; | ||
}; | ||
value: function enable() { | ||
this._isEnabled = true; | ||
} | ||
}, { | ||
key: 'disable', | ||
value: function disable() { | ||
this._isEnabled = false; | ||
} | ||
}, { | ||
key: 'toggleEnabled', | ||
value: function toggleEnabled() { | ||
this._isEnabled = !this._isEnabled; | ||
} | ||
}, { | ||
key: 'toggle', | ||
value: function toggle(event) { | ||
if (event) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
var context = $(event.currentTarget).data(dataKey); | ||
Tooltip.prototype.disable = function disable() { | ||
this._isEnabled = false; | ||
}; | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
Tooltip.prototype.toggleEnabled = function toggleEnabled() { | ||
this._isEnabled = !this._isEnabled; | ||
}; | ||
context._activeTrigger.click = !context._activeTrigger.click; | ||
Tooltip.prototype.toggle = function toggle(event) { | ||
if (event) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
var context = $(event.currentTarget).data(dataKey); | ||
if (context._isWithActiveTrigger()) { | ||
context._enter(null, context); | ||
} else { | ||
context._leave(null, context); | ||
} | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
context._activeTrigger.click = !context._activeTrigger.click; | ||
if (context._isWithActiveTrigger()) { | ||
context._enter(null, context); | ||
} else { | ||
context._leave(null, context); | ||
} | ||
} else { | ||
if ($(this.getTipElement()).hasClass(ClassName.IN)) { | ||
this._leave(null, this); | ||
return; | ||
} | ||
if ($(this.getTipElement()).hasClass(ClassName.IN)) { | ||
this._leave(null, this); | ||
return; | ||
} | ||
this._enter(null, this); | ||
} | ||
this._enter(null, this); | ||
} | ||
}, { | ||
key: 'dispose', | ||
value: function dispose() { | ||
clearTimeout(this._timeout); | ||
}; | ||
this.cleanupTether(); | ||
Tooltip.prototype.dispose = function dispose() { | ||
clearTimeout(this._timeout); | ||
$.removeData(this.element, this.constructor.DATA_KEY); | ||
this.cleanupTether(); | ||
$(this.element).off(this.constructor.EVENT_KEY); | ||
$.removeData(this.element, this.constructor.DATA_KEY); | ||
if (this.tip) { | ||
$(this.tip).remove(); | ||
} | ||
$(this.element).off(this.constructor.EVENT_KEY); | ||
this._isEnabled = null; | ||
this._timeout = null; | ||
this._hoverState = null; | ||
this._activeTrigger = null; | ||
this._tether = null; | ||
this.element = null; | ||
this.config = null; | ||
this.tip = null; | ||
if (this.tip) { | ||
$(this.tip).remove(); | ||
} | ||
}, { | ||
key: 'show', | ||
value: function show() { | ||
var _this = this; | ||
var showEvent = $.Event(this.constructor.Event.SHOW); | ||
this._isEnabled = null; | ||
this._timeout = null; | ||
this._hoverState = null; | ||
this._activeTrigger = null; | ||
this._tether = null; | ||
if (this.isWithContent() && this._isEnabled) { | ||
$(this.element).trigger(showEvent); | ||
this.element = null; | ||
this.config = null; | ||
this.tip = null; | ||
}; | ||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); | ||
Tooltip.prototype.show = function show() { | ||
var _this = this; | ||
if (showEvent.isDefaultPrevented() || !isInTheDom) { | ||
return; | ||
} | ||
var showEvent = $.Event(this.constructor.Event.SHOW); | ||
var tip = this.getTipElement(); | ||
var tipId = Util.getUID(this.constructor.NAME); | ||
if (this.isWithContent() && this._isEnabled) { | ||
$(this.element).trigger(showEvent); | ||
tip.setAttribute('id', tipId); | ||
this.element.setAttribute('aria-describedby', tipId); | ||
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); | ||
this.setContent(); | ||
if (showEvent.isDefaultPrevented() || !isInTheDom) { | ||
return; | ||
} | ||
if (this.config.animation) { | ||
$(tip).addClass(ClassName.FADE); | ||
} | ||
var tip = this.getTipElement(); | ||
var tipId = Util.getUID(this.constructor.NAME); | ||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; | ||
tip.setAttribute('id', tipId); | ||
this.element.setAttribute('aria-describedby', tipId); | ||
var attachment = this._getAttachment(placement); | ||
this.setContent(); | ||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); | ||
if (this.config.animation) { | ||
$(tip).addClass(ClassName.FADE); | ||
} | ||
$(this.element).trigger(this.constructor.Event.INSERTED); | ||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; | ||
this._tether = new Tether({ | ||
attachment: attachment, | ||
element: tip, | ||
target: this.element, | ||
classes: TetherClass, | ||
classPrefix: CLASS_PREFIX, | ||
offset: this.config.offset, | ||
constraints: this.config.constraints, | ||
addTargetClasses: false | ||
}); | ||
var attachment = this._getAttachment(placement); | ||
Util.reflow(tip); | ||
this._tether.position(); | ||
$(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); | ||
$(tip).addClass(ClassName.IN); | ||
$(this.element).trigger(this.constructor.Event.INSERTED); | ||
var complete = function complete() { | ||
var prevHoverState = _this._hoverState; | ||
_this._hoverState = null; | ||
this._tether = new Tether({ | ||
attachment: attachment, | ||
element: tip, | ||
target: this.element, | ||
classes: TetherClass, | ||
classPrefix: CLASS_PREFIX, | ||
offset: this.config.offset, | ||
constraints: this.config.constraints, | ||
addTargetClasses: false | ||
}); | ||
$(_this.element).trigger(_this.constructor.Event.SHOWN); | ||
Util.reflow(tip); | ||
this._tether.position(); | ||
if (prevHoverState === HoverState.OUT) { | ||
_this._leave(null, _this); | ||
} | ||
}; | ||
$(tip).addClass(ClassName.IN); | ||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { | ||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); | ||
return; | ||
} | ||
complete(); | ||
} | ||
} | ||
}, { | ||
key: 'hide', | ||
value: function hide(callback) { | ||
var _this2 = this; | ||
var tip = this.getTipElement(); | ||
var hideEvent = $.Event(this.constructor.Event.HIDE); | ||
var complete = function complete() { | ||
if (_this2._hoverState !== HoverState.IN && tip.parentNode) { | ||
tip.parentNode.removeChild(tip); | ||
} | ||
var prevHoverState = _this._hoverState; | ||
_this._hoverState = null; | ||
_this2.element.removeAttribute('aria-describedby'); | ||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN); | ||
_this2.cleanupTether(); | ||
$(_this.element).trigger(_this.constructor.Event.SHOWN); | ||
if (callback) { | ||
callback(); | ||
if (prevHoverState === HoverState.OUT) { | ||
_this._leave(null, _this); | ||
} | ||
}; | ||
$(this.element).trigger(hideEvent); | ||
if (hideEvent.isDefaultPrevented()) { | ||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { | ||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); | ||
return; | ||
} | ||
$(tip).removeClass(ClassName.IN); | ||
complete(); | ||
} | ||
}; | ||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { | ||
Tooltip.prototype.hide = function hide(callback) { | ||
var _this2 = this; | ||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
complete(); | ||
var tip = this.getTipElement(); | ||
var hideEvent = $.Event(this.constructor.Event.HIDE); | ||
var complete = function complete() { | ||
if (_this2._hoverState !== HoverState.IN && tip.parentNode) { | ||
tip.parentNode.removeChild(tip); | ||
} | ||
this._hoverState = ''; | ||
_this2.element.removeAttribute('aria-describedby'); | ||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN); | ||
_this2.cleanupTether(); | ||
if (callback) { | ||
callback(); | ||
} | ||
}; | ||
$(this.element).trigger(hideEvent); | ||
if (hideEvent.isDefaultPrevented()) { | ||
return; | ||
} | ||
// protected | ||
$(tip).removeClass(ClassName.IN); | ||
}, { | ||
key: 'isWithContent', | ||
value: function isWithContent() { | ||
return Boolean(this.getTitle()); | ||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { | ||
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); | ||
} else { | ||
complete(); | ||
} | ||
}, { | ||
key: 'getTipElement', | ||
value: function getTipElement() { | ||
return this.tip = this.tip || $(this.config.template)[0]; | ||
} | ||
}, { | ||
key: 'setContent', | ||
value: function setContent() { | ||
var $tip = $(this.getTipElement()); | ||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); | ||
this._hoverState = ''; | ||
}; | ||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); | ||
// protected | ||
this.cleanupTether(); | ||
} | ||
}, { | ||
key: 'setElementContent', | ||
value: function setElementContent($element, content) { | ||
var html = this.config.html; | ||
if (typeof content === 'object' && (content.nodeType || content.jquery)) { | ||
// content is a DOM node or a jQuery | ||
if (html) { | ||
if (!$(content).parent().is($element)) { | ||
$element.empty().append(content); | ||
} | ||
} else { | ||
$element.text($(content).text()); | ||
Tooltip.prototype.isWithContent = function isWithContent() { | ||
return Boolean(this.getTitle()); | ||
}; | ||
Tooltip.prototype.getTipElement = function getTipElement() { | ||
return this.tip = this.tip || $(this.config.template)[0]; | ||
}; | ||
Tooltip.prototype.setContent = function setContent() { | ||
var $tip = $(this.getTipElement()); | ||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); | ||
$tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); | ||
this.cleanupTether(); | ||
}; | ||
Tooltip.prototype.setElementContent = function setElementContent($element, content) { | ||
var html = this.config.html; | ||
if ((typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && (content.nodeType || content.jquery)) { | ||
// content is a DOM node or a jQuery | ||
if (html) { | ||
if (!$(content).parent().is($element)) { | ||
$element.empty().append(content); | ||
} | ||
} else { | ||
$element[html ? 'html' : 'text'](content); | ||
$element.text($(content).text()); | ||
} | ||
} else { | ||
$element[html ? 'html' : 'text'](content); | ||
} | ||
}, { | ||
key: 'getTitle', | ||
value: function getTitle() { | ||
var title = this.element.getAttribute('data-original-title'); | ||
}; | ||
if (!title) { | ||
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; | ||
} | ||
Tooltip.prototype.getTitle = function getTitle() { | ||
var title = this.element.getAttribute('data-original-title'); | ||
return title; | ||
if (!title) { | ||
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; | ||
} | ||
}, { | ||
key: 'cleanupTether', | ||
value: function cleanupTether() { | ||
if (this._tether) { | ||
this._tether.destroy(); | ||
} | ||
} | ||
// private | ||
return title; | ||
}; | ||
}, { | ||
key: '_getAttachment', | ||
value: function _getAttachment(placement) { | ||
return AttachmentMap[placement.toUpperCase()]; | ||
Tooltip.prototype.cleanupTether = function cleanupTether() { | ||
if (this._tether) { | ||
this._tether.destroy(); | ||
} | ||
}, { | ||
key: '_setListeners', | ||
value: function _setListeners() { | ||
var _this3 = this; | ||
}; | ||
var triggers = this.config.trigger.split(' '); | ||
// private | ||
triggers.forEach(function (trigger) { | ||
if (trigger === 'click') { | ||
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3)); | ||
} else if (trigger !== Trigger.MANUAL) { | ||
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; | ||
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; | ||
Tooltip.prototype._getAttachment = function _getAttachment(placement) { | ||
return AttachmentMap[placement.toUpperCase()]; | ||
}; | ||
$(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3)); | ||
} | ||
}); | ||
Tooltip.prototype._setListeners = function _setListeners() { | ||
var _this3 = this; | ||
if (this.config.selector) { | ||
this.config = $.extend({}, this.config, { | ||
trigger: 'manual', | ||
selector: '' | ||
}); | ||
} else { | ||
this._fixTitle(); | ||
var triggers = this.config.trigger.split(' '); | ||
triggers.forEach(function (trigger) { | ||
if (trigger === 'click') { | ||
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, $.proxy(_this3.toggle, _this3)); | ||
} else if (trigger !== Trigger.MANUAL) { | ||
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; | ||
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; | ||
$(_this3.element).on(eventIn, _this3.config.selector, $.proxy(_this3._enter, _this3)).on(eventOut, _this3.config.selector, $.proxy(_this3._leave, _this3)); | ||
} | ||
}); | ||
if (this.config.selector) { | ||
this.config = $.extend({}, this.config, { | ||
trigger: 'manual', | ||
selector: '' | ||
}); | ||
} else { | ||
this._fixTitle(); | ||
} | ||
}, { | ||
key: '_fixTitle', | ||
value: function _fixTitle() { | ||
var titleType = typeof this.element.getAttribute('data-original-title'); | ||
if (this.element.getAttribute('title') || titleType !== 'string') { | ||
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); | ||
this.element.setAttribute('title', ''); | ||
} | ||
}; | ||
Tooltip.prototype._fixTitle = function _fixTitle() { | ||
var titleType = _typeof(this.element.getAttribute('data-original-title')); | ||
if (this.element.getAttribute('title') || titleType !== 'string') { | ||
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); | ||
this.element.setAttribute('title', ''); | ||
} | ||
}, { | ||
key: '_enter', | ||
value: function _enter(event, context) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
}; | ||
context = context || $(event.currentTarget).data(dataKey); | ||
Tooltip.prototype._enter = function _enter(event, context) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
context = context || $(event.currentTarget).data(dataKey); | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; | ||
} | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { | ||
context._hoverState = HoverState.IN; | ||
return; | ||
} | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; | ||
} | ||
clearTimeout(context._timeout); | ||
if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { | ||
context._hoverState = HoverState.IN; | ||
return; | ||
} | ||
if (!context.config.delay || !context.config.delay.show) { | ||
clearTimeout(context._timeout); | ||
context._hoverState = HoverState.IN; | ||
if (!context.config.delay || !context.config.delay.show) { | ||
context.show(); | ||
return; | ||
} | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.IN) { | ||
context.show(); | ||
return; | ||
} | ||
}, context.config.delay.show); | ||
}; | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.IN) { | ||
context.show(); | ||
} | ||
}, context.config.delay.show); | ||
Tooltip.prototype._leave = function _leave(event, context) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
context = context || $(event.currentTarget).data(dataKey); | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
}, { | ||
key: '_leave', | ||
value: function _leave(event, context) { | ||
var dataKey = this.constructor.DATA_KEY; | ||
context = context || $(event.currentTarget).data(dataKey); | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; | ||
} | ||
if (!context) { | ||
context = new this.constructor(event.currentTarget, this._getDelegateConfig()); | ||
$(event.currentTarget).data(dataKey, context); | ||
} | ||
if (context._isWithActiveTrigger()) { | ||
return; | ||
} | ||
if (event) { | ||
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; | ||
} | ||
clearTimeout(context._timeout); | ||
if (context._isWithActiveTrigger()) { | ||
return; | ||
} | ||
context._hoverState = HoverState.OUT; | ||
clearTimeout(context._timeout); | ||
if (!context.config.delay || !context.config.delay.hide) { | ||
context.hide(); | ||
return; | ||
} | ||
context._hoverState = HoverState.OUT; | ||
if (!context.config.delay || !context.config.delay.hide) { | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.OUT) { | ||
context.hide(); | ||
return; | ||
} | ||
}, context.config.delay.hide); | ||
}; | ||
context._timeout = setTimeout(function () { | ||
if (context._hoverState === HoverState.OUT) { | ||
context.hide(); | ||
} | ||
}, context.config.delay.hide); | ||
} | ||
}, { | ||
key: '_isWithActiveTrigger', | ||
value: function _isWithActiveTrigger() { | ||
for (var trigger in this._activeTrigger) { | ||
if (this._activeTrigger[trigger]) { | ||
return true; | ||
} | ||
Tooltip.prototype._isWithActiveTrigger = function _isWithActiveTrigger() { | ||
for (var trigger in this._activeTrigger) { | ||
if (this._activeTrigger[trigger]) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
}, { | ||
key: '_getConfig', | ||
value: function _getConfig(config) { | ||
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); | ||
if (config.delay && typeof config.delay === 'number') { | ||
config.delay = { | ||
show: config.delay, | ||
hide: config.delay | ||
}; | ||
} | ||
return false; | ||
}; | ||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); | ||
Tooltip.prototype._getConfig = function _getConfig(config) { | ||
config = $.extend({}, this.constructor.Default, $(this.element).data(), config); | ||
return config; | ||
if (config.delay && typeof config.delay === 'number') { | ||
config.delay = { | ||
show: config.delay, | ||
hide: config.delay | ||
}; | ||
} | ||
}, { | ||
key: '_getDelegateConfig', | ||
value: function _getDelegateConfig() { | ||
var config = {}; | ||
if (this.config) { | ||
for (var key in this.config) { | ||
if (this.constructor.Default[key] !== this.config[key]) { | ||
config[key] = this.config[key]; | ||
} | ||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); | ||
return config; | ||
}; | ||
Tooltip.prototype._getDelegateConfig = function _getDelegateConfig() { | ||
var config = {}; | ||
if (this.config) { | ||
for (var key in this.config) { | ||
if (this.constructor.Default[key] !== this.config[key]) { | ||
config[key] = this.config[key]; | ||
} | ||
} | ||
return config; | ||
} | ||
// static | ||
return config; | ||
}; | ||
}], [{ | ||
key: '_jQueryInterface', | ||
value: function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = typeof config === 'object' ? config : null; | ||
// static | ||
if (!data && /destroy|hide/.test(config)) { | ||
return; | ||
} | ||
Tooltip._jQueryInterface = function _jQueryInterface(config) { | ||
return this.each(function () { | ||
var data = $(this).data(DATA_KEY); | ||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null; | ||
if (!data) { | ||
data = new Tooltip(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
if (!data && /dispose|hide/.test(config)) { | ||
return; | ||
} | ||
if (!data) { | ||
data = new Tooltip(this, _config); | ||
$(this).data(DATA_KEY, data); | ||
} | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
}; | ||
if (typeof config === 'string') { | ||
if (data[config] === undefined) { | ||
throw new Error('No method named "' + config + '"'); | ||
} | ||
data[config](); | ||
} | ||
}); | ||
} | ||
}, { | ||
_createClass(Tooltip, null, [{ | ||
key: 'VERSION', | ||
@@ -613,4 +579,10 @@ get: function get() { | ||
return Tooltip; | ||
})(); | ||
}(); | ||
/** | ||
* ------------------------------------------------------------------------ | ||
* jQuery | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
$.fn[NAME] = Tooltip._jQueryInterface; | ||
@@ -624,3 +596,3 @@ $.fn[NAME].Constructor = Tooltip; | ||
return Tooltip; | ||
})(jQuery); | ||
}(jQuery); /* global Tether */ | ||
//# sourceMappingURL=tooltip.js.map |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): util.js | ||
* Bootstrap (v4.0.0-alpha.5): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -8,6 +8,4 @@ * -------------------------------------------------------------------------- | ||
'use strict'; | ||
var Util = function ($) { | ||
var Util = (function ($) { | ||
/** | ||
@@ -32,3 +30,3 @@ * ------------------------------------------------------------------------ | ||
function toType(obj) { | ||
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); | ||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); | ||
} | ||
@@ -60,5 +58,5 @@ | ||
for (var _name in TransitionEndEvent) { | ||
if (el.style[_name] !== undefined) { | ||
return { end: TransitionEndEvent[_name] }; | ||
for (var name in TransitionEndEvent) { | ||
if (el.style[name] !== undefined) { | ||
return { end: TransitionEndEvent[name] }; | ||
} | ||
@@ -111,3 +109,3 @@ } | ||
/* eslint-disable no-bitwise */ | ||
prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here | ||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here | ||
/* eslint-enable no-bitwise */ | ||
@@ -117,3 +115,2 @@ } while (document.getElementById(prefix)); | ||
}, | ||
getSelectorFromElement: function getSelectorFromElement(element) { | ||
@@ -129,15 +126,11 @@ var selector = element.getAttribute('data-target'); | ||
}, | ||
reflow: function reflow(element) { | ||
new Function('bs', 'return bs')(element.offsetHeight); | ||
}, | ||
triggerTransitionEnd: function triggerTransitionEnd(element) { | ||
$(element).trigger(transition.end); | ||
}, | ||
supportsTransitionEnd: function supportsTransitionEnd() { | ||
return Boolean(transition); | ||
}, | ||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { | ||
@@ -148,3 +141,3 @@ for (var property in configTypes) { | ||
var value = config[property]; | ||
var valueType = undefined; | ||
var valueType = void 0; | ||
@@ -168,3 +161,3 @@ if (value && isElement(value)) { | ||
return Util; | ||
})(jQuery); | ||
}(jQuery); | ||
//# sourceMappingURL=util.js.map |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): alert.js | ||
* Bootstrap (v4.0.0-alpha.5): alert.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'alert' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.alert' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): button.js | ||
* Bootstrap (v4.0.0-alpha.5): button.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -18,3 +18,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'button' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.button' | ||
@@ -21,0 +21,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): carousel.js | ||
* Bootstrap (v4.0.0-alpha.5): carousel.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'carousel' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.carousel' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): collapse.js | ||
* Bootstrap (v4.0.0-alpha.5): collapse.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'collapse' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.collapse' | ||
@@ -61,3 +61,3 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
const Selector = { | ||
ACTIVES : '.panel > .in, .panel > .collapsing', | ||
ACTIVES : '.card > .in, .card > .collapsing', | ||
DATA_TOGGLE : '[data-toggle="collapse"]' | ||
@@ -241,3 +241,3 @@ } | ||
this._element.style[dimension] = 0 | ||
this._element.style[dimension] = '' | ||
@@ -244,0 +244,0 @@ if (!Util.supportsTransitionEnd()) { |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): dropdown.js | ||
* Bootstrap (v4.0.0-alpha.5): dropdown.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'dropdown' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.dropdown' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): modal.js | ||
* Bootstrap (v4.0.0-alpha.5): modal.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'modal' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.modal' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -6,3 +6,3 @@ import Tooltip from './tooltip' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): popover.js | ||
* Bootstrap (v4.0.0-alpha.5): popover.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'popover' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.popover' | ||
@@ -33,3 +33,2 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
template : '<div class="popover" role="tooltip">' | ||
+ '<div class="popover-arrow"></div>' | ||
+ '<h3 class="popover-title"></h3>' | ||
@@ -50,4 +49,3 @@ + '<div class="popover-content"></div></div>' | ||
TITLE : '.popover-title', | ||
CONTENT : '.popover-content', | ||
ARROW : '.popover-arrow' | ||
CONTENT : '.popover-content' | ||
} | ||
@@ -54,0 +52,0 @@ |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): scrollspy.js | ||
* Bootstrap (v4.0.0-alpha.5): scrollspy.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'scrollspy' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.scrollspy' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -6,3 +6,3 @@ import Util from './util' | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): tab.js | ||
* Bootstrap (v4.0.0-alpha.5): tab.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -22,3 +22,3 @@ * -------------------------------------------------------------------------- | ||
const NAME = 'tab' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.tab' | ||
@@ -25,0 +25,0 @@ const EVENT_KEY = `.${DATA_KEY}` |
@@ -8,3 +8,3 @@ /* global Tether */ | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): tooltip.js | ||
* Bootstrap (v4.0.0-alpha.5): tooltip.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -18,6 +18,6 @@ * -------------------------------------------------------------------------- | ||
* Check for Tether dependency | ||
* Tether - http://github.hubspot.com/tether/ | ||
* Tether - http://tether.io/ | ||
*/ | ||
if (window.Tether === undefined) { | ||
throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)') | ||
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)') | ||
} | ||
@@ -33,3 +33,3 @@ | ||
const NAME = 'tooltip' | ||
const VERSION = '4.0.0-alpha.4' | ||
const VERSION = '4.0.0-alpha.5' | ||
const DATA_KEY = 'bs.tooltip' | ||
@@ -44,3 +44,2 @@ const EVENT_KEY = `.${DATA_KEY}` | ||
template : '<div class="tooltip" role="tooltip">' | ||
+ '<div class="tooltip-arrow"></div>' | ||
+ '<div class="tooltip-inner"></div></div>', | ||
@@ -618,3 +617,3 @@ trigger : 'hover focus', | ||
if (!data && /destroy|hide/.test(config)) { | ||
if (!data && /dispose|hide/.test(config)) { | ||
return | ||
@@ -621,0 +620,0 @@ } |
/** | ||
* -------------------------------------------------------------------------- | ||
* Bootstrap (v4.0.0-alpha.4): util.js | ||
* Bootstrap (v4.0.0-alpha.5): util.js | ||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
@@ -5,0 +5,0 @@ * -------------------------------------------------------------------------- |
## How does Bootstrap's test suite work? | ||
Bootstrap uses [QUnit](http://api.qunitjs.com/), a powerful, easy-to-use JavaScript unit test framework. Each plugin has a file dedicated to its tests in `unit/<plugin-name>.js`. | ||
Bootstrap uses [QUnit](https://qunitjs.com/), a powerful, easy-to-use JavaScript unit test framework. Each plugin has a file dedicated to its tests in `unit/<plugin-name>.js`. | ||
@@ -17,3 +17,3 @@ * `unit/` contains the unit test files for each Bootstrap plugin. | ||
1. Locate and open the file dedicated to the plugin which you need to add tests to (`unit/<plugin-name>.js`). | ||
2. Review the [QUnit API Documentation](http://api.qunitjs.com/) and use the existing tests as references for how to structure your new tests. | ||
2. Review the [QUnit API Documentation](https://api.qunitjs.com/) and use the existing tests as references for how to structure your new tests. | ||
3. Write the necessary unit test(s) for the new or revised functionality. | ||
@@ -28,3 +28,3 @@ 4. Run `grunt test-js` to see the results of your newly-added test(s). | ||
* Each test should test only one unit per test, although one test can include several assertions. Create multiple tests for multiple units of functionality. | ||
* Each test should begin with [`assert.expect`](http://api.qunitjs.com/expect/) to ensure that the expected assertions are run. | ||
* Each test should begin with [`assert.expect`](https://api.qunitjs.com/expect/) to ensure that the expected assertions are run. | ||
* Each test should follow the project's [JavaScript Code Guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js) | ||
@@ -31,0 +31,0 @@ |
@@ -93,2 +93,17 @@ $(function () { | ||
QUnit.test('should reset style to auto after finishing closing collapse', function (assert) { | ||
assert.expect(1) | ||
var done = assert.async() | ||
$('<div class="collapse"/>') | ||
.on('shown.bs.collapse', function () { | ||
$(this).bootstrapCollapse('hide') | ||
}) | ||
.on('hidden.bs.collapse', function () { | ||
assert.strictEqual(this.style.height, '', 'height is auto') | ||
done() | ||
}) | ||
.bootstrapCollapse('show') | ||
}) | ||
QUnit.test('should remove "collapsed" class from target when collapse is shown', function (assert) { | ||
@@ -224,8 +239,8 @@ assert.expect(1) | ||
var accordionHTML = '<div class="panel-group" id="accordion">' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
var accordionHTML = '<div id="accordion">' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '</div>' | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card') | ||
@@ -259,8 +274,8 @@ var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) | ||
var accordionHTML = '<div class="panel-group accordion">' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
var accordionHTML = '<div class="accordion">' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '</div>' | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card') | ||
@@ -362,8 +377,8 @@ var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent=".accordion"/>').appendTo($groups.eq(0)) | ||
var accordionHTML = '<div class="panel-group" id="accordion">' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
var accordionHTML = '<div id="accordion">' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '</div>' | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card') | ||
@@ -398,7 +413,7 @@ var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) | ||
var accordionHTML = '<div id="accordion">' | ||
+ '<div class="panel"/>' | ||
+ '<div class="panel"/>' | ||
+ '<div class="card"/>' | ||
+ '<div class="card"/>' | ||
+ '</div>' | ||
var showFired = false | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.panel') | ||
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card') | ||
@@ -405,0 +420,0 @@ var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) |
@@ -371,3 +371,3 @@ $(function () { | ||
// this is some dumb hack shit because sub pixels in firefox | ||
// this is some dumb hack stuff because sub pixels in firefox | ||
var top = Math.round($target.offset().top + ($target[0].offsetHeight / 2) - ($tooltip[0].offsetHeight / 2)) | ||
@@ -374,0 +374,0 @@ var top2 = Math.round($tooltip.offset().top) |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){var e=getComputedStyle(t)||{},o=e.position;if("fixed"===o)return t;for(var i=t;i=i.parentNode;){var n=void 0;try{n=getComputedStyle(i)}catch(r){}if("undefined"==typeof n||null===n)return i;var s=n,a=s.overflow,f=s.overflowX,h=s.overflowY;if(/(auto|scroll)/.test(a+h+f)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(n.position)>=0))return i}return document.body}function r(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,i={},n=t.getBoundingClientRect();for(var r in n)i[r]=n[r];var s=x(e);return i.top-=s.top,i.left-=s.left,"undefined"==typeof i.width&&(i.width=document.body.scrollWidth-i.left-i.right),"undefined"==typeof i.height&&(i.height=document.body.scrollHeight-i.top-i.bottom),i.top=i.top-o.clientTop,i.left=i.left-o.clientLeft,i.right=e.body.clientWidth-i.width-i.left,i.bottom=e.body.clientHeight-i.height-i.top,i}function s(t){return t.offsetParent||document.documentElement}function a(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");f(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return{width:n,height:n}}function f(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=u(t).replace(o," ");p(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=u(t)+(" "+e);p(t,o)}}function d(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=u(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function u(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function p(t,e){t.setAttribute("class",e)}function c(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&d(t,o)&&h(t,o)}),e.forEach(function(e){d(t,e)||l(t,e)})}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;e>i;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParent:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=r(e),o=t,i=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],U.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}(),C=void 0;"undefined"==typeof C&&(C={modules:[]});var O=function(){var t=0;return function(){return++t}}(),E={},x=function(t){var e=t._tetherZeroElement;"undefined"==typeof e&&(e=t.createElement("div"),e.setAttribute("data-tether-id",O()),f(e.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(e),t._tetherZeroElement=e);var o=e.getAttribute("data-tether-id");if("undefined"==typeof E[o]){E[o]={};var i=e.getBoundingClientRect();for(var n in i)E[o][n]=i[n];T(function(){delete E[o]})}return E[o]},A=[],T=function(t){A.push(t)},S=function(){for(var t=void 0;t=A.pop();)t()},W=function(){function t(){i(this,t)}return w(t,[{key:"on",value:function(t,e,o){var i=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"==typeof this.bindings||"undefined"==typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,i=Array(o>1?o-1:0),n=1;o>n;n++)i[n-1]=arguments[n];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,h=a;"undefined"==typeof h&&(h=this),s.apply(h,i),f?this.bindings[t].splice(e,1):++e}}}}]),t}();C.Utils={getScrollParent:n,getBounds:r,getOffsetParent:s,extend:f,addClass:l,removeClass:h,hasClass:d,updateClasses:c,defer:T,flush:S,uniqueId:O,Evented:W,getScrollBarSize:a};var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}();if("undefined"==typeof C)throw new Error("You must include the utils.js file before tether.js");var P=C.Utils,n=P.getScrollParent,r=P.getBounds,s=P.getOffsetParent,f=P.extend,l=P.addClass,h=P.removeClass,c=P.updateClasses,T=P.defer,S=P.flush,a=P.getScrollBarSize,k=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var i=e[o];if(void 0!==t.style[i])return i}}(),B=[],_=function(){B.forEach(function(t){t.position(!1)}),S()};!function(){var t=null,e=null,o=null,i=function n(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||("undefined"!=typeof o&&(clearTimeout(o),o=null),t=m(),_(),e=m()-t))};"undefined"!=typeof window&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var z={center:"center",left:"right",right:"left"},F={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},Y=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=z[e.left]),"auto"===i&&(i=F[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},X=function(t){var e=t.split(" "),o=M(e,2),i=o[0],n=o[1];return{top:i,left:n}},j=X,N=function(){function t(e){var o=this;i(this,t),this.position=this.position.bind(this),B.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return w(t,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],i={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=f(i,t);var r=this.options,s=r.element,a=r.target,h=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=j(this.options.targetAttachment),this.attachment=j(this.options.attachment),this.offset=X(this.options.offset),this.targetOffset=X(this.options.targetOffset),"undefined"!=typeof this.scrollParent&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParent=this.target:this.scrollParent=n(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return r(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=r(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=r(o);var i=getComputedStyle(o),n=o.scrollWidth>o.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;n&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var h=this.target.scrollTop/(o.scrollHeight-a);return e.top=h*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t&&this.position()}},{key:"disable",value:function(){h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParent&&this.scrollParent.removeEventListener("scroll",this.position)}},{key:"destroy",value:function(){var t=this;this.disable(),B.forEach(function(e,o){return e===t?void B.splice(o,1):void 0})}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),T(function(){"undefined"!=typeof o._addAttachClasses&&(c(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&c(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=Y(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return r(t.element)}),n=i.width,f=i.height;if(0===n&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;n=h.width,f=h.height}else this.lastSize={width:n,height:f};var l=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=l,u=y(H(this.attachment),{width:n,height:f}),p=y(H(o),d),c=y(this.offset,{width:n,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=l.left+p.left-u.left,b=l.top+p.top-u.top,w=0;w<C.modules.length;++w){var O=C.modules[w],E=O.position.call(this,{left:m,top:b,targetAttachment:o,targetPos:l,elementPos:i,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:A,attachment:this.attachment});if(E===!1)return!1;"undefined"!=typeof E&&"object"==typeof E&&(b=E.top,m=E.left)}var x={page:{top:b,left:m},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-f+innerHeight,left:m-pageXOffset,right:pageXOffset-m-n+innerWidth}},A=void 0;return document.body.scrollWidth>window.innerWidth&&(A=this.cache("scrollbar-size",a),x.viewport.bottom-=A.height),document.body.scrollHeight>window.innerHeight&&(A=this.cache("scrollbar-size",a),x.viewport.right-=A.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-b-f,x.page.right=document.body.scrollWidth-m-n),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return s(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return r(e)}),i=getComputedStyle(e),n=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-n.width+a.right,o.bottom=document.body.scrollHeight-o.top-n.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,h=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+h-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&S(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var r=!1,a=0;a<this.history.length;++a){var h=this.history[a];if("undefined"!=typeof h[i]&&!g(h[i][n],t[i][n])){r=!0;break}}r||(o[i][n]=!0)}}var l={top:"",left:"",right:"",bottom:""},d=function(t,o){var i="undefined"!=typeof e.options.optimizations,n=i?e.options.optimizations.gpu:null;if(n!==!1){var r=void 0,s=void 0;t.top?(l.top=0,r=o.top):(l.bottom=0,r=-o.bottom),t.left?(l.left=0,s=o.left):(l.right=0,s=-o.right),l[k]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==k&&(l[k]+=" translateZ(0)")}else t.top?l.top=o.top+"px":l.bottom=o.bottom+"px",t.left?l.left=o.left+"px":l.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(l.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(l.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){l.position="absolute";var i=e.cache("target-offsetparent",function(){return s(e.target)});s(e.element)!==i&&T(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(l.position="absolute",d({top:!0,left:!0},t.page)),!u){for(var p=!0,c=this.element.parentNode;c&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var m={},v=!1;for(var n in l){var y=l[n],b=this.element.style[n];""!==b&&""!==y&&["top","left","bottom","right"].indexOf(n)>=0&&(b=parseFloat(b),y=parseFloat(y)),b!==y&&(v=!0,m[n]=y)}v&&T(function(){f(e.element.style,m)})}}}]),t}();N.modules=[],C.position=_;var R=f(N,C),M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=C.Utils,r=P.getBounds,f=P.extend,c=P.updateClasses,T=P.defer,U=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return r(e.element)}),a=s.height,h=s.width;if(0===h&&0===a&&"undefined"!=typeof this.lastSize){var l=this.lastSize;h=l.width,a=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=f({},n),y=f({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,f=t.pin;"undefined"==typeof s&&(s="");var l=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=M(c,2);d=g[0],l=g[1]}else l=d=s;var w=b(e,r);("target"===d||"both"===d)&&(o<w[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+a>w[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&(o<w[1]&&"top"===v.top&&("bottom"===y.top?(o+=u,v.top="bottom",o+=a,y.top="top"):"top"===y.top&&(o+=u,v.top="bottom",o-=a,y.top="bottom")),o+a>w[3]&&"bottom"===v.top&&("top"===y.top?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&(o-=u,v.top="top",o+=a,y.top="top")),"middle"===v.top&&(o+a>w[3]&&"top"===y.top?(o-=a,y.top="bottom"):o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"))),("target"===l||"both"===l)&&(i<w[0]&&"left"===v.left&&(i+=p,v.left="right"),i+h>w[2]&&"right"===v.left&&(i-=p,v.left="left")),"together"===l&&(i<w[0]&&"left"===v.left?"right"===y.left?(i+=p,v.left="right",i+=h,y.left="left"):"left"===y.left&&(i+=p,v.left="right",i-=h,y.left="right"):i+h>w[2]&&"right"===v.left?"left"===y.left?(i-=p,v.left="left",i-=h,y.left="right"):"right"===y.left&&(i-=p,v.left="left",i+=h,y.left="left"):"center"===v.left&&(i+h>w[2]&&"left"===y.left?(i-=h,y.left="right"):i<w[0]&&"right"===y.left&&(i+=h,y.left="left"))),("element"===d||"both"===d)&&(o<w[1]&&"bottom"===y.top&&(o+=a,y.top="top"),o+a>w[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===l||"both"===l)&&(i<w[0]&&("right"===y.left?(i+=h,y.left="left"):"center"===y.left&&(i+=h/2,y.left="left")),i+h>w[2]&&("left"===y.left?(i-=h,y.left="right"):"center"===y.left&&(i-=h/2,y.left="right"))),"string"==typeof f?f=f.split(",").map(function(t){return t.trim()}):f===!0&&(f=["top","left","right","bottom"]),f=f||[];var C=[],O=[];o<w[1]&&(f.indexOf("top")>=0?(o=w[1],C.push("top")):O.push("top")),o+a>w[3]&&(f.indexOf("bottom")>=0?(o=w[3]-a,C.push("bottom")):O.push("bottom")),i<w[0]&&(f.indexOf("left")>=0?(i=w[0],C.push("left")):O.push("left")),i+h>w[2]&&(f.indexOf("right")>=0?(i=w[2]-h,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==n.top||v.left!==n.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&e.updateAttachClasses(y,v)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,m,g),c(e.element,m,g)}),{top:o,left:i}}});var P=C.Utils,r=P.getBounds,c=P.updateClasses,T=P.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,n=this.cache("element-bounds",function(){return r(e.element)}),s=n.height,a=n.width,f=this.getTargetBounds(),h=o+s,l=i+a,d=[];o<=f.bottom&&h>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===i||e===l)&&d.push(t)}),i<=f.right&&l>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===h)&&d.push(t)});var u=[],p=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),T(function(){e.options.addTargetClasses!==!1&&c(e.target,p,u),c(e.element,p,u)}),!0}});var M=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,a=M(s,2);n=a[0],r=a[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),R}); | ||
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=t.getBoundingClientRect(),o={};for(var n in e)o[n]=e[n];if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=i(r);o.top+=s.top,o.bottom+=s.top,o.left+=s.left,o.right+=s.left}}return o}function r(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(t.ownerDocument.body),t.ownerDocument!==document&&n.push(t.ownerDocument.defaultView),n}function s(){A&&document.body.removeChild(A),A=null}function a(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n=i(t),r=P();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function f(t){return t.offsetParent||document.documentElement}function l(){if(M)return M;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");h(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return M={width:i,height:i}}function h(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=c(t).replace(o," ");g(t,n)}}function u(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{d(t,e);var o=c(t)+(" "+e);g(t,o)}}function p(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=c(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function c(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function g(t,e){t.setAttribute("class",e)}function m(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&p(t,o)&&d(t,o)}),e.forEach(function(e){p(t,e)||u(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(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 y(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function b(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function w(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function C(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function O(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=a(e),n=o,i=getComputedStyle(e);if(e=[n.left,n.top,o.width+n.left,o.height+n.top],t.ownerDocument!==document){var r=t.ownerDocument.defaultView;e[0]+=r.pageXOffset,e[1]+=r.pageYOffset,e[2]+=r.pageXOffset,e[3]+=r.pageYOffset}G.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(i["border"+t+"Width"]):e[o]-=parseFloat(i["border"+t+"Width"])})}(),e}var E=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),x=void 0;"undefined"==typeof x&&(x={modules:[]});var A=null,T=function(){var t=0;return function(){return++t}}(),S={},P=function(){var t=A;t||(t=document.createElement("div"),t.setAttribute("data-tether-id",T()),h(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),A=t);var e=t.getAttribute("data-tether-id");return"undefined"==typeof S[e]&&(S[e]=i(t),k(function(){delete S[e]})),S[e]},M=null,W=[],k=function(t){W.push(t)},_=function(){for(var t=void 0;t=W.pop();)t()},B=function(){function t(){n(this,t)}return E(t,[{key:"on",value:function(t,e,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,n=Array(o>1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,n),f?this.bindings[t].splice(e,1):++e}}}}]),t}();x.Utils={getActualBoundingClientRect:i,getScrollParents:r,getBounds:a,getOffsetParent:f,extend:h,addClass:u,removeClass:d,hasClass:p,updateClasses:m,defer:k,flush:_,uniqueId:T,Evented:B,getScrollBarSize:l,removeUtilElements:s};var z=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),j=function(t,e,o){for(var n=!0;n;){var i=t,r=e,s=o;n=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=r,o=s,n=!0,a=l=void 0}};if("undefined"==typeof x)throw new Error("You must include the utils.js file before tether.js");var Y=x.Utils,r=Y.getScrollParents,a=Y.getBounds,f=Y.getOffsetParent,h=Y.extend,u=Y.addClass,d=Y.removeClass,m=Y.updateClasses,k=Y.defer,_=Y.flush,l=Y.getScrollBarSize,s=Y.removeUtilElements,L=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var n=e[o];if(void 0!==t.style[n])return n}}(),D=[],X=function(){D.forEach(function(t){t.position(!1)}),_()};!function(){var t=null,e=null,o=null,n=function i(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&b()-t<10||(null!=o&&(clearTimeout(o),o=null),t=b(),X(),e=b()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var F={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},N={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},U=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=F[e.left]),"auto"===n&&(n=H[e.top]),{left:o,top:n}},V=function(t){var e=t.left,o=t.top;return"undefined"!=typeof N[t.left]&&(e=N[t.left]),"undefined"!=typeof N[t.top]&&(o=N[t.top]),{left:e,top:o}},R=function(t){var e=t.split(" "),o=z(e,2),n=o[0],i=o[1];return{top:n,left:i}},q=R,I=function(t){function e(t){var o=this;n(this,e),j(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),D.push(this),this.history=[],this.setOptions(t,!1),x.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return v(e,t),E(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=h(n,t);var i=this.options,s=i.element,a=i.target,f=i.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),u(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&u(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=q(this.options.targetAttachment),this.attachment=q(this.options.attachment),this.offset=R(this.options.offset),this.targetOffset=R(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return a(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=a(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=a(o);var n=getComputedStyle(o),i=o.scrollWidth>o.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var s=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*s*(s/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>s&&this.target===document.body&&(f=-11e-5*Math.pow(s,2)-.00727*s+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-s);return e.top=l*(s-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),D.forEach(function(e,o){e===t&&D.splice(o,1)}),0===D.length&&s()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),k(function(){"undefined"!=typeof o._addAttachClasses&&(m(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&m(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=U(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return a(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var s=this.lastSize;i=s.width,r=s.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=C(V(this.attachment),{width:i,height:r}),p=C(V(o),d),c=C(this.offset,{width:i,height:r}),g=C(this.targetOffset,d);u=w(u,c),p=w(p,g);for(var m=h.left+p.left-u.left,v=h.top+p.top-u.top,y=0;y<x.modules.length;++y){var b=x.modules[y],O=b.position.call(this,{left:m,top:v,targetAttachment:o,targetPos:h,elementPos:n,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:S,attachment:this.attachment});if(O===!1)return!1;"undefined"!=typeof O&&"object"==typeof O&&(v=O.top,m=O.left)}var E={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-i+innerWidth}},A=this.target.ownerDocument,T=A.defaultView,S=void 0;return T.innerHeight>A.documentElement.clientHeight&&(S=this.cache("scrollbar-size",l),E.viewport.bottom-=S.height),T.innerWidth>A.documentElement.clientWidth&&(S=this.cache("scrollbar-size",l),E.viewport.right-=S.width),(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position))&&(E.page.bottom=A.body.scrollHeight-v-r,E.page.right=A.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return f(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return a(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-i.width+r.right,o.bottom=A.body.scrollHeight-o.top-i.height+r.bottom,E.page.top>=o.top+r.top&&E.page.bottom>=o.bottom&&E.page.left>=o.left+r.left&&E.page.right>=o.right){var s=e.scrollTop,l=e.scrollLeft;E.offset={top:E.page.top-o.top+s-r.top,left:E.page.left-o.left+l-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),e&&_(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s<this.history.length;++s){var a=this.history[s];if("undefined"!=typeof a[n]&&!y(a[n][i],t[n][i])){r=!0;break}}r||(o[n][i]=!0)}}var l={top:"",left:"",right:"",bottom:""},d=function(t,o){var n="undefined"!=typeof e.options.optimizations,i=n?e.options.optimizations.gpu:null;if(i!==!1){var r=void 0,s=void 0;if(t.top?(l.top=0,r=o.top):(l.bottom=0,r=-o.bottom),t.left?(l.left=0,s=o.left):(l.right=0,s=-o.right),window.matchMedia){var a=window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches;a||(s=Math.round(s),r=Math.round(r))}l[L]="translateX("+s+"px) translateY("+r+"px)","msTransform"!==L&&(l[L]+=" translateZ(0)")}else t.top?l.top=o.top+"px":l.bottom=o.bottom+"px",t.left?l.left=o.left+"px":l.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(l.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(l.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){l.position="absolute";var n=e.cache("target-offsetparent",function(){return f(e.target)});f(e.element)!==n&&k(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(l.position="absolute",d({top:!0,left:!0},t.page)),!u){for(var p=!0,c=this.element.parentNode;c&&1===c.nodeType&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var g={},m=!1;for(var i in l){var v=l[i],b=this.element.style[i];b!==v&&(m=!0,g[i]=v)}m&&k(function(){h(e.element.style,g),e.trigger("repositioned")})}}}]),e}(B);I.modules=[],x.position=X;var $=h(I,x),z=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Y=x.Utils,a=Y.getBounds,h=Y.extend,m=Y.updateClasses,k=Y.defer,G=["left","top","right","bottom"];x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return a(e.element)}),s=r.height,f=r.width;if(0===f&&0===s&&"undefined"!=typeof this.lastSize){var l=this.lastSize;f=l.width,s=l.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,c=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&c.push(e),o&&c.push(o)}),c.forEach(function(t){["left","top","right","bottom"].forEach(function(e){c.push(t+"-"+e)})});var g=[],v=h({},i),y=h({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,a=t.attachment,l=t.pin;"undefined"==typeof a&&(a="");var h=void 0,d=void 0;if(a.indexOf(" ")>=0){var c=a.split(" "),m=z(c,2);d=m[0],h=m[1]}else h=d=a;var b=O(e,r);("target"===d||"both"===d)&&(o<b[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+s>b[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&o<b[1]?(o+=u,v.top="bottom",o+=s,y.top="top"):"top"===y.top&&o+s>b[3]&&o-(s-u)>=b[1]&&(o-=s-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+s>b[3]?(o-=u,v.top="top",o-=s,y.top="bottom"):"bottom"===y.top&&o<b[1]&&o+(2*s-u)<=b[3]&&(o+=s-u,v.top="top",y.top="top")),"middle"===v.top&&(o+s>b[3]&&"top"===y.top?(o-=s,y.top="bottom"):o<b[1]&&"bottom"===y.top&&(o+=s,y.top="top"))),("target"===h||"both"===h)&&(n<b[0]&&"left"===v.left&&(n+=p,v.left="right"),n+f>b[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(n<b[0]&&"left"===v.left?"right"===y.left?(n+=p,v.left="right",n+=f,y.left="left"):"left"===y.left&&(n+=p,v.left="right",n-=f,y.left="right"):n+f>b[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):n<b[0]&&"right"===y.left&&(n+=f,y.left="left"))),("element"===d||"both"===d)&&(o<b[1]&&"bottom"===y.top&&(o+=s,y.top="top"),o+s>b[3]&&"top"===y.top&&(o-=s,y.top="bottom")),("element"===h||"both"===h)&&(n<b[0]&&("right"===y.left?(n+=f,y.left="left"):"center"===y.left&&(n+=f/2,y.left="left")),n+f>b[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],C=[];o<b[1]&&(l.indexOf("top")>=0?(o=b[1],w.push("top")):C.push("top")),o+s>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-s,w.push("bottom")):C.push("bottom")),n<b[0]&&(l.indexOf("left")>=0?(n=b[0],w.push("left")):C.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):C.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),g.push(t),w.forEach(function(e){g.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),g.push(t),C.forEach(function(e){g.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),k(function(){e.options.addTargetClasses!==!1&&m(e.target,g,c),m(e.element,g,c)}),{top:o,left:n}}});var Y=x.Utils,a=Y.getBounds,m=Y.updateClasses,k=Y.defer;x.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return a(e.element)}),r=i.height,s=i.width,f=this.getTargetBounds(),l=o+r,h=n+s,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&d.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&d.push(t)});var u=[],p=[],c=["left","top","right","bottom"];return u.push(this.getClass("abutted")),c.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),k(function(){e.options.addTargetClasses!==!1&&m(e.target,p,u),m(e.element,p,u)}),!0}});var z=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return x.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=z(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),$}); |
{ | ||
"name": "bootstrap", | ||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", | ||
"version": "4.0.0-alpha.4", | ||
"version": "4.0.0-alpha.5", | ||
"keywords": [ | ||
@@ -14,3 +14,3 @@ "css", | ||
], | ||
"homepage": "http://getbootstrap.com", | ||
"homepage": "https://getbootstrap.com", | ||
"author": "The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)", | ||
@@ -43,37 +43,39 @@ "contributors": [ | ||
"jquery": "1.9.1 - 3", | ||
"tether": "^1.1.1" | ||
"tether": "^1.3.7" | ||
}, | ||
"devDependencies": { | ||
"autoprefixer": "^6.0.3", | ||
"babel-eslint": "^6.0.4", | ||
"eslint": "^3.0.0", | ||
"autoprefixer": "^6.5.0", | ||
"babel-eslint": "^7.0.0", | ||
"babel-plugin-transform-es2015-modules-strip": "^0.1.0", | ||
"babel-preset-es2015": "^6.16.0", | ||
"eslint": "^3.7.1", | ||
"grunt": "^1.0.1", | ||
"grunt-babel": "^5.0.3", | ||
"grunt-build-control": "^0.7.0", | ||
"grunt-babel": "^6.0.0", | ||
"grunt-build-control": "^0.7.1", | ||
"grunt-contrib-clean": "^1.0.0", | ||
"grunt-contrib-compress": "^1.1.0", | ||
"grunt-contrib-concat": "^1.0.0", | ||
"grunt-contrib-connect": "^1.0.0", | ||
"grunt-contrib-compress": "^1.3.0", | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-connect": "^1.0.2", | ||
"grunt-contrib-copy": "^1.0.0", | ||
"grunt-contrib-cssmin": "^1.0.0", | ||
"grunt-contrib-qunit": "^1.0.1", | ||
"grunt-contrib-cssmin": "^1.0.2", | ||
"grunt-contrib-qunit": "^1.2.0", | ||
"grunt-contrib-sass": "^1.0.0", | ||
"grunt-contrib-uglify": "^1.0.0", | ||
"grunt-contrib-uglify": "^2.0.0", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-exec": "^1.0.0", | ||
"grunt-html": "^8.0.1", | ||
"grunt-jekyll": "^0.4.2", | ||
"grunt-sass": "^1.0.0", | ||
"grunt-exec": "^1.0.1", | ||
"grunt-html": "^8.0.2", | ||
"grunt-jekyll": "^0.4.4", | ||
"grunt-sass": "^1.2.1", | ||
"grunt-saucelabs": "^9.0.0", | ||
"grunt-scss-lint": "^0.3.8", | ||
"grunt-scss-lint": "^0.5.0", | ||
"grunt-stamp": "^0.3.0", | ||
"htmlhint": "^0.9.13", | ||
"is-travis": "^1.0.0", | ||
"jscs": "^3.0.4", | ||
"load-grunt-tasks": "^3.4.0", | ||
"postcss-cli": "^2.5.2", | ||
"jscs": "^3.0.7", | ||
"load-grunt-tasks": "^3.5.2", | ||
"postcss-cli": "^2.6.0", | ||
"postcss-flexbugs-fixes": "^2.0.0", | ||
"shelljs": "^0.7.0", | ||
"shx": "^0.1.2", | ||
"time-grunt": "^1.2.1" | ||
"shelljs": "^0.7.4", | ||
"shx": "^0.1.4", | ||
"time-grunt": "^1.4.0" | ||
}, | ||
@@ -105,5 +107,5 @@ "engines": { | ||
"dependencies": { | ||
"jquery": "1.9.1 - 3" | ||
"jquery": "3" | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# [Bootstrap](http://getbootstrap.com) | ||
# [Bootstrap](https://getbootstrap.com) | ||
@@ -8,6 +8,6 @@ [![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com) | ||
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap) | ||
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies) | ||
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap?type=dev) | ||
[![Meteor Atmosphere](https://img.shields.io/badge/meteor-twbs%3Abootstrap-blue.svg)](https://atmospherejs.com/twbs/bootstrap) | ||
[![Packagist Prerelease](https://img.shields.io/packagist/vpre/twbs/bootstrap.svg)](https://packagist.org/packages/twbs/bootstrap) | ||
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/4.0.0-alpha4) | ||
[![NuGet](https://img.shields.io/nuget/vpre/bootstrap.svg)](https://www.nuget.org/packages/bootstrap/4.0.0-alpha5) | ||
@@ -18,3 +18,3 @@ [![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) | ||
To get started, check out <http://getbootstrap.com>! | ||
To get started, check out <https://getbootstrap.com>! | ||
@@ -36,11 +36,11 @@ ## Table of contents | ||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.4.zip) | ||
- [Download the latest release.](https://github.com/twbs/bootstrap/archive/v4.0.0-alpha.5.zip) | ||
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git` | ||
- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-alpha.4` | ||
- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap@=4.0.0-alpha.4` | ||
- Install with [npm](https://www.npmjs.com): `npm install bootstrap@4.0.0-alpha.5` | ||
- Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap@=4.0.0-alpha.5` | ||
- Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap` | ||
- Install with [Bower](http://bower.io): `bower install bootstrap#v4.0.0-alpha.4` | ||
- Install with [Bower](https://bower.io): `bower install bootstrap#v4.0.0-alpha.5` | ||
- Install with [NuGet](https://www.nuget.org): CSS: `Install-Package bootstrap -Pre` Sass: `Install-Package bootstrap.sass -Pre` (`-Pre` is only required until Bootstrap v4 has a stable release). | ||
Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. | ||
Read the [Getting started page](https://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. | ||
@@ -73,3 +73,3 @@ ### What's included | ||
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://getbootstrap.com>. The docs may also be run locally. | ||
Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](https://jekyllrb.com) and publicly hosted on GitHub Pages at <https://getbootstrap.com>. The docs may also be run locally. | ||
@@ -83,7 +83,7 @@ ### Running documentation locally | ||
Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). | ||
Learn more about using Jekyll by reading its [documentation](https://jekyllrb.com/docs/home/). | ||
### Documentation for previous releases | ||
Documentation for v2.3.2 has been made available for the time being at <http://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3. | ||
Documentation for v2.3.2 has been made available for the time being at <https://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3. | ||
@@ -109,3 +109,3 @@ [Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. | ||
- Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap). | ||
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com). | ||
- Read and subscribe to [The Official Bootstrap Blog](https://blog.getbootstrap.com). | ||
- Join [the official Slack room](https://bootstrap-slack.herokuapp.com). | ||
@@ -122,3 +122,3 @@ - Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel. | ||
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. | ||
See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](https://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. | ||
@@ -142,2 +142,2 @@ | ||
Code and documentation copyright 2011-2016 the Bootstrap Authors and Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE). | ||
Code and documentation copyright 2011-2016 the [Bootstrap Authors](https://github.com/twbs/bootstrap/graphs/contributors) and [Twitter, Inc.](https://twitter.com) Code released under the [MIT License](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2136154
151
34950
34
Updatedtether@^1.3.7