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.
3 lines
10 KiB
3 lines
10 KiB
3 years ago
|
define ("theme_ilb/bootstrap/carousel",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b<arguments.length;b++){c=null!=arguments[b]?arguments[b]:{};if(b%2){f(Object(c),!0).forEach(function(b){h(a,b,c[b])})}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(a,Object.getOwnPropertyDescriptors(c))}else{f(Object(c)).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(c,b))})}}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function j(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function k(a,b,c){if(b)j(a.prototype,b);if(c)j(a,c);return a}var l="bs.carousel",m=".".concat(l),n=".data-api",o=b.default.fn.carousel,p={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},q={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},r="next",s="prev",t="slide".concat(m),u="slid".concat(m),v="keydown".concat(m),w="mouseenter".concat(m),x="mouseleave".concat(m),y="touchstart".concat(m),z="touchmove".concat(m),A="touchend".concat(m),B="pointerdown".concat(m),C="pointerup".concat(m),D="dragstart".concat(m),E="load".concat(m).concat(n),F="click".concat(m).concat(n),G="active",H=".active.carousel-item",I={TOUCH:"touch",PEN:"pen"},J=function(){function a(b,c){i(this,a);this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this.touchStartX=0;this.touchDeltaX=0;this._config=this._getConfig(c);this._element=b;this._indicatorsElement=this._element.querySelector(".carousel-indicators");this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints;this._pointerEvent=!!(window.PointerEvent||window.MSPointerEvent);this._addEventListeners()}k(a,[{key:"next",value:function next(){if(!this._isSliding){this._slide(r)}}},{key:"nextWhenVisible",value:function nextWhenVisible(){var a=(0,b.default)(this._element);if(!document.hidden&&a.is(":visible")&&"hidden"!==a.css("visibility")){this.next()}}},{key:"prev",value:function prev(){if(!this._isSliding){this._slide(s)}}},{key:"pause",value:function pause(a){if(!a){this._isPaused=!0}if(this._element.querySelector(".carousel-item-next, .carousel-item-prev")){c.default.triggerTransitionEnd(this._element);this.cycle(!0)}clearInterval(this._interval);this._interval=null}},{key:"cycle",value:function cycle(a){if(!a){this._isPaused=!1}if(this._interval){clearInterval(this._interval);this._interval=null}if(this._config.interval&&!this._isPaused){this._updateInterval();this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval)}}},{key:"to",value:function to(a){var c=this;this._activeElement=this._element.querySelector(H);var d=this._getItemIndex(this._activeElement);if(a>this._items.length-1||0>a){return}if(this._isSliding){(0,b.default)(this._element).one(u,function(){return c.to(a)});return}if(d===a){this.pause();this.cycle();return}var e=a>d?r:s;this._slide(e,this._items[a])}},{key:"dispose",value:function dispose(){(0,b.default)(this._element).off(m);b.default.removeData(this._element,l);this._items=nu
|
||
|
//# sourceMappingURL=carousel.min.js.map
|