You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
6.1 KiB
1 line
6.1 KiB
6 years ago
|
define(["exports","jquery","./util"],function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return(e="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})(a)}function f(){return f=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])}return a},f.apply(this,arguments)}function g(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function h(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)}}function i(a,b,c){return b&&h(a.prototype,b),c&&h(a,c),a}Object.defineProperty(a,"__esModule",{value:!0});var j=d(b),k=d(c),l=function(a){var b="collapse",c="4.0.0",d="bs.collapse",h=".".concat(d),j=".data-api",l=a.fn[b],m=600,n={toggle:!0,parent:""},o={toggle:"boolean",parent:"(string|element)"},p={SHOW:"show".concat(h),SHOWN:"shown".concat(h),HIDE:"hide".concat(h),HIDDEN:"hidden".concat(h),CLICK_DATA_API:"click".concat(h).concat(j)},q={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},r={WIDTH:"width",HEIGHT:"height"},s={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},t=function(){function h(b,c){g(this,h),this._isTransitioning=!1,this._element=b,this._config=this._getConfig(c),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'.concat(b.id,'"],')+'[data-toggle="collapse"][data-target="#'.concat(b.id,'"]')));for(var d=a(s.DATA_TOGGLE),e=0;e<d.length;e++){var f=d[e],i=k["default"].getSelectorFromElement(f);null!==i&&a(i).filter(b).length>0&&(this._selector=i,this._triggerArray.push(f))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return i(h,[{key:"toggle",value:function(){a(this._element).hasClass(q.SHOW)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(q.SHOW)){var c,e;if(this._parent&&(c=a.makeArray(a(this._parent).find(s.ACTIVES).filter('[data-parent="'.concat(this._config.parent,'"]'))),0===c.length&&(c=null)),!(c&&(e=a(c).not(this._selector).data(d),e&&e._isTransitioning))){var f=a.Event(p.SHOW);if(a(this._element).trigger(f),!f.isDefaultPrevented()){c&&(h._jQueryInterface.call(a(c).not(this._selector),"hide"),e||a(c).data(d,null));var g=this._getDimension();a(this._element).removeClass(q.COLLAPSE).addClass(q.COLLAPSING),this._element.style[g]=0,this._triggerArray.length>0&&a(this._triggerArray).removeClass(q.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var i=function(){a(b._element).removeClass(q.COLLAPSING).addClass(q.COLLAPSE).addClass(q.SHOW),b._element.style[g]="",b.setTransitioning(!1),a(b._element).trigger(p.SHOWN)};if(!k["default"].supportsTransitionEnd())return void i();var j=g[0].toUpperCase()+g.slice(1),l="scroll".concat(j);a(this._element).one(k["default"].TRANSITION_END,i).emulateTransitionEnd(m),this._element.style[g]="".concat(this._element[l],"px")}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(q.SHOW)){var c=a.Event(p.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var d=this._getDimension();if(this._element.style[d]="".concat(this._element.getBoundingClientRect()[d],"px"),k["default"].reflow(this._element),a(this._element).addClass(q.COLLAPSING).removeClass(q.COLLAPSE).removeClass(q.SHOW),this._triggerArray.length>0)for(var e=0;e<this._triggerArray.length;e++){var f=this._triggerArray[e],g=k["default"].getSelectorFromElement(f);if(null!==g){var h=a(g);h.hasClass(q.SHOW)||a(f).addClass(q.COLLAPSED).attr("aria-expanded",!1)}}this.setTransitioning(!0);var i=function(){b.setTransitioning(!1),a(b._element).removeClass(q.COLLAPSING).addClass(q.COLLAPSE).trig
|