carousel.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*!
  2. * Bootstrap carousel.js v4.6.2 (https://getbootstrap.com/)
  3. * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  4. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  5. */
  6. (function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
  8. typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
  9. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
  10. })(this, (function ($, Util) { 'use strict';
  11. function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
  12. var $__default = /*#__PURE__*/_interopDefaultLegacy($);
  13. var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
  14. function _defineProperties(target, props) {
  15. for (var i = 0; i < props.length; i++) {
  16. var descriptor = props[i];
  17. descriptor.enumerable = descriptor.enumerable || false;
  18. descriptor.configurable = true;
  19. if ("value" in descriptor) descriptor.writable = true;
  20. Object.defineProperty(target, descriptor.key, descriptor);
  21. }
  22. }
  23. function _createClass(Constructor, protoProps, staticProps) {
  24. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  25. if (staticProps) _defineProperties(Constructor, staticProps);
  26. Object.defineProperty(Constructor, "prototype", {
  27. writable: false
  28. });
  29. return Constructor;
  30. }
  31. function _extends() {
  32. _extends = Object.assign ? Object.assign.bind() : function (target) {
  33. for (var i = 1; i < arguments.length; i++) {
  34. var source = arguments[i];
  35. for (var key in source) {
  36. if (Object.prototype.hasOwnProperty.call(source, key)) {
  37. target[key] = source[key];
  38. }
  39. }
  40. }
  41. return target;
  42. };
  43. return _extends.apply(this, arguments);
  44. }
  45. /**
  46. * Constants
  47. */
  48. var NAME = 'carousel';
  49. var VERSION = '4.6.2';
  50. var DATA_KEY = 'bs.carousel';
  51. var EVENT_KEY = "." + DATA_KEY;
  52. var DATA_API_KEY = '.data-api';
  53. var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
  54. var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  55. var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
  56. var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
  57. var SWIPE_THRESHOLD = 40;
  58. var CLASS_NAME_CAROUSEL = 'carousel';
  59. var CLASS_NAME_ACTIVE = 'active';
  60. var CLASS_NAME_SLIDE = 'slide';
  61. var CLASS_NAME_RIGHT = 'carousel-item-right';
  62. var CLASS_NAME_LEFT = 'carousel-item-left';
  63. var CLASS_NAME_NEXT = 'carousel-item-next';
  64. var CLASS_NAME_PREV = 'carousel-item-prev';
  65. var CLASS_NAME_POINTER_EVENT = 'pointer-event';
  66. var DIRECTION_NEXT = 'next';
  67. var DIRECTION_PREV = 'prev';
  68. var DIRECTION_LEFT = 'left';
  69. var DIRECTION_RIGHT = 'right';
  70. var EVENT_SLIDE = "slide" + EVENT_KEY;
  71. var EVENT_SLID = "slid" + EVENT_KEY;
  72. var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
  73. var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
  74. var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
  75. var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
  76. var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
  77. var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
  78. var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
  79. var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
  80. var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
  81. var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
  82. var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
  83. var SELECTOR_ACTIVE = '.active';
  84. var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
  85. var SELECTOR_ITEM = '.carousel-item';
  86. var SELECTOR_ITEM_IMG = '.carousel-item img';
  87. var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
  88. var SELECTOR_INDICATORS = '.carousel-indicators';
  89. var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
  90. var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
  91. var Default = {
  92. interval: 5000,
  93. keyboard: true,
  94. slide: false,
  95. pause: 'hover',
  96. wrap: true,
  97. touch: true
  98. };
  99. var DefaultType = {
  100. interval: '(number|boolean)',
  101. keyboard: 'boolean',
  102. slide: '(boolean|string)',
  103. pause: '(string|boolean)',
  104. wrap: 'boolean',
  105. touch: 'boolean'
  106. };
  107. var PointerType = {
  108. TOUCH: 'touch',
  109. PEN: 'pen'
  110. };
  111. /**
  112. * Class definition
  113. */
  114. var Carousel = /*#__PURE__*/function () {
  115. function Carousel(element, config) {
  116. this._items = null;
  117. this._interval = null;
  118. this._activeElement = null;
  119. this._isPaused = false;
  120. this._isSliding = false;
  121. this.touchTimeout = null;
  122. this.touchStartX = 0;
  123. this.touchDeltaX = 0;
  124. this._config = this._getConfig(config);
  125. this._element = element;
  126. this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
  127. this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
  128. this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
  129. this._addEventListeners();
  130. } // Getters
  131. var _proto = Carousel.prototype;
  132. // Public
  133. _proto.next = function next() {
  134. if (!this._isSliding) {
  135. this._slide(DIRECTION_NEXT);
  136. }
  137. };
  138. _proto.nextWhenVisible = function nextWhenVisible() {
  139. var $element = $__default["default"](this._element); // Don't call next when the page isn't visible
  140. // or the carousel or its parent isn't visible
  141. if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
  142. this.next();
  143. }
  144. };
  145. _proto.prev = function prev() {
  146. if (!this._isSliding) {
  147. this._slide(DIRECTION_PREV);
  148. }
  149. };
  150. _proto.pause = function pause(event) {
  151. if (!event) {
  152. this._isPaused = true;
  153. }
  154. if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
  155. Util__default["default"].triggerTransitionEnd(this._element);
  156. this.cycle(true);
  157. }
  158. clearInterval(this._interval);
  159. this._interval = null;
  160. };
  161. _proto.cycle = function cycle(event) {
  162. if (!event) {
  163. this._isPaused = false;
  164. }
  165. if (this._interval) {
  166. clearInterval(this._interval);
  167. this._interval = null;
  168. }
  169. if (this._config.interval && !this._isPaused) {
  170. this._updateInterval();
  171. this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
  172. }
  173. };
  174. _proto.to = function to(index) {
  175. var _this = this;
  176. this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  177. var activeIndex = this._getItemIndex(this._activeElement);
  178. if (index > this._items.length - 1 || index < 0) {
  179. return;
  180. }
  181. if (this._isSliding) {
  182. $__default["default"](this._element).one(EVENT_SLID, function () {
  183. return _this.to(index);
  184. });
  185. return;
  186. }
  187. if (activeIndex === index) {
  188. this.pause();
  189. this.cycle();
  190. return;
  191. }
  192. var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
  193. this._slide(direction, this._items[index]);
  194. };
  195. _proto.dispose = function dispose() {
  196. $__default["default"](this._element).off(EVENT_KEY);
  197. $__default["default"].removeData(this._element, DATA_KEY);
  198. this._items = null;
  199. this._config = null;
  200. this._element = null;
  201. this._interval = null;
  202. this._isPaused = null;
  203. this._isSliding = null;
  204. this._activeElement = null;
  205. this._indicatorsElement = null;
  206. } // Private
  207. ;
  208. _proto._getConfig = function _getConfig(config) {
  209. config = _extends({}, Default, config);
  210. Util__default["default"].typeCheckConfig(NAME, config, DefaultType);
  211. return config;
  212. };
  213. _proto._handleSwipe = function _handleSwipe() {
  214. var absDeltax = Math.abs(this.touchDeltaX);
  215. if (absDeltax <= SWIPE_THRESHOLD) {
  216. return;
  217. }
  218. var direction = absDeltax / this.touchDeltaX;
  219. this.touchDeltaX = 0; // swipe left
  220. if (direction > 0) {
  221. this.prev();
  222. } // swipe right
  223. if (direction < 0) {
  224. this.next();
  225. }
  226. };
  227. _proto._addEventListeners = function _addEventListeners() {
  228. var _this2 = this;
  229. if (this._config.keyboard) {
  230. $__default["default"](this._element).on(EVENT_KEYDOWN, function (event) {
  231. return _this2._keydown(event);
  232. });
  233. }
  234. if (this._config.pause === 'hover') {
  235. $__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) {
  236. return _this2.pause(event);
  237. }).on(EVENT_MOUSELEAVE, function (event) {
  238. return _this2.cycle(event);
  239. });
  240. }
  241. if (this._config.touch) {
  242. this._addTouchEventListeners();
  243. }
  244. };
  245. _proto._addTouchEventListeners = function _addTouchEventListeners() {
  246. var _this3 = this;
  247. if (!this._touchSupported) {
  248. return;
  249. }
  250. var start = function start(event) {
  251. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  252. _this3.touchStartX = event.originalEvent.clientX;
  253. } else if (!_this3._pointerEvent) {
  254. _this3.touchStartX = event.originalEvent.touches[0].clientX;
  255. }
  256. };
  257. var move = function move(event) {
  258. // ensure swiping with one touch and not pinching
  259. _this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX;
  260. };
  261. var end = function end(event) {
  262. if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
  263. _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
  264. }
  265. _this3._handleSwipe();
  266. if (_this3._config.pause === 'hover') {
  267. // If it's a touch-enabled device, mouseenter/leave are fired as
  268. // part of the mouse compatibility events on first tap - the carousel
  269. // would stop cycling until user tapped out of it;
  270. // here, we listen for touchend, explicitly pause the carousel
  271. // (as if it's the second time we tap on it, mouseenter compat event
  272. // is NOT fired) and after a timeout (to allow for mouse compatibility
  273. // events to fire) we explicitly restart cycling
  274. _this3.pause();
  275. if (_this3.touchTimeout) {
  276. clearTimeout(_this3.touchTimeout);
  277. }
  278. _this3.touchTimeout = setTimeout(function (event) {
  279. return _this3.cycle(event);
  280. }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
  281. }
  282. };
  283. $__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
  284. return e.preventDefault();
  285. });
  286. if (this._pointerEvent) {
  287. $__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) {
  288. return start(event);
  289. });
  290. $__default["default"](this._element).on(EVENT_POINTERUP, function (event) {
  291. return end(event);
  292. });
  293. this._element.classList.add(CLASS_NAME_POINTER_EVENT);
  294. } else {
  295. $__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) {
  296. return start(event);
  297. });
  298. $__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) {
  299. return move(event);
  300. });
  301. $__default["default"](this._element).on(EVENT_TOUCHEND, function (event) {
  302. return end(event);
  303. });
  304. }
  305. };
  306. _proto._keydown = function _keydown(event) {
  307. if (/input|textarea/i.test(event.target.tagName)) {
  308. return;
  309. }
  310. switch (event.which) {
  311. case ARROW_LEFT_KEYCODE:
  312. event.preventDefault();
  313. this.prev();
  314. break;
  315. case ARROW_RIGHT_KEYCODE:
  316. event.preventDefault();
  317. this.next();
  318. break;
  319. }
  320. };
  321. _proto._getItemIndex = function _getItemIndex(element) {
  322. this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
  323. return this._items.indexOf(element);
  324. };
  325. _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
  326. var isNextDirection = direction === DIRECTION_NEXT;
  327. var isPrevDirection = direction === DIRECTION_PREV;
  328. var activeIndex = this._getItemIndex(activeElement);
  329. var lastItemIndex = this._items.length - 1;
  330. var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
  331. if (isGoingToWrap && !this._config.wrap) {
  332. return activeElement;
  333. }
  334. var delta = direction === DIRECTION_PREV ? -1 : 1;
  335. var itemIndex = (activeIndex + delta) % this._items.length;
  336. return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
  337. };
  338. _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
  339. var targetIndex = this._getItemIndex(relatedTarget);
  340. var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
  341. var slideEvent = $__default["default"].Event(EVENT_SLIDE, {
  342. relatedTarget: relatedTarget,
  343. direction: eventDirectionName,
  344. from: fromIndex,
  345. to: targetIndex
  346. });
  347. $__default["default"](this._element).trigger(slideEvent);
  348. return slideEvent;
  349. };
  350. _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
  351. if (this._indicatorsElement) {
  352. var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
  353. $__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE);
  354. var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
  355. if (nextIndicator) {
  356. $__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE);
  357. }
  358. }
  359. };
  360. _proto._updateInterval = function _updateInterval() {
  361. var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  362. if (!element) {
  363. return;
  364. }
  365. var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
  366. if (elementInterval) {
  367. this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
  368. this._config.interval = elementInterval;
  369. } else {
  370. this._config.interval = this._config.defaultInterval || this._config.interval;
  371. }
  372. };
  373. _proto._slide = function _slide(direction, element) {
  374. var _this4 = this;
  375. var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
  376. var activeElementIndex = this._getItemIndex(activeElement);
  377. var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
  378. var nextElementIndex = this._getItemIndex(nextElement);
  379. var isCycling = Boolean(this._interval);
  380. var directionalClassName;
  381. var orderClassName;
  382. var eventDirectionName;
  383. if (direction === DIRECTION_NEXT) {
  384. directionalClassName = CLASS_NAME_LEFT;
  385. orderClassName = CLASS_NAME_NEXT;
  386. eventDirectionName = DIRECTION_LEFT;
  387. } else {
  388. directionalClassName = CLASS_NAME_RIGHT;
  389. orderClassName = CLASS_NAME_PREV;
  390. eventDirectionName = DIRECTION_RIGHT;
  391. }
  392. if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
  393. this._isSliding = false;
  394. return;
  395. }
  396. var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
  397. if (slideEvent.isDefaultPrevented()) {
  398. return;
  399. }
  400. if (!activeElement || !nextElement) {
  401. // Some weirdness is happening, so we bail
  402. return;
  403. }
  404. this._isSliding = true;
  405. if (isCycling) {
  406. this.pause();
  407. }
  408. this._setActiveIndicatorElement(nextElement);
  409. this._activeElement = nextElement;
  410. var slidEvent = $__default["default"].Event(EVENT_SLID, {
  411. relatedTarget: nextElement,
  412. direction: eventDirectionName,
  413. from: activeElementIndex,
  414. to: nextElementIndex
  415. });
  416. if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) {
  417. $__default["default"](nextElement).addClass(orderClassName);
  418. Util__default["default"].reflow(nextElement);
  419. $__default["default"](activeElement).addClass(directionalClassName);
  420. $__default["default"](nextElement).addClass(directionalClassName);
  421. var transitionDuration = Util__default["default"].getTransitionDurationFromElement(activeElement);
  422. $__default["default"](activeElement).one(Util__default["default"].TRANSITION_END, function () {
  423. $__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
  424. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
  425. _this4._isSliding = false;
  426. setTimeout(function () {
  427. return $__default["default"](_this4._element).trigger(slidEvent);
  428. }, 0);
  429. }).emulateTransitionEnd(transitionDuration);
  430. } else {
  431. $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE);
  432. $__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE);
  433. this._isSliding = false;
  434. $__default["default"](this._element).trigger(slidEvent);
  435. }
  436. if (isCycling) {
  437. this.cycle();
  438. }
  439. } // Static
  440. ;
  441. Carousel._jQueryInterface = function _jQueryInterface(config) {
  442. return this.each(function () {
  443. var data = $__default["default"](this).data(DATA_KEY);
  444. var _config = _extends({}, Default, $__default["default"](this).data());
  445. if (typeof config === 'object') {
  446. _config = _extends({}, _config, config);
  447. }
  448. var action = typeof config === 'string' ? config : _config.slide;
  449. if (!data) {
  450. data = new Carousel(this, _config);
  451. $__default["default"](this).data(DATA_KEY, data);
  452. }
  453. if (typeof config === 'number') {
  454. data.to(config);
  455. } else if (typeof action === 'string') {
  456. if (typeof data[action] === 'undefined') {
  457. throw new TypeError("No method named \"" + action + "\"");
  458. }
  459. data[action]();
  460. } else if (_config.interval && _config.ride) {
  461. data.pause();
  462. data.cycle();
  463. }
  464. });
  465. };
  466. Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
  467. var selector = Util__default["default"].getSelectorFromElement(this);
  468. if (!selector) {
  469. return;
  470. }
  471. var target = $__default["default"](selector)[0];
  472. if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) {
  473. return;
  474. }
  475. var config = _extends({}, $__default["default"](target).data(), $__default["default"](this).data());
  476. var slideIndex = this.getAttribute('data-slide-to');
  477. if (slideIndex) {
  478. config.interval = false;
  479. }
  480. Carousel._jQueryInterface.call($__default["default"](target), config);
  481. if (slideIndex) {
  482. $__default["default"](target).data(DATA_KEY).to(slideIndex);
  483. }
  484. event.preventDefault();
  485. };
  486. _createClass(Carousel, null, [{
  487. key: "VERSION",
  488. get: function get() {
  489. return VERSION;
  490. }
  491. }, {
  492. key: "Default",
  493. get: function get() {
  494. return Default;
  495. }
  496. }]);
  497. return Carousel;
  498. }();
  499. /**
  500. * Data API implementation
  501. */
  502. $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
  503. $__default["default"](window).on(EVENT_LOAD_DATA_API, function () {
  504. var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
  505. for (var i = 0, len = carousels.length; i < len; i++) {
  506. var $carousel = $__default["default"](carousels[i]);
  507. Carousel._jQueryInterface.call($carousel, $carousel.data());
  508. }
  509. });
  510. /**
  511. * jQuery
  512. */
  513. $__default["default"].fn[NAME] = Carousel._jQueryInterface;
  514. $__default["default"].fn[NAME].Constructor = Carousel;
  515. $__default["default"].fn[NAME].noConflict = function () {
  516. $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
  517. return Carousel._jQueryInterface;
  518. };
  519. return Carousel;
  520. }));
  521. //# sourceMappingURL=carousel.js.map