{"version":3,"file":"index-aab0b8a1-chunk.js","sources":["../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/enums.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/math.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/userAgent.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/within.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getVariation.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/flip.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/hide.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/offset.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/debounce.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/createPopper.js","../../../node_modules/.pnpm/@popperjs+core@2.11.8/node_modules/@popperjs/core/lib/popper.js","../../../node_modules/.pnpm/@splidejs+splide@2.4.21/node_modules/@splidejs/splide/dist/js/splide.esm.js","../../../w3t_front/utils/index.js"],"sourcesContent":["export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `
` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/*!\n * Splide.js\n * Version : 2.4.20\n * License : MIT\n * Copyright: 2020 Naotoshi Fujita\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Splide\"] = factory();\n\telse\n\t\troot[\"Splide\"] = factory();\n})(self, function() {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 311:\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => /* binding */ module_Splide\n});\n\n// NAMESPACE OBJECT: ./src/js/constants/states.js\nvar states_namespaceObject = {};\n__webpack_require__.r(states_namespaceObject);\n__webpack_require__.d(states_namespaceObject, {\n \"CREATED\": () => CREATED,\n \"DESTROYED\": () => DESTROYED,\n \"IDLE\": () => IDLE,\n \"MOUNTED\": () => MOUNTED,\n \"MOVING\": () => MOVING\n});\n\n;// CONCATENATED MODULE: ./src/js/core/event.js\n/**\r\n * The function for providing an Event object simply managing events.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * The function for providing an Event object simply managing events.\r\n */\n/* harmony default export */ const core_event = (function () {\n /**\r\n * Store all event data.\r\n *\r\n * @type {Array}\r\n */\n var data = [];\n var Event = {\n /**\r\n * Subscribe the given event(s).\r\n *\r\n * @param {string} events - An event name. Use space to separate multiple events.\r\n * Also, namespace is accepted by dot, such as 'resize.{namespace}'.\r\n * @param {function} handler - A callback function.\r\n * @param {Element} elm - Optional. Native event will be listened to when this arg is provided.\r\n * @param {Object} options - Optional. Options for addEventListener.\r\n */\n on: function on(events, handler, elm, options) {\n if (elm === void 0) {\n elm = null;\n }\n\n if (options === void 0) {\n options = {};\n }\n\n events.split(' ').forEach(function (event) {\n if (elm) {\n elm.addEventListener(event, handler, options);\n }\n\n data.push({\n event: event,\n handler: handler,\n elm: elm,\n options: options\n });\n });\n },\n\n /**\r\n * Unsubscribe the given event(s).\r\n *\r\n * @param {string} events - A event name or names split by space.\r\n * @param {Element} elm - Optional. removeEventListener() will be called when this arg is provided.\r\n */\n off: function off(events, elm) {\n if (elm === void 0) {\n elm = null;\n }\n\n events.split(' ').forEach(function (event) {\n data = data.filter(function (item) {\n if (item && item.event === event && item.elm === elm) {\n unsubscribe(item);\n return false;\n }\n\n return true;\n });\n });\n },\n\n /**\r\n * Emit an event.\r\n * This method is only for custom events.\r\n *\r\n * @param {string} event - An event name.\r\n * @param {*} args - Any number of arguments passed to handlers.\r\n */\n emit: function emit(event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n data.forEach(function (item) {\n if (!item.elm && item.event.split('.')[0] === event) {\n item.handler.apply(item, args);\n }\n });\n },\n\n /**\r\n * Clear event data.\r\n */\n destroy: function destroy() {\n data.forEach(unsubscribe);\n data = [];\n }\n };\n /**\r\n * Remove the registered event listener.\r\n *\r\n * @param {Object} item - An object containing event data.\r\n */\n\n function unsubscribe(item) {\n if (item.elm) {\n item.elm.removeEventListener(item.event, item.handler, item.options);\n }\n }\n\n return Event;\n});\n;// CONCATENATED MODULE: ./src/js/core/state.js\n/**\r\n * The function providing a super simple state system.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * The function providing a super simple state system.\r\n *\r\n * @param {string|number} initialState - Provide the initial state value.\r\n */\n/* harmony default export */ const state = (function (initialState) {\n /**\r\n * Store the current state.\r\n *\r\n * @type {string|number}\r\n */\n var curr = initialState;\n return {\n /**\r\n * Change state.\r\n *\r\n * @param {string|number} state - A new state.\r\n */\n set: function set(state) {\n curr = state;\n },\n\n /**\r\n * Verify if the current state is given one or not.\r\n *\r\n * @param {string|number} state - A state name to be verified.\r\n *\r\n * @return {boolean} - True if the current state is the given one.\r\n */\n is: function is(state) {\n return state === curr;\n }\n };\n});\n;// CONCATENATED MODULE: ./src/js/utils/object.js\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\r\n * Some utility functions related with Object, supporting IE.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\nvar keys = Object.keys;\n/**\r\n * Iterate an object like Array.forEach.\r\n * IE doesn't support forEach of HTMLCollection.\r\n *\r\n * @param {Object} obj - An object.\r\n * @param {function} callback - A function handling each value. Arguments are value, property and index.\r\n */\n\nfunction each(obj, callback) {\n keys(obj).some(function (key, index) {\n return callback(obj[key], key, index);\n });\n}\n/**\r\n * Return values of the given object as an array.\r\n * IE doesn't support Object.values.\r\n *\r\n * @param {Object} obj - An object.\r\n *\r\n * @return {Array} - An array containing all values of the given object.\r\n */\n\nfunction values(obj) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n}\n/**\r\n * Check if the given subject is object or not.\r\n *\r\n * @param {*} subject - A subject to be verified.\r\n *\r\n * @return {boolean} - True if object, false otherwise.\r\n */\n\nfunction isObject(subject) {\n return typeof subject === 'object';\n}\n/**\r\n * Merge two objects deeply.\r\n *\r\n * @param {Object} to - An object where \"from\" is merged.\r\n * @param {Object} from - An object merged to \"to\".\r\n *\r\n * @return {Object} - A merged object.\r\n */\n\nfunction merge(_ref, from) {\n var to = _extends({}, _ref);\n\n each(from, function (value, key) {\n if (isObject(value)) {\n if (!isObject(to[key])) {\n to[key] = {};\n }\n\n to[key] = merge(to[key], value);\n } else {\n to[key] = value;\n }\n });\n return to;\n}\n/**\r\n * Assign all properties \"from\" to \"to\" object.\r\n *\r\n * @param {Object} to - An object where properties are assigned.\r\n * @param {Object} from - An object whose properties are assigned to \"to\".\r\n *\r\n * @return {Object} - An assigned object.\r\n */\n\nfunction object_assign(to, from) {\n keys(from).forEach(function (key) {\n if (!to[key]) {\n Object.defineProperty(to, key, Object.getOwnPropertyDescriptor(from, key));\n }\n });\n return to;\n}\n;// CONCATENATED MODULE: ./src/js/utils/utils.js\n/**\r\n * A package of some miscellaneous utility functions.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Convert the given value to array.\r\n *\r\n * @param {*} value - Any value.\r\n *\r\n * @return {*[]} - Array containing the given value.\r\n */\n\nfunction toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n/**\r\n * Check if the given value is between min and max.\r\n * Min will be returned when the value is less than min or max will do when greater than max.\r\n *\r\n * @param {number} value - A number to be checked.\r\n * @param {number} m1 - Minimum or maximum number.\r\n * @param {number} m2 - Maximum or minimum number.\r\n *\r\n * @return {number} - A value itself, min or max.\r\n */\n\nfunction between(value, m1, m2) {\n return Math.min(Math.max(value, m1 > m2 ? m2 : m1), m1 > m2 ? m1 : m2);\n}\n/**\r\n * The sprintf method with minimum functionality.\r\n *\r\n * @param {string} format - The string format.\r\n * @param {string|Array} replacements - Replacements accepting multiple arguments.\r\n *\r\n * @returns {string} - Converted string.\r\n */\n\nfunction sprintf(format, replacements) {\n var i = 0;\n return format.replace(/%s/g, function () {\n return toArray(replacements)[i++];\n });\n}\n/**\r\n * Append px unit to the given subject if necessary.\r\n *\r\n * @param {number|string} value - A value that may not include an unit.\r\n *\r\n * @return {string} - If the value is string, return itself.\r\n * If number, do value + \"px\". An empty string, otherwise.\r\n */\n\nfunction unit(value) {\n var type = typeof value;\n\n if (type === 'number' && value > 0) {\n return parseFloat(value) + 'px';\n }\n\n return type === 'string' ? value : '';\n}\n/**\r\n * Pad start with 0.\r\n *\r\n * @param {number} number - A number to be filled with 0.\r\n *\r\n * @return {string|number} - Padded number.\r\n */\n\nfunction pad(number) {\n return number < 10 ? '0' + number : number;\n}\n/**\r\n * Convert the given value to pixel.\r\n *\r\n * @param {Element} root - Root element where a dummy div is appended.\r\n * @param {string|number} value - CSS value to be converted, such as 10rem.\r\n *\r\n * @return {number} - Pixel.\r\n */\n\nfunction toPixel(root, value) {\n if (typeof value === 'string') {\n var div = create('div', {});\n applyStyle(div, {\n position: 'absolute',\n width: value\n });\n append(root, div);\n value = div.clientWidth;\n dom_remove(div);\n }\n\n return +value || 0;\n}\n;// CONCATENATED MODULE: ./src/js/utils/dom.js\n/**\r\n * Some utility functions related with DOM.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n/**\r\n * Find the first element matching the given selector.\r\n * Be aware that all selectors after a space are ignored.\r\n *\r\n * @param {Element|Node} elm - An ancestor element.\r\n * @param {string} selector - DOMString.\r\n *\r\n * @return {Element|null} - A found element or null.\r\n */\n\nfunction find(elm, selector) {\n return elm ? elm.querySelector(selector.split(' ')[0]) : null;\n}\n/**\r\n * Find a first child having the given tag or class name.\r\n *\r\n * @param {Element} parent - A parent element.\r\n * @param {string} tagOrClassName - A tag or class name.\r\n *\r\n * @return {Element|undefined} - A found element on success or undefined on failure.\r\n */\n\nfunction child(parent, tagOrClassName) {\n return children(parent, tagOrClassName)[0];\n}\n/**\r\n * Return chile elements that matches the provided tag or class name.\r\n *\r\n * @param {Element} parent - A parent element.\r\n * @param {string} tagOrClassName - A tag or class name.\r\n *\r\n * @return {Element[]} - Found elements.\r\n */\n\nfunction children(parent, tagOrClassName) {\n if (parent) {\n return values(parent.children).filter(function (child) {\n return hasClass(child, tagOrClassName.split(' ')[0]) || child.tagName === tagOrClassName;\n });\n }\n\n return [];\n}\n/**\r\n * Create an element with some optional attributes.\r\n *\r\n * @param {string} tag - A tag name.\r\n * @param {Object} attrs - An object any attribute pairs of name and value.\r\n *\r\n * @return {Element} - A created element.\r\n */\n\nfunction create(tag, attrs) {\n var elm = document.createElement(tag);\n each(attrs, function (value, key) {\n return setAttribute(elm, key, value);\n });\n return elm;\n}\n/**\r\n * Convert HTML string to DOM node.\r\n *\r\n * @param {string} html - HTML string.\r\n *\r\n * @return {Node} - A created node.\r\n */\n\nfunction domify(html) {\n var div = create('div', {});\n div.innerHTML = html;\n return div.firstChild;\n}\n/**\r\n * Remove a given element from a DOM tree.\r\n *\r\n * @param {Element|Element[]} elms - Element(s) to be removed.\r\n */\n\nfunction dom_remove(elms) {\n toArray(elms).forEach(function (elm) {\n if (elm) {\n var parent = elm.parentElement;\n parent && parent.removeChild(elm);\n }\n });\n}\n/**\r\n * Append a child to a given element.\r\n *\r\n * @param {Element} parent - A parent element.\r\n * @param {Element} child - An element to be appended.\r\n */\n\nfunction append(parent, child) {\n if (parent) {\n parent.appendChild(child);\n }\n}\n/**\r\n * Insert an element before the reference element.\r\n *\r\n * @param {Element|Node} ref - A reference element.\r\n * @param {Element} elm - An element to be inserted.\r\n */\n\nfunction before(elm, ref) {\n if (elm && ref) {\n var parent = ref.parentElement;\n parent && parent.insertBefore(elm, ref);\n }\n}\n/**\r\n * Apply styles to the given element.\r\n *\r\n * @param {Element} elm - An element where styles are applied.\r\n * @param {Object} styles - Object containing styles.\r\n */\n\nfunction applyStyle(elm, styles) {\n if (elm) {\n each(styles, function (value, prop) {\n if (value !== null) {\n elm.style[prop] = value;\n }\n });\n }\n}\n/**\r\n * Add or remove classes to/from the element.\r\n * This function is for internal usage.\r\n *\r\n * @param {Element} elm - An element where classes are added.\r\n * @param {string|string[]} classes - Class names being added.\r\n * @param {boolean} remove - Whether to remove or add classes.\r\n */\n\nfunction addOrRemoveClasses(elm, classes, remove) {\n if (elm) {\n toArray(classes).forEach(function (name) {\n if (name) {\n elm.classList[remove ? 'remove' : 'add'](name);\n }\n });\n }\n}\n/**\r\n * Add classes to the element.\r\n *\r\n * @param {Element} elm - An element where classes are added.\r\n * @param {string|string[]} classes - Class names being added.\r\n */\n\n\nfunction addClass(elm, classes) {\n addOrRemoveClasses(elm, classes, false);\n}\n/**\r\n * Remove a class from the element.\r\n *\r\n * @param {Element} elm - An element where classes are removed.\r\n * @param {string|string[]} classes - A class name being removed.\r\n */\n\nfunction removeClass(elm, classes) {\n addOrRemoveClasses(elm, classes, true);\n}\n/**\r\n * Verify if the provided element has the class or not.\r\n *\r\n * @param {Element} elm - An element.\r\n * @param {string} className - A class name.\r\n *\r\n * @return {boolean} - True if the element has the class or false if not.\r\n */\n\nfunction hasClass(elm, className) {\n return !!elm && elm.classList.contains(className);\n}\n/**\r\n * Set attribute to the given element.\r\n *\r\n * @param {Element} elm - An element where an attribute is assigned.\r\n * @param {string} name - Attribute name.\r\n * @param {string|number|boolean} value - Attribute value.\r\n */\n\nfunction setAttribute(elm, name, value) {\n if (elm) {\n elm.setAttribute(name, value);\n }\n}\n/**\r\n * Get attribute from the given element.\r\n *\r\n * @param {Element} elm - An element where an attribute is assigned.\r\n * @param {string} name - Attribute name.\r\n *\r\n * @return {string} - The value of the given attribute if available. An empty string if not.\r\n */\n\nfunction getAttribute(elm, name) {\n return elm ? elm.getAttribute(name) : '';\n}\n/**\r\n * Remove attribute from the given element.\r\n *\r\n * @param {Element|Element[]} elms - An element where an attribute is removed.\r\n * @param {string|string[]} names - Attribute name.\r\n */\n\nfunction removeAttribute(elms, names) {\n toArray(names).forEach(function (name) {\n toArray(elms).forEach(function (elm) {\n return elm && elm.removeAttribute(name);\n });\n });\n}\n/**\r\n * Return the Rect object of the provided object.\r\n *\r\n * @param {Element} elm - An element.\r\n *\r\n * @return {ClientRect|DOMRect} - A rect object.\r\n */\n\nfunction getRect(elm) {\n return elm.getBoundingClientRect();\n}\n/**\r\n * Trigger the given callback after all images contained by the element are loaded.\r\n *\r\n * @param {Element} elm - Element that may contain images.\r\n * @param {Function} callback - Callback function fired right after all images are loaded.\r\n */\n\nfunction loaded(elm, callback) {\n var images = elm.querySelectorAll('img');\n var length = images.length;\n\n if (length) {\n var count = 0;\n each(images, function (img) {\n img.onload = img.onerror = function () {\n if (++count === length) {\n callback();\n }\n };\n });\n } else {\n // Trigger the callback immediately if there is no image.\n callback();\n }\n}\n;// CONCATENATED MODULE: ./src/js/constants/types.js\n/**\r\n * Export slider types.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Normal slider.\r\n *\r\n * @type {string}\r\n */\nvar SLIDE = 'slide';\n/**\r\n * Loop after the last slide and before the first one.\r\n *\r\n * @type {string}\r\n */\n\nvar LOOP = 'loop';\n/**\r\n * The track doesn't move.\r\n *\r\n * @type {string}\r\n */\n\nvar FADE = 'fade';\n;// CONCATENATED MODULE: ./src/js/transitions/slide/index.js\n/**\r\n * The component for general slide effect transition.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n/**\r\n * The component for general slide effect transition.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const slide = (function (Splide, Components) {\n /**\r\n * Hold the list element.\r\n *\r\n * @type {Element}\r\n */\n var list;\n /**\r\n * Hold the onEnd callback function.\r\n *\r\n * @type {function}\r\n */\n\n var endCallback;\n return {\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n list = Components.Elements.list;\n Splide.on('transitionend', function (e) {\n if (e.target === list && endCallback) {\n endCallback();\n }\n }, list);\n },\n\n /**\r\n * Start transition.\r\n *\r\n * @param {number} destIndex - Destination slide index that might be clone's.\r\n * @param {number} newIndex - New index.\r\n * @param {number} prevIndex - Previous index.\r\n * @param {Object} coord - Destination coordinates.\r\n * @param {function} done - Callback function must be invoked when transition is completed.\r\n */\n start: function start(destIndex, newIndex, prevIndex, coord, done) {\n var options = Splide.options;\n var edgeIndex = Components.Controller.edgeIndex;\n var speed = options.speed;\n endCallback = done;\n\n if (Splide.is(SLIDE)) {\n if (prevIndex === 0 && newIndex >= edgeIndex || prevIndex >= edgeIndex && newIndex === 0) {\n speed = options.rewindSpeed || speed;\n }\n }\n\n applyStyle(list, {\n transition: \"transform \" + speed + \"ms \" + options.easing,\n transform: \"translate(\" + coord.x + \"px,\" + coord.y + \"px)\"\n });\n }\n };\n});\n;// CONCATENATED MODULE: ./src/js/transitions/fade/index.js\n/**\r\n * The component for fade transition.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n/**\r\n * The component for fade transition.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const fade = (function (Splide, Components) {\n var Fade = {\n /**\r\n * Called when the component is mounted.\r\n * Apply transition style to the first slide.\r\n */\n mount: function mount() {\n apply(Splide.index);\n },\n\n /**\r\n * Start transition.\r\n *\r\n * @param {number} destIndex - Destination slide index that might be clone's.\r\n * @param {number} newIndex - New index.\r\n * @param {number} prevIndex - Previous index.\r\n * @param {Object} coord - Destination coordinates.\r\n * @param {function} done - Callback function must be invoked when transition is completed.\r\n */\n start: function start(destIndex, newIndex, prevIndex, coord, done) {\n var track = Components.Elements.track;\n applyStyle(track, {\n height: unit(track.clientHeight)\n });\n apply(newIndex);\n setTimeout(function () {\n done();\n applyStyle(track, {\n height: ''\n });\n });\n }\n };\n /**\r\n * Apply transition style to the slide specified by the given index.\r\n *\r\n * @param {number} index - A slide index.\r\n */\n\n function apply(index) {\n var options = Splide.options;\n applyStyle(Components.Elements.slides[index], {\n transition: \"opacity \" + options.speed + \"ms \" + options.easing\n });\n }\n\n return Fade;\n});\n;// CONCATENATED MODULE: ./src/js/transitions/index.js\n/**\r\n * Export transition components.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n;// CONCATENATED MODULE: ./src/js/core/composer.js\n/**\r\n * Provide a function for composing components.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n/**\r\n * Compose components.\r\n *\r\n * @param {Splide} Splide - Splide instance.\r\n * @param {Object} Components - Additional components.\r\n * @param {function} Transition - Change component for transition.\r\n *\r\n * @return {Object} - An object containing all components.\r\n */\n\nfunction compose(Splide, Components, Transition) {\n var components = {};\n each(Components, function (Component, name) {\n components[name] = Component(Splide, components, name.toLowerCase());\n });\n\n if (!Transition) {\n Transition = Splide.is(FADE) ? fade : slide;\n }\n\n components.Transition = Transition(Splide, components);\n return components;\n}\n;// CONCATENATED MODULE: ./src/js/utils/error.js\n/**\r\n * Utility functions for outputting logs.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Prefix of an error massage.\r\n *\r\n * @type {string}\r\n */\nvar MESSAGE_PREFIX = '[SPLIDE]';\n/**\r\n * Display an error message on the browser console.\r\n *\r\n * @param {string} message - An error message.\r\n */\n\nfunction error(message) {\n console.error(MESSAGE_PREFIX + \" \" + message);\n}\n/**\r\n * Check existence of the given object and throw an error if it doesn't.\r\n *\r\n * @throws {Error}\r\n *\r\n * @param {*} subject - A subject to be confirmed.\r\n * @param {string} message - An error message.\r\n */\n\nfunction exist(subject, message) {\n if (!subject) {\n throw new Error(message);\n }\n}\n;// CONCATENATED MODULE: ./src/js/constants/classes.js\n/**\r\n * Export class names.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * A root class name.\r\n *\r\n * @type {string}\r\n */\nvar ROOT = 'splide';\n/**\r\n * The definition table of all classes for elements.\r\n * They might be modified by options.\r\n *\r\n * @type {Object}\r\n */\n\nvar ELEMENT_CLASSES = {\n root: ROOT,\n slider: ROOT + \"__slider\",\n track: ROOT + \"__track\",\n list: ROOT + \"__list\",\n slide: ROOT + \"__slide\",\n container: ROOT + \"__slide__container\",\n arrows: ROOT + \"__arrows\",\n arrow: ROOT + \"__arrow\",\n prev: ROOT + \"__arrow--prev\",\n next: ROOT + \"__arrow--next\",\n pagination: ROOT + \"__pagination\",\n page: ROOT + \"__pagination__page\",\n clone: ROOT + \"__slide--clone\",\n progress: ROOT + \"__progress\",\n bar: ROOT + \"__progress__bar\",\n autoplay: ROOT + \"__autoplay\",\n play: ROOT + \"__play\",\n pause: ROOT + \"__pause\",\n spinner: ROOT + \"__spinner\",\n sr: ROOT + \"__sr\"\n};\n/**\r\n * Definitions of status classes.\r\n *\r\n * @type {Object}\r\n */\n\nvar STATUS_CLASSES = {\n active: 'is-active',\n visible: 'is-visible',\n loading: 'is-loading'\n};\n;// CONCATENATED MODULE: ./src/js/constants/i18n.js\n/**\r\n * Export i18n texts as object.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Texts for i18n.\r\n *\r\n * @type {Object}\r\n */\nvar I18N = {\n prev: 'Previous slide',\n next: 'Next slide',\n first: 'Go to first slide',\n last: 'Go to last slide',\n slideX: 'Go to slide %s',\n pageX: 'Go to page %s',\n play: 'Start autoplay',\n pause: 'Pause autoplay'\n};\n;// CONCATENATED MODULE: ./src/js/constants/defaults.js\n/**\r\n * Export default options.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\nvar DEFAULTS = {\n /**\r\n * Determine a slider type.\r\n * - 'slide': Regular slider.\r\n * - 'loop' : Carousel slider.\r\n * - 'fade' : Change slides with fade transition. perPage, drag options are ignored.\r\n *\r\n * @type {string}\r\n */\n type: 'slide',\n\n /**\r\n * Whether to rewind a slider before the first slide or after the last one.\r\n * In \"loop\" mode, this option is ignored.\r\n *\r\n * @type {boolean}\r\n */\n rewind: false,\n\n /**\r\n * Transition speed in milliseconds.\r\n *\r\n * @type {number}\r\n */\n speed: 400,\n\n /**\r\n * Transition speed on rewind in milliseconds.\r\n *\r\n * @type {number}\r\n */\n rewindSpeed: 0,\n\n /**\r\n * Whether to prevent any actions while a slider is transitioning.\r\n * If false, navigation, drag and swipe work while the slider is running.\r\n * Even so, it will be forced to wait for transition in some cases in the loop mode to shift a slider.\r\n *\r\n * @type {boolean}\r\n */\n waitForTransition: true,\n\n /**\r\n * Define slider max width.\r\n *\r\n * @type {number}\r\n */\n width: 0,\n\n /**\r\n * Define slider height.\r\n *\r\n * @type {number}\r\n */\n height: 0,\n\n /**\r\n * Fix width of slides. CSS format is allowed such as 10em, 80% or 80vw.\r\n * perPage number will be ignored when this option is falsy.\r\n *\r\n * @type {number|string}\r\n */\n fixedWidth: 0,\n\n /**\r\n * Fix height of slides. CSS format is allowed such as 10em, 80vh but % unit is not accepted.\r\n * heightRatio option will be ignored when this option is falsy.\r\n *\r\n * @type {number|string}\r\n */\n fixedHeight: 0,\n\n /**\r\n * Determine height of slides by ratio to a slider width.\r\n * This will be ignored when the fixedHeight is provided.\r\n *\r\n * @type {number}\r\n */\n heightRatio: 0,\n\n /**\r\n * If true, slide width will be determined by the element width itself.\r\n * - perPage/perMove should be 1.\r\n *\r\n * @type {boolean}\r\n */\n autoWidth: false,\n\n /**\r\n * If true, slide height will be determined by the element width itself.\r\n * - perPage/perMove should be 1.\r\n *\r\n * @type {boolean}\r\n */\n autoHeight: false,\n\n /**\r\n * Determine how many slides should be displayed per page.\r\n *\r\n * @type {number}\r\n */\n perPage: 1,\n\n /**\r\n * Determine how many slides should be moved when a slider goes to next or perv.\r\n *\r\n * @type {number}\r\n */\n perMove: 0,\n\n /**\r\n * Determine manually how many clones should be generated on the left and right side.\r\n * The total number of clones will be twice of this number.\r\n *\r\n * @type {number}\r\n */\n clones: 0,\n\n /**\r\n * Start index.\r\n *\r\n * @type {number}\r\n */\n start: 0,\n\n /**\r\n * Determine which slide should be focused if there are multiple slides in a page.\r\n * A string \"center\" is acceptable for centering slides.\r\n *\r\n * @type {boolean|number|string}\r\n */\n focus: false,\n\n /**\r\n * Gap between slides. CSS format is allowed such as 1em.\r\n *\r\n * @type {number|string}\r\n */\n gap: 0,\n\n /**\r\n * Set padding-left/right in horizontal mode or padding-top/bottom in vertical one.\r\n * Give a single value to set a same size for both sides or\r\n * do an object for different sizes.\r\n * Also, CSS format is allowed such as 1em.\r\n *\r\n * @example\r\n * - 10: Number\r\n * - '1em': CSS format.\r\n * - { left: 0, right: 20 }: Object for different sizes in horizontal mode.\r\n * - { top: 0, bottom: 20 }: Object for different sizes in vertical mode.\r\n *\r\n * @type {number|string|Object}\r\n */\n padding: 0,\n\n /**\r\n * Whether to append arrows.\r\n *\r\n * @type {boolean}\r\n */\n arrows: true,\n\n /**\r\n * Change the arrow SVG path like 'm7.61 0.807-2.12...'.\r\n *\r\n * @type {string}\r\n */\n arrowPath: '',\n\n /**\r\n * Whether to append pagination(indicator dots) or not.\r\n *\r\n * @type {boolean}\r\n */\n pagination: true,\n\n /**\r\n * Activate autoplay.\r\n *\r\n * @type {boolean}\r\n */\n autoplay: false,\n\n /**\r\n * Autoplay interval in milliseconds.\r\n *\r\n * @type {number}\r\n */\n interval: 5000,\n\n /**\r\n * Whether to stop autoplay when a slider is hovered.\r\n *\r\n * @type {boolean}\r\n */\n pauseOnHover: true,\n\n /**\r\n * Whether to stop autoplay when a slider elements are focused.\r\n * True is recommended for accessibility.\r\n *\r\n * @type {boolean}\r\n */\n pauseOnFocus: true,\n\n /**\r\n * Whether to reset progress of the autoplay timer when resumed.\r\n *\r\n * @type {boolean}\r\n */\n resetProgress: true,\n\n /**\r\n * Loading images lazily.\r\n * Image src must be provided by a data-splide-lazy attribute.\r\n *\r\n * - false: Do nothing.\r\n * - 'nearby': Only images around an active slide will be loaded.\r\n * - 'sequential': All images will be sequentially loaded.\r\n *\r\n * @type {boolean|string}\r\n */\n lazyLoad: false,\n\n /**\r\n * This option works only when a lazyLoad option is \"nearby\".\r\n * Determine how many pages(not slides) around an active slide should be loaded beforehand.\r\n *\r\n * @type {number}\r\n */\n preloadPages: 1,\n\n /**\r\n * Easing for CSS transition. For example, linear, ease or cubic-bezier().\r\n *\r\n * @type {string}\r\n */\n easing: 'cubic-bezier(.42,.65,.27,.99)',\n\n /**\r\n * Whether to enable keyboard shortcuts\r\n * - true or 'global': Listen to keydown event of the document.\r\n * - 'focused': Listen to the keydown event of the slider root element. tabindex=\"0\" will be added to the element.\r\n * - false: Disable keyboard shortcuts.\r\n *\r\n * @type {boolean|string}\r\n */\n keyboard: 'global',\n\n /**\r\n * Whether to allow mouse drag and touch swipe.\r\n *\r\n * @type {boolean}\r\n */\n drag: true,\n\n /**\r\n * The angle threshold for drag.\r\n * The slider starts moving only when the drag angle is less than this threshold.\r\n *\r\n * @type {number}\r\n */\n dragAngleThreshold: 30,\n\n /**\r\n * Distance threshold for determining if the action is \"flick\" or \"swipe\".\r\n * When a drag distance is over this value, the action will be treated as \"swipe\", not \"flick\".\r\n *\r\n * @type {number}\r\n */\n swipeDistanceThreshold: 150,\n\n /**\r\n * Velocity threshold for determining if the action is \"flick\" or \"swipe\".\r\n * Around 0.5 is recommended.\r\n *\r\n * @type {number}\r\n */\n flickVelocityThreshold: .6,\n\n /**\r\n * Determine power of flick. The larger number this is, the farther a slider runs by flick.\r\n * Around 500 is recommended.\r\n *\r\n * @type {number}\r\n */\n flickPower: 600,\n\n /**\r\n * Limit a number of pages to move by flick.\r\n *\r\n * @type {number}\r\n */\n flickMaxPages: 1,\n\n /**\r\n * Slider direction.\r\n * - 'ltr': Left to right.\r\n * - 'rtl': Right to left.\r\n * - 'ttb': Top to bottom.\r\n *\r\n * @type {string}\r\n */\n direction: 'ltr',\n\n /**\r\n * Set img src to background-image of its parent element.\r\n * Images with various sizes can be displayed as same dimension without cropping work.\r\n * fixedHeight or heightRatio is required.\r\n *\r\n * @type {boolean}\r\n */\n cover: false,\n\n /**\r\n * Whether to enable accessibility(aria and screen reader texts) or not.\r\n *\r\n * @type {boolean}\r\n */\n accessibility: true,\n\n /**\r\n * Whether to add tabindex=\"0\" to visible slides or not.\r\n *\r\n * @type {boolean}\r\n */\n slideFocus: true,\n\n /**\r\n * Determine if a slider is navigation for another.\r\n * Use \"sync\" API to synchronize two sliders.\r\n *\r\n * @type {boolean}\r\n */\n isNavigation: false,\n\n /**\r\n * Whether to trim spaces before the fist slide or after the last one when \"focus\" is not 0.\r\n *\r\n * @type {boolean}\r\n */\n trimSpace: true,\n\n /**\r\n * The \"is-active\" class is added after transition as default.\r\n * If true, it will be added before move.\r\n *\r\n * @type {boolean}\r\n */\n updateOnMove: false,\n\n /**\r\n * Throttle duration in milliseconds for the resize event.\r\n *\r\n * @type {number}\r\n */\n throttle: 100,\n\n /**\r\n * Whether to destroy a slider or not.\r\n *\r\n * @type {boolean}\r\n */\n destroy: false,\n\n /**\r\n * Options for specific breakpoints.\r\n *\r\n * @example\r\n * {\r\n * 1000: {\r\n * perPage: 3,\r\n * gap: 20\r\n * },\r\n * 600: {\r\n * perPage: 1,\r\n * gap: 5,\r\n * }\r\n * }\r\n *\r\n * @type {boolean|Object}\r\n */\n breakpoints: false,\n\n /**\r\n * Collection of class names.\r\n *\r\n * @see ./classes.js\r\n *\r\n * @type {Object}\r\n */\n classes: ELEMENT_CLASSES,\n\n /**\r\n * Collection of i18n texts.\r\n *\r\n * @see ./i18n.js\r\n *\r\n * @type {Object}\r\n */\n i18n: I18N\n};\n;// CONCATENATED MODULE: ./src/js/constants/states.js\n/**\r\n * Export state constants.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Splide has been just created.\r\n *\r\n * @type {number}\r\n */\nvar CREATED = 1;\n/**\r\n * All components have been mounted and initialized.\r\n *\r\n * @type {number}\r\n */\n\nvar MOUNTED = 2;\n/**\r\n * Splide is ready for transition.\r\n *\r\n * @type {number}\r\n */\n\nvar IDLE = 3;\n/**\r\n * Splide is moving.\r\n *\r\n * @type {number}\r\n */\n\nvar MOVING = 4;\n/**\r\n * Splide is moving.\r\n *\r\n * @type {number}\r\n */\n\nvar DESTROYED = 5;\n;// CONCATENATED MODULE: ./src/js/splide.js\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\r\n * The main class for applying Splide to an element.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\n\n\n\n/**\r\n * The main class for applying Splide to an element,\r\n * providing some APIs to control the behavior.\r\n */\n\nvar Splide = /*#__PURE__*/function () {\n /**\r\n * Splide constructor.\r\n *\r\n * @throws {Error} When the given root element or selector is invalid.\r\n *\r\n * @param {Element|string} root - A selector for a root element or an element itself.\r\n * @param {Object} options - Optional. Options to change default behaviour.\r\n * @param {Object} Components - Optional. Components.\r\n */\n function Splide(root, options, Components) {\n if (options === void 0) {\n options = {};\n }\n\n if (Components === void 0) {\n Components = {};\n }\n\n this.root = root instanceof Element ? root : document.querySelector(root);\n exist(this.root, 'An invalid element/selector was given.');\n this.Components = null;\n this.Event = core_event();\n this.State = state(CREATED);\n this.STATES = states_namespaceObject;\n this._o = merge(DEFAULTS, options);\n this._i = 0;\n this._c = Components;\n this._e = {}; // Extensions\n\n this._t = null; // Transition\n }\n /**\r\n * Compose and mount components.\r\n *\r\n * @param {Object} Extensions - Optional. Additional components.\r\n * @param {function} Transition - Optional. Set a custom transition component.\r\n *\r\n * @return {Splide|undefined} - This instance or undefined if an exception occurred.\r\n */\n\n\n var _proto = Splide.prototype;\n\n _proto.mount = function mount(Extensions, Transition) {\n var _this = this;\n\n if (Extensions === void 0) {\n Extensions = this._e;\n }\n\n if (Transition === void 0) {\n Transition = this._t;\n }\n\n // Reset the state.\n this.State.set(CREATED);\n this._e = Extensions;\n this._t = Transition;\n this.Components = compose(this, merge(this._c, Extensions), Transition);\n\n try {\n each(this.Components, function (component, key) {\n var required = component.required;\n\n if (required === undefined || required) {\n component.mount && component.mount();\n } else {\n delete _this.Components[key];\n }\n });\n } catch (e) {\n error(e.message);\n return;\n }\n\n var State = this.State;\n State.set(MOUNTED);\n each(this.Components, function (component) {\n component.mounted && component.mounted();\n });\n this.emit('mounted');\n State.set(IDLE);\n this.emit('ready');\n applyStyle(this.root, {\n visibility: 'visible'\n });\n this.on('move drag', function () {\n return State.set(MOVING);\n }).on('moved dragged', function () {\n return State.set(IDLE);\n });\n return this;\n }\n /**\r\n * Set sync target.\r\n *\r\n * @param {Splide} splide - A Splide instance.\r\n *\r\n * @return {Splide} - This instance.\r\n */\n ;\n\n _proto.sync = function sync(splide) {\n this.sibling = splide;\n return this;\n }\n /**\r\n * Register callback fired on the given event(s).\r\n *\r\n * @param {string} events - An event name. Use space to separate multiple events.\r\n * Also, namespace is accepted by dot, such as 'resize.{namespace}'.\r\n * @param {function} handler - A callback function.\r\n * @param {Element} elm - Optional. Native event will be listened to when this arg is provided.\r\n * @param {Object} options - Optional. Options for addEventListener.\r\n *\r\n * @return {Splide} - This instance.\r\n */\n ;\n\n _proto.on = function on(events, handler, elm, options) {\n if (elm === void 0) {\n elm = null;\n }\n\n if (options === void 0) {\n options = {};\n }\n\n this.Event.on(events, handler, elm, options);\n return this;\n }\n /**\r\n * Unsubscribe the given event.\r\n *\r\n * @param {string} events - A event name.\r\n * @param {Element} elm - Optional. removeEventListener() will be called when this arg is provided.\r\n *\r\n * @return {Splide} - This instance.\r\n */\n ;\n\n _proto.off = function off(events, elm) {\n if (elm === void 0) {\n elm = null;\n }\n\n this.Event.off(events, elm);\n return this;\n }\n /**\r\n * Emit an event.\r\n *\r\n * @param {string} event - An event name.\r\n * @param {*} args - Any number of arguments passed to handlers.\r\n */\n ;\n\n _proto.emit = function emit(event) {\n var _this$Event;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n (_this$Event = this.Event).emit.apply(_this$Event, [event].concat(args));\n\n return this;\n }\n /**\r\n * Go to the slide specified by the given control.\r\n *\r\n * @param {string|number} control - A control pattern.\r\n * @param {boolean} wait - Optional. Whether to wait for transition.\r\n */\n ;\n\n _proto.go = function go(control, wait) {\n if (wait === void 0) {\n wait = this.options.waitForTransition;\n }\n\n if (this.State.is(IDLE) || this.State.is(MOVING) && !wait) {\n this.Components.Controller.go(control, false);\n }\n\n return this;\n }\n /**\r\n * Verify whether the slider type is the given one or not.\r\n *\r\n * @param {string} type - A slider type.\r\n *\r\n * @return {boolean} - True if the slider type is the provided type or false if not.\r\n */\n ;\n\n _proto.is = function is(type) {\n return type === this._o.type;\n }\n /**\r\n * Insert a slide.\r\n *\r\n * @param {Element|string} slide - A slide element to be added.\r\n * @param {number} index - A slide will be added at the position.\r\n */\n ;\n\n _proto.add = function add(slide, index) {\n if (index === void 0) {\n index = -1;\n }\n\n this.Components.Elements.add(slide, index, this.refresh.bind(this));\n return this;\n }\n /**\r\n * Remove the slide designated by the index.\r\n *\r\n * @param {number} index - A slide index.\r\n */\n ;\n\n _proto.remove = function remove(index) {\n this.Components.Elements.remove(index);\n this.refresh();\n return this;\n }\n /**\r\n * Destroy all Slide objects and clones and recreate them again.\r\n */\n ;\n\n _proto.refresh = function refresh() {\n this.emit('refresh:before').emit('refresh').emit('resize');\n return this;\n }\n /**\r\n * Destroy the Splide.\r\n * \"Completely\" boolean is mainly for breakpoints.\r\n *\r\n * @param {boolean} completely - Destroy completely.\r\n */\n ;\n\n _proto.destroy = function destroy(completely) {\n var _this2 = this;\n\n if (completely === void 0) {\n completely = true;\n }\n\n // Postpone destroy because it should be done after mount.\n if (this.State.is(CREATED)) {\n this.on('ready', function () {\n return _this2.destroy(completely);\n });\n return;\n }\n\n values(this.Components).reverse().forEach(function (component) {\n component.destroy && component.destroy(completely);\n });\n this.emit('destroy', completely); // Destroy all event handlers, including ones for native events.\n\n this.Event.destroy();\n this.State.set(DESTROYED);\n return this;\n }\n /**\r\n * Return the current slide index.\r\n *\r\n * @return {number} - The current slide index.\r\n // */\n ;\n\n _createClass(Splide, [{\n key: \"index\",\n get: function get() {\n return this._i;\n }\n /**\r\n * Set the current slide index.\r\n *\r\n * @param {number|string} index - A new index.\r\n */\n ,\n set: function set(index) {\n this._i = parseInt(index);\n }\n /**\r\n * Return length of slides.\r\n * This is an alias of Elements.length.\r\n *\r\n * @return {number} - A number of slides.\r\n */\n\n }, {\n key: \"length\",\n get: function get() {\n return this.Components.Elements.length;\n }\n /**\r\n * Return options.\r\n *\r\n * @return {Object} - Options object.\r\n */\n\n }, {\n key: \"options\",\n get: function get() {\n return this._o;\n }\n /**\r\n * Set options with merging the given object to the current one.\r\n *\r\n * @param {Object} options - New options.\r\n */\n ,\n set: function set(options) {\n var created = this.State.is(CREATED);\n\n if (!created) {\n this.emit('update');\n }\n\n this._o = merge(this._o, options);\n\n if (!created) {\n this.emit('updated', this._o);\n }\n }\n /**\r\n * Return the class list.\r\n * This is an alias of Splide.options.classList.\r\n *\r\n * @return {Object} - An object containing all class list.\r\n */\n\n }, {\n key: \"classes\",\n get: function get() {\n return this._o.classes;\n }\n /**\r\n * Return the i18n strings.\r\n * This is an alias of Splide.options.i18n.\r\n *\r\n * @return {Object} - An object containing all i18n strings.\r\n */\n\n }, {\n key: \"i18n\",\n get: function get() {\n return this._o.i18n;\n }\n }]);\n\n return Splide;\n}();\n\n\n;// CONCATENATED MODULE: ./src/js/components/options/index.js\n/**\r\n * The component for initializing options.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n/**\r\n * The component for initializing options.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const options = (function (Splide) {\n /**\r\n * Retrieve options from the data attribute.\r\n * Note that IE10 doesn't support dataset property.\r\n *\r\n * @type {string}\r\n */\n var options = getAttribute(Splide.root, 'data-splide');\n\n if (options) {\n try {\n Splide.options = JSON.parse(options);\n } catch (e) {\n error(e.message);\n }\n }\n\n return {\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n if (Splide.State.is(CREATED)) {\n Splide.index = Splide.options.start;\n }\n }\n };\n});\n;// CONCATENATED MODULE: ./src/js/constants/directions.js\n/**\r\n * Export layout modes.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Enumerate slides from left to right.\r\n *\r\n * @type {string}\r\n */\nvar LTR = 'ltr';\n/**\r\n * Enumerate slides from right to left.\r\n *\r\n * @type {string}\r\n */\n\nvar RTL = 'rtl';\n/**\r\n * Enumerate slides in a col.\r\n *\r\n * @type {string}\r\n */\n\nvar TTB = 'ttb';\n;// CONCATENATED MODULE: ./src/js/components/elements/slide.js\n/**\r\n * The sub component for handling each slide.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\n\n/**\r\n * Events for restoring original styles.\r\n *\r\n * @type {string}\r\n */\n\nvar STYLE_RESTORE_EVENTS = 'update.slide';\n/**\r\n * The sub component for handling each slide.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {number} index - An unique slide index.\r\n * @param {number} realIndex - Clones should pass a real slide index.\r\n * @param {Element} slide - A slide element.\r\n *\r\n * @return {Object} - The sub component object.\r\n */\n\n/* harmony default export */ const elements_slide = (function (Splide, index, realIndex, slide) {\n /**\r\n * Whether to update \"is-active\" class before or after transition.\r\n *\r\n * @type {boolean}\r\n */\n var updateOnMove = Splide.options.updateOnMove;\n /**\r\n * Events when the slide status is updated.\r\n * Append a namespace to remove listeners later.\r\n *\r\n * @type {string}\r\n */\n\n var STATUS_UPDATE_EVENTS = 'ready.slide updated.slide resized.slide moved.slide' + (updateOnMove ? ' move.slide' : '');\n /**\r\n * Slide sub component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Slide = {\n /**\r\n * Slide element.\r\n *\r\n * @type {Element}\r\n */\n slide: slide,\n\n /**\r\n * Slide index.\r\n *\r\n * @type {number}\r\n */\n index: index,\n\n /**\r\n * Real index for clones.\r\n *\r\n * @type {number}\r\n */\n realIndex: realIndex,\n\n /**\r\n * Container element if available.\r\n *\r\n * @type {Element|undefined}\r\n */\n container: child(slide, Splide.classes.container),\n\n /**\r\n * Whether this is a cloned slide or not.\r\n *\r\n * @type {boolean}\r\n */\n isClone: realIndex > -1,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n var _this = this;\n\n if (!this.isClone) {\n slide.id = Splide.root.id + \"-slide\" + pad(index + 1);\n }\n\n Splide.on(STATUS_UPDATE_EVENTS, function () {\n return _this.update();\n }).on(STYLE_RESTORE_EVENTS, restoreStyles).on('click', function () {\n return Splide.emit('click', _this);\n }, slide);\n /*\r\n * Add \"is-active\" class to a clone element temporarily\r\n * and it will be removed on \"moved\" event.\r\n */\n\n if (updateOnMove) {\n Splide.on('move.slide', function (newIndex) {\n if (newIndex === realIndex) {\n _update(true, false);\n }\n });\n } // Make sure the slide is shown.\n\n\n applyStyle(slide, {\n display: ''\n }); // Hold the original styles.\n\n this.styles = getAttribute(slide, 'style') || '';\n },\n\n /**\r\n * Destroy.\r\n */\n destroy: function destroy() {\n Splide.off(STATUS_UPDATE_EVENTS).off(STYLE_RESTORE_EVENTS).off('click', slide);\n removeClass(slide, values(STATUS_CLASSES));\n restoreStyles();\n removeAttribute(this.container, 'style');\n },\n\n /**\r\n * Update active and visible status.\r\n */\n update: function update() {\n _update(this.isActive(), false);\n\n _update(this.isVisible(), true);\n },\n\n /**\r\n * Check whether this slide is active or not.\r\n *\r\n * @return {boolean} - True if the slide is active or false if not.\r\n */\n isActive: function isActive() {\n return Splide.index === index;\n },\n\n /**\r\n * Check whether this slide is visible in the viewport or not.\r\n *\r\n * @return {boolean} - True if the slide is visible or false if not.\r\n */\n isVisible: function isVisible() {\n var active = this.isActive();\n\n if (Splide.is(FADE) || active) {\n return active;\n }\n\n var ceil = Math.ceil;\n var trackRect = getRect(Splide.Components.Elements.track);\n var slideRect = getRect(slide);\n\n if (Splide.options.direction === TTB) {\n return trackRect.top <= slideRect.top && slideRect.bottom <= ceil(trackRect.bottom);\n }\n\n return trackRect.left <= slideRect.left && slideRect.right <= ceil(trackRect.right);\n },\n\n /**\r\n * Calculate how far this slide is from another slide and\r\n * return true if the distance is within the given number.\r\n *\r\n * @param {number} from - Index of a target slide.\r\n * @param {number} within - True if the slide is within this number.\r\n *\r\n * @return {boolean} - True if the slide is within the number or false otherwise.\r\n */\n isWithin: function isWithin(from, within) {\n var diff = Math.abs(from - index);\n\n if (!Splide.is(SLIDE) && !this.isClone) {\n diff = Math.min(diff, Splide.length - diff);\n }\n\n return diff < within;\n }\n };\n /**\r\n * Update classes for activity or visibility.\r\n *\r\n * @param {boolean} active - Is active/visible or not.\r\n * @param {boolean} forVisibility - Toggle classes for activity or visibility.\r\n */\n\n function _update(active, forVisibility) {\n var type = forVisibility ? 'visible' : 'active';\n var className = STATUS_CLASSES[type];\n\n if (active) {\n addClass(slide, className);\n Splide.emit(\"\" + type, Slide);\n } else {\n if (hasClass(slide, className)) {\n removeClass(slide, className);\n Splide.emit(\"\" + (forVisibility ? 'hidden' : 'inactive'), Slide);\n }\n }\n }\n /**\r\n * Restore the original styles.\r\n */\n\n\n function restoreStyles() {\n setAttribute(slide, 'style', Slide.styles);\n }\n\n return Slide;\n});\n;// CONCATENATED MODULE: ./src/js/components/elements/index.js\n/**\r\n * The component for main elements.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\n/**\r\n * The property name for UID stored in a window object.\r\n *\r\n * @type {string}\r\n */\n\nvar UID_NAME = 'uid';\n/**\r\n * The component for main elements.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const components_elements = (function (Splide, Components) {\n /**\r\n * Hold the root element.\r\n *\r\n * @type {Element}\r\n */\n var root = Splide.root;\n /**\r\n * Hold the class list.\r\n *\r\n * @type {Object}\r\n */\n\n var classes = Splide.classes;\n /**\r\n * Store Slide objects.\r\n *\r\n * @type {Array}\r\n */\n\n var Slides = [];\n /*\r\n * Assign unique ID to the root element if it doesn't have the one.\r\n * Note that IE doesn't support padStart() to fill the uid by 0.\r\n */\n\n if (!root.id) {\n window.splide = window.splide || {};\n var uid = window.splide[UID_NAME] || 0;\n window.splide[UID_NAME] = ++uid;\n root.id = \"splide\" + pad(uid);\n }\n /**\r\n * Elements component object.\r\n *\r\n * @type {Object}\r\n */\n\n\n var Elements = {\n /**\r\n * Called when the component is mounted.\r\n * Collect main elements and store them as member properties.\r\n */\n mount: function mount() {\n var _this = this;\n\n this.init();\n Splide.on('refresh', function () {\n _this.destroy();\n\n _this.init();\n }).on('updated', function () {\n removeClass(root, getClasses());\n addClass(root, getClasses());\n });\n },\n\n /**\r\n * Destroy.\r\n */\n destroy: function destroy() {\n Slides.forEach(function (Slide) {\n Slide.destroy();\n });\n Slides = [];\n removeClass(root, getClasses());\n },\n\n /**\r\n * Initialization.\r\n */\n init: function init() {\n var _this2 = this;\n\n collect();\n addClass(root, getClasses());\n this.slides.forEach(function (slide, index) {\n _this2.register(slide, index, -1);\n });\n },\n\n /**\r\n * Register a slide to create a Slide object and handle its behavior.\r\n *\r\n * @param {Element} slide - A slide element.\r\n * @param {number} index - A unique index. This can be negative.\r\n * @param {number} realIndex - A real index for clones. Set -1 for real slides.\r\n */\n register: function register(slide, index, realIndex) {\n var SlideObject = elements_slide(Splide, index, realIndex, slide);\n SlideObject.mount();\n Slides.push(SlideObject);\n },\n\n /**\r\n * Return the Slide object designated by the index.\r\n * Note that \"find\" is not supported by IE.\r\n *\r\n * @return {Object|undefined} - A Slide object if available. Undefined if not.\r\n */\n getSlide: function getSlide(index) {\n return Slides.filter(function (Slide) {\n return Slide.index === index;\n })[0];\n },\n\n /**\r\n * Return all Slide objects.\r\n *\r\n * @param {boolean} includeClones - Whether to include cloned slides or not.\r\n *\r\n * @return {Object[]} - Slide objects.\r\n */\n getSlides: function getSlides(includeClones) {\n return includeClones ? Slides : Slides.filter(function (Slide) {\n return !Slide.isClone;\n });\n },\n\n /**\r\n * Return Slide objects belonging to the given page.\r\n *\r\n * @param {number} page - A page number.\r\n *\r\n * @return {Object[]} - An array containing Slide objects.\r\n */\n getSlidesByPage: function getSlidesByPage(page) {\n var idx = Components.Controller.toIndex(page);\n var options = Splide.options;\n var max = options.focus !== false ? 1 : options.perPage;\n return Slides.filter(function (_ref) {\n var index = _ref.index;\n return idx <= index && index < idx + max;\n });\n },\n\n /**\r\n * Insert a slide to a slider.\r\n * Need to refresh Splide after adding a slide.\r\n *\r\n * @param {Node|string} slide - A slide element to be added.\r\n * @param {number} index - A slide will be added at the position.\r\n * @param {Function} callback - Called right after the slide is added to the DOM tree.\r\n */\n add: function add(slide, index, callback) {\n if (typeof slide === 'string') {\n slide = domify(slide);\n }\n\n if (slide instanceof Element) {\n var ref = this.slides[index]; // This will be removed in mount() of a Slide component.\n\n applyStyle(slide, {\n display: 'none'\n });\n\n if (ref) {\n before(slide, ref);\n this.slides.splice(index, 0, slide);\n } else {\n append(this.list, slide);\n this.slides.push(slide);\n }\n\n loaded(slide, function () {\n callback && callback(slide);\n });\n }\n },\n\n /**\r\n * Remove a slide from a slider.\r\n * Need to refresh Splide after removing a slide.\r\n *\r\n * @param index - Slide index.\r\n */\n remove: function remove(index) {\n dom_remove(this.slides.splice(index, 1)[0]);\n },\n\n /**\r\n * Trigger the provided callback for each Slide object.\r\n *\r\n * @param {Function} callback - A callback function. The first argument will be the Slide object.\r\n */\n each: function each(callback) {\n Slides.forEach(callback);\n },\n\n /**\r\n * Return slides length without clones.\r\n *\r\n * @return {number} - Slide length.\r\n */\n get length() {\n return this.slides.length;\n },\n\n /**\r\n * Return \"SlideObjects\" length including clones.\r\n *\r\n * @return {number} - Slide length including clones.\r\n */\n get total() {\n return Slides.length;\n }\n\n };\n /**\r\n * Collect elements.\r\n */\n\n function collect() {\n Elements.slider = child(root, classes.slider);\n Elements.track = find(root, \".\" + classes.track);\n Elements.list = child(Elements.track, classes.list);\n exist(Elements.track && Elements.list, 'Track or list was not found.');\n Elements.slides = children(Elements.list, classes.slide);\n var arrows = findParts(classes.arrows);\n Elements.arrows = {\n prev: find(arrows, \".\" + classes.prev),\n next: find(arrows, \".\" + classes.next)\n };\n var autoplay = findParts(classes.autoplay);\n Elements.bar = find(findParts(classes.progress), \".\" + classes.bar);\n Elements.play = find(autoplay, \".\" + classes.play);\n Elements.pause = find(autoplay, \".\" + classes.pause);\n Elements.track.id = Elements.track.id || root.id + \"-track\";\n Elements.list.id = Elements.list.id || root.id + \"-list\";\n }\n /**\r\n * Return class names for the root element.\r\n */\n\n\n function getClasses() {\n var rootClass = classes.root;\n var options = Splide.options;\n return [rootClass + \"--\" + options.type, rootClass + \"--\" + options.direction, options.drag ? rootClass + \"--draggable\" : '', options.isNavigation ? rootClass + \"--nav\" : '', STATUS_CLASSES.active];\n }\n /**\r\n * Find parts only from children of the root or track.\r\n *\r\n * @return {Element} - A found element or undefined.\r\n */\n\n\n function findParts(className) {\n return child(root, className) || child(Elements.slider, className);\n }\n\n return Elements;\n});\n;// CONCATENATED MODULE: ./src/js/components/controller/index.js\n/**\r\n * The component for controlling the track.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\nvar floor = Math.floor;\n/**\r\n * The component for controlling the track.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const controller = (function (Splide, Components) {\n /**\r\n * Store current options.\r\n *\r\n * @type {Object}\r\n */\n var options;\n /**\r\n * True if the slide is LOOP mode.\r\n *\r\n * @type {boolean}\r\n */\n\n var isLoop;\n /**\r\n * Controller component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Controller = {\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n options = Splide.options;\n isLoop = Splide.is(LOOP);\n bind();\n },\n\n /**\r\n * Make track run by the given control.\r\n * - \"+{i}\" : Increment the slide index by i.\r\n * - \"-{i}\" : Decrement the slide index by i.\r\n * - \"{i}\" : Go to the slide whose index is i.\r\n * - \">\" : Go to next page.\r\n * - \"<\" : Go to prev page.\r\n * - \">{i}\" : Go to page i.\r\n *\r\n * @param {string|number} control - A control pattern.\r\n * @param {boolean} silently - Go to the destination without event emission.\r\n */\n go: function go(control, silently) {\n var destIndex = this.trim(this.parse(control));\n Components.Track.go(destIndex, this.rewind(destIndex), silently);\n },\n\n /**\r\n * Parse the given control and return the destination index for the track.\r\n *\r\n * @param {string} control - A control target pattern.\r\n *\r\n * @return {number} - A parsed target.\r\n */\n parse: function parse(control) {\n var index = Splide.index;\n var matches = String(control).match(/([+\\-<>]+)(\\d+)?/);\n var indicator = matches ? matches[1] : '';\n var number = matches ? parseInt(matches[2]) : 0;\n\n switch (indicator) {\n case '+':\n index += number || 1;\n break;\n\n case '-':\n index -= number || 1;\n break;\n\n case '>':\n case '<':\n index = parsePage(number, index, indicator === '<');\n break;\n\n default:\n index = parseInt(control);\n }\n\n return index;\n },\n\n /**\r\n * Compute index from the given page number.\r\n *\r\n * @param {number} page - Page number.\r\n *\r\n * @return {number} - A computed page number.\r\n */\n toIndex: function toIndex(page) {\n if (hasFocus()) {\n return page;\n }\n\n var length = Splide.length;\n var perPage = options.perPage;\n var index = page * perPage;\n index = index - (this.pageLength * perPage - length) * floor(index / length); // Adjustment for the last page.\n\n if (length - perPage <= index && index < length) {\n index = length - perPage;\n }\n\n return index;\n },\n\n /**\r\n * Compute page number from the given slide index.\r\n *\r\n * @param {number} index - Slide index.\r\n *\r\n * @return {number} - A computed page number.\r\n */\n toPage: function toPage(index) {\n if (hasFocus()) {\n return index;\n }\n\n var length = Splide.length;\n var perPage = options.perPage; // Make the last \"perPage\" number of slides belong to the last page.\n\n if (length - perPage <= index && index < length) {\n return floor((length - 1) / perPage);\n }\n\n return floor(index / perPage);\n },\n\n /**\r\n * Trim the given index according to the current mode.\r\n * Index being returned could be less than 0 or greater than the length in Loop mode.\r\n *\r\n * @param {number} index - An index being trimmed.\r\n *\r\n * @return {number} - A trimmed index.\r\n */\n trim: function trim(index) {\n if (!isLoop) {\n index = options.rewind ? this.rewind(index) : between(index, 0, this.edgeIndex);\n }\n\n return index;\n },\n\n /**\r\n * Rewind the given index if it's out of range.\r\n *\r\n * @param {number} index - An index.\r\n *\r\n * @return {number} - A rewound index.\r\n */\n rewind: function rewind(index) {\n var edge = this.edgeIndex;\n\n if (isLoop) {\n while (index > edge) {\n index -= edge + 1;\n }\n\n while (index < 0) {\n index += edge + 1;\n }\n } else {\n if (index > edge) {\n index = 0;\n } else if (index < 0) {\n index = edge;\n }\n }\n\n return index;\n },\n\n /**\r\n * Check if the direction is \"rtl\" or not.\r\n *\r\n * @return {boolean} - True if \"rtl\" or false if not.\r\n */\n isRtl: function isRtl() {\n return options.direction === RTL;\n },\n\n /**\r\n * Return the page length.\r\n *\r\n * @return {number} - Max page number.\r\n */\n get pageLength() {\n var length = Splide.length;\n return hasFocus() ? length : Math.ceil(length / options.perPage);\n },\n\n /**\r\n * Return the edge index.\r\n *\r\n * @return {number} - Edge index.\r\n */\n get edgeIndex() {\n var length = Splide.length;\n\n if (!length) {\n return 0;\n }\n\n if (hasFocus() || options.isNavigation || isLoop) {\n return length - 1;\n }\n\n return length - options.perPage;\n },\n\n /**\r\n * Return the index of the previous slide.\r\n *\r\n * @return {number} - The index of the previous slide if available. -1 otherwise.\r\n */\n get prevIndex() {\n var prev = Splide.index - 1;\n\n if (isLoop || options.rewind) {\n prev = this.rewind(prev);\n }\n\n return prev > -1 ? prev : -1;\n },\n\n /**\r\n * Return the index of the next slide.\r\n *\r\n * @return {number} - The index of the next slide if available. -1 otherwise.\r\n */\n get nextIndex() {\n var next = Splide.index + 1;\n\n if (isLoop || options.rewind) {\n next = this.rewind(next);\n }\n\n return Splide.index < next && next <= this.edgeIndex || next === 0 ? next : -1;\n }\n\n };\n /**\r\n * Listen to some events.\r\n */\n\n function bind() {\n Splide.on('move', function (newIndex) {\n Splide.index = newIndex;\n }).on('updated refresh', function (newOptions) {\n options = newOptions || options;\n Splide.index = between(Splide.index, 0, Controller.edgeIndex);\n });\n }\n /**\r\n * Verify if the focus option is available or not.\r\n *\r\n * @return {boolean} - True if a slider has the focus option.\r\n */\n\n\n function hasFocus() {\n return options.focus !== false;\n }\n /**\r\n * Return the next or previous page index computed by the page number and current index.\r\n *\r\n * @param {number} number - Specify the page number.\r\n * @param {number} index - Current index.\r\n * @param {boolean} prev - Prev or next.\r\n *\r\n * @return {number} - Slide index.\r\n */\n\n\n function parsePage(number, index, prev) {\n if (number > -1) {\n return Controller.toIndex(number);\n }\n\n var perMove = options.perMove;\n var sign = prev ? -1 : 1;\n\n if (perMove) {\n return index + perMove * sign;\n }\n\n return Controller.toIndex(Controller.toPage(index) + sign);\n }\n\n return Controller;\n});\n;// CONCATENATED MODULE: ./src/js/components/track/index.js\n/**\r\n * The component for moving list in the track.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\nvar abs = Math.abs;\n/**\r\n * The component for moving list in the track.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const track = (function (Splide, Components) {\n /**\r\n * Hold the Layout component.\r\n *\r\n * @type {Object}\r\n */\n var Layout;\n /**\r\n * Hold the Layout component.\r\n *\r\n * @type {Object}\r\n */\n\n var Elements;\n /**\r\n * Store the list element.\r\n *\r\n * @type {Element}\r\n */\n\n var list;\n /**\r\n * Whether the current direction is vertical or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isVertical = Splide.options.direction === TTB;\n /**\r\n * Whether the slider type is FADE or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isFade = Splide.is(FADE);\n /**\r\n * Whether the slider direction is RTL or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isRTL = Splide.options.direction === RTL;\n /**\r\n * This will be true while transitioning from the last index to the first one.\r\n *\r\n * @type {boolean}\r\n */\n\n var isLoopPending = false;\n /**\r\n * Sign for the direction. Only RTL mode uses the positive sign.\r\n *\r\n * @type {number}\r\n */\n\n var sign = isRTL ? 1 : -1;\n /**\r\n * Track component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Track = {\n /**\r\n * Make public the sign defined locally.\r\n *\r\n * @type {number}\r\n */\n sign: sign,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n Elements = Components.Elements;\n Layout = Components.Layout;\n list = Elements.list;\n },\n\n /**\r\n * Called after the component is mounted.\r\n * The resize event must be registered after the Layout's one is done.\r\n */\n mounted: function mounted() {\n var _this = this;\n\n if (!isFade) {\n this.jump(0);\n Splide.on('mounted resize updated', function () {\n _this.jump(Splide.index);\n });\n }\n },\n\n /**\r\n * Go to the given destination index.\r\n * After arriving there, the track is jump to the new index without animation, mainly for loop mode.\r\n *\r\n * @param {number} destIndex - A destination index.\r\n * This can be negative or greater than slides length for reaching clones.\r\n * @param {number} newIndex - An actual new index. They are always same in Slide and Rewind mode.\r\n * @param {boolean} silently - If true, suppress emitting events.\r\n */\n go: function go(destIndex, newIndex, silently) {\n var newPosition = getTrimmedPosition(destIndex);\n var prevIndex = Splide.index; // Prevent any actions while transitioning from the last index to the first one for jump.\n\n if (Splide.State.is(MOVING) && isLoopPending) {\n return;\n }\n\n isLoopPending = destIndex !== newIndex;\n\n if (!silently) {\n Splide.emit('move', newIndex, prevIndex, destIndex);\n }\n\n if (Math.abs(newPosition - this.position) >= 1 || isFade) {\n Components.Transition.start(destIndex, newIndex, prevIndex, this.toCoord(newPosition), function () {\n onTransitionEnd(destIndex, newIndex, prevIndex, silently);\n });\n } else {\n if (destIndex !== prevIndex && Splide.options.trimSpace === 'move') {\n Components.Controller.go(destIndex + destIndex - prevIndex, silently);\n } else {\n onTransitionEnd(destIndex, newIndex, prevIndex, silently);\n }\n }\n },\n\n /**\r\n * Move the track to the specified index.\r\n *\r\n * @param {number} index - A destination index where the track jumps.\r\n */\n jump: function jump(index) {\n this.translate(getTrimmedPosition(index));\n },\n\n /**\r\n * Set the list position by CSS translate property.\r\n *\r\n * @param {number} position - A new position value.\r\n */\n translate: function translate(position) {\n applyStyle(list, {\n transform: \"translate\" + (isVertical ? 'Y' : 'X') + \"(\" + position + \"px)\"\n });\n },\n\n /**\r\n * Cancel the transition and set the list position.\r\n * Also, loop the slider if necessary.\r\n */\n cancel: function cancel() {\n if (Splide.is(LOOP)) {\n this.shift();\n } else {\n // Ensure the current position.\n this.translate(this.position);\n }\n\n applyStyle(list, {\n transition: ''\n });\n },\n\n /**\r\n * Shift the slider if it exceeds borders on the edge.\r\n */\n shift: function shift() {\n var position = abs(this.position);\n var left = abs(this.toPosition(0));\n var right = abs(this.toPosition(Splide.length));\n var innerSize = right - left;\n\n if (position < left) {\n position += innerSize;\n } else if (position > right) {\n position -= innerSize;\n }\n\n this.translate(sign * position);\n },\n\n /**\r\n * Trim redundant spaces on the left or right edge if necessary.\r\n *\r\n * @param {number} position - Position value to be trimmed.\r\n *\r\n * @return {number} - Trimmed position.\r\n */\n trim: function trim(position) {\n if (!Splide.options.trimSpace || Splide.is(LOOP)) {\n return position;\n }\n\n var edge = sign * (Layout.totalSize() - Layout.size - Layout.gap);\n return between(position, edge, 0);\n },\n\n /**\r\n * Calculate the closest slide index from the given position.\r\n *\r\n * @param {number} position - A position converted to an slide index.\r\n *\r\n * @return {number} - The closest slide index.\r\n */\n toIndex: function toIndex(position) {\n var _this2 = this;\n\n var index = 0;\n var minDistance = Infinity;\n Elements.getSlides(true).forEach(function (Slide) {\n var slideIndex = Slide.index;\n var distance = abs(_this2.toPosition(slideIndex) - position);\n\n if (distance < minDistance) {\n minDistance = distance;\n index = slideIndex;\n }\n });\n return index;\n },\n\n /**\r\n * Return coordinates object by the given position.\r\n *\r\n * @param {number} position - A position value.\r\n *\r\n * @return {Object} - A coordinates object.\r\n */\n toCoord: function toCoord(position) {\n return {\n x: isVertical ? 0 : position,\n y: isVertical ? position : 0\n };\n },\n\n /**\r\n * Calculate the track position by a slide index.\r\n *\r\n * @param {number} index - Slide index.\r\n *\r\n * @return {Object} - Calculated position.\r\n */\n toPosition: function toPosition(index) {\n var position = Layout.totalSize(index) - Layout.slideSize(index) - Layout.gap;\n return sign * (position + this.offset(index));\n },\n\n /**\r\n * Return the current offset value, considering direction.\r\n *\r\n * @return {number} - Offset amount.\r\n */\n offset: function offset(index) {\n var focus = Splide.options.focus;\n var slideSize = Layout.slideSize(index);\n\n if (focus === 'center') {\n return -(Layout.size - slideSize) / 2;\n }\n\n return -(parseInt(focus) || 0) * (slideSize + Layout.gap);\n },\n\n /**\r\n * Return the current position.\r\n * This returns the correct position even while transitioning by CSS.\r\n *\r\n * @return {number} - Current position.\r\n */\n get position() {\n var prop = isVertical ? 'top' : isRTL ? 'right' : 'left';\n return getRect(list)[prop] - (getRect(Elements.track)[prop] - Layout.padding[prop] * sign);\n }\n\n };\n /**\r\n * Called whenever slides arrive at a destination.\r\n *\r\n * @param {number} destIndex - A destination index.\r\n * @param {number} newIndex - A new index.\r\n * @param {number} prevIndex - A previous index.\r\n * @param {boolean} silently - If true, suppress emitting events.\r\n */\n\n function onTransitionEnd(destIndex, newIndex, prevIndex, silently) {\n applyStyle(list, {\n transition: ''\n });\n isLoopPending = false;\n\n if (!isFade) {\n Track.jump(newIndex);\n }\n\n if (!silently) {\n Splide.emit('moved', newIndex, prevIndex, destIndex);\n }\n }\n /**\r\n * Convert index to the trimmed position.\r\n *\r\n * @return {number} - Trimmed position.\r\n */\n\n\n function getTrimmedPosition(index) {\n return Track.trim(Track.toPosition(index));\n }\n\n return Track;\n});\n;// CONCATENATED MODULE: ./src/js/components/clones/index.js\n/**\r\n * The component for cloning some slides for \"loop\" mode of the track.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n/**\r\n * The component for cloning some slides for \"loop\" mode of the track.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const clones = (function (Splide, Components) {\n /**\r\n * Store information of all clones.\r\n *\r\n * @type {Array}\r\n */\n var clones = [];\n /**\r\n * Store the current clone count on one side.\r\n *\r\n * @type {number}\r\n */\n\n var cloneCount = 0;\n /**\r\n * Keep Elements component.\r\n *\r\n * @type {Object}\r\n */\n\n var Elements = Components.Elements;\n /**\r\n * Clones component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Clones = {\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n var _this = this;\n\n if (Splide.is(LOOP)) {\n init();\n Splide.on('refresh:before', function () {\n _this.destroy();\n }).on('refresh', init).on('resize', function () {\n if (cloneCount !== getCloneCount()) {\n // Destroy before refresh not to collect clones by the Elements component.\n _this.destroy();\n\n Splide.refresh();\n }\n });\n }\n },\n\n /**\r\n * Destroy.\r\n */\n destroy: function destroy() {\n dom_remove(clones);\n clones = [];\n },\n\n /**\r\n * Return all clones.\r\n *\r\n * @return {Element[]} - Cloned elements.\r\n */\n get clones() {\n return clones;\n },\n\n /**\r\n * Return clone length.\r\n *\r\n * @return {number} - A length of clones.\r\n */\n get length() {\n return clones.length;\n }\n\n };\n /**\r\n * Initialization.\r\n */\n\n function init() {\n Clones.destroy();\n cloneCount = getCloneCount();\n generateClones(cloneCount);\n }\n /**\r\n * Generate and append/prepend clones.\r\n *\r\n * @param {number} count - The half number of clones.\r\n */\n\n\n function generateClones(count) {\n var length = Elements.length,\n register = Elements.register;\n\n if (length) {\n var slides = Elements.slides;\n\n while (slides.length < count) {\n slides = slides.concat(slides);\n } // Clones after the last element.\n\n\n slides.slice(0, count).forEach(function (elm, index) {\n var clone = cloneDeeply(elm);\n append(Elements.list, clone);\n clones.push(clone);\n register(clone, index + length, index % length);\n }); // Clones before the first element.\n\n slides.slice(-count).forEach(function (elm, index) {\n var clone = cloneDeeply(elm);\n before(clone, slides[0]);\n clones.push(clone);\n register(clone, index - count, (length + index - count % length) % length);\n });\n }\n }\n /**\r\n * Return half count of clones to be generated.\r\n * Clone count is determined by:\r\n * - \"clones\" value in the options.\r\n * - Number of slides that can be placed in a view in \"fixed\" mode.\r\n * - Max pages a flick action can move.\r\n * - Whether the slide length is enough for perPage.\r\n *\r\n * @return {number} - Count for clones.\r\n */\n\n\n function getCloneCount() {\n var options = Splide.options;\n\n if (options.clones) {\n return options.clones;\n } // Use the slide length in autoWidth mode because the number cannot be calculated.\n\n\n var baseCount = options.autoWidth || options.autoHeight ? Elements.length : options.perPage;\n var dimension = options.direction === TTB ? 'Height' : 'Width';\n var fixedSize = toPixel(Splide.root, options[\"fixed\" + dimension]);\n\n if (fixedSize) {\n // Roughly calculate the count. This needs not to be strict.\n baseCount = Math.ceil(Elements.track[\"client\" + dimension] / fixedSize);\n }\n\n return baseCount * (options.drag ? options.flickMaxPages + 1 : 1);\n }\n /**\r\n * Clone deeply the given element.\r\n *\r\n * @param {Element} elm - An element being duplicated.\r\n *\r\n * @return {Node} - A cloned node(element).\r\n */\n\n\n function cloneDeeply(elm) {\n var clone = elm.cloneNode(true);\n addClass(clone, Splide.classes.clone); // ID should not be duplicated.\n\n removeAttribute(clone, 'id');\n return clone;\n }\n\n return Clones;\n});\n;// CONCATENATED MODULE: ./src/js/components/layout/directions/horizontal.js\n/**\r\n * The resolver component for horizontal layout.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n/**\r\n * The resolver component for horizontal layout.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The resolver object.\r\n */\n\n/* harmony default export */ const horizontal = (function (Splide, Components) {\n /**\r\n * Keep the Elements component.\r\n *\r\n * @type {string}\r\n */\n var Elements = Components.Elements;\n /**\r\n * Keep the root element.\r\n *\r\n * @type {Element}\r\n */\n\n var root = Splide.root;\n /**\r\n * Keep the track element.\r\n *\r\n * @type {Element}\r\n */\n\n var track;\n /**\r\n * Keep the latest options.\r\n *\r\n * @type {Element}\r\n */\n\n var options = Splide.options;\n return {\n /**\r\n * Margin property name.\r\n *\r\n * @type {string}\r\n */\n margin: 'margin' + (options.direction === RTL ? 'Left' : 'Right'),\n\n /**\r\n * Always 0 because the height will be determined by inner contents.\r\n *\r\n * @type {number}\r\n */\n height: 0,\n\n /**\r\n * Initialization.\r\n */\n init: function init() {\n this.resize();\n },\n\n /**\r\n * Resize gap and padding.\r\n * This must be called on init.\r\n */\n resize: function resize() {\n options = Splide.options;\n track = Elements.track;\n this.gap = toPixel(root, options.gap);\n var padding = options.padding;\n var left = toPixel(root, padding.left || padding);\n var right = toPixel(root, padding.right || padding);\n this.padding = {\n left: left,\n right: right\n };\n applyStyle(track, {\n paddingLeft: unit(left),\n paddingRight: unit(right)\n });\n },\n\n /**\r\n * Return total width from the left of the list to the right of the slide specified by the provided index.\r\n *\r\n * @param {number} index - Optional. A slide index. If undefined, total width of the slider will be returned.\r\n *\r\n * @return {number} - Total width to the right side of the specified slide, or 0 for an invalid index.\r\n */\n totalWidth: function totalWidth(index) {\n if (index === void 0) {\n index = Splide.length - 1;\n }\n\n var Slide = Elements.getSlide(index);\n var width = 0;\n\n if (Slide) {\n var slideRect = getRect(Slide.slide);\n var listRect = getRect(Elements.list);\n\n if (options.direction === RTL) {\n width = listRect.right - slideRect.left;\n } else {\n width = slideRect.right - listRect.left;\n }\n\n width += this.gap;\n }\n\n return width;\n },\n\n /**\r\n * Return the slide width in px.\r\n *\r\n * @param {number} index - Slide index.\r\n *\r\n * @return {number} - The slide width.\r\n */\n slideWidth: function slideWidth(index) {\n if (options.autoWidth) {\n var Slide = Elements.getSlide(index);\n return Slide ? Slide.slide.offsetWidth : 0;\n }\n\n var width = options.fixedWidth || (this.width + this.gap) / options.perPage - this.gap;\n return toPixel(root, width);\n },\n\n /**\r\n * Return the slide height in px.\r\n *\r\n * @return {number} - The slide height.\r\n */\n slideHeight: function slideHeight() {\n var height = options.height || options.fixedHeight || this.width * options.heightRatio;\n return toPixel(root, height);\n },\n\n /**\r\n * Return slider width without padding.\r\n *\r\n * @return {number} - Current slider width.\r\n */\n get width() {\n return track.clientWidth - this.padding.left - this.padding.right;\n }\n\n };\n});\n;// CONCATENATED MODULE: ./src/js/components/layout/directions/vertical.js\n/**\r\n * The resolver component for vertical layout.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n/**\r\n * The resolver component for vertical layout.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The resolver object.\r\n */\n\n/* harmony default export */ const vertical = (function (Splide, Components) {\n /**\r\n * Keep the Elements component.\r\n *\r\n * @type {string}\r\n */\n var Elements = Components.Elements;\n /**\r\n * Keep the root element.\r\n *\r\n * @type {Element}\r\n */\n\n var root = Splide.root;\n /**\r\n * Keep the track element.\r\n *\r\n * @type {Element}\r\n */\n\n var track;\n /**\r\n * Keep the latest options.\r\n *\r\n * @type {Element}\r\n */\n\n var options;\n return {\n /**\r\n * Margin property name.\r\n *\r\n * @type {string}\r\n */\n margin: 'marginBottom',\n\n /**\r\n * Initialization.\r\n */\n init: function init() {\n this.resize();\n },\n\n /**\r\n * Resize gap and padding.\r\n * This must be called on init.\r\n */\n resize: function resize() {\n options = Splide.options;\n track = Elements.track;\n this.gap = toPixel(root, options.gap);\n var padding = options.padding;\n var top = toPixel(root, padding.top || padding);\n var bottom = toPixel(root, padding.bottom || padding);\n this.padding = {\n top: top,\n bottom: bottom\n };\n applyStyle(track, {\n paddingTop: unit(top),\n paddingBottom: unit(bottom)\n });\n },\n\n /**\r\n * Return total height from the top of the list to the bottom of the slide specified by the provided index.\r\n *\r\n * @param {number} index - Optional. A slide index. If undefined, total height of the slider will be returned.\r\n *\r\n * @return {number} - Total height to the bottom of the specified slide, or 0 for an invalid index.\r\n */\n totalHeight: function totalHeight(index) {\n if (index === void 0) {\n index = Splide.length - 1;\n }\n\n var Slide = Elements.getSlide(index);\n\n if (Slide) {\n return getRect(Slide.slide).bottom - getRect(Elements.list).top + this.gap;\n }\n\n return 0;\n },\n\n /**\r\n * Return the slide width in px.\r\n *\r\n * @return {number} - The slide width.\r\n */\n slideWidth: function slideWidth() {\n return toPixel(root, options.fixedWidth || this.width);\n },\n\n /**\r\n * Return the slide height in px.\r\n *\r\n * @param {number} index - Slide index.\r\n *\r\n * @return {number} - The slide height.\r\n */\n slideHeight: function slideHeight(index) {\n if (options.autoHeight) {\n var Slide = Elements.getSlide(index);\n return Slide ? Slide.slide.offsetHeight : 0;\n }\n\n var height = options.fixedHeight || (this.height + this.gap) / options.perPage - this.gap;\n return toPixel(root, height);\n },\n\n /**\r\n * Return slider width without padding.\r\n *\r\n * @return {number} - Current slider width.\r\n */\n get width() {\n return track.clientWidth;\n },\n\n /**\r\n * Return slide height without padding.\r\n *\r\n * @return {number} - Slider height.\r\n */\n get height() {\n var height = options.height || this.width * options.heightRatio;\n exist(height, '\"height\" or \"heightRatio\" is missing.');\n return toPixel(root, height) - this.padding.top - this.padding.bottom;\n }\n\n };\n});\n;// CONCATENATED MODULE: ./src/js/utils/time.js\n/**\r\n * A package of utility functions related with time.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Simple throttle function that controls how often the given function is executed.\r\n *\r\n * @param {function} func - A function to be throttled.\r\n * @param {number} wait - Time in millisecond for interval of execution.\r\n *\r\n * @return {Function} - A debounced function.\r\n */\nfunction throttle(func, wait) {\n var timeout; // Declare function by the \"function\" keyword to prevent \"this\" from being inherited.\n\n return function () {\n if (!timeout) {\n timeout = setTimeout(function () {\n func();\n timeout = null;\n }, wait);\n }\n };\n}\n/**\r\n * Custom setInterval function that provides progress rate as callback.\r\n *\r\n * @param {function} callback - A callback function fired every time the interval time passes.\r\n * @param {number} interval - Interval duration in milliseconds.\r\n * @param {function} progress - A callback function fired whenever the progress goes.\r\n *\r\n * @return {Object} - An object containing play() and pause() functions.\r\n */\n\nfunction createInterval(callback, interval, progress) {\n var _window = window,\n requestAnimationFrame = _window.requestAnimationFrame;\n var start,\n elapse,\n rate,\n _pause = true;\n\n var step = function step(timestamp) {\n if (!_pause) {\n if (!start) {\n start = timestamp;\n\n if (rate && rate < 1) {\n start -= rate * interval;\n }\n }\n\n elapse = timestamp - start;\n rate = elapse / interval;\n\n if (elapse >= interval) {\n start = 0;\n rate = 1;\n callback();\n }\n\n if (progress) {\n progress(rate);\n }\n\n requestAnimationFrame(step);\n }\n };\n\n return {\n pause: function pause() {\n _pause = true;\n start = 0;\n },\n play: function play(reset) {\n start = 0;\n\n if (reset) {\n rate = 0;\n }\n\n if (_pause) {\n _pause = false;\n requestAnimationFrame(step);\n }\n }\n };\n}\n;// CONCATENATED MODULE: ./src/js/components/layout/index.js\n/**\r\n * The component for handing slide layouts and their sizes.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\n\n\n/**\r\n * The component for handing slide layouts and their sizes.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const layout = (function (Splide, Components) {\n /**\r\n * Keep the Elements component.\r\n *\r\n * @type {string}\r\n */\n var Elements = Components.Elements;\n /**\r\n * Whether the slider is vertical or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isVertical = Splide.options.direction === TTB;\n /**\r\n * Layout component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Layout = object_assign({\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n bind();\n init(); // The word \"size\" means width for a horizontal slider and height for a vertical slider.\n\n this.totalSize = isVertical ? this.totalHeight : this.totalWidth;\n this.slideSize = isVertical ? this.slideHeight : this.slideWidth;\n },\n\n /**\r\n * Destroy the component.\r\n */\n destroy: function destroy() {\n removeAttribute([Elements.list, Elements.track], 'style');\n },\n\n /**\r\n * Return the slider height on the vertical mode or width on the horizontal mode.\r\n *\r\n * @return {number}\r\n */\n get size() {\n return isVertical ? this.height : this.width;\n }\n\n }, isVertical ? vertical(Splide, Components) : horizontal(Splide, Components));\n /**\r\n * Init slider styles according to options.\r\n */\n\n function init() {\n Layout.init();\n applyStyle(Splide.root, {\n maxWidth: unit(Splide.options.width)\n });\n Elements.each(function (Slide) {\n Slide.slide.style[Layout.margin] = unit(Layout.gap);\n });\n resize();\n }\n /**\r\n * Listen the resize native event with throttle.\r\n * Initialize when the component is mounted or options are updated.\r\n */\n\n\n function bind() {\n Splide.on('resize load', throttle(function () {\n Splide.emit('resize');\n }, Splide.options.throttle), window).on('resize', resize).on('updated refresh', init);\n }\n /**\r\n * Resize the track and slide elements.\r\n */\n\n\n function resize() {\n var options = Splide.options;\n Layout.resize();\n applyStyle(Elements.track, {\n height: unit(Layout.height)\n });\n var slideHeight = options.autoHeight ? null : unit(Layout.slideHeight());\n Elements.each(function (Slide) {\n applyStyle(Slide.container, {\n height: slideHeight\n });\n applyStyle(Slide.slide, {\n width: options.autoWidth ? null : unit(Layout.slideWidth(Slide.index)),\n height: Slide.container ? null : slideHeight\n });\n });\n Splide.emit('resized');\n }\n\n return Layout;\n});\n;// CONCATENATED MODULE: ./src/js/components/drag/index.js\n/**\r\n * The component for supporting mouse drag and swipe.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n\n\nvar drag_abs = Math.abs;\n/**\r\n * If the absolute velocity is greater thant this value,\r\n * a slider always goes to a different slide after drag, not allowed to stay on a current slide.\r\n */\n\nvar MIN_VELOCITY = 0.1;\n/**\r\n * Adjust how much the track can be pulled on the first or last page.\r\n * The larger number this is, the farther the track moves.\r\n * This should be around 5 - 9.\r\n *\r\n * @type {number}\r\n */\n\nvar FRICTION_REDUCER = 7;\n/**\r\n * The component supporting mouse drag and swipe.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const drag = (function (Splide, Components) {\n /**\r\n * Store the Move component.\r\n *\r\n * @type {Object}\r\n */\n var Track = Components.Track;\n /**\r\n * Store the Controller component.\r\n *\r\n * @type {Object}\r\n */\n\n var Controller = Components.Controller;\n /**\r\n * Coordinate of the track on starting drag.\r\n *\r\n * @type {Object}\r\n */\n\n var startCoord;\n /**\r\n * Analyzed info on starting drag.\r\n *\r\n * @type {Object|null}\r\n */\n\n var startInfo;\n /**\r\n * Analyzed info being updated while dragging/swiping.\r\n *\r\n * @type {Object}\r\n */\n\n var currentInfo;\n /**\r\n * Determine whether slides are being dragged or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isDragging;\n /**\r\n * Whether the slider direction is vertical or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var isVertical = Splide.options.direction === TTB;\n /**\r\n * Axis for the direction.\r\n *\r\n * @type {string}\r\n */\n\n var axis = isVertical ? 'y' : 'x';\n /**\r\n * Drag component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Drag = {\n /**\r\n * Whether dragging is disabled or not.\r\n *\r\n * @type {boolean}\r\n */\n disabled: false,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n var _this = this;\n\n var Elements = Components.Elements;\n var track = Elements.track;\n Splide.on('touchstart mousedown', start, track).on('touchmove mousemove', move, track, {\n passive: false\n }).on('touchend touchcancel mouseleave mouseup dragend', end, track).on('mounted refresh', function () {\n // Prevent dragging an image or anchor itself.\n each(Elements.list.querySelectorAll('img, a'), function (elm) {\n Splide.off('dragstart', elm).on('dragstart', function (e) {\n e.preventDefault();\n }, elm, {\n passive: false\n });\n });\n }).on('mounted updated', function () {\n _this.disabled = !Splide.options.drag;\n });\n }\n };\n /**\r\n * Called when the track starts to be dragged.\r\n *\r\n * @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.\r\n */\n\n function start(e) {\n if (!Drag.disabled && !isDragging) {\n // These prams are used to evaluate whether the slider should start moving.\n init(e);\n }\n }\n /**\r\n * Initialize parameters.\r\n *\r\n * @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.\r\n */\n\n\n function init(e) {\n startCoord = Track.toCoord(Track.position);\n startInfo = analyze(e, {});\n currentInfo = startInfo;\n }\n /**\r\n * Called while the track being dragged.\r\n *\r\n * @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.\r\n */\n\n\n function move(e) {\n if (startInfo) {\n currentInfo = analyze(e, startInfo);\n\n if (isDragging) {\n if (e.cancelable) {\n e.preventDefault();\n }\n\n if (!Splide.is(FADE)) {\n var position = startCoord[axis] + currentInfo.offset[axis];\n Track.translate(resist(position));\n }\n } else {\n if (shouldMove(currentInfo)) {\n Splide.emit('drag', startInfo);\n isDragging = true;\n Track.cancel(); // These params are actual drag data.\n\n init(e);\n }\n }\n }\n }\n /**\r\n * Determine whether to start moving the track or not by drag angle.\r\n *\r\n * @param {Object} info - An information object.\r\n *\r\n * @return {boolean} - True if the track should be moved or false if not.\r\n */\n\n\n function shouldMove(_ref) {\n var offset = _ref.offset;\n\n if (Splide.State.is(MOVING) && Splide.options.waitForTransition) {\n return false;\n }\n\n var angle = Math.atan(drag_abs(offset.y) / drag_abs(offset.x)) * 180 / Math.PI;\n\n if (isVertical) {\n angle = 90 - angle;\n }\n\n return angle < Splide.options.dragAngleThreshold;\n }\n /**\r\n * Resist dragging the track on the first/last page because there is no more.\r\n *\r\n * @param {number} position - A position being applied to the track.\r\n *\r\n * @return {Object} - Adjusted position.\r\n */\n\n\n function resist(position) {\n if (Splide.is(SLIDE)) {\n var sign = Track.sign;\n\n var _start = sign * Track.trim(Track.toPosition(0));\n\n var _end = sign * Track.trim(Track.toPosition(Controller.edgeIndex));\n\n position *= sign;\n\n if (position < _start) {\n position = _start - FRICTION_REDUCER * Math.log(_start - position);\n } else if (position > _end) {\n position = _end + FRICTION_REDUCER * Math.log(position - _end);\n }\n\n position *= sign;\n }\n\n return position;\n }\n /**\r\n * Called when dragging ends.\r\n */\n\n\n function end() {\n startInfo = null;\n\n if (isDragging) {\n Splide.emit('dragged', currentInfo);\n go(currentInfo);\n isDragging = false;\n }\n }\n /**\r\n * Go to the slide determined by the analyzed data.\r\n *\r\n * @param {Object} info - An info object.\r\n */\n\n\n function go(info) {\n var velocity = info.velocity[axis];\n var absV = drag_abs(velocity);\n\n if (absV > 0) {\n var options = Splide.options;\n var index = Splide.index;\n var sign = velocity < 0 ? -1 : 1;\n var destIndex = index;\n\n if (!Splide.is(FADE)) {\n var destination = Track.position;\n\n if (absV > options.flickVelocityThreshold && drag_abs(info.offset[axis]) < options.swipeDistanceThreshold) {\n destination += sign * Math.min(absV * options.flickPower, Components.Layout.size * (options.flickMaxPages || 1));\n }\n\n destIndex = Track.toIndex(destination);\n }\n /*\r\n * Do not allow the track to go to a previous position if there is enough velocity.\r\n * Always use the adjacent index for the fade mode.\r\n */\n\n\n if (destIndex === index && absV > MIN_VELOCITY) {\n destIndex = index + sign * Track.sign;\n }\n\n if (Splide.is(SLIDE)) {\n destIndex = between(destIndex, 0, Controller.edgeIndex);\n }\n\n Controller.go(destIndex, options.isNavigation);\n }\n }\n /**\r\n * Analyze the given event object and return important information for handling swipe behavior.\r\n *\r\n * @param {Event} e - Touch or Mouse event object.\r\n * @param {Object} startInfo - Information analyzed on start for calculating difference from the current one.\r\n *\r\n * @return {Object} - An object containing analyzed information, such as offset, velocity, etc.\r\n */\n\n\n function analyze(e, startInfo) {\n var timeStamp = e.timeStamp,\n touches = e.touches;\n\n var _ref2 = touches ? touches[0] : e,\n clientX = _ref2.clientX,\n clientY = _ref2.clientY;\n\n var _ref3 = startInfo.to || {},\n _ref3$x = _ref3.x,\n fromX = _ref3$x === void 0 ? clientX : _ref3$x,\n _ref3$y = _ref3.y,\n fromY = _ref3$y === void 0 ? clientY : _ref3$y;\n\n var startTime = startInfo.time || 0;\n var offset = {\n x: clientX - fromX,\n y: clientY - fromY\n };\n var duration = timeStamp - startTime;\n var velocity = {\n x: offset.x / duration,\n y: offset.y / duration\n };\n return {\n to: {\n x: clientX,\n y: clientY\n },\n offset: offset,\n time: timeStamp,\n velocity: velocity\n };\n }\n\n return Drag;\n});\n;// CONCATENATED MODULE: ./src/js/components/click/index.js\n/**\r\n * The component for handling a click event.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * The component for handling a click event.\r\n * Click should be disabled during drag/swipe.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n/* harmony default export */ const click = (function (Splide, Components) {\n /**\r\n * Whether click is disabled or not.\r\n *\r\n * @type {boolean}\r\n */\n var disabled = false;\n /**\r\n * Click component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Click = {\n /**\r\n * Mount only when the drag is activated and the slide type is not \"fade\".\r\n *\r\n * @type {boolean}\r\n */\n required: Splide.options.drag,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n Splide.on('click', onClick, Components.Elements.track, {\n capture: true\n }).on('drag', function () {\n disabled = true;\n }).on('dragged', function () {\n // Make sure the flag is released after the click event is fired.\n setTimeout(function () {\n disabled = false;\n });\n });\n }\n };\n /**\r\n * Called when a track element is clicked.\r\n *\r\n * @param {Event} e - A click event.\r\n */\n\n function onClick(e) {\n if (disabled) {\n e.preventDefault();\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n\n return Click;\n});\n;// CONCATENATED MODULE: ./src/js/components/autoplay/index.js\n/**\r\n * The component for playing slides automatically.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n/**\r\n * Set of pause flags.\r\n */\n\nvar PAUSE_FLAGS = {\n HOVER: 1,\n FOCUS: 2,\n MANUAL: 3\n};\n/**\r\n * The component for playing slides automatically.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n * @param {string} name - A component name as a lowercase string.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const autoplay = (function (Splide, Components, name) {\n /**\r\n * Store pause flags.\r\n *\r\n * @type {Array}\r\n */\n var flags = [];\n /**\r\n * Store an interval object.\r\n *\r\n * @type {Object};\r\n */\n\n var interval;\n /**\r\n * Keep the Elements component.\r\n *\r\n * @type {string}\r\n */\n\n var Elements = Components.Elements;\n /**\r\n * Autoplay component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Autoplay = {\n /**\r\n * Required only when the autoplay option is true.\r\n *\r\n * @type {boolean}\r\n */\n required: Splide.options.autoplay,\n\n /**\r\n * Called when the component is mounted.\r\n * Note that autoplay starts only if there are slides over perPage number.\r\n */\n mount: function mount() {\n var options = Splide.options;\n\n if (Elements.slides.length > options.perPage) {\n interval = createInterval(function () {\n Splide.go('>');\n }, options.interval, function (rate) {\n Splide.emit(name + \":playing\", rate);\n\n if (Elements.bar) {\n applyStyle(Elements.bar, {\n width: rate * 100 + \"%\"\n });\n }\n });\n bind();\n this.play();\n }\n },\n\n /**\r\n * Start autoplay.\r\n *\r\n * @param {number} flag - A pause flag to be removed.\r\n */\n play: function play(flag) {\n if (flag === void 0) {\n flag = 0;\n }\n\n flags = flags.filter(function (f) {\n return f !== flag;\n });\n\n if (!flags.length) {\n Splide.emit(name + \":play\");\n interval.play(Splide.options.resetProgress);\n }\n },\n\n /**\r\n * Pause autoplay.\r\n * Note that Array.includes is not supported by IE.\r\n *\r\n * @param {number} flag - A pause flag to be added.\r\n */\n pause: function pause(flag) {\n if (flag === void 0) {\n flag = 0;\n }\n\n interval.pause();\n\n if (flags.indexOf(flag) === -1) {\n flags.push(flag);\n }\n\n if (flags.length === 1) {\n Splide.emit(name + \":pause\");\n }\n }\n };\n /**\r\n * Listen some events.\r\n */\n\n function bind() {\n var options = Splide.options;\n var sibling = Splide.sibling;\n var elms = [Splide.root, sibling ? sibling.root : null];\n\n if (options.pauseOnHover) {\n switchOn(elms, 'mouseleave', PAUSE_FLAGS.HOVER, true);\n switchOn(elms, 'mouseenter', PAUSE_FLAGS.HOVER, false);\n }\n\n if (options.pauseOnFocus) {\n switchOn(elms, 'focusout', PAUSE_FLAGS.FOCUS, true);\n switchOn(elms, 'focusin', PAUSE_FLAGS.FOCUS, false);\n }\n\n if (Elements.play) {\n Splide.on('click', function () {\n // Need to be removed a focus flag at first.\n Autoplay.play(PAUSE_FLAGS.FOCUS);\n Autoplay.play(PAUSE_FLAGS.MANUAL);\n }, Elements.play);\n }\n\n if (Elements.pause) {\n switchOn([Elements.pause], 'click', PAUSE_FLAGS.MANUAL, false);\n }\n\n Splide.on('move refresh', function () {\n Autoplay.play();\n }) // Rewind the timer.\n .on('destroy', function () {\n Autoplay.pause();\n });\n }\n /**\r\n * Play or pause on the given event.\r\n *\r\n * @param {Element[]} elms - Elements.\r\n * @param {string} event - An event name or names.\r\n * @param {number} flag - A pause flag defined on the top.\r\n * @param {boolean} play - Determine whether to play or pause.\r\n */\n\n\n function switchOn(elms, event, flag, play) {\n elms.forEach(function (elm) {\n Splide.on(event, function () {\n Autoplay[play ? 'play' : 'pause'](flag);\n }, elm);\n });\n }\n\n return Autoplay;\n});\n;// CONCATENATED MODULE: ./src/js/components/cover/index.js\n/**\r\n * The component for change an img element to background image of its wrapper.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * The component for change an img element to background image of its wrapper.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const cover = (function (Splide, Components) {\n /**\r\n * Hold options.\r\n *\r\n * @type {Object}\r\n */\n var options = Splide.options;\n /**\r\n * Cover component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Cover = {\n /**\r\n * Required only when \"cover\" option is true.\r\n *\r\n * @type {boolean}\r\n */\n required: options.cover,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n Splide.on('lazyload:loaded', function (img) {\n cover(img, false);\n });\n Splide.on('mounted updated refresh', function () {\n return apply(false);\n });\n },\n\n /**\r\n * Destroy.\r\n */\n destroy: function destroy() {\n apply(true);\n }\n };\n /**\r\n * Apply \"cover\" to all slides.\r\n *\r\n * @param {boolean} uncover - If true, \"cover\" will be clear.\r\n */\n\n function apply(uncover) {\n Components.Elements.each(function (Slide) {\n var img = child(Slide.slide, 'IMG') || child(Slide.container, 'IMG');\n\n if (img && img.src) {\n cover(img, uncover);\n }\n });\n }\n /**\r\n * Set background image of the parent element, using source of the given image element.\r\n *\r\n * @param {Element} img - An image element.\r\n * @param {boolean} uncover - Reset \"cover\".\r\n */\n\n\n function cover(img, uncover) {\n applyStyle(img.parentElement, {\n background: uncover ? '' : \"center/cover no-repeat url(\\\"\" + img.src + \"\\\")\"\n });\n applyStyle(img, {\n display: uncover ? '' : 'none'\n });\n }\n\n return Cover;\n});\n;// CONCATENATED MODULE: ./src/js/components/arrows/path.js\n/**\r\n * Export vector path for an arrow.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n/**\r\n * Namespace definition for SVG element.\r\n *\r\n * @type {string}\r\n */\nvar XML_NAME_SPACE = 'http://www.w3.org/2000/svg';\n/**\r\n * The arrow vector path.\r\n *\r\n * @type {number}\r\n */\n\nvar PATH = 'm15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z';\n/**\r\n * SVG width and height.\r\n *\r\n * @type {number}\r\n */\n\nvar SIZE = 40;\n;// CONCATENATED MODULE: ./src/js/components/arrows/index.js\n/**\r\n * The component for appending prev/next arrows.\r\n *\r\n * @author Naotoshi Fujita\r\n * @copyright Naotoshi Fujita. All rights reserved.\r\n */\n\n\n\n/**\r\n * The component for appending prev/next arrows.\r\n *\r\n * @param {Splide} Splide - A Splide instance.\r\n * @param {Object} Components - An object containing components.\r\n * @param {string} name - A component name as a lowercase string.\r\n *\r\n * @return {Object} - The component object.\r\n */\n\n/* harmony default export */ const arrows = (function (Splide, Components, name) {\n /**\r\n * Previous arrow element.\r\n *\r\n * @type {Element|undefined}\r\n */\n var prev;\n /**\r\n * Next arrow element.\r\n *\r\n * @type {Element|undefined}\r\n */\n\n var next;\n /**\r\n * Store the class list.\r\n *\r\n * @type {Object}\r\n */\n\n var classes = Splide.classes;\n /**\r\n * Hold the root element.\r\n *\r\n * @type {Element}\r\n */\n\n var root = Splide.root;\n /**\r\n * Whether arrows are created programmatically or not.\r\n *\r\n * @type {boolean}\r\n */\n\n var created;\n /**\r\n * Hold the Elements component.\r\n *\r\n * @type {Object}\r\n */\n\n var Elements = Components.Elements;\n /**\r\n * Arrows component object.\r\n *\r\n * @type {Object}\r\n */\n\n var Arrows = {\n /**\r\n * Required when the arrows option is true.\r\n *\r\n * @type {boolean}\r\n */\n required: Splide.options.arrows,\n\n /**\r\n * Called when the component is mounted.\r\n */\n mount: function mount() {\n // Attempt to get arrows from HTML source.\n prev = Elements.arrows.prev;\n next = Elements.arrows.next; // If arrows were not found in HTML, let's generate them.\n\n if ((!prev || !next) && Splide.options.arrows) {\n prev = createArrow(true);\n next = createArrow(false);\n created = true;\n appendArrows();\n }\n\n if (prev && next) {\n bind();\n }\n\n this.arrows = {\n prev: prev,\n next: next\n };\n },\n\n /**\r\n * Called after all components are mounted.\r\n */\n mounted: function mounted() {\n Splide.emit(name + \":mounted\", prev, next);\n },\n\n /**\r\n * Destroy.\r\n */\n destroy: function destroy() {\n removeAttribute([prev, next], 'disabled');\n\n if (created) {\n dom_remove(prev.parentElement);\n }\n }\n };\n /**\r\n * Listen to native and custom events.\r\n */\n\n function bind() {\n Splide.on('click', function () {\n Splide.go('<');\n }, prev).on('click', function () {\n Splide.go('>');\n }, next).on('mounted move updated refresh', updateDisabled);\n }\n /**\r\n * Update a disabled attribute.\r\n */\n\n\n function updateDisabled() {\n var _Components$Controlle = Components.Controller,\n prevIndex = _Components$Controlle.prevIndex,\n nextIndex = _Components$Controlle.nextIndex;\n var isEnough = Splide.length > Splide.options.perPage || Splide.is(LOOP);\n prev.disabled = prevIndex < 0 || !isEnough;\n next.disabled = nextIndex < 0 || !isEnough;\n Splide.emit(name + \":updated\", prev, next, prevIndex, nextIndex);\n }\n /**\r\n * Create a wrapper element and append arrows.\r\n */\n\n\n function appendArrows() {\n var wrapper = create('div', {\n \"class\": classes.arrows\n });\n append(wrapper, prev);\n append(wrapper, next);\n var slider = Elements.slider;\n var parent = Splide.options.arrows === 'slider' && slider ? slider : root;\n before(wrapper, parent.firstElementChild);\n }\n /**\r\n * Create an arrow element.\r\n *\r\n * @param {boolean} prev - Determine to create a prev arrow or next arrow.\r\n *\r\n * @return {Element} - A created arrow element.\r\n */\n\n\n function createArrow(prev) {\n var arrow = \"