From f3c8df77296409ad9b44890fe0e3b9df0323e9bf Mon Sep 17 00:00:00 2001 From: Andrey Nelyubin Date: Fri, 17 Feb 2023 16:15:19 +0300 Subject: [PATCH] Ensuring that drag does not move slides more than `options.flickMaxPages` allows --- dist/js/splide-renderer.min.js | 2 +- dist/js/splide-renderer.min.js.map | 2 +- dist/js/splide.cjs.js | 8 ++++++-- dist/js/splide.esm.js | 8 ++++++-- dist/js/splide.js | 8 ++++++-- dist/js/splide.min.js | 4 ++-- dist/js/splide.min.js.gz | Bin 12933 -> 12963 bytes dist/js/splide.min.js.map | 2 +- src/js/components/Drag/Drag.ts | 8 ++++++-- src/js/components/Drag/test/general.test.ts | 14 ++++++++++++++ 10 files changed, 43 insertions(+), 13 deletions(-) diff --git a/dist/js/splide-renderer.min.js b/dist/js/splide-renderer.min.js index 5d5433af..b305d1e4 100644 --- a/dist/js/splide-renderer.min.js +++ b/dist/js/splide-renderer.min.js @@ -2,7 +2,7 @@ * Splide.js * Version : 4.1.4 * License : MIT - * Copyright: 2022 Naotoshi Fujita + * Copyright: 2023 Naotoshi Fujita */ var t,n;t=this,n=function(){"use strict";var s="rtl",u="ttb",o={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};function e(t,n,e){return{resolve:function(t,n,i){var r=(i=i||e.direction)!==s||n?i===u?0:-1:1;return o[t]&&o[t][r]||t.replace(/width|left|right/i,function(t,n){t=o[t.toLowerCase()][r]||t;return 0 img","display",t.cover?"none":"inline",n)})},n.buildTranslate=function(t){var n=this.Direction,i=n.resolve,n=n.orient,r=[];return r.push(this.cssOffsetClones(t)),r.push(this.cssOffsetGaps(t)),this.isCenter(t)&&(r.push(this.buildCssValue(n(-50),"%")),r.push.apply(r,this.cssOffsetCenter(t))),r.filter(Boolean).map(function(t){return"translate"+i("X")+"("+t+")"}).join(" ")},n.cssOffsetClones=function(t){var n,i=this.Direction,r=i.resolve,i=i.orient,e=this.getCloneCount();return this.isFixedWidth(t)?(n=(r=this.parseCssValue(t[r("fixedWidth")])).value,r=r.unit,this.buildCssValue(i(n)*e,r)):i(100*e/t.perPage)+"%"},n.cssOffsetCenter=function(t){var n,i,r=this.Direction,e=r.resolve,r=r.orient;return this.isFixedWidth(t)?(n=(e=this.parseCssValue(t[e("fixedWidth")])).value,e=e.unit,[this.buildCssValue(r(n/2),e)]):(n=t.perPage,e=t.gap,(t=[]).push(r(50/n)+"%"),e&&(i=(e=this.parseCssValue(e)).value,e=e.unit,t.push(this.buildCssValue(r((i/n-i)/2),e))),t)},n.cssOffsetGaps=function(t){var n,i,r,e=this.getCloneCount();return e&&t.gap?(n=this.Direction.orient,i=(r=this.parseCssValue(t.gap)).value,r=r.unit,this.isFixedWidth(t)?this.buildCssValue(n(i*e),r):(t=t.perPage,this.buildCssValue(n(e/t*i),r))):""},n.resolve=function(t){return T(this.Direction.resolve(t))},n.cssPadding=function(t,n){t=t.padding,n=this.Direction.resolve(n?"right":"left",!0);return t&&G(t[n]||(b(t)?0:t))||"0px"},n.cssTrackHeight=function(t){var n="";return this.isVertical()&&(O(n=this.cssHeight(t),'"height" is missing.'),n="calc("+n+" - "+this.cssPadding(t,!1)+" - "+this.cssPadding(t,!0)+")"),n},n.cssHeight=function(t){return G(t.height)},n.cssSlideWidth=function(t){return t.autoWidth?"":G(t.fixedWidth)||(this.isVertical()?"":this.cssSlideSize(t))},n.cssSlideHeight=function(t){return G(t.fixedHeight)||(this.isVertical()?t.autoHeight?"":this.cssSlideSize(t):this.cssHeight(t))},n.cssSlideSize=function(t){var n=G(t.gap);return"calc((100%"+(n&&" + "+n)+")/"+(t.perPage||1)+(n&&" - "+n)+")"},n.cssAspectRatio=function(t){t=t.heightRatio;return t?""+1/t:""},n.buildCssValue=function(t,n){return""+t+n},n.parseCssValue=function(t){return y(t)?{value:parseFloat(t)||0,unit:t.replace(/\d*(\.\d*)?/,"")||"px"}:{value:t,unit:"px"}},n.parseBreakpoints=function(){var i=this,t=this.options.breakpoints;this.breakpoints.push(["default",this.options]),t&&P(t,function(t,n){i.breakpoints.push([n,X(X({},i.options),t)])})},n.isFixedWidth=function(t){return!!t[this.Direction.resolve("fixedWidth")]},n.isLoop=function(){return"loop"===this.options.type},n.isCenter=function(t){if("center"===t.focus){if(this.isLoop())return!0;if("slide"===this.options.type)return!this.options.trimSpace}return!1},n.isVertical=function(){return this.options.direction===u},n.buildClasses=function(){var t=this.options;return[r,r+"--"+t.type,r+"--"+t.direction,t.drag&&r+"--draggable",t.isNavigation&&r+"--nav",d,!this.config.hidden&&"is-rendered"].filter(Boolean).join(" ")},n.buildAttrs=function(t){var i="";return P(t,function(t,n){i+=t?" "+T(n)+'="'+t+'"':""}),i.trim()},n.buildStyles=function(t){var i="";return P(t,function(t,n){i+=" "+T(n)+":"+t+";"}),i.trim()},n.renderSlides=function(){var n=this,i=this.config.slideTag;return this.slides.map(function(t){return"<"+i+" "+n.buildAttrs(t.attrs)+">"+(t.html||"")+""}).join("")},n.cover=function(t){var n=t.styles,t=t.html,t=void 0===t?"":t;this.options.cover&&!this.options.lazyLoad&&(t=t.match(//))&&t[2]&&(n.background="center/cover no-repeat url('"+t[2]+"')")},n.generateClones=function(r){for(var e=this.options.classes,s=this.getCloneCount(),t=r.slice();t.length')+this.renderArrow(!0)+this.renderArrow(!1)+""},n.renderArrow=function(t){var n=this.options,i=n.classes,n=n.i18n,i={class:i.arrow+" "+(t?i.prev:i.next),type:"button",ariaLabel:t?n.prev:n.next};return"'},n.html=function(){var t=this.config,n=t.rootClass,i=t.listTag,r=t.arrows,e=t.beforeTrack,s=t.afterTrack,u=t.slider,o=t.beforeSlider,t=t.afterSlider,a="";return a=(a+='
')+(""),u&&(a=a+(o||"")+'
'),a+=e||"",r&&(a+=this.renderArrows()),a=(a=(a=a+'
'+("<"+i+' class="splide__list">'))+this.renderSlides()+(""))+"
"+(s||""),u&&(a=a+"
"+(t||"")),a+="
"},t}()},"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).SplideRenderer=n(); //# sourceMappingURL=splide-renderer.min.js.map diff --git a/dist/js/splide-renderer.min.js.map b/dist/js/splide-renderer.min.js.map index 4c3cfa44..990cb029 100644 --- a/dist/js/splide-renderer.min.js.map +++ b/dist/js/splide-renderer.min.js.map @@ -1 +1 @@ -{"version":3,"file":"splide-renderer.min.js","sources":["../../src/js/components/Arrows/path.ts","../../src/js/constants/directions.ts","../../src/js/components/Direction/Direction.ts","../../src/js/constants/arrows.ts","../../src/js/constants/project.ts","../../src/js/constants/classes.ts","../../src/js/constants/defaults.ts","../../src/js/constants/i18n.ts","../../src/js/utils/arrayLike/slice/slice.ts","../../src/js/utils/function/apply/apply.ts","../../src/js/utils/type/type.ts","../../src/js/utils/array/toArray/toArray.ts","../../src/js/utils/array/forEach/forEach.ts","../../src/js/utils/array/push/push.ts","../../src/js/utils/dom/matches/matches.ts","../../src/js/utils/dom/child/child.ts","../../src/js/utils/dom/children/children.ts","../../src/js/utils/object/ownKeys/ownKeys.ts","../../src/js/utils/object/forOwn/forOwn.ts","../../src/js/utils/object/assign/assign.ts","../../src/js/utils/object/merge/merge.ts","../../src/js/utils/dom/remove/remove.ts","../../src/js/utils/dom/unit/unit.ts","../../src/js/utils/error/assert/assert.ts","../../src/js/utils/math/math/math.ts","../../src/js/utils/string/camelToKebab/camelToKebab.ts","../../src/js/utils/string/uniqueId/uniqueId.ts","../../src/js/constructors/EventBinder/EventBinder.ts","../../src/js/utils/array/empty/empty.ts","../../src/js/constructors/EventInterface/EventInterface.ts","../../src/js/constants/events.ts","../../src/js/renderer/constants/classes.ts","../../src/js/renderer/constants/defaults.ts","../../src/js/renderer/Style/Style.ts","../../src/js/renderer/SplideRenderer/SplideRenderer.ts","../../src/js/utils/string/pad/pad.ts","../../src/js/utils/dom/queryAll/queryAll.ts","../../src/js/constants/types.ts"],"sourcesContent":["/**\r\n * The namespace for SVG elements.\r\n */\r\nexport const XML_NAME_SPACE = 'http://www.w3.org/2000/svg';\r\n\r\n/**\r\n * The arrow path.\r\n */\r\nexport const 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';\r\n\r\n/**\r\n * SVG width and height.\r\n */\r\nexport const SIZE = 40;\r\n","/**\r\n * Enumerates slides from left to right.\r\n */\r\nexport const LTR = 'ltr';\r\n\r\n/**\r\n * Enumerates slides from right to left.\r\n */\r\nexport const RTL = 'rtl';\r\n\r\n/**\r\n * Enumerates slides in a col.\r\n */\r\nexport const TTB = 'ttb';\r\n","import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from '../../constants/arrows';\r\nimport { RTL, TTB } from '../../constants/directions';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { BaseComponent, Components, Options } from '../../types';\r\n\r\n\r\n/**\r\n * The interface for the Direction component.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface DirectionComponent extends BaseComponent {\r\n resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string;\r\n orient( value: number ): number;\r\n}\r\n\r\n/**\r\n * The translation map for directions.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const ORIENTATION_MAP = {\r\n width : [ 'height' ],\r\n left : [ 'top', 'right' ],\r\n right : [ 'bottom', 'left' ],\r\n x : [ 'y' ],\r\n X : [ 'Y' ],\r\n Y : [ 'X' ],\r\n ArrowLeft : [ ARROW_UP, ARROW_RIGHT ],\r\n ArrowRight: [ ARROW_DOWN, ARROW_LEFT ],\r\n};\r\n\r\n/**\r\n * The component that absorbs the difference among directions.\r\n *\r\n * @since 3.0.0\r\n *\r\n * @param Splide - A Splide instance.\r\n * @param Components - A collection of components.\r\n * @param options - Options.\r\n *\r\n * @return A Direction component object.\r\n */\r\nexport function Direction( Splide: Splide, Components: Components, options: Options ): DirectionComponent {\r\n /**\r\n * Resolves the provided property name.\r\n *\r\n * @param prop - A property name to translate.\r\n * @param axisOnly - Optional. If `ture`, returns the same property for LTR and RTL.\r\n * @param direction - Optional. Specify the direction. The default value is the `direction` option.\r\n */\r\n function resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string {\r\n direction = direction || options.direction;\r\n const index = direction === RTL && ! axisOnly ? 1 : direction === TTB ? 0 : -1;\r\n\r\n return ORIENTATION_MAP[ prop ] && ORIENTATION_MAP[ prop ][ index ]\r\n || prop.replace( /width|left|right/i, ( match, offset ) => {\r\n const replacement = ORIENTATION_MAP[ match.toLowerCase() ][ index ] || match;\r\n return offset > 0 ? replacement.charAt( 0 ).toUpperCase() + replacement.slice( 1 ) : replacement;\r\n } );\r\n }\r\n\r\n /**\r\n * Orients the value towards the current direction.\r\n *\r\n * @param value - A value to orient.\r\n *\r\n * @return The oriented value.\r\n */\r\n function orient( value: number ): number {\r\n return value * ( options.direction === RTL ? 1 : -1 );\r\n }\r\n\r\n return {\r\n resolve,\r\n orient,\r\n };\r\n}\r\n","const ARROW = 'Arrow';\r\nexport const ARROW_LEFT = `${ ARROW }Left`;\r\nexport const ARROW_RIGHT = `${ ARROW }Right`;\r\nexport const ARROW_UP = `${ ARROW }Up`;\r\nexport const ARROW_DOWN = `${ ARROW }Down`;","/**\r\n * The project code.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const PROJECT_CODE = 'splide';\r\n\r\n/**\r\n * The data attribute prefix.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const DATA_ATTRIBUTE = `data-${ PROJECT_CODE }`;\r\n","import { PROJECT_CODE } from './project';\r\n\r\n/**\r\n * The prefix for classes.\r\n *\r\n * @since 4.1.0\r\n */\r\nconst CLASS_PREFIX = `${ PROJECT_CODE }__`;\r\n\r\n/**\r\n * The prefix for status classes.\r\n *\r\n * @since 4.1.0\r\n */\r\nconst STATUS_CLASS_PREFIX = 'is-';\r\n\r\n/**\r\n * All classes as constants.\r\n */\r\nexport const CLASS_ROOT = PROJECT_CODE;\r\nexport const CLASS_TRACK = `${ CLASS_PREFIX }track`;\r\nexport const CLASS_LIST = `${ CLASS_PREFIX }list`;\r\nexport const CLASS_SLIDE = `${ CLASS_PREFIX }slide`;\r\nexport const CLASS_CLONE = `${ CLASS_SLIDE }--clone`;\r\nexport const CLASS_CONTAINER = `${ CLASS_SLIDE }__container`;\r\nexport const CLASS_ARROWS = `${ CLASS_PREFIX }arrows`;\r\nexport const CLASS_ARROW = `${ CLASS_PREFIX }arrow`;\r\nexport const CLASS_ARROW_PREV = `${ CLASS_ARROW }--prev`;\r\nexport const CLASS_ARROW_NEXT = `${ CLASS_ARROW }--next`;\r\nexport const CLASS_PAGINATION = `${ CLASS_PREFIX }pagination`;\r\nexport const CLASS_PAGINATION_PAGE = `${ CLASS_PAGINATION }__page`;\r\nexport const CLASS_PROGRESS = `${ CLASS_PREFIX }progress`;\r\nexport const CLASS_PROGRESS_BAR = `${ CLASS_PROGRESS }__bar`;\r\nexport const CLASS_TOGGLE = `${ CLASS_PREFIX }toggle`;\r\nexport const CLASS_TOGGLE_PLAY = `${ CLASS_TOGGLE }__play`;\r\nexport const CLASS_TOGGLE_PAUSE = `${ CLASS_TOGGLE }__pause`;\r\nexport const CLASS_SPINNER = `${ CLASS_PREFIX }spinner`;\r\nexport const CLASS_SR = `${ CLASS_PREFIX }sr`;\r\nexport const CLASS_INITIALIZED = `${ STATUS_CLASS_PREFIX }initialized`;\r\nexport const CLASS_ACTIVE = `${ STATUS_CLASS_PREFIX }active`;\r\nexport const CLASS_PREV = `${ STATUS_CLASS_PREFIX }prev`;\r\nexport const CLASS_NEXT = `${ STATUS_CLASS_PREFIX }next`;\r\nexport const CLASS_VISIBLE = `${ STATUS_CLASS_PREFIX }visible`;\r\nexport const CLASS_LOADING = `${ STATUS_CLASS_PREFIX }loading`;\r\nexport const CLASS_FOCUS_IN = `${ STATUS_CLASS_PREFIX }focus-in`;\r\nexport const CLASS_OVERFLOW = `${ STATUS_CLASS_PREFIX }overflow`;\r\n\r\n/**\r\n * The array with all status classes except for `is-initialized`.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const STATUS_CLASSES = [\r\n CLASS_ACTIVE,\r\n CLASS_VISIBLE,\r\n CLASS_PREV,\r\n CLASS_NEXT,\r\n CLASS_LOADING,\r\n CLASS_FOCUS_IN,\r\n CLASS_OVERFLOW,\r\n];\r\n\r\n/**\r\n * The collection of classes for elements that Splide dynamically creates.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const CLASSES = {\r\n slide : CLASS_SLIDE,\r\n clone : CLASS_CLONE,\r\n arrows : CLASS_ARROWS,\r\n arrow : CLASS_ARROW,\r\n prev : CLASS_ARROW_PREV,\r\n next : CLASS_ARROW_NEXT,\r\n pagination: CLASS_PAGINATION,\r\n page : CLASS_PAGINATION_PAGE,\r\n spinner : CLASS_SPINNER,\r\n};\r\n","import { Options } from '../types';\r\nimport { CLASSES } from './classes';\r\nimport { I18N } from './i18n';\r\n\r\n\r\n/**\r\n * The collection of default options.\r\n * Note that this collection does not contain all options.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const DEFAULTS: Options = {\r\n type : 'slide',\r\n role : 'region',\r\n speed : 400,\r\n perPage : 1,\r\n cloneStatus : true,\r\n arrows : true,\r\n pagination : true,\r\n paginationKeyboard: true,\r\n interval : 5000,\r\n pauseOnHover : true,\r\n pauseOnFocus : true,\r\n resetProgress : true,\r\n easing : 'cubic-bezier(0.25, 1, 0.5, 1)',\r\n drag : true,\r\n direction : 'ltr',\r\n trimSpace : true,\r\n focusableNodes : 'a, button, textarea, input, select, iframe',\r\n live : true,\r\n classes : CLASSES,\r\n i18n : I18N,\r\n reducedMotion: {\r\n speed : 0,\r\n rewindSpeed: 0,\r\n autoplay : 'pause',\r\n },\r\n};","/**\r\n * The collection of i18n strings.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const I18N = {\r\n prev : 'Previous slide',\r\n next : 'Next slide',\r\n first : 'Go to first slide',\r\n last : 'Go to last slide',\r\n slideX : 'Go to slide %s',\r\n pageX : 'Go to page %s',\r\n play : 'Start autoplay',\r\n pause : 'Pause autoplay',\r\n carousel : 'carousel',\r\n slide : 'slide',\r\n select : 'Select a slide to show',\r\n slideLabel: '%s of %s', // [ slide number ] / [ slide size ]\r\n};\r\n","/**\r\n * The slice method for an array-like object.\r\n *\r\n * @param arrayLike - An array-like object.\r\n * @param start - Optional. A start index.\r\n * @param end - Optional. A end index.\r\n *\r\n * @return An array with sliced elements.\r\n */\r\nexport function slice( arrayLike: ArrayLike, start?: number, end?: number ): T[] {\r\n return Array.prototype.slice.call( arrayLike, start, end );\r\n}\r\n","import { AnyFunction, ShiftN } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\n\r\n\r\n/**\r\n * Create a function where provided arguments are bound.\r\n * `this` parameter will be always null.\r\n *\r\n * @param func - A function.\r\n * @param args - Arguments to bind to the function.\r\n *\r\n * @return A function where arguments are bound.\r\n */\r\nexport function apply(\r\n func: F,\r\n ...args: A\r\n): ( ...args: ShiftN, A[\"length\"]> ) => ReturnType;\r\n\r\n/**\r\n * Create a function where provided arguments are bound.\r\n * `this` parameter will be always null.\r\n *\r\n * @param func - A function.\r\n */\r\nexport function apply( func: AnyFunction ): any {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n return func.bind( null, ...slice( arguments, 1 ) );\r\n}\r\n","import { AnyFunction } from '../../types';\r\nimport { apply } from '../function';\r\n\r\n\r\n/**\r\n * The alias of the type check function.\r\n *\r\n * @param type - A type.\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is the specified type.\r\n */\r\nfunction typeOf( type: string, subject: unknown ): boolean {\r\n return typeof subject === type;\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an object or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an object, or otherwise `false`.\r\n */\r\nexport function isObject( subject: unknown ): subject is object {\r\n return ! isNull( subject ) && typeOf( 'object', subject );\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an array or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an array, or otherwise `false`.\r\n */\r\nexport const isArray: ( subject: unknown ) => subject is T[] = Array.isArray;\r\n\r\n/**\r\n * Checks if the given subject is a function or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is a function, or otherwise `false`.\r\n */\r\nexport const isFunction = <( subject: unknown ) => subject is AnyFunction>apply( typeOf, 'function' );\r\n\r\n/**\r\n * Checks if the given subject is a string or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is a string, or otherwise `false`.\r\n */\r\nexport const isString = <( subject: unknown ) => subject is string>apply( typeOf, 'string' );\r\n\r\n/**\r\n * Checks if the given subject is `undefined` or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is `undefined`, or otherwise `false`.\r\n */\r\nexport const isUndefined = <( subject: unknown ) => subject is undefined>apply( typeOf, 'undefined' );\r\n\r\n/**\r\n * Checks if the given subject is `null` or not.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is `null`, or otherwise `false`.\r\n */\r\nexport function isNull( subject: unknown ): subject is null {\r\n return subject === null;\r\n}\r\n\r\n/**\r\n * Checks if the given subject is an HTMLElement instance or not.\r\n * This method takes into account which `window` the node belongs to.\r\n *\r\n * @param subject - A subject to check.\r\n *\r\n * @return `true` if the subject is an HTMLElement instance, or otherwise `false`.\r\n */\r\nexport function isHTMLElement( subject: unknown ): subject is HTMLElement {\r\n try {\r\n return subject instanceof ( ( subject as Node ).ownerDocument.defaultView || window ).HTMLElement;\r\n } catch ( e ) {\r\n return false;\r\n }\r\n}","import { isArray } from '../../type/type';\r\n\r\n\r\n/**\r\n * Push the provided value to an array if the value is not an array.\r\n *\r\n * @param value - A value to push.\r\n *\r\n * @return An array containing the value, or the value itself if it is already an array.\r\n */\r\nexport function toArray( value: T | T[] ): T[] {\r\n return isArray( value ) ? value : [ value ];\r\n}\r\n","import { toArray } from '../toArray/toArray';\r\n\r\n\r\n/**\r\n * The extended `Array#forEach` method that accepts a single value as an argument.\r\n *\r\n * @param values - A value or values to iterate over.\r\n * @param iteratee - An iteratee function.\r\n */\r\nexport function forEach( values: T | T[], iteratee: ( value: T, index: number, array: T[] ) => void ): void {\r\n toArray( values ).forEach( iteratee );\r\n}\r\n","import { toArray } from '../toArray/toArray';\r\n\r\n\r\n/**\r\n * Extended `Array#push()` that accepts an item or an array with items.\r\n *\r\n * @param array - An array to push items.\r\n * @param items - An item or items to push.\r\n *\r\n * @return A provided array itself.\r\n */\r\nexport function push( array: T[], items: T | T[] ): T[] {\r\n array.push( ...toArray( items ) );\r\n return array;\r\n}\r\n","import { isHTMLElement } from '../../type/type';\r\n\r\n\r\n/**\r\n * Checks if the element can be selected by the provided selector or not.\r\n *\r\n * @param elm - An element to check.\r\n * @param selector - A selector to test.\r\n *\r\n * @return `true` if the selector matches the element, or otherwise `false`.\r\n */\r\nexport function matches( elm: Element | EventTarget, selector: string ): boolean {\r\n return isHTMLElement( elm ) && ( elm[ 'msMatchesSelector' ] || elm.matches ).call( elm, selector );\r\n}\r\n","import { children } from '../children/children';\r\n\r\n\r\n/**\r\n * Returns a child element that matches the specified tag or class name.\r\n *\r\n * @param parent - A parent element.\r\n * @param selector - A selector to filter children.\r\n *\r\n * @return A matched child element if available, or otherwise `undefined`.\r\n */\r\nexport function child( parent: HTMLElement, selector?: string ): E | undefined {\r\n return selector ? children( parent, selector )[ 0 ] : parent.firstElementChild as E;\r\n}\r\n","import { slice } from '../../arrayLike';\r\nimport { matches } from '../matches/matches';\r\n\r\n\r\n/**\r\n * Finds children that has the specified tag or class name.\r\n *\r\n * @param parent - A parent element.\r\n * @param selector - Optional. A selector to filter children.\r\n *\r\n * @return An array with filtered children.\r\n */\r\nexport function children( parent: HTMLElement, selector?: string ): E[] {\r\n const children = parent ? slice( parent.children ) as E[] : [];\r\n return selector ? children.filter( child => matches( child, selector ) ) : children;\r\n}\r\n","/**\r\n * An alias of `Object.keys()`\r\n */\r\nexport const ownKeys = Object.keys;","import { ownKeys } from '../ownKeys/ownKeys';\r\n\r\n\r\n/**\r\n * Iterates over the provided object by own enumerable keys with calling the iteratee function.\r\n *\r\n * @param object - An object to iterate over.\r\n * @param iteratee - An iteratee function that takes `value` and `key` as arguments.\r\n * @param right - If `true`, the method iterates over the object from the end like `forEachRight()`.\r\n *\r\n * @return A provided object itself.\r\n */\r\nexport function forOwn(\r\n object: T,\r\n iteratee: ( value: T[ keyof T ], key: string ) => boolean | void,\r\n right?: boolean\r\n): T {\r\n if ( object ) {\r\n ( right ? ownKeys( object ).reverse() : ownKeys( object ) ).forEach( key => {\r\n key !== '__proto__' && iteratee( object[ key ], key );\r\n } );\r\n }\r\n\r\n return object;\r\n}\r\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\nimport { forOwn } from '../forOwn/forOwn';\r\n\r\n\r\n/**\r\n * Assigns U to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - An object to assign.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Assign = Omit & U;\r\n\r\n/**\r\n * Recursively assigns U[] to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - A tuple contains objects.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Assigned = {\r\n 0: T,\r\n 1: Assigned>, Shift, N, Push>,\r\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\r\n\r\nexport function assign( object: T ): T;\r\n\r\nexport function assign(\r\n object: T,\r\n ...sources: U\r\n): Resolve>\r\n\r\n/**\r\n * Assigns all own enumerable properties of all source objects to the provided object.\r\n *\r\n * @param object - An object to assign properties to.\r\n *\r\n * @return An object assigned properties of the sources to.\r\n */\r\nexport function assign( object: T ): any {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n slice( arguments, 1 ).forEach( source => {\r\n forOwn( source, ( value, key ) => {\r\n object[ key ] = source[ key ];\r\n } );\r\n } );\r\n\r\n return object;\r\n}\r\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\r\nimport { slice } from '../../arrayLike';\r\nimport { isArray, isObject } from '../../type/type';\r\nimport { forOwn } from '../forOwn/forOwn';\r\n\r\n\r\n/**\r\n * Merges U to T.\r\n *\r\n * @typeParam T - An object to merge U into.\r\n * @typeParam U - An object to merge properties from.\r\n *\r\n * @return A merged object type.\r\n */\r\nexport type Merge = Omit & {\r\n [ K in ( keyof T & keyof U ) ]: U[ K ] extends object\r\n ? U[ K ] extends any[]\r\n ? U[ K ]\r\n : T[ K ] extends object\r\n ? Merge extends infer A ? Resolve> : never\r\n : U[ K ]\r\n : U[ K ];\r\n} & Omit;\r\n\r\n/**\r\n * Recursively merges U[] to T.\r\n *\r\n * @typeParam T - An object to assign to.\r\n * @typeParam U - A tuple contains objects.\r\n *\r\n * @return An assigned object type.\r\n */\r\nexport type Merged = {\r\n 0: T,\r\n 1: Merged>, Shift, N, Push>,\r\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\r\n\r\nexport function merge( object: T ): T;\r\n\r\nexport function merge(\r\n object: T,\r\n ...sources: U\r\n): Resolve>\r\n\r\n/**\r\n * Recursively merges source properties to the object.\r\n * Be aware that this method does not merge arrays. They are just duplicated by `slice()`.\r\n *\r\n * @param object - An object to merge properties to.\r\n *\r\n * @return A new object with merged properties.\r\n */\r\nexport function merge( object: T ): any {\r\n // eslint-disable-next-line prefer-rest-params\r\n slice( arguments, 1 ).forEach( source => {\r\n forOwn( source, ( value, key ) => {\r\n if ( isArray( value ) ) {\r\n object[ key ] = value.slice();\r\n } else if ( isObject( value ) ) {\r\n object[ key ] = merge( {}, isObject( object[ key ] ) ? object[ key ] : {}, value );\r\n } else {\r\n object[ key ] = value;\r\n }\r\n } );\r\n } );\r\n\r\n return object;\r\n}\r\n","import { forEach } from '../../array';\r\n\r\n\r\n/**\r\n * Removes the provided node from its parent.\r\n *\r\n * @param nodes - A node or nodes to remove.\r\n */\r\nexport function remove( nodes: Node | Node[] ): void {\r\n forEach( nodes, node => {\r\n if ( node && node.parentNode ) {\r\n node.parentNode.removeChild( node );\r\n }\r\n } );\r\n}\r\n","import { isString } from '../../type/type';\r\n\r\n\r\n/**\r\n * Appends `px` to the provided number.\r\n * If the value is already string, just returns it.\r\n *\r\n * @param value - A value to append `px` to.\r\n *\r\n * @return A string with the CSS unit.\r\n */\r\nexport function unit( value: number | string ): string {\r\n return isString( value ) ? value : value ? `${ value }px` : '';\r\n}\r\n","import { PROJECT_CODE } from '../../../constants/project';\r\n\r\n\r\n/**\r\n * Throws an error if the provided condition is falsy.\r\n *\r\n * @param condition - If falsy, an error is thrown.\r\n * @param message - Optional. A message to display.\r\n */\r\nexport function assert( condition: any, message?: string ): void {\r\n if ( ! condition ) {\r\n throw new Error( `[${ PROJECT_CODE }] ${ message || '' }` );\r\n }\r\n}\r\n","export const { min, max, floor, ceil, abs } = Math;\r\n","/**\r\n * Converts the provided string in the camel case to the kebab case.\r\n *\r\n * @param string - A string to convert.\r\n */\r\nexport function camelToKebab( string: string ): string {\r\n return string.replace( /([a-z0-9])([A-Z])/g, '$1-$2' ).toLowerCase();\r\n}\r\n","import { pad } from '../pad/pad';\r\n\r\n\r\n/**\r\n * Stores unique IDs.\r\n *\r\n * @since 3.0.0\r\n */\r\nconst ids: Record = {};\r\n\r\n/**\r\n * Returns a sequential unique ID as \"{ prefix }-{ number }\".\r\n *\r\n * @param prefix - A prefix for the ID.\r\n */\r\nexport function uniqueId( prefix: string ): string {\r\n return `${ prefix }${ pad( ( ids[ prefix ] = ( ids[ prefix ] || 0 ) + 1 ) ) }`;\r\n}\r\n","import { AnyFunction } from '../../types';\r\nimport { empty, forEach } from '../../utils';\r\n\r\n\r\n/**\r\n * The type for an EventTarget or an array with EventTarget objects.\r\n *\r\n * @since 4.0.0\r\n */\r\ntype EventTargets = EventTarget | EventTarget[];\r\n\r\n/**\r\n * The interface for the EventBinder object.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface EventBinderObject {\r\n bind( target: EventTargets, events: string | string[], callback: AnyFunction, options?: AddEventListenerOptions ): void\r\n unbind( target: EventTarget | EventTarget[], events: string | string[], callback?: AnyFunction ): void;\r\n dispatch( target: EventTarget, event: string, detail?: T ): void;\r\n destroy(): void;\r\n}\r\n\r\n/**\r\n * The constructor function to provide methods to subscribe native events.\r\n *\r\n * @since 4.0.0\r\n * @constructor\r\n *\r\n * @return An EventBinder object.\r\n */\r\nexport function EventBinder(): EventBinderObject {\r\n /**\r\n * Stores all handlers that listen to native events.\r\n * `[ target, event, namespace, callback, remover ]`\r\n */\r\n let listeners: [ EventTarget, string, string | undefined, AnyFunction, () => void ][] = [];\r\n\r\n /**\r\n * Listens to native events.\r\n * - `destroy()` can unsubscribe all events.\r\n * - In IE, mediaQueryList does not inherit EventTarget,\r\n * and only supports deprecated `addListener` and `removeListener`.\r\n *\r\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event or events to listen to.\r\n * @param callback - A callback function.\r\n * @param options - Optional. The options to pass to the `addEventListener` function.\r\n */\r\n function bind(\r\n targets: EventTargets,\r\n events: string | string[],\r\n callback: AnyFunction,\r\n options?: AddEventListenerOptions\r\n ): void {\r\n forEachEvent( targets, events, ( target, event, namespace ) => {\r\n const isEventTarget = 'addEventListener' in target;\r\n const remover = isEventTarget\r\n ? target.removeEventListener.bind( target, event, callback, options )\r\n : target[ 'removeListener' ].bind( target, callback );\r\n\r\n isEventTarget ? target.addEventListener( event, callback, options ) : target[ 'addListener' ]( callback );\r\n listeners.push( [ target, event, namespace, callback, remover ] );\r\n } );\r\n }\r\n\r\n /**\r\n * Removes the event handler.\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event name or names to remove.\r\n * @param callback - Optional. Specify the callback to remove.\r\n */\r\n function unbind( targets: EventTargets, events: string | string[], callback?: AnyFunction ): void {\r\n forEachEvent( targets, events, ( target, event, namespace ) => {\r\n listeners = listeners.filter( listener => {\r\n if ( listener[ 0 ] === target\r\n && listener[ 1 ] === event\r\n && listener[ 2 ] === namespace\r\n && ( ! callback || listener[ 3 ] === callback )\r\n ) {\r\n listener[ 4 ]();\r\n return false;\r\n }\r\n\r\n return true;\r\n } );\r\n } );\r\n }\r\n\r\n /**\r\n * Dispatches a custom event of the target.\r\n *\r\n * @param target - An event target.\r\n * @param type - An event type.\r\n * @param detail - Optional. The `detail` object of the event.\r\n *\r\n * @return An event object.\r\n */\r\n function dispatch( target: EventTarget, type: string, detail?: T ): CustomEvent {\r\n let e: CustomEvent;\r\n const bubbles = true;\r\n\r\n if ( typeof CustomEvent === 'function' ) {\r\n e = new CustomEvent( type, { bubbles, detail } );\r\n } else {\r\n e = document.createEvent( 'CustomEvent' );\r\n e.initCustomEvent( type, bubbles, false, detail );\r\n }\r\n\r\n target.dispatchEvent( e );\r\n return e;\r\n }\r\n\r\n /**\r\n * Iterates over each target and event.\r\n *\r\n * @param targets - A target element, the window object or the document object.\r\n * @param events - An event name or names.\r\n * @param iteratee - An iteratee function.\r\n */\r\n function forEachEvent(\r\n targets: EventTargets,\r\n events: string | string[],\r\n iteratee: ( target: EventTarget, event: string, namespace: string | undefined ) => void\r\n ): void {\r\n forEach( targets, target => {\r\n target && forEach( events, events => {\r\n events.split( ' ' ).forEach( eventNS => {\r\n const fragment = eventNS.split( '.' );\r\n iteratee( target, fragment[ 0 ], fragment[ 1 ] );\r\n } );\r\n } );\r\n } );\r\n }\r\n\r\n /**\r\n * Removes all listeners.\r\n */\r\n function destroy(): void {\r\n listeners.forEach( data => { data[ 4 ]() } );\r\n empty( listeners );\r\n }\r\n\r\n return {\r\n bind,\r\n unbind,\r\n dispatch,\r\n destroy,\r\n };\r\n}\r\n","/**\r\n * Empties the array.\r\n *\r\n * @param array - A array to empty.\r\n */\r\nexport function empty( array: any[] ): void {\r\n array.length = 0;\r\n}\r\n","import { EVENT_DESTROY } from '../../constants/events';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { AnyFunction, EventMap } from '../../types';\r\nimport { apply, assign, isArray, slice, toArray } from '../../utils';\r\nimport { EventBinder, EventBinderObject } from '../EventBinder/EventBinder';\r\n\r\n\r\n/**\r\n * The interface for the EventInterface object.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport interface EventInterfaceObject extends EventBinderObject {\r\n on( event: K, callback: EventMap[ K ] ): void;\r\n on( events: string | string[], callback: AnyFunction ): void;\r\n off( events: K | K[] | string | string[] ): void;\r\n emit( event: K, ...args: Parameters ): void\r\n emit( event: string, ...args: any[] ): void;\r\n\r\n /** @internal */\r\n bus: DocumentFragment;\r\n}\r\n\r\n/**\r\n * The constructor function that provides interface for internal and native events.\r\n *\r\n * @since 3.0.0\r\n * @constructor\r\n *\r\n * @param Splide - A Splide instance.\r\n *\r\n * @return A collection of interface functions.\r\n */\r\nexport function EventInterface( Splide?: Splide ): EventInterfaceObject {\r\n /**\r\n * The document fragment for internal events.\r\n * Provide the Splide instance to share the bus.\r\n */\r\n const bus = Splide ? Splide.event.bus : document.createDocumentFragment();\r\n\r\n /**\r\n * An event binder object.\r\n */\r\n const binder = EventBinder();\r\n\r\n /**\r\n * Listens to an internal event or events.\r\n *\r\n * @param events - An event name or names separated by spaces. Use a dot(.) to add a namespace.\r\n * @param callback - A callback function to register.\r\n */\r\n function on( events: string | string[], callback: AnyFunction ): void {\r\n binder.bind( bus, toArray( events ).join( ' ' ), e => {\r\n callback.apply( callback, isArray( e.detail ) ? e.detail : [] );\r\n } );\r\n }\r\n\r\n /**\r\n * Triggers callback functions.\r\n * This accepts additional arguments and passes them to callbacks.\r\n *\r\n * @param event - An event name.\r\n */\r\n function emit( event: string ): void {\r\n // eslint-disable-next-line prefer-rest-params, prefer-spread\r\n binder.dispatch( bus, event, slice( arguments, 1 ) );\r\n }\r\n\r\n if ( Splide ) {\r\n Splide.event.on( EVENT_DESTROY, binder.destroy );\r\n }\r\n\r\n return assign( binder, {\r\n bus,\r\n on,\r\n off: apply( binder.unbind, bus ),\r\n emit,\r\n } );\r\n}","export const EVENT_MOUNTED = 'mounted';\r\nexport const EVENT_READY = 'ready';\r\nexport const EVENT_MOVE = 'move';\r\nexport const EVENT_MOVED = 'moved';\r\nexport const EVENT_CLICK = 'click';\r\nexport const EVENT_ACTIVE = 'active';\r\nexport const EVENT_INACTIVE = 'inactive';\r\nexport const EVENT_VISIBLE = 'visible';\r\nexport const EVENT_HIDDEN = 'hidden';\r\nexport const EVENT_REFRESH = 'refresh';\r\nexport const EVENT_UPDATED = 'updated';\r\nexport const EVENT_RESIZE = 'resize';\r\nexport const EVENT_RESIZED = 'resized';\r\nexport const EVENT_DRAG = 'drag';\r\nexport const EVENT_DRAGGING = 'dragging';\r\nexport const EVENT_DRAGGED = 'dragged';\r\nexport const EVENT_SCROLL = 'scroll';\r\nexport const EVENT_SCROLLED = 'scrolled';\r\nexport const EVENT_OVERFLOW = 'overflow';\r\nexport const EVENT_DESTROY = 'destroy';\r\nexport const EVENT_ARROWS_MOUNTED = 'arrows:mounted';\r\nexport const EVENT_ARROWS_UPDATED = 'arrows:updated';\r\nexport const EVENT_PAGINATION_MOUNTED = 'pagination:mounted';\r\nexport const EVENT_PAGINATION_UPDATED = 'pagination:updated';\r\nexport const EVENT_NAVIGATION_MOUNTED = 'navigation:mounted';\r\nexport const EVENT_AUTOPLAY_PLAY = 'autoplay:play';\r\nexport const EVENT_AUTOPLAY_PLAYING = 'autoplay:playing';\r\nexport const EVENT_AUTOPLAY_PAUSE = 'autoplay:pause';\r\nexport const EVENT_LAZYLOAD_LOADED = 'lazyload:loaded';\r\n\r\n/** @internal */\r\nexport const EVENT_SLIDE_KEYDOWN = 'sk';\r\nexport const EVENT_SHIFTED = 'sh';\r\nexport const EVENT_END_INDEX_CHANGED = 'ei';\r\n","export const CLASS_RENDERED = 'is-rendered';\r\n","import { RendererConfig } from '../types/types';\r\n\r\n\r\n/**\r\n * Default options for generating static HTML.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const RENDERER_DEFAULT_CONFIG: RendererConfig = {\r\n listTag : 'ul',\r\n slideTag: 'li',\r\n};\r\n","import { Options } from '../../types';\r\nimport { forOwn } from '../../utils';\r\n\r\n\r\ninterface Styles {\r\n [ breakpoint: string ]: {\r\n [ selector: string ]: Record\r\n };\r\n}\r\n\r\n/**\r\n * The class for generating styles as a string.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport class Style {\r\n /**\r\n * The collection of registered styles categorized by each breakpoint.\r\n */\r\n private readonly styles: Styles = {};\r\n\r\n /**\r\n * The ID of the slider.\r\n */\r\n private readonly id: string;\r\n\r\n /**\r\n * Holds options.\r\n */\r\n private readonly options: Options;\r\n\r\n /**\r\n * The Style constructor.\r\n *\r\n * @param id - A slider ID.\r\n * @param options - Options.\r\n */\r\n constructor( id: string, options: Options ) {\r\n this.id = id;\r\n this.options = options;\r\n }\r\n\r\n /**\r\n * Registers a CSS rule.\r\n *\r\n * @param selector - A selector.\r\n * @param prop\r\n * @param value\r\n * @param breakpoint\r\n */\r\n rule( selector: string, prop: string, value: string | number, breakpoint?: string ): void {\r\n breakpoint = breakpoint || 'default';\r\n const selectors = ( this.styles[ breakpoint ] = this.styles[ breakpoint ] || {} );\r\n const styles = ( selectors[ selector ] = selectors[ selector ] || {} );\r\n styles[ prop ] = value;\r\n }\r\n\r\n /**\r\n * Builds styles as a single string.\r\n *\r\n * @return Built styles.\r\n */\r\n build(): string {\r\n let css = '';\r\n\r\n if ( this.styles.default ) {\r\n css += this.buildSelectors( this.styles.default );\r\n }\r\n\r\n Object.keys( this.styles )\r\n .sort( ( n, m ) => this.options.mediaQuery === 'min' ? +n - +m : +m - +n )\r\n .forEach( breakpoint => {\r\n if ( breakpoint !== 'default' ) {\r\n css += `@media screen and (max-width: ${ breakpoint }px) {`;\r\n css += this.buildSelectors( this.styles[ breakpoint ] );\r\n css += `}`;\r\n }\r\n } );\r\n\r\n return css;\r\n }\r\n\r\n /**\r\n * Builds styles for each breakpoint.\r\n *\r\n * @param selectors - An object with styles.\r\n *\r\n * @return Built styles.\r\n */\r\n private buildSelectors( selectors: Record> ): string {\r\n let css = '';\r\n\r\n forOwn( selectors, ( styles, selector ) => {\r\n selector = `#${ this.id } ${ selector }`.trim();\r\n css += `${ selector } {`;\r\n\r\n forOwn( styles, ( value, prop ) => {\r\n if ( value || value === 0 ) {\r\n css += `${ prop }: ${ value };`;\r\n }\r\n } );\r\n\r\n css += '}';\r\n } );\r\n\r\n return css;\r\n }\r\n}\r\n","import { PATH, SIZE, XML_NAME_SPACE } from '../../components/Arrows/path';\r\nimport { Direction, DirectionComponent } from '../../components/Direction/Direction';\r\nimport { CLASS_ACTIVE, CLASS_CLONE, CLASS_LIST, CLASS_ROOT, CLASS_SLIDE, CLASS_TRACK } from '../../constants/classes';\r\nimport { DEFAULTS } from '../../constants/defaults';\r\nimport { TTB } from '../../constants/directions';\r\nimport { EVENT_MOUNTED } from '../../constants/events';\r\nimport { LOOP, SLIDE } from '../../constants/types';\r\nimport { EventInterface } from '../../constructors';\r\nimport { Splide } from '../../core/Splide/Splide';\r\nimport { Options } from '../../types';\r\nimport {\r\n assert,\r\n assign,\r\n camelToKebab,\r\n child,\r\n forOwn,\r\n isObject,\r\n isString,\r\n max,\r\n merge,\r\n push,\r\n queryAll,\r\n remove,\r\n uniqueId,\r\n unit,\r\n} from '../../utils';\r\nimport { CLASS_RENDERED } from '../constants/classes';\r\nimport { RENDERER_DEFAULT_CONFIG } from '../constants/defaults';\r\nimport { Style } from '../Style/Style';\r\nimport { RendererConfig, SlideContent } from '../types/types';\r\n\r\n\r\n/**\r\n * The class to generate static HTML of the slider for the first view.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport class SplideRenderer {\r\n /**\r\n * Removes a style element and clones.\r\n *\r\n * @param splide - A Splide instance.\r\n */\r\n static clean( splide: Splide ): void {\r\n const { on } = EventInterface( splide );\r\n const { root } = splide;\r\n const clones = queryAll( root, `.${ CLASS_CLONE }` );\r\n\r\n on( EVENT_MOUNTED, () => {\r\n remove( child( root, 'style' ) );\r\n } );\r\n\r\n remove( clones );\r\n }\r\n\r\n /**\r\n * Holds slide contents.\r\n */\r\n private readonly contents: string[] | SlideContent[];\r\n\r\n /**\r\n * Stores data of slides.\r\n */\r\n private readonly slides: SlideContent[] = [];\r\n\r\n /**\r\n * The Direction component.\r\n */\r\n private readonly Direction: DirectionComponent;\r\n\r\n /**\r\n * Holds the Style instance.\r\n */\r\n private readonly Style: Style;\r\n\r\n /**\r\n * Holds options.\r\n */\r\n private readonly options: Options = {};\r\n\r\n /**\r\n * Holds options for this instance.\r\n */\r\n private readonly config: RendererConfig;\r\n\r\n /**\r\n * The slider ID.\r\n */\r\n private readonly id: string;\r\n\r\n /**\r\n * An array with options for each breakpoint.\r\n */\r\n private readonly breakpoints: [ string, Options ][] = [];\r\n\r\n /**\r\n * The SplideRenderer constructor.\r\n *\r\n * @param contents - An array with slide contents. Each item must be an HTML or a plain text.\r\n * @param options - Optional. Slider options.\r\n * @param config - Static default options.\r\n * @param defaults - Default options for the slider. Pass `Splide.defaults` if you are using it.\r\n */\r\n constructor( contents: string[] | SlideContent[], options?: Options, config?: RendererConfig, defaults?: Options ) {\r\n merge( DEFAULTS, defaults || {} );\r\n merge( merge( this.options, DEFAULTS ), options || {} );\r\n\r\n this.contents = contents;\r\n this.config = assign( {}, RENDERER_DEFAULT_CONFIG, config || {} );\r\n this.id = this.config.id || uniqueId( 'splide' );\r\n this.Style = new Style( this.id, this.options );\r\n this.Direction = Direction( null, null, this.options );\r\n\r\n assert( this.contents.length, 'Provide at least 1 content.' );\r\n\r\n this.init();\r\n }\r\n\r\n /**\r\n * Initializes the instance.\r\n */\r\n private init(): void {\r\n this.parseBreakpoints();\r\n this.initSlides();\r\n this.registerRootStyles();\r\n this.registerTrackStyles();\r\n this.registerSlideStyles();\r\n this.registerListStyles();\r\n }\r\n\r\n /**\r\n * Initializes slides.\r\n */\r\n private initSlides(): void {\r\n push( this.slides, this.contents.map( ( content, index ) => {\r\n content = isString( content ) ? { html: content } : content;\r\n content.styles = content.styles || {};\r\n content.attrs = content.attrs || {};\r\n\r\n this.cover( content );\r\n\r\n const classes = `${ this.options.classes.slide } ${ index === 0 ? CLASS_ACTIVE : '' }`;\r\n\r\n assign( content.attrs, {\r\n class: `${ classes } ${ content.attrs.class || '' }`.trim(),\r\n style: this.buildStyles( content.styles ),\r\n } );\r\n\r\n return content;\r\n } ) );\r\n\r\n if ( this.isLoop() ) {\r\n this.generateClones( this.slides );\r\n }\r\n }\r\n\r\n /**\r\n * Registers styles for the root element.\r\n */\r\n private registerRootStyles(): void {\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n this.Style.rule( ' ', 'max-width', unit( options.width ), width );\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for the track element.\r\n */\r\n private registerTrackStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_TRACK }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, this.resolve( 'paddingLeft' ), this.cssPadding( options, false ), width );\r\n Style.rule( selector, this.resolve( 'paddingRight' ), this.cssPadding( options, true ), width );\r\n Style.rule( selector, 'height', this.cssTrackHeight( options ), width );\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for the list element.\r\n */\r\n private registerListStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_LIST }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, 'transform', this.buildTranslate( options ), width );\r\n\r\n if ( ! this.cssSlideHeight( options ) ) {\r\n Style.rule( selector, 'aspect-ratio', this.cssAspectRatio( options ), width );\r\n }\r\n } );\r\n }\r\n\r\n /**\r\n * Registers styles for slides and clones.\r\n */\r\n private registerSlideStyles(): void {\r\n const { Style } = this;\r\n const selector = `.${ CLASS_SLIDE }`;\r\n\r\n this.breakpoints.forEach( ( [ width, options ] ) => {\r\n Style.rule( selector, 'width', this.cssSlideWidth( options ), width );\r\n Style.rule( selector, 'height', this.cssSlideHeight( options ) || '100%', width );\r\n Style.rule( selector, this.resolve( 'marginRight' ), unit( options.gap ) || '0px', width );\r\n Style.rule( `${ selector } > img`, 'display', options.cover ? 'none' : 'inline', width );\r\n } );\r\n }\r\n\r\n /**\r\n * Builds multiple `translateX` for the list element.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return A string with multiple translate functions.\r\n */\r\n private buildTranslate( options: Options ): string {\r\n const { resolve, orient } = this.Direction;\r\n const values = [];\r\n\r\n values.push( this.cssOffsetClones( options ) );\r\n values.push( this.cssOffsetGaps( options ) );\r\n\r\n if ( this.isCenter( options ) ) {\r\n values.push( this.buildCssValue( orient( -50 ), '%' ) );\r\n values.push( ...this.cssOffsetCenter( options ) );\r\n }\r\n\r\n return values\r\n .filter( Boolean )\r\n .map( value => `translate${ resolve( 'X' ) }(${ value })` )\r\n .join( ' ' );\r\n }\r\n\r\n /**\r\n * Returns offset for the list element.\r\n * This does not include gaps because it can not be converted into percent.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset.\r\n */\r\n private cssOffsetClones( options: Options ): string {\r\n const { resolve, orient } = this.Direction;\r\n const cloneCount = this.getCloneCount();\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\r\n return this.buildCssValue( orient( value ) * cloneCount, unit );\r\n }\r\n\r\n const percent = 100 * cloneCount / options.perPage;\r\n return `${ orient( percent ) }%`;\r\n }\r\n\r\n /**\r\n * Returns offset for centering the active slide.\r\n *\r\n * Note:\r\n * ( 100% + gap ) / perPage - gap\r\n * 100% / perPage + gap / perPage - gap;\r\n * 50% / perPage + ( gap / perPage - gap ) / 2;\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset.\r\n */\r\n private cssOffsetCenter( options: Options ): string[] {\r\n const { resolve, orient } = this.Direction;\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\r\n return [ this.buildCssValue( orient( value / 2 ), unit ) ];\r\n }\r\n\r\n const values = [];\r\n const { perPage, gap } = options;\r\n\r\n values.push( `${ orient( 50 / perPage ) }%` );\r\n\r\n if ( gap ) {\r\n const { value, unit } = this.parseCssValue( gap );\r\n const gapOffset = ( value / perPage - value ) / 2;\r\n values.push( this.buildCssValue( orient( gapOffset ), unit ) );\r\n }\r\n\r\n return values;\r\n }\r\n\r\n /**\r\n * Returns offset for gaps.\r\n *\r\n * @param options - Options for each breakpoint.\r\n *\r\n * @return The offset as `calc()`.\r\n */\r\n private cssOffsetGaps( options: Options ): string {\r\n const cloneCount = this.getCloneCount();\r\n\r\n if ( cloneCount && options.gap ) {\r\n const { orient } = this.Direction;\r\n const { value, unit } = this.parseCssValue( options.gap );\r\n\r\n if ( this.isFixedWidth( options ) ) {\r\n return this.buildCssValue( orient( value * cloneCount ), unit );\r\n }\r\n\r\n const { perPage } = options;\r\n const gaps = cloneCount / perPage;\r\n return this.buildCssValue( orient( gaps * value ), unit );\r\n }\r\n\r\n return '';\r\n }\r\n\r\n /**\r\n * Resolves the prop for the current direction and converts it into the Kebab case.\r\n *\r\n * @param prop - A property name to resolve.\r\n *\r\n * @return A resolved property name in the Kebab case.\r\n */\r\n private resolve( prop: string ): string {\r\n return camelToKebab( this.Direction.resolve( prop ) );\r\n }\r\n\r\n /**\r\n * Returns padding in the CSS format.\r\n *\r\n * @param options - Options.\r\n * @param right - Determines whether to get padding right or left.\r\n *\r\n * @return Padding in the CSS format.\r\n */\r\n private cssPadding( options: Options, right: boolean ): string {\r\n const { padding } = options;\r\n const prop = this.Direction.resolve( right ? 'right' : 'left', true );\r\n return padding && unit( padding[ prop ] || ( isObject( padding ) ? 0 : padding ) ) || '0px';\r\n }\r\n\r\n /**\r\n * Returns height of the track element in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssTrackHeight( options: Options ): string {\r\n let height = '';\r\n\r\n if ( this.isVertical() ) {\r\n height = this.cssHeight( options );\r\n assert( height, '\"height\" is missing.' );\r\n height = `calc(${ height } - ${ this.cssPadding( options, false ) } - ${ this.cssPadding( options, true ) })`;\r\n }\r\n\r\n return height;\r\n }\r\n\r\n /**\r\n * Returns height provided though options in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssHeight( options: Options ): string {\r\n return unit( options.height );\r\n }\r\n\r\n /**\r\n * Returns width of each slide in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Width in the CSS format.\r\n */\r\n private cssSlideWidth( options: Options ): string {\r\n return options.autoWidth\r\n ? ''\r\n : unit( options.fixedWidth ) || ( this.isVertical() ? '' : this.cssSlideSize( options ) );\r\n }\r\n\r\n /**\r\n * Returns height of each slide in the CSS format.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Height in the CSS format.\r\n */\r\n private cssSlideHeight( options: Options ): string {\r\n return unit( options.fixedHeight )\r\n || ( this.isVertical()\r\n ? ( options.autoHeight ? '' : this.cssSlideSize( options ) )\r\n : this.cssHeight( options )\r\n );\r\n }\r\n\r\n /**\r\n * Returns width or height of each slide in the CSS format, considering the current direction.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return Width or height in the CSS format.\r\n */\r\n private cssSlideSize( options: Options ): string {\r\n const gap = unit( options.gap );\r\n return `calc((100%${ gap && ` + ${ gap }` })/${ options.perPage || 1 }${ gap && ` - ${ gap }` })`;\r\n }\r\n\r\n /**\r\n * Returns the aspectRatio value to simulate the `heightRatio` option.\r\n *\r\n * @param options - Options.\r\n *\r\n * @return aspectRatio in the CSS format.\r\n */\r\n private cssAspectRatio( options: Options ): string {\r\n const { heightRatio } = options;\r\n return heightRatio ? `${ 1 / heightRatio }` : '';\r\n }\r\n\r\n /**\r\n * Builds the css value by the provided value and unit.\r\n *\r\n * @param value - A value.\r\n * @param unit - A CSS unit.\r\n *\r\n * @return A built value for a CSS value.\r\n */\r\n private buildCssValue( value: number, unit: string ): string {\r\n return `${ value }${ unit }`;\r\n }\r\n\r\n /**\r\n * Parses the CSS value into number and unit.\r\n *\r\n * @param value - A value to parse.\r\n *\r\n * @return An object with value and unit.\r\n */\r\n private parseCssValue( value: string | number ): { value: number, unit: string } {\r\n if ( isString( value ) ) {\r\n const number = parseFloat( value ) || 0;\r\n const unit = value.replace( /\\d*(\\.\\d*)?/, '' ) || 'px';\r\n return { value: number, unit };\r\n }\r\n\r\n return { value, unit: 'px' };\r\n }\r\n\r\n /**\r\n * Parses breakpoints and generate options for each breakpoint.\r\n */\r\n private parseBreakpoints(): void {\r\n const { breakpoints } = this.options;\r\n\r\n this.breakpoints.push( [ 'default', this.options ] );\r\n\r\n if ( breakpoints ) {\r\n forOwn( breakpoints, ( options, width ) => {\r\n this.breakpoints.push( [ width, merge( merge( {}, this.options ), options ) ] );\r\n } );\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the slide width is fixed or not.\r\n *\r\n * @return `true` if the slide width is fixed, or otherwise `false`.\r\n */\r\n private isFixedWidth( options: Options ): boolean {\r\n return !! options[ this.Direction.resolve( 'fixedWidth' ) ];\r\n }\r\n\r\n /**\r\n * Checks if the slider type is loop or not.\r\n *\r\n * @return `true` if the slider type is loop, or otherwise `false`.\r\n */\r\n private isLoop(): boolean {\r\n return this.options.type === LOOP;\r\n }\r\n\r\n /**\r\n * Checks if the active slide should be centered or not.\r\n *\r\n * @return `true` if the slide should be centered, or otherwise `false`.\r\n */\r\n private isCenter( options: Options ): boolean {\r\n if( options.focus === 'center' ) {\r\n if ( this.isLoop() ) {\r\n return true;\r\n }\r\n\r\n if ( this.options.type === SLIDE ) {\r\n return ! this.options.trimSpace;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if the direction is TTB or not.\r\n *\r\n * @return `true` if the direction is TTB, or otherwise `false`.\r\n */\r\n private isVertical(): boolean {\r\n return this.options.direction === TTB;\r\n }\r\n\r\n /**\r\n * Builds classes of the root element.\r\n *\r\n * @return Classes for the root element as a single string.\r\n */\r\n private buildClasses(): string {\r\n const { options } = this;\r\n\r\n return [\r\n CLASS_ROOT,\r\n `${ CLASS_ROOT }--${ options.type }`,\r\n `${ CLASS_ROOT }--${ options.direction }`,\r\n options.drag && `${ CLASS_ROOT }--draggable`,\r\n options.isNavigation && `${ CLASS_ROOT }--nav`,\r\n CLASS_ACTIVE,\r\n ! this.config.hidden && CLASS_RENDERED,\r\n ].filter( Boolean ).join( ' ' );\r\n }\r\n\r\n /**\r\n * Converts provided attributes into a single string.\r\n *\r\n * @param attrs - An object with attributes.\r\n *\r\n * @return A built string.\r\n */\r\n private buildAttrs( attrs: Record ): string {\r\n let attr = '';\r\n\r\n forOwn( attrs, ( value, key ) => {\r\n attr += value ? ` ${ camelToKebab( key ) }=\"${ value }\"` : '';\r\n } );\r\n\r\n return attr.trim();\r\n }\r\n\r\n /**\r\n * Converts provided styles into a single string.\r\n *\r\n * @param styles - An object with styles.\r\n *\r\n * @return A built string.\r\n */\r\n private buildStyles( styles: Record ): string {\r\n let style = '';\r\n\r\n forOwn( styles, ( value, key ) => {\r\n style += ` ${ camelToKebab( key ) }:${ value };`;\r\n } );\r\n\r\n return style.trim();\r\n }\r\n\r\n /**\r\n * Generates HTML of slides with inserting provided contents.\r\n *\r\n * @return The HTML for all slides and clones.\r\n */\r\n private renderSlides(): string {\r\n const { slideTag: tag } = this.config;\r\n\r\n return this.slides.map( content => {\r\n return `<${ tag } ${ this.buildAttrs( content.attrs ) }>${ content.html || '' }`;\r\n } ).join( '' );\r\n }\r\n\r\n /**\r\n * Add the `background` style for the cover mode.\r\n *\r\n * @param content - A slide content.\r\n */\r\n private cover( content: SlideContent ): void {\r\n const { styles, html = '' } = content;\r\n\r\n if ( this.options.cover && ! this.options.lazyLoad ) {\r\n const src = html.match( // );\r\n\r\n if ( src && src[ 2 ] ) {\r\n styles.background = `center/cover no-repeat url('${ src[ 2 ] }')`;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Generates clones.\r\n *\r\n * @param contents - An array with SlideContent objects.\r\n */\r\n private generateClones( contents: SlideContent[] ): void {\r\n const { classes } = this.options;\r\n const count = this.getCloneCount();\r\n const slides = contents.slice();\r\n\r\n while ( slides.length < count ) {\r\n push( slides, slides );\r\n }\r\n\r\n push( slides.slice( -count ).reverse(), slides.slice( 0, count ) ).forEach( ( content, index ) => {\r\n const attrs = assign( {}, content.attrs, { class: `${ content.attrs.class } ${ classes.clone }` } );\r\n const clone = assign( {}, content, { attrs } );\r\n index < count ? contents.unshift( clone ) : contents.push( clone );\r\n } );\r\n }\r\n\r\n /**\r\n * Returns the number of clones to generate.\r\n *\r\n * @return A number of clones.\r\n */\r\n private getCloneCount(): number {\r\n if ( this.isLoop() ) {\r\n const { options } = this;\r\n\r\n if ( options.clones ) {\r\n return options.clones;\r\n }\r\n\r\n const perPage = max( ...this.breakpoints.map( ( [ , options ] ) => options.perPage ) );\r\n return perPage * ( ( options.flickMaxPages || 1 ) + 1 );\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n /**\r\n * Generates arrows and the wrapper element.\r\n *\r\n * @return The HTML for arrows.\r\n */\r\n private renderArrows(): string {\r\n let html = '';\r\n\r\n html += `
`;\r\n html += this.renderArrow( true );\r\n html += this.renderArrow( false );\r\n html += `
`;\r\n\r\n return html;\r\n }\r\n\r\n /**\r\n * Generates an arrow HTML.\r\n * Some attributes are temporary, and Splide changes them after mount.\r\n *\r\n * @param prev - Options for each breakpoint.\r\n *\r\n * @return The HTML for the prev or next arrow.\r\n */\r\n private renderArrow( prev: boolean ): string {\r\n const { classes, i18n } = this.options;\r\n const attrs = {\r\n class : `${ classes.arrow } ${ prev ? classes.prev : classes.next }`,\r\n type : 'button',\r\n ariaLabel: prev ? i18n.prev : i18n.next,\r\n };\r\n\r\n return ``;\r\n }\r\n\r\n /**\r\n * Returns the HTML of the slider.\r\n *\r\n * @return The generated HTML.\r\n */\r\n html(): string {\r\n const { rootClass, listTag, arrows, beforeTrack, afterTrack, slider, beforeSlider, afterSlider } = this.config;\r\n\r\n let html = '';\r\n\r\n html += `
`;\r\n html += ``;\r\n\r\n if ( slider ) {\r\n html += beforeSlider || '';\r\n html += `
`;\r\n }\r\n\r\n html += beforeTrack || '';\r\n\r\n if ( arrows ) {\r\n html += this.renderArrows();\r\n }\r\n\r\n html += `
`;\r\n html += `<${ listTag } class=\"splide__list\">`;\r\n\r\n html += this.renderSlides();\r\n\r\n html += ``;\r\n html += `
`; // .track\r\n\r\n html += afterTrack || '';\r\n\r\n if ( slider ) {\r\n html += `
`;\r\n html += afterSlider || '';\r\n }\r\n\r\n html += `
`; // .splide\r\n\r\n return html;\r\n }\r\n}\r\n","/**\r\n * Pads the number with 0.\r\n *\r\n * @param number - A number to pad.\r\n *\r\n * @return string - Padded number.\r\n */\r\nexport function pad( number: number ): string {\r\n return number < 10 ? `0${ number }` : `${ number }`;\r\n}\r\n","import { slice } from '../../arrayLike';\r\n\r\n\r\n/**\r\n * Returns elements that match the provided selector.\r\n *\r\n * @param parent - A parent element to start searching from.\r\n * @param selector - A selector to query.\r\n *\r\n * @return An array with matched elements.\r\n */\r\nexport function queryAll( parent: Element | Document, selector?: string ): E[] {\r\n return selector ? slice( parent.querySelectorAll( selector ) ) : [];\r\n}\r\n","/**\r\n * The type for the regular slider.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const SLIDE = 'slide';\r\n\r\n/**\r\n * The type for the carousel slider.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const LOOP = 'loop';\r\n\r\n/**\r\n * The type for the fade slider that can not have multiple slides in a page.\r\n *\r\n * @since 3.0.0\r\n */\r\nexport const FADE = 'fade';\r\n"],"names":["RTL","TTB","ORIENTATION_MAP","width","left","right","x","X","Y","ArrowLeft","ARROW","ArrowRight","Direction","Splide","Components","options","resolve","prop","axisOnly","direction","index","replace","match","offset","replacement","toLowerCase","charAt","toUpperCase","slice","orient","value","PROJECT_CODE","CLASS_PREFIX","CLASS_ROOT","CLASS_TRACK","CLASS_LIST","CLASS_SLIDE","CLASS_CLONE","CLASS_ARROW","CLASS_PAGINATION","CLASS_ACTIVE","STATUS_CLASS_PREFIX","DEFAULTS","type","role","speed","perPage","cloneStatus","arrows","pagination","paginationKeyboard","interval","pauseOnHover","pauseOnFocus","resetProgress","easing","drag","trimSpace","focusableNodes","live","classes","slide","clone","arrow","prev","next","page","spinner","i18n","first","last","slideX","pageX","play","pause","carousel","select","slideLabel","reducedMotion","rewindSpeed","autoplay","arrayLike","start","end","Array","prototype","call","apply","func","bind","arguments","typeOf","subject","isObject","isArray","isString","toArray","forEach","values","iteratee","push","array","items","matches","elm","selector","ownerDocument","defaultView","window","HTMLElement","e","child","parent","children","filter","firstElementChild","ownKeys","Object","keys","forOwn","object","reverse","key","assign","source","merge","remove","nodes","node","parentNode","removeChild","unit","assert","condition","message","Error","Math","min","max","floor","ceil","abs","camelToKebab","string","ids","EventBinder","listeners","forEachEvent","targets","events","target","split","eventNS","fragment","callback","event","namespace","isEventTarget","remover","removeEventListener","addEventListener","unbind","listener","dispatch","detail","CustomEvent","bubbles","document","createEvent","initCustomEvent","dispatchEvent","destroy","data","length","EventInterface","bus","createDocumentFragment","binder","on","join","off","emit","RENDERER_DEFAULT_CONFIG","listTag","slideTag","Style","id","this","styles","rule","breakpoint","selectors","build","_this","css","default","buildSelectors","sort","n","m","mediaQuery","_this2","trim","SplideRenderer","contents","config","defaults","slides","breakpoints","prefix","number","init","clean","splide","root","clones","querySelectorAll","parseBreakpoints","initSlides","registerRootStyles","registerTrackStyles","registerSlideStyles","registerListStyles","_this3","map","content","html","attrs","cover","class","style","buildStyles","isLoop","generateClones","_this4","_ref","_this5","_ref2","cssPadding","cssTrackHeight","_this6","_ref3","buildTranslate","cssSlideHeight","cssAspectRatio","_this7","_ref4","cssSlideWidth","gap","_this$Direction","cssOffsetClones","cssOffsetGaps","isCenter","buildCssValue","cssOffsetCenter","Boolean","_this$Direction2","cloneCount","getCloneCount","isFixedWidth","_this$parseCssValue","parseCssValue","_this$Direction3","_this$parseCssValue2","_this$parseCssValue3","_this$parseCssValue4","padding","height","isVertical","cssHeight","autoWidth","fixedWidth","cssSlideSize","fixedHeight","autoHeight","heightRatio","parseFloat","_this8","focus","buildClasses","isNavigation","hidden","buildAttrs","attr","renderSlides","_this9","tag","_content$html","lazyLoad","src","background","count","unshift","_ref5","flickMaxPages","renderArrows","renderArrow","_this$options","ariaLabel","arrowPath","_this$config","rootClass","beforeTrack","afterTrack","slider","beforeSlider","afterSlider"],"mappings":";;;;;;yCAGO,ICKMA,EAAM,MAKNC,EAAM,MCQNC,EAAkB,CAC7BC,MAAY,CAAE,UACdC,KAAY,CAAE,MAAO,SACrBC,MAAY,CAAE,SAAU,QACxBC,EAAY,CAAE,KACdC,EAAY,CAAE,KACdC,EAAY,CAAE,KACdC,UAAY,CCzBiBC,UADAA,cD2B7BC,WAAY,CCzBiBD,YAHAA,YDoBA,EAsBf,SAAAE,EAAWC,EAAgBC,EAAwBC,GA8B1D,MAAA,CACLC,QAvBO,SAASC,EAAcC,EAAoBC,GAE5C,IAAAC,GADND,EAAYA,GAAaJ,EAAQI,aACLnB,GAASkB,EAAeC,IAAclB,EAAM,EAAI,CAAA,EAA5B,EAEzC,OAAAC,EAAiBe,IAAUf,EAAiBe,GAAQG,IACtDH,EAAKI,QAAS,oBAAqB,SAAEC,EAAOC,GACvCC,EAActB,EAAiBoB,EAAMG,YAAN,GAAuBL,IAAWE,EAChE,OAAS,EAATC,EAAaC,EAAYE,OAAQ,CAApB,EAAwBC,YAAxB,EAAwCH,EAAYI,MAAO,CAAnB,EAAyBJ,CACrF,CAHC,CAIP,EAeEK,OANF,SAAiBC,GACf,OAAOA,GAAUf,EAAQI,YAAcnB,EAAM,EAAI,CAAA,EACnD,CAEO,CAIT,CExEO,IAAM+B,EAAe,SCEtBC,EAAmBD,EAAzB,KAYaE,EAAw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Q,UAEAwH,GAAc,IAEjBC,IAEH9E,EADQA,EAAA,UACAgF,GAAe,KAGjBhF,GAAA,QAGV"} \ No newline at end of file +{"version":3,"file":"splide-renderer.min.js","sources":["../../src/js/components/Arrows/path.ts","../../src/js/constants/directions.ts","../../src/js/components/Direction/Direction.ts","../../src/js/constants/arrows.ts","../../src/js/constants/project.ts","../../src/js/constants/classes.ts","../../src/js/constants/defaults.ts","../../src/js/constants/i18n.ts","../../src/js/utils/arrayLike/slice/slice.ts","../../src/js/utils/function/apply/apply.ts","../../src/js/utils/type/type.ts","../../src/js/utils/array/toArray/toArray.ts","../../src/js/utils/array/forEach/forEach.ts","../../src/js/utils/array/push/push.ts","../../src/js/utils/dom/matches/matches.ts","../../src/js/utils/dom/child/child.ts","../../src/js/utils/dom/children/children.ts","../../src/js/utils/object/ownKeys/ownKeys.ts","../../src/js/utils/object/forOwn/forOwn.ts","../../src/js/utils/object/assign/assign.ts","../../src/js/utils/object/merge/merge.ts","../../src/js/utils/dom/remove/remove.ts","../../src/js/utils/dom/unit/unit.ts","../../src/js/utils/error/assert/assert.ts","../../src/js/utils/math/math/math.ts","../../src/js/utils/string/camelToKebab/camelToKebab.ts","../../src/js/utils/string/uniqueId/uniqueId.ts","../../src/js/constructors/EventBinder/EventBinder.ts","../../src/js/utils/array/empty/empty.ts","../../src/js/constructors/EventInterface/EventInterface.ts","../../src/js/constants/events.ts","../../src/js/renderer/constants/classes.ts","../../src/js/renderer/constants/defaults.ts","../../src/js/renderer/Style/Style.ts","../../src/js/renderer/SplideRenderer/SplideRenderer.ts","../../src/js/utils/string/pad/pad.ts","../../src/js/utils/dom/queryAll/queryAll.ts","../../src/js/constants/types.ts"],"sourcesContent":["/**\n * The namespace for SVG elements.\n */\nexport const XML_NAME_SPACE = 'http://www.w3.org/2000/svg';\n\n/**\n * The arrow path.\n */\nexport const 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\n/**\n * SVG width and height.\n */\nexport const SIZE = 40;\n","/**\n * Enumerates slides from left to right.\n */\nexport const LTR = 'ltr';\n\n/**\n * Enumerates slides from right to left.\n */\nexport const RTL = 'rtl';\n\n/**\n * Enumerates slides in a col.\n */\nexport const TTB = 'ttb';\n","import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from '../../constants/arrows';\nimport { RTL, TTB } from '../../constants/directions';\nimport { Splide } from '../../core/Splide/Splide';\nimport { BaseComponent, Components, Options } from '../../types';\n\n\n/**\n * The interface for the Direction component.\n *\n * @since 3.0.0\n */\nexport interface DirectionComponent extends BaseComponent {\n resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string;\n orient( value: number ): number;\n}\n\n/**\n * The translation map for directions.\n *\n * @since 3.0.0\n */\nexport const ORIENTATION_MAP = {\n width : [ 'height' ],\n left : [ 'top', 'right' ],\n right : [ 'bottom', 'left' ],\n x : [ 'y' ],\n X : [ 'Y' ],\n Y : [ 'X' ],\n ArrowLeft : [ ARROW_UP, ARROW_RIGHT ],\n ArrowRight: [ ARROW_DOWN, ARROW_LEFT ],\n};\n\n/**\n * The component that absorbs the difference among directions.\n *\n * @since 3.0.0\n *\n * @param Splide - A Splide instance.\n * @param Components - A collection of components.\n * @param options - Options.\n *\n * @return A Direction component object.\n */\nexport function Direction( Splide: Splide, Components: Components, options: Options ): DirectionComponent {\n /**\n * Resolves the provided property name.\n *\n * @param prop - A property name to translate.\n * @param axisOnly - Optional. If `ture`, returns the same property for LTR and RTL.\n * @param direction - Optional. Specify the direction. The default value is the `direction` option.\n */\n function resolve( prop: string, axisOnly?: boolean, direction?: Options['direction'] ): string {\n direction = direction || options.direction;\n const index = direction === RTL && ! axisOnly ? 1 : direction === TTB ? 0 : -1;\n\n return ORIENTATION_MAP[ prop ] && ORIENTATION_MAP[ prop ][ index ]\n || prop.replace( /width|left|right/i, ( match, offset ) => {\n const replacement = ORIENTATION_MAP[ match.toLowerCase() ][ index ] || match;\n return offset > 0 ? replacement.charAt( 0 ).toUpperCase() + replacement.slice( 1 ) : replacement;\n } );\n }\n\n /**\n * Orients the value towards the current direction.\n *\n * @param value - A value to orient.\n *\n * @return The oriented value.\n */\n function orient( value: number ): number {\n return value * ( options.direction === RTL ? 1 : -1 );\n }\n\n return {\n resolve,\n orient,\n };\n}\n","const ARROW = 'Arrow';\nexport const ARROW_LEFT = `${ ARROW }Left`;\nexport const ARROW_RIGHT = `${ ARROW }Right`;\nexport const ARROW_UP = `${ ARROW }Up`;\nexport const ARROW_DOWN = `${ ARROW }Down`;","/**\n * The project code.\n *\n * @since 3.0.0\n */\nexport const PROJECT_CODE = 'splide';\n\n/**\n * The data attribute prefix.\n *\n * @since 3.0.0\n */\nexport const DATA_ATTRIBUTE = `data-${ PROJECT_CODE }`;\n","import { PROJECT_CODE } from './project';\n\n/**\n * The prefix for classes.\n *\n * @since 4.1.0\n */\nconst CLASS_PREFIX = `${ PROJECT_CODE }__`;\n\n/**\n * The prefix for status classes.\n *\n * @since 4.1.0\n */\nconst STATUS_CLASS_PREFIX = 'is-';\n\n/**\n * All classes as constants.\n */\nexport const CLASS_ROOT = PROJECT_CODE;\nexport const CLASS_TRACK = `${ CLASS_PREFIX }track`;\nexport const CLASS_LIST = `${ CLASS_PREFIX }list`;\nexport const CLASS_SLIDE = `${ CLASS_PREFIX }slide`;\nexport const CLASS_CLONE = `${ CLASS_SLIDE }--clone`;\nexport const CLASS_CONTAINER = `${ CLASS_SLIDE }__container`;\nexport const CLASS_ARROWS = `${ CLASS_PREFIX }arrows`;\nexport const CLASS_ARROW = `${ CLASS_PREFIX }arrow`;\nexport const CLASS_ARROW_PREV = `${ CLASS_ARROW }--prev`;\nexport const CLASS_ARROW_NEXT = `${ CLASS_ARROW }--next`;\nexport const CLASS_PAGINATION = `${ CLASS_PREFIX }pagination`;\nexport const CLASS_PAGINATION_PAGE = `${ CLASS_PAGINATION }__page`;\nexport const CLASS_PROGRESS = `${ CLASS_PREFIX }progress`;\nexport const CLASS_PROGRESS_BAR = `${ CLASS_PROGRESS }__bar`;\nexport const CLASS_TOGGLE = `${ CLASS_PREFIX }toggle`;\nexport const CLASS_TOGGLE_PLAY = `${ CLASS_TOGGLE }__play`;\nexport const CLASS_TOGGLE_PAUSE = `${ CLASS_TOGGLE }__pause`;\nexport const CLASS_SPINNER = `${ CLASS_PREFIX }spinner`;\nexport const CLASS_SR = `${ CLASS_PREFIX }sr`;\nexport const CLASS_INITIALIZED = `${ STATUS_CLASS_PREFIX }initialized`;\nexport const CLASS_ACTIVE = `${ STATUS_CLASS_PREFIX }active`;\nexport const CLASS_PREV = `${ STATUS_CLASS_PREFIX }prev`;\nexport const CLASS_NEXT = `${ STATUS_CLASS_PREFIX }next`;\nexport const CLASS_VISIBLE = `${ STATUS_CLASS_PREFIX }visible`;\nexport const CLASS_LOADING = `${ STATUS_CLASS_PREFIX }loading`;\nexport const CLASS_FOCUS_IN = `${ STATUS_CLASS_PREFIX }focus-in`;\nexport const CLASS_OVERFLOW = `${ STATUS_CLASS_PREFIX }overflow`;\n\n/**\n * The array with all status classes except for `is-initialized`.\n *\n * @since 3.0.0\n */\nexport const STATUS_CLASSES = [\n CLASS_ACTIVE,\n CLASS_VISIBLE,\n CLASS_PREV,\n CLASS_NEXT,\n CLASS_LOADING,\n CLASS_FOCUS_IN,\n CLASS_OVERFLOW,\n];\n\n/**\n * The collection of classes for elements that Splide dynamically creates.\n *\n * @since 3.0.0\n */\nexport const CLASSES = {\n slide : CLASS_SLIDE,\n clone : CLASS_CLONE,\n arrows : CLASS_ARROWS,\n arrow : CLASS_ARROW,\n prev : CLASS_ARROW_PREV,\n next : CLASS_ARROW_NEXT,\n pagination: CLASS_PAGINATION,\n page : CLASS_PAGINATION_PAGE,\n spinner : CLASS_SPINNER,\n};\n","import { Options } from '../types';\nimport { CLASSES } from './classes';\nimport { I18N } from './i18n';\n\n\n/**\n * The collection of default options.\n * Note that this collection does not contain all options.\n *\n * @since 3.0.0\n */\nexport const DEFAULTS: Options = {\n type : 'slide',\n role : 'region',\n speed : 400,\n perPage : 1,\n cloneStatus : true,\n arrows : true,\n pagination : true,\n paginationKeyboard: true,\n interval : 5000,\n pauseOnHover : true,\n pauseOnFocus : true,\n resetProgress : true,\n easing : 'cubic-bezier(0.25, 1, 0.5, 1)',\n drag : true,\n direction : 'ltr',\n trimSpace : true,\n focusableNodes : 'a, button, textarea, input, select, iframe',\n live : true,\n classes : CLASSES,\n i18n : I18N,\n reducedMotion: {\n speed : 0,\n rewindSpeed: 0,\n autoplay : 'pause',\n },\n};","/**\n * The collection of i18n strings.\n *\n * @since 3.0.0\n */\nexport const 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 carousel : 'carousel',\n slide : 'slide',\n select : 'Select a slide to show',\n slideLabel: '%s of %s', // [ slide number ] / [ slide size ]\n};\n","/**\n * The slice method for an array-like object.\n *\n * @param arrayLike - An array-like object.\n * @param start - Optional. A start index.\n * @param end - Optional. A end index.\n *\n * @return An array with sliced elements.\n */\nexport function slice( arrayLike: ArrayLike, start?: number, end?: number ): T[] {\n return Array.prototype.slice.call( arrayLike, start, end );\n}\n","import { AnyFunction, ShiftN } from '../../../types';\nimport { slice } from '../../arrayLike';\n\n\n/**\n * Create a function where provided arguments are bound.\n * `this` parameter will be always null.\n *\n * @param func - A function.\n * @param args - Arguments to bind to the function.\n *\n * @return A function where arguments are bound.\n */\nexport function apply(\n func: F,\n ...args: A\n): ( ...args: ShiftN, A[\"length\"]> ) => ReturnType;\n\n/**\n * Create a function where provided arguments are bound.\n * `this` parameter will be always null.\n *\n * @param func - A function.\n */\nexport function apply( func: AnyFunction ): any {\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n return func.bind( null, ...slice( arguments, 1 ) );\n}\n","import { AnyFunction } from '../../types';\nimport { apply } from '../function';\n\n\n/**\n * The alias of the type check function.\n *\n * @param type - A type.\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is the specified type.\n */\nfunction typeOf( type: string, subject: unknown ): boolean {\n return typeof subject === type;\n}\n\n/**\n * Checks if the given subject is an object or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is an object, or otherwise `false`.\n */\nexport function isObject( subject: unknown ): subject is object {\n return ! isNull( subject ) && typeOf( 'object', subject );\n}\n\n/**\n * Checks if the given subject is an array or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is an array, or otherwise `false`.\n */\nexport const isArray: ( subject: unknown ) => subject is T[] = Array.isArray;\n\n/**\n * Checks if the given subject is a function or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is a function, or otherwise `false`.\n */\nexport const isFunction = <( subject: unknown ) => subject is AnyFunction>apply( typeOf, 'function' );\n\n/**\n * Checks if the given subject is a string or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is a string, or otherwise `false`.\n */\nexport const isString = <( subject: unknown ) => subject is string>apply( typeOf, 'string' );\n\n/**\n * Checks if the given subject is `undefined` or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is `undefined`, or otherwise `false`.\n */\nexport const isUndefined = <( subject: unknown ) => subject is undefined>apply( typeOf, 'undefined' );\n\n/**\n * Checks if the given subject is `null` or not.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is `null`, or otherwise `false`.\n */\nexport function isNull( subject: unknown ): subject is null {\n return subject === null;\n}\n\n/**\n * Checks if the given subject is an HTMLElement instance or not.\n * This method takes into account which `window` the node belongs to.\n *\n * @param subject - A subject to check.\n *\n * @return `true` if the subject is an HTMLElement instance, or otherwise `false`.\n */\nexport function isHTMLElement( subject: unknown ): subject is HTMLElement {\n try {\n return subject instanceof ( ( subject as Node ).ownerDocument.defaultView || window ).HTMLElement;\n } catch ( e ) {\n return false;\n }\n}","import { isArray } from '../../type/type';\n\n\n/**\n * Push the provided value to an array if the value is not an array.\n *\n * @param value - A value to push.\n *\n * @return An array containing the value, or the value itself if it is already an array.\n */\nexport function toArray( value: T | T[] ): T[] {\n return isArray( value ) ? value : [ value ];\n}\n","import { toArray } from '../toArray/toArray';\n\n\n/**\n * The extended `Array#forEach` method that accepts a single value as an argument.\n *\n * @param values - A value or values to iterate over.\n * @param iteratee - An iteratee function.\n */\nexport function forEach( values: T | T[], iteratee: ( value: T, index: number, array: T[] ) => void ): void {\n toArray( values ).forEach( iteratee );\n}\n","import { toArray } from '../toArray/toArray';\n\n\n/**\n * Extended `Array#push()` that accepts an item or an array with items.\n *\n * @param array - An array to push items.\n * @param items - An item or items to push.\n *\n * @return A provided array itself.\n */\nexport function push( array: T[], items: T | T[] ): T[] {\n array.push( ...toArray( items ) );\n return array;\n}\n","import { isHTMLElement } from '../../type/type';\n\n\n/**\n * Checks if the element can be selected by the provided selector or not.\n *\n * @param elm - An element to check.\n * @param selector - A selector to test.\n *\n * @return `true` if the selector matches the element, or otherwise `false`.\n */\nexport function matches( elm: Element | EventTarget, selector: string ): boolean {\n return isHTMLElement( elm ) && ( elm[ 'msMatchesSelector' ] || elm.matches ).call( elm, selector );\n}\n","import { children } from '../children/children';\n\n\n/**\n * Returns a child element that matches the specified tag or class name.\n *\n * @param parent - A parent element.\n * @param selector - A selector to filter children.\n *\n * @return A matched child element if available, or otherwise `undefined`.\n */\nexport function child( parent: HTMLElement, selector?: string ): E | undefined {\n return selector ? children( parent, selector )[ 0 ] : parent.firstElementChild as E;\n}\n","import { slice } from '../../arrayLike';\nimport { matches } from '../matches/matches';\n\n\n/**\n * Finds children that has the specified tag or class name.\n *\n * @param parent - A parent element.\n * @param selector - Optional. A selector to filter children.\n *\n * @return An array with filtered children.\n */\nexport function children( parent: HTMLElement, selector?: string ): E[] {\n const children = parent ? slice( parent.children ) as E[] : [];\n return selector ? children.filter( child => matches( child, selector ) ) : children;\n}\n","/**\n * An alias of `Object.keys()`\n */\nexport const ownKeys = Object.keys;","import { ownKeys } from '../ownKeys/ownKeys';\n\n\n/**\n * Iterates over the provided object by own enumerable keys with calling the iteratee function.\n *\n * @param object - An object to iterate over.\n * @param iteratee - An iteratee function that takes `value` and `key` as arguments.\n * @param right - If `true`, the method iterates over the object from the end like `forEachRight()`.\n *\n * @return A provided object itself.\n */\nexport function forOwn(\n object: T,\n iteratee: ( value: T[ keyof T ], key: string ) => boolean | void,\n right?: boolean\n): T {\n if ( object ) {\n ( right ? ownKeys( object ).reverse() : ownKeys( object ) ).forEach( key => {\n key !== '__proto__' && iteratee( object[ key ], key );\n } );\n }\n\n return object;\n}\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\nimport { slice } from '../../arrayLike';\nimport { forOwn } from '../forOwn/forOwn';\n\n\n/**\n * Assigns U to T.\n *\n * @typeParam T - An object to assign to.\n * @typeParam U - An object to assign.\n *\n * @return An assigned object type.\n */\nexport type Assign = Omit & U;\n\n/**\n * Recursively assigns U[] to T.\n *\n * @typeParam T - An object to assign to.\n * @typeParam U - A tuple contains objects.\n *\n * @return An assigned object type.\n */\nexport type Assigned = {\n 0: T,\n 1: Assigned>, Shift, N, Push>,\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\n\nexport function assign( object: T ): T;\n\nexport function assign(\n object: T,\n ...sources: U\n): Resolve>\n\n/**\n * Assigns all own enumerable properties of all source objects to the provided object.\n *\n * @param object - An object to assign properties to.\n *\n * @return An object assigned properties of the sources to.\n */\nexport function assign( object: T ): any {\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n slice( arguments, 1 ).forEach( source => {\n forOwn( source, ( value, key ) => {\n object[ key ] = source[ key ];\n } );\n } );\n\n return object;\n}\n","import { Cast, Head, Push, Resolve, Shift } from '../../../types';\nimport { slice } from '../../arrayLike';\nimport { isArray, isObject } from '../../type/type';\nimport { forOwn } from '../forOwn/forOwn';\n\n\n/**\n * Merges U to T.\n *\n * @typeParam T - An object to merge U into.\n * @typeParam U - An object to merge properties from.\n *\n * @return A merged object type.\n */\nexport type Merge = Omit & {\n [ K in ( keyof T & keyof U ) ]: U[ K ] extends object\n ? U[ K ] extends any[]\n ? U[ K ]\n : T[ K ] extends object\n ? Merge extends infer A ? Resolve> : never\n : U[ K ]\n : U[ K ];\n} & Omit;\n\n/**\n * Recursively merges U[] to T.\n *\n * @typeParam T - An object to assign to.\n * @typeParam U - A tuple contains objects.\n *\n * @return An assigned object type.\n */\nexport type Merged = {\n 0: T,\n 1: Merged>, Shift, N, Push>,\n}[ C['length'] extends N ? 0 : 1 ] extends infer A ? Cast : never;\n\nexport function merge( object: T ): T;\n\nexport function merge(\n object: T,\n ...sources: U\n): Resolve>\n\n/**\n * Recursively merges source properties to the object.\n * Be aware that this method does not merge arrays. They are just duplicated by `slice()`.\n *\n * @param object - An object to merge properties to.\n *\n * @return A new object with merged properties.\n */\nexport function merge( object: T ): any {\n // eslint-disable-next-line prefer-rest-params\n slice( arguments, 1 ).forEach( source => {\n forOwn( source, ( value, key ) => {\n if ( isArray( value ) ) {\n object[ key ] = value.slice();\n } else if ( isObject( value ) ) {\n object[ key ] = merge( {}, isObject( object[ key ] ) ? object[ key ] : {}, value );\n } else {\n object[ key ] = value;\n }\n } );\n } );\n\n return object;\n}\n","import { forEach } from '../../array';\n\n\n/**\n * Removes the provided node from its parent.\n *\n * @param nodes - A node or nodes to remove.\n */\nexport function remove( nodes: Node | Node[] ): void {\n forEach( nodes, node => {\n if ( node && node.parentNode ) {\n node.parentNode.removeChild( node );\n }\n } );\n}\n","import { isString } from '../../type/type';\n\n\n/**\n * Appends `px` to the provided number.\n * If the value is already string, just returns it.\n *\n * @param value - A value to append `px` to.\n *\n * @return A string with the CSS unit.\n */\nexport function unit( value: number | string ): string {\n return isString( value ) ? value : value ? `${ value }px` : '';\n}\n","import { PROJECT_CODE } from '../../../constants/project';\n\n\n/**\n * Throws an error if the provided condition is falsy.\n *\n * @param condition - If falsy, an error is thrown.\n * @param message - Optional. A message to display.\n */\nexport function assert( condition: any, message?: string ): void {\n if ( ! condition ) {\n throw new Error( `[${ PROJECT_CODE }] ${ message || '' }` );\n }\n}\n","export const { min, max, floor, ceil, abs } = Math;\n","/**\n * Converts the provided string in the camel case to the kebab case.\n *\n * @param string - A string to convert.\n */\nexport function camelToKebab( string: string ): string {\n return string.replace( /([a-z0-9])([A-Z])/g, '$1-$2' ).toLowerCase();\n}\n","import { pad } from '../pad/pad';\n\n\n/**\n * Stores unique IDs.\n *\n * @since 3.0.0\n */\nconst ids: Record = {};\n\n/**\n * Returns a sequential unique ID as \"{ prefix }-{ number }\".\n *\n * @param prefix - A prefix for the ID.\n */\nexport function uniqueId( prefix: string ): string {\n return `${ prefix }${ pad( ( ids[ prefix ] = ( ids[ prefix ] || 0 ) + 1 ) ) }`;\n}\n","import { AnyFunction } from '../../types';\nimport { empty, forEach } from '../../utils';\n\n\n/**\n * The type for an EventTarget or an array with EventTarget objects.\n *\n * @since 4.0.0\n */\ntype EventTargets = EventTarget | EventTarget[];\n\n/**\n * The interface for the EventBinder object.\n *\n * @since 3.0.0\n */\nexport interface EventBinderObject {\n bind( target: EventTargets, events: string | string[], callback: AnyFunction, options?: AddEventListenerOptions ): void\n unbind( target: EventTarget | EventTarget[], events: string | string[], callback?: AnyFunction ): void;\n dispatch( target: EventTarget, event: string, detail?: T ): void;\n destroy(): void;\n}\n\n/**\n * The constructor function to provide methods to subscribe native events.\n *\n * @since 4.0.0\n * @constructor\n *\n * @return An EventBinder object.\n */\nexport function EventBinder(): EventBinderObject {\n /**\n * Stores all handlers that listen to native events.\n * `[ target, event, namespace, callback, remover ]`\n */\n let listeners: [ EventTarget, string, string | undefined, AnyFunction, () => void ][] = [];\n\n /**\n * Listens to native events.\n * - `destroy()` can unsubscribe all events.\n * - In IE, mediaQueryList does not inherit EventTarget,\n * and only supports deprecated `addListener` and `removeListener`.\n *\n * @link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener\n *\n * @param targets - A target element, the window object or the document object.\n * @param events - An event or events to listen to.\n * @param callback - A callback function.\n * @param options - Optional. The options to pass to the `addEventListener` function.\n */\n function bind(\n targets: EventTargets,\n events: string | string[],\n callback: AnyFunction,\n options?: AddEventListenerOptions\n ): void {\n forEachEvent( targets, events, ( target, event, namespace ) => {\n const isEventTarget = 'addEventListener' in target;\n const remover = isEventTarget\n ? target.removeEventListener.bind( target, event, callback, options )\n : target[ 'removeListener' ].bind( target, callback );\n\n isEventTarget ? target.addEventListener( event, callback, options ) : target[ 'addListener' ]( callback );\n listeners.push( [ target, event, namespace, callback, remover ] );\n } );\n }\n\n /**\n * Removes the event handler.\n *\n * @param targets - A target element, the window object or the document object.\n * @param events - An event name or names to remove.\n * @param callback - Optional. Specify the callback to remove.\n */\n function unbind( targets: EventTargets, events: string | string[], callback?: AnyFunction ): void {\n forEachEvent( targets, events, ( target, event, namespace ) => {\n listeners = listeners.filter( listener => {\n if ( listener[ 0 ] === target\n && listener[ 1 ] === event\n && listener[ 2 ] === namespace\n && ( ! callback || listener[ 3 ] === callback )\n ) {\n listener[ 4 ]();\n return false;\n }\n\n return true;\n } );\n } );\n }\n\n /**\n * Dispatches a custom event of the target.\n *\n * @param target - An event target.\n * @param type - An event type.\n * @param detail - Optional. The `detail` object of the event.\n *\n * @return An event object.\n */\n function dispatch( target: EventTarget, type: string, detail?: T ): CustomEvent {\n let e: CustomEvent;\n const bubbles = true;\n\n if ( typeof CustomEvent === 'function' ) {\n e = new CustomEvent( type, { bubbles, detail } );\n } else {\n e = document.createEvent( 'CustomEvent' );\n e.initCustomEvent( type, bubbles, false, detail );\n }\n\n target.dispatchEvent( e );\n return e;\n }\n\n /**\n * Iterates over each target and event.\n *\n * @param targets - A target element, the window object or the document object.\n * @param events - An event name or names.\n * @param iteratee - An iteratee function.\n */\n function forEachEvent(\n targets: EventTargets,\n events: string | string[],\n iteratee: ( target: EventTarget, event: string, namespace: string | undefined ) => void\n ): void {\n forEach( targets, target => {\n target && forEach( events, events => {\n events.split( ' ' ).forEach( eventNS => {\n const fragment = eventNS.split( '.' );\n iteratee( target, fragment[ 0 ], fragment[ 1 ] );\n } );\n } );\n } );\n }\n\n /**\n * Removes all listeners.\n */\n function destroy(): void {\n listeners.forEach( data => { data[ 4 ]() } );\n empty( listeners );\n }\n\n return {\n bind,\n unbind,\n dispatch,\n destroy,\n };\n}\n","/**\n * Empties the array.\n *\n * @param array - A array to empty.\n */\nexport function empty( array: any[] ): void {\n array.length = 0;\n}\n","import { EVENT_DESTROY } from '../../constants/events';\nimport { Splide } from '../../core/Splide/Splide';\nimport { AnyFunction, EventMap } from '../../types';\nimport { apply, assign, isArray, slice, toArray } from '../../utils';\nimport { EventBinder, EventBinderObject } from '../EventBinder/EventBinder';\n\n\n/**\n * The interface for the EventInterface object.\n *\n * @since 3.0.0\n */\nexport interface EventInterfaceObject extends EventBinderObject {\n on( event: K, callback: EventMap[ K ] ): void;\n on( events: string | string[], callback: AnyFunction ): void;\n off( events: K | K[] | string | string[] ): void;\n emit( event: K, ...args: Parameters ): void\n emit( event: string, ...args: any[] ): void;\n\n /** @internal */\n bus: DocumentFragment;\n}\n\n/**\n * The constructor function that provides interface for internal and native events.\n *\n * @since 3.0.0\n * @constructor\n *\n * @param Splide - A Splide instance.\n *\n * @return A collection of interface functions.\n */\nexport function EventInterface( Splide?: Splide ): EventInterfaceObject {\n /**\n * The document fragment for internal events.\n * Provide the Splide instance to share the bus.\n */\n const bus = Splide ? Splide.event.bus : document.createDocumentFragment();\n\n /**\n * An event binder object.\n */\n const binder = EventBinder();\n\n /**\n * Listens to an internal event or events.\n *\n * @param events - An event name or names separated by spaces. Use a dot(.) to add a namespace.\n * @param callback - A callback function to register.\n */\n function on( events: string | string[], callback: AnyFunction ): void {\n binder.bind( bus, toArray( events ).join( ' ' ), e => {\n callback.apply( callback, isArray( e.detail ) ? e.detail : [] );\n } );\n }\n\n /**\n * Triggers callback functions.\n * This accepts additional arguments and passes them to callbacks.\n *\n * @param event - An event name.\n */\n function emit( event: string ): void {\n // eslint-disable-next-line prefer-rest-params, prefer-spread\n binder.dispatch( bus, event, slice( arguments, 1 ) );\n }\n\n if ( Splide ) {\n Splide.event.on( EVENT_DESTROY, binder.destroy );\n }\n\n return assign( binder, {\n bus,\n on,\n off: apply( binder.unbind, bus ),\n emit,\n } );\n}","export const EVENT_MOUNTED = 'mounted';\nexport const EVENT_READY = 'ready';\nexport const EVENT_MOVE = 'move';\nexport const EVENT_MOVED = 'moved';\nexport const EVENT_CLICK = 'click';\nexport const EVENT_ACTIVE = 'active';\nexport const EVENT_INACTIVE = 'inactive';\nexport const EVENT_VISIBLE = 'visible';\nexport const EVENT_HIDDEN = 'hidden';\nexport const EVENT_REFRESH = 'refresh';\nexport const EVENT_UPDATED = 'updated';\nexport const EVENT_RESIZE = 'resize';\nexport const EVENT_RESIZED = 'resized';\nexport const EVENT_DRAG = 'drag';\nexport const EVENT_DRAGGING = 'dragging';\nexport const EVENT_DRAGGED = 'dragged';\nexport const EVENT_SCROLL = 'scroll';\nexport const EVENT_SCROLLED = 'scrolled';\nexport const EVENT_OVERFLOW = 'overflow';\nexport const EVENT_DESTROY = 'destroy';\nexport const EVENT_ARROWS_MOUNTED = 'arrows:mounted';\nexport const EVENT_ARROWS_UPDATED = 'arrows:updated';\nexport const EVENT_PAGINATION_MOUNTED = 'pagination:mounted';\nexport const EVENT_PAGINATION_UPDATED = 'pagination:updated';\nexport const EVENT_NAVIGATION_MOUNTED = 'navigation:mounted';\nexport const EVENT_AUTOPLAY_PLAY = 'autoplay:play';\nexport const EVENT_AUTOPLAY_PLAYING = 'autoplay:playing';\nexport const EVENT_AUTOPLAY_PAUSE = 'autoplay:pause';\nexport const EVENT_LAZYLOAD_LOADED = 'lazyload:loaded';\n\n/** @internal */\nexport const EVENT_SLIDE_KEYDOWN = 'sk';\nexport const EVENT_SHIFTED = 'sh';\nexport const EVENT_END_INDEX_CHANGED = 'ei';\n","export const CLASS_RENDERED = 'is-rendered';\n","import { RendererConfig } from '../types/types';\n\n\n/**\n * Default options for generating static HTML.\n *\n * @since 3.0.0\n */\nexport const RENDERER_DEFAULT_CONFIG: RendererConfig = {\n listTag : 'ul',\n slideTag: 'li',\n};\n","import { Options } from '../../types';\nimport { forOwn } from '../../utils';\n\n\ninterface Styles {\n [ breakpoint: string ]: {\n [ selector: string ]: Record\n };\n}\n\n/**\n * The class for generating styles as a string.\n *\n * @since 3.0.0\n */\nexport class Style {\n /**\n * The collection of registered styles categorized by each breakpoint.\n */\n private readonly styles: Styles = {};\n\n /**\n * The ID of the slider.\n */\n private readonly id: string;\n\n /**\n * Holds options.\n */\n private readonly options: Options;\n\n /**\n * The Style constructor.\n *\n * @param id - A slider ID.\n * @param options - Options.\n */\n constructor( id: string, options: Options ) {\n this.id = id;\n this.options = options;\n }\n\n /**\n * Registers a CSS rule.\n *\n * @param selector - A selector.\n * @param prop\n * @param value\n * @param breakpoint\n */\n rule( selector: string, prop: string, value: string | number, breakpoint?: string ): void {\n breakpoint = breakpoint || 'default';\n const selectors = ( this.styles[ breakpoint ] = this.styles[ breakpoint ] || {} );\n const styles = ( selectors[ selector ] = selectors[ selector ] || {} );\n styles[ prop ] = value;\n }\n\n /**\n * Builds styles as a single string.\n *\n * @return Built styles.\n */\n build(): string {\n let css = '';\n\n if ( this.styles.default ) {\n css += this.buildSelectors( this.styles.default );\n }\n\n Object.keys( this.styles )\n .sort( ( n, m ) => this.options.mediaQuery === 'min' ? +n - +m : +m - +n )\n .forEach( breakpoint => {\n if ( breakpoint !== 'default' ) {\n css += `@media screen and (max-width: ${ breakpoint }px) {`;\n css += this.buildSelectors( this.styles[ breakpoint ] );\n css += `}`;\n }\n } );\n\n return css;\n }\n\n /**\n * Builds styles for each breakpoint.\n *\n * @param selectors - An object with styles.\n *\n * @return Built styles.\n */\n private buildSelectors( selectors: Record> ): string {\n let css = '';\n\n forOwn( selectors, ( styles, selector ) => {\n selector = `#${ this.id } ${ selector }`.trim();\n css += `${ selector } {`;\n\n forOwn( styles, ( value, prop ) => {\n if ( value || value === 0 ) {\n css += `${ prop }: ${ value };`;\n }\n } );\n\n css += '}';\n } );\n\n return css;\n }\n}\n","import { PATH, SIZE, XML_NAME_SPACE } from '../../components/Arrows/path';\nimport { Direction, DirectionComponent } from '../../components/Direction/Direction';\nimport { CLASS_ACTIVE, CLASS_CLONE, CLASS_LIST, CLASS_ROOT, CLASS_SLIDE, CLASS_TRACK } from '../../constants/classes';\nimport { DEFAULTS } from '../../constants/defaults';\nimport { TTB } from '../../constants/directions';\nimport { EVENT_MOUNTED } from '../../constants/events';\nimport { LOOP, SLIDE } from '../../constants/types';\nimport { EventInterface } from '../../constructors';\nimport { Splide } from '../../core/Splide/Splide';\nimport { Options } from '../../types';\nimport {\n assert,\n assign,\n camelToKebab,\n child,\n forOwn,\n isObject,\n isString,\n max,\n merge,\n push,\n queryAll,\n remove,\n uniqueId,\n unit,\n} from '../../utils';\nimport { CLASS_RENDERED } from '../constants/classes';\nimport { RENDERER_DEFAULT_CONFIG } from '../constants/defaults';\nimport { Style } from '../Style/Style';\nimport { RendererConfig, SlideContent } from '../types/types';\n\n\n/**\n * The class to generate static HTML of the slider for the first view.\n *\n * @since 3.0.0\n */\nexport class SplideRenderer {\n /**\n * Removes a style element and clones.\n *\n * @param splide - A Splide instance.\n */\n static clean( splide: Splide ): void {\n const { on } = EventInterface( splide );\n const { root } = splide;\n const clones = queryAll( root, `.${ CLASS_CLONE }` );\n\n on( EVENT_MOUNTED, () => {\n remove( child( root, 'style' ) );\n } );\n\n remove( clones );\n }\n\n /**\n * Holds slide contents.\n */\n private readonly contents: string[] | SlideContent[];\n\n /**\n * Stores data of slides.\n */\n private readonly slides: SlideContent[] = [];\n\n /**\n * The Direction component.\n */\n private readonly Direction: DirectionComponent;\n\n /**\n * Holds the Style instance.\n */\n private readonly Style: Style;\n\n /**\n * Holds options.\n */\n private readonly options: Options = {};\n\n /**\n * Holds options for this instance.\n */\n private readonly config: RendererConfig;\n\n /**\n * The slider ID.\n */\n private readonly id: string;\n\n /**\n * An array with options for each breakpoint.\n */\n private readonly breakpoints: [ string, Options ][] = [];\n\n /**\n * The SplideRenderer constructor.\n *\n * @param contents - An array with slide contents. Each item must be an HTML or a plain text.\n * @param options - Optional. Slider options.\n * @param config - Static default options.\n * @param defaults - Default options for the slider. Pass `Splide.defaults` if you are using it.\n */\n constructor( contents: string[] | SlideContent[], options?: Options, config?: RendererConfig, defaults?: Options ) {\n merge( DEFAULTS, defaults || {} );\n merge( merge( this.options, DEFAULTS ), options || {} );\n\n this.contents = contents;\n this.config = assign( {}, RENDERER_DEFAULT_CONFIG, config || {} );\n this.id = this.config.id || uniqueId( 'splide' );\n this.Style = new Style( this.id, this.options );\n this.Direction = Direction( null, null, this.options );\n\n assert( this.contents.length, 'Provide at least 1 content.' );\n\n this.init();\n }\n\n /**\n * Initializes the instance.\n */\n private init(): void {\n this.parseBreakpoints();\n this.initSlides();\n this.registerRootStyles();\n this.registerTrackStyles();\n this.registerSlideStyles();\n this.registerListStyles();\n }\n\n /**\n * Initializes slides.\n */\n private initSlides(): void {\n push( this.slides, this.contents.map( ( content, index ) => {\n content = isString( content ) ? { html: content } : content;\n content.styles = content.styles || {};\n content.attrs = content.attrs || {};\n\n this.cover( content );\n\n const classes = `${ this.options.classes.slide } ${ index === 0 ? CLASS_ACTIVE : '' }`;\n\n assign( content.attrs, {\n class: `${ classes } ${ content.attrs.class || '' }`.trim(),\n style: this.buildStyles( content.styles ),\n } );\n\n return content;\n } ) );\n\n if ( this.isLoop() ) {\n this.generateClones( this.slides );\n }\n }\n\n /**\n * Registers styles for the root element.\n */\n private registerRootStyles(): void {\n this.breakpoints.forEach( ( [ width, options ] ) => {\n this.Style.rule( ' ', 'max-width', unit( options.width ), width );\n } );\n }\n\n /**\n * Registers styles for the track element.\n */\n private registerTrackStyles(): void {\n const { Style } = this;\n const selector = `.${ CLASS_TRACK }`;\n\n this.breakpoints.forEach( ( [ width, options ] ) => {\n Style.rule( selector, this.resolve( 'paddingLeft' ), this.cssPadding( options, false ), width );\n Style.rule( selector, this.resolve( 'paddingRight' ), this.cssPadding( options, true ), width );\n Style.rule( selector, 'height', this.cssTrackHeight( options ), width );\n } );\n }\n\n /**\n * Registers styles for the list element.\n */\n private registerListStyles(): void {\n const { Style } = this;\n const selector = `.${ CLASS_LIST }`;\n\n this.breakpoints.forEach( ( [ width, options ] ) => {\n Style.rule( selector, 'transform', this.buildTranslate( options ), width );\n\n if ( ! this.cssSlideHeight( options ) ) {\n Style.rule( selector, 'aspect-ratio', this.cssAspectRatio( options ), width );\n }\n } );\n }\n\n /**\n * Registers styles for slides and clones.\n */\n private registerSlideStyles(): void {\n const { Style } = this;\n const selector = `.${ CLASS_SLIDE }`;\n\n this.breakpoints.forEach( ( [ width, options ] ) => {\n Style.rule( selector, 'width', this.cssSlideWidth( options ), width );\n Style.rule( selector, 'height', this.cssSlideHeight( options ) || '100%', width );\n Style.rule( selector, this.resolve( 'marginRight' ), unit( options.gap ) || '0px', width );\n Style.rule( `${ selector } > img`, 'display', options.cover ? 'none' : 'inline', width );\n } );\n }\n\n /**\n * Builds multiple `translateX` for the list element.\n *\n * @param options - Options for each breakpoint.\n *\n * @return A string with multiple translate functions.\n */\n private buildTranslate( options: Options ): string {\n const { resolve, orient } = this.Direction;\n const values = [];\n\n values.push( this.cssOffsetClones( options ) );\n values.push( this.cssOffsetGaps( options ) );\n\n if ( this.isCenter( options ) ) {\n values.push( this.buildCssValue( orient( -50 ), '%' ) );\n values.push( ...this.cssOffsetCenter( options ) );\n }\n\n return values\n .filter( Boolean )\n .map( value => `translate${ resolve( 'X' ) }(${ value })` )\n .join( ' ' );\n }\n\n /**\n * Returns offset for the list element.\n * This does not include gaps because it can not be converted into percent.\n *\n * @param options - Options for each breakpoint.\n *\n * @return The offset.\n */\n private cssOffsetClones( options: Options ): string {\n const { resolve, orient } = this.Direction;\n const cloneCount = this.getCloneCount();\n\n if ( this.isFixedWidth( options ) ) {\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\n return this.buildCssValue( orient( value ) * cloneCount, unit );\n }\n\n const percent = 100 * cloneCount / options.perPage;\n return `${ orient( percent ) }%`;\n }\n\n /**\n * Returns offset for centering the active slide.\n *\n * Note:\n * ( 100% + gap ) / perPage - gap\n * 100% / perPage + gap / perPage - gap;\n * 50% / perPage + ( gap / perPage - gap ) / 2;\n *\n * @param options - Options for each breakpoint.\n *\n * @return The offset.\n */\n private cssOffsetCenter( options: Options ): string[] {\n const { resolve, orient } = this.Direction;\n\n if ( this.isFixedWidth( options ) ) {\n const { value, unit } = this.parseCssValue( options[ resolve( 'fixedWidth' ) ] );\n return [ this.buildCssValue( orient( value / 2 ), unit ) ];\n }\n\n const values = [];\n const { perPage, gap } = options;\n\n values.push( `${ orient( 50 / perPage ) }%` );\n\n if ( gap ) {\n const { value, unit } = this.parseCssValue( gap );\n const gapOffset = ( value / perPage - value ) / 2;\n values.push( this.buildCssValue( orient( gapOffset ), unit ) );\n }\n\n return values;\n }\n\n /**\n * Returns offset for gaps.\n *\n * @param options - Options for each breakpoint.\n *\n * @return The offset as `calc()`.\n */\n private cssOffsetGaps( options: Options ): string {\n const cloneCount = this.getCloneCount();\n\n if ( cloneCount && options.gap ) {\n const { orient } = this.Direction;\n const { value, unit } = this.parseCssValue( options.gap );\n\n if ( this.isFixedWidth( options ) ) {\n return this.buildCssValue( orient( value * cloneCount ), unit );\n }\n\n const { perPage } = options;\n const gaps = cloneCount / perPage;\n return this.buildCssValue( orient( gaps * value ), unit );\n }\n\n return '';\n }\n\n /**\n * Resolves the prop for the current direction and converts it into the Kebab case.\n *\n * @param prop - A property name to resolve.\n *\n * @return A resolved property name in the Kebab case.\n */\n private resolve( prop: string ): string {\n return camelToKebab( this.Direction.resolve( prop ) );\n }\n\n /**\n * Returns padding in the CSS format.\n *\n * @param options - Options.\n * @param right - Determines whether to get padding right or left.\n *\n * @return Padding in the CSS format.\n */\n private cssPadding( options: Options, right: boolean ): string {\n const { padding } = options;\n const prop = this.Direction.resolve( right ? 'right' : 'left', true );\n return padding && unit( padding[ prop ] || ( isObject( padding ) ? 0 : padding ) ) || '0px';\n }\n\n /**\n * Returns height of the track element in the CSS format.\n *\n * @param options - Options.\n *\n * @return Height in the CSS format.\n */\n private cssTrackHeight( options: Options ): string {\n let height = '';\n\n if ( this.isVertical() ) {\n height = this.cssHeight( options );\n assert( height, '\"height\" is missing.' );\n height = `calc(${ height } - ${ this.cssPadding( options, false ) } - ${ this.cssPadding( options, true ) })`;\n }\n\n return height;\n }\n\n /**\n * Returns height provided though options in the CSS format.\n *\n * @param options - Options.\n *\n * @return Height in the CSS format.\n */\n private cssHeight( options: Options ): string {\n return unit( options.height );\n }\n\n /**\n * Returns width of each slide in the CSS format.\n *\n * @param options - Options.\n *\n * @return Width in the CSS format.\n */\n private cssSlideWidth( options: Options ): string {\n return options.autoWidth\n ? ''\n : unit( options.fixedWidth ) || ( this.isVertical() ? '' : this.cssSlideSize( options ) );\n }\n\n /**\n * Returns height of each slide in the CSS format.\n *\n * @param options - Options.\n *\n * @return Height in the CSS format.\n */\n private cssSlideHeight( options: Options ): string {\n return unit( options.fixedHeight )\n || ( this.isVertical()\n ? ( options.autoHeight ? '' : this.cssSlideSize( options ) )\n : this.cssHeight( options )\n );\n }\n\n /**\n * Returns width or height of each slide in the CSS format, considering the current direction.\n *\n * @param options - Options.\n *\n * @return Width or height in the CSS format.\n */\n private cssSlideSize( options: Options ): string {\n const gap = unit( options.gap );\n return `calc((100%${ gap && ` + ${ gap }` })/${ options.perPage || 1 }${ gap && ` - ${ gap }` })`;\n }\n\n /**\n * Returns the aspectRatio value to simulate the `heightRatio` option.\n *\n * @param options - Options.\n *\n * @return aspectRatio in the CSS format.\n */\n private cssAspectRatio( options: Options ): string {\n const { heightRatio } = options;\n return heightRatio ? `${ 1 / heightRatio }` : '';\n }\n\n /**\n * Builds the css value by the provided value and unit.\n *\n * @param value - A value.\n * @param unit - A CSS unit.\n *\n * @return A built value for a CSS value.\n */\n private buildCssValue( value: number, unit: string ): string {\n return `${ value }${ unit }`;\n }\n\n /**\n * Parses the CSS value into number and unit.\n *\n * @param value - A value to parse.\n *\n * @return An object with value and unit.\n */\n private parseCssValue( value: string | number ): { value: number, unit: string } {\n if ( isString( value ) ) {\n const number = parseFloat( value ) || 0;\n const unit = value.replace( /\\d*(\\.\\d*)?/, '' ) || 'px';\n return { value: number, unit };\n }\n\n return { value, unit: 'px' };\n }\n\n /**\n * Parses breakpoints and generate options for each breakpoint.\n */\n private parseBreakpoints(): void {\n const { breakpoints } = this.options;\n\n this.breakpoints.push( [ 'default', this.options ] );\n\n if ( breakpoints ) {\n forOwn( breakpoints, ( options, width ) => {\n this.breakpoints.push( [ width, merge( merge( {}, this.options ), options ) ] );\n } );\n }\n }\n\n /**\n * Checks if the slide width is fixed or not.\n *\n * @return `true` if the slide width is fixed, or otherwise `false`.\n */\n private isFixedWidth( options: Options ): boolean {\n return !! options[ this.Direction.resolve( 'fixedWidth' ) ];\n }\n\n /**\n * Checks if the slider type is loop or not.\n *\n * @return `true` if the slider type is loop, or otherwise `false`.\n */\n private isLoop(): boolean {\n return this.options.type === LOOP;\n }\n\n /**\n * Checks if the active slide should be centered or not.\n *\n * @return `true` if the slide should be centered, or otherwise `false`.\n */\n private isCenter( options: Options ): boolean {\n if( options.focus === 'center' ) {\n if ( this.isLoop() ) {\n return true;\n }\n\n if ( this.options.type === SLIDE ) {\n return ! this.options.trimSpace;\n }\n }\n\n return false;\n }\n\n /**\n * Checks if the direction is TTB or not.\n *\n * @return `true` if the direction is TTB, or otherwise `false`.\n */\n private isVertical(): boolean {\n return this.options.direction === TTB;\n }\n\n /**\n * Builds classes of the root element.\n *\n * @return Classes for the root element as a single string.\n */\n private buildClasses(): string {\n const { options } = this;\n\n return [\n CLASS_ROOT,\n `${ CLASS_ROOT }--${ options.type }`,\n `${ CLASS_ROOT }--${ options.direction }`,\n options.drag && `${ CLASS_ROOT }--draggable`,\n options.isNavigation && `${ CLASS_ROOT }--nav`,\n CLASS_ACTIVE,\n ! this.config.hidden && CLASS_RENDERED,\n ].filter( Boolean ).join( ' ' );\n }\n\n /**\n * Converts provided attributes into a single string.\n *\n * @param attrs - An object with attributes.\n *\n * @return A built string.\n */\n private buildAttrs( attrs: Record ): string {\n let attr = '';\n\n forOwn( attrs, ( value, key ) => {\n attr += value ? ` ${ camelToKebab( key ) }=\"${ value }\"` : '';\n } );\n\n return attr.trim();\n }\n\n /**\n * Converts provided styles into a single string.\n *\n * @param styles - An object with styles.\n *\n * @return A built string.\n */\n private buildStyles( styles: Record ): string {\n let style = '';\n\n forOwn( styles, ( value, key ) => {\n style += ` ${ camelToKebab( key ) }:${ value };`;\n } );\n\n return style.trim();\n }\n\n /**\n * Generates HTML of slides with inserting provided contents.\n *\n * @return The HTML for all slides and clones.\n */\n private renderSlides(): string {\n const { slideTag: tag } = this.config;\n\n return this.slides.map( content => {\n return `<${ tag } ${ this.buildAttrs( content.attrs ) }>${ content.html || '' }`;\n } ).join( '' );\n }\n\n /**\n * Add the `background` style for the cover mode.\n *\n * @param content - A slide content.\n */\n private cover( content: SlideContent ): void {\n const { styles, html = '' } = content;\n\n if ( this.options.cover && ! this.options.lazyLoad ) {\n const src = html.match( // );\n\n if ( src && src[ 2 ] ) {\n styles.background = `center/cover no-repeat url('${ src[ 2 ] }')`;\n }\n }\n }\n\n /**\n * Generates clones.\n *\n * @param contents - An array with SlideContent objects.\n */\n private generateClones( contents: SlideContent[] ): void {\n const { classes } = this.options;\n const count = this.getCloneCount();\n const slides = contents.slice();\n\n while ( slides.length < count ) {\n push( slides, slides );\n }\n\n push( slides.slice( -count ).reverse(), slides.slice( 0, count ) ).forEach( ( content, index ) => {\n const attrs = assign( {}, content.attrs, { class: `${ content.attrs.class } ${ classes.clone }` } );\n const clone = assign( {}, content, { attrs } );\n index < count ? contents.unshift( clone ) : contents.push( clone );\n } );\n }\n\n /**\n * Returns the number of clones to generate.\n *\n * @return A number of clones.\n */\n private getCloneCount(): number {\n if ( this.isLoop() ) {\n const { options } = this;\n\n if ( options.clones ) {\n return options.clones;\n }\n\n const perPage = max( ...this.breakpoints.map( ( [ , options ] ) => options.perPage ) );\n return perPage * ( ( options.flickMaxPages || 1 ) + 1 );\n }\n\n return 0;\n }\n\n /**\n * Generates arrows and the wrapper element.\n *\n * @return The HTML for arrows.\n */\n private renderArrows(): string {\n let html = '';\n\n html += `
`;\n html += this.renderArrow( true );\n html += this.renderArrow( false );\n html += `
`;\n\n return html;\n }\n\n /**\n * Generates an arrow HTML.\n * Some attributes are temporary, and Splide changes them after mount.\n *\n * @param prev - Options for each breakpoint.\n *\n * @return The HTML for the prev or next arrow.\n */\n private renderArrow( prev: boolean ): string {\n const { classes, i18n } = this.options;\n const attrs = {\n class : `${ classes.arrow } ${ prev ? classes.prev : classes.next }`,\n type : 'button',\n ariaLabel: prev ? i18n.prev : i18n.next,\n };\n\n return ``;\n }\n\n /**\n * Returns the HTML of the slider.\n *\n * @return The generated HTML.\n */\n html(): string {\n const { rootClass, listTag, arrows, beforeTrack, afterTrack, slider, beforeSlider, afterSlider } = this.config;\n\n let html = '';\n\n html += `
`;\n html += ``;\n\n if ( slider ) {\n html += beforeSlider || '';\n html += `
`;\n }\n\n html += beforeTrack || '';\n\n if ( arrows ) {\n html += this.renderArrows();\n }\n\n html += `
`;\n html += `<${ listTag } class=\"splide__list\">`;\n\n html += this.renderSlides();\n\n html += ``;\n html += `
`; // .track\n\n html += afterTrack || '';\n\n if ( slider ) {\n html += `
`;\n html += afterSlider || '';\n }\n\n html += `
`; // .splide\n\n return html;\n }\n}\n","/**\n * Pads the number with 0.\n *\n * @param number - A number to pad.\n *\n * @return string - Padded number.\n */\nexport function pad( number: number ): string {\n return number < 10 ? `0${ number }` : `${ number }`;\n}\n","import { slice } from '../../arrayLike';\n\n\n/**\n * Returns elements that match the provided selector.\n *\n * @param parent - A parent element to start searching from.\n * @param selector - A selector to query.\n *\n * @return An array with matched elements.\n */\nexport function queryAll( parent: Element | Document, selector?: string ): E[] {\n return selector ? slice( parent.querySelectorAll( selector ) ) : [];\n}\n","/**\n * The type for the regular slider.\n *\n * @since 3.0.0\n */\nexport const SLIDE = 'slide';\n\n/**\n * The type for the carousel slider.\n *\n * @since 3.0.0\n */\nexport const LOOP = 'loop';\n\n/**\n * The type for the fade slider that can not have multiple slides in a page.\n *\n * @since 3.0.0\n */\nexport const FADE = 'fade';\n"],"names":["RTL","TTB","ORIENTATION_MAP","width","left","right","x","X","Y","ArrowLeft","ARROW","ArrowRight","Direction","Splide","Components","options","resolve","prop","axisOnly","direction","index","replace","match","offset","replacement","toLowerCase","charAt","toUpperCase","slice","orient","value","PROJECT_CODE","CLASS_PREFIX","CLASS_ROOT","CLASS_TRACK","CLASS_LIST","CLASS_SLIDE","CLASS_CLONE","CLASS_ARROW","CLASS_PAGINATION","CLASS_ACTIVE","STATUS_CLASS_PREFIX","DEFAULTS","type","role","speed","perPage","cloneStatus","arrows","pagination","paginationKeyboard","interval","pauseOnHover","pauseOnFocus","resetProgress","easing","drag","trimSpace","focusableNodes","live","classes","slide","clone","arrow","prev","next","page","spinner","i18n","first","last","slideX","pageX","play","pause","carousel","select","slideLabel","reducedMotion","rewindSpeed","autoplay","arrayLike","start","end","Array","prototype","call","apply","func","bind","arguments","typeOf","subject","isObject","isArray","isString","toArray","forEach","values","iteratee","push","array","items","matches","elm","selector","ownerDocument","defaultView","window","HTMLElement","e","child","parent","children","filter","firstElementChild","ownKeys","Object","keys","forOwn","object","reverse","key","assign","source","merge","remove","nodes","node","parentNode","removeChild","unit","assert","condition","message","Error","Math","min","max","floor","ceil","abs","camelToKebab","string","ids","EventBinder","listeners","forEachEvent","targets","events","target","split","eventNS","fragment","callback","event","namespace","isEventTarget","remover","removeEventListener","addEventListener","unbind","listener","dispatch","detail","CustomEvent","bubbles","document","createEvent","initCustomEvent","dispatchEvent","destroy","data","length","EventInterface","bus","createDocumentFragment","binder","on","join","off","emit","RENDERER_DEFAULT_CONFIG","listTag","slideTag","Style","id","this","styles","rule","breakpoint","selectors","build","_this","css","default","buildSelectors","sort","n","m","mediaQuery","_this2","trim","SplideRenderer","contents","config","defaults","slides","breakpoints","prefix","number","init","clean","splide","root","clones","querySelectorAll","parseBreakpoints","initSlides","registerRootStyles","registerTrackStyles","registerSlideStyles","registerListStyles","_this3","map","content","html","attrs","cover","class","style","buildStyles","isLoop","generateClones","_this4","_ref","_this5","_ref2","cssPadding","cssTrackHeight","_this6","_ref3","buildTranslate","cssSlideHeight","cssAspectRatio","_this7","_ref4","cssSlideWidth","gap","_this$Direction","cssOffsetClones","cssOffsetGaps","isCenter","buildCssValue","cssOffsetCenter","Boolean","_this$Direction2","cloneCount","getCloneCount","isFixedWidth","_this$parseCssValue","parseCssValue","_this$Direction3","_this$parseCssValue2","_this$parseCssValue3","_this$parseCssValue4","padding","height","isVertical","cssHeight","autoWidth","fixedWidth","cssSlideSize","fixedHeight","autoHeight","heightRatio","parseFloat","_this8","focus","buildClasses","isNavigation","hidden","buildAttrs","attr","renderSlides","_this9","tag","_content$html","lazyLoad","src","background","count","unshift","_ref5","flickMaxPages","renderArrows","renderArrow","_this$options","ariaLabel","arrowPath","_this$config","rootClass","beforeTrack","afterTrack","slider","beforeSlider","afterSlider"],"mappings":";;;;;;yCAGO,ICKMA,EAAM,MAKNC,EAAM,MCQNC,EAAkB,CAC7BC,MAAY,CAAE,UACdC,KAAY,CAAE,MAAO,SACrBC,MAAY,CAAE,SAAU,QACxBC,EAAY,CAAE,KACdC,EAAY,CAAE,KACdC,EAAY,CAAE,KACdC,UAAY,CCzBiBC,UADAA,cD2B7BC,WAAY,CCzBiBD,YAHAA,YDoBA,EAsBf,SAAAE,EAAWC,EAAgBC,EAAwBC,GA8B1D,MAAA,CACLC,QAvBO,SAASC,EAAcC,EAAoBC,GAE5C,IAAAC,GADND,EAAYA,GAAaJ,EAAQI,aACLnB,GAASkB,EAAeC,IAAclB,EAAM,EAAI,CAAA,EAA5B,EAEzC,OAAAC,EAAiBe,IAAUf,EAAiBe,GAAQG,IACtDH,EAAKI,QAAS,oBAAqB,SAAE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RA,GAAA,YAAqBvC,KAAKD,GAAgB,YAAAC,KAAK4F,aAAL,EAAyBsB,KAAAA,GAAa,IAAhF,iBACmBlH,KAAKF,MAAMO,QAAtB,YAEHgH,IAEK9E,EADRA,GAAQ+E,GAAgB,IAChB,gCAGV/E,GAAQ4E,GAAe,GAElB9P,IACHkL,GAAQvC,KAAK4G,aAAb,GAWFrE,GAHAA,GAJAA,EADQA,EAAA,+BACR,IAAa3C,EAAb,2BAEQI,KAAKiG,aAAb,GAEA,KAAcrG,EAAd,MACQ,UAEAwH,GAAc,IAEjBC,IAEH9E,EADQA,EAAA,UACAgF,GAAe,KAGjBhF,GAAA,QAGV"} \ No newline at end of file diff --git a/dist/js/splide.cjs.js b/dist/js/splide.cjs.js index db16a6ac..8152a6bb 100644 --- a/dist/js/splide.cjs.js +++ b/dist/js/splide.cjs.js @@ -2,7 +2,7 @@ * Splide.js * Version : 4.1.4 * License : MIT - * Copyright: 2022 Naotoshi Fujita + * Copyright: 2023 Naotoshi Fujita */ 'use strict'; @@ -2264,7 +2264,11 @@ function Drag(Splide2, Components2, options) { } else if (Splide2.is(SLIDE) && exceeded && rewind) { Controller.go(exceededLimit(true) ? ">" : "<"); } else { - Controller.go(Controller.toDest(destination), true); + var sign1 = sign(velocity); + var expectedDestination = Controller.toDest(destination); + var maxPages = options.flickMaxPages || 1; + var goTo = sign1 < 0 ? min(expectedDestination, Splide2.index + maxPages) : max(expectedDestination, Splide2.index - maxPages); + Controller.go(goTo, true); } reduce(true); diff --git a/dist/js/splide.esm.js b/dist/js/splide.esm.js index ebab3fe9..53a733b8 100644 --- a/dist/js/splide.esm.js +++ b/dist/js/splide.esm.js @@ -6,7 +6,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d * Splide.js * Version : 4.1.4 * License : MIT - * Copyright: 2022 Naotoshi Fujita + * Copyright: 2023 Naotoshi Fujita */ var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)"; var CREATED = 1; @@ -2259,7 +2259,11 @@ function Drag(Splide2, Components2, options) { } else if (Splide2.is(SLIDE) && exceeded && rewind) { Controller.go(exceededLimit(true) ? ">" : "<"); } else { - Controller.go(Controller.toDest(destination), true); + var sign1 = sign(velocity); + var expectedDestination = Controller.toDest(destination); + var maxPages = options.flickMaxPages || 1; + var goTo = sign1 < 0 ? min(expectedDestination, Splide2.index + maxPages) : max(expectedDestination, Splide2.index - maxPages); + Controller.go(goTo, true); } reduce(true); diff --git a/dist/js/splide.js b/dist/js/splide.js index c495a338..426a7a4b 100644 --- a/dist/js/splide.js +++ b/dist/js/splide.js @@ -6,7 +6,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d * Splide.js * Version : 4.1.4 * License : MIT - * Copyright: 2022 Naotoshi Fujita + * Copyright: 2023 Naotoshi Fujita */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Splide = factory()); @@ -2257,7 +2257,11 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d } else if (Splide2.is(SLIDE) && exceeded && rewind) { Controller.go(exceededLimit(true) ? ">" : "<"); } else { - Controller.go(Controller.toDest(destination), true); + var sign1 = sign(velocity); + var expectedDestination = Controller.toDest(destination); + var maxPages = options.flickMaxPages || 1; + var goTo = sign1 < 0 ? min(expectedDestination, Splide2.index + maxPages) : max(expectedDestination, Splide2.index - maxPages); + Controller.go(goTo, true); } reduce(true); diff --git a/dist/js/splide.min.js b/dist/js/splide.min.js index 7f4cd983..67dc1a95 100644 --- a/dist/js/splide.min.js +++ b/dist/js/splide.min.js @@ -3,7 +3,7 @@ function r(n,t){for(var i=0;i=r))return l();u=h(s)}}function l(){f=!0}function d(){u&&cancelAnimationFrame(u),f=!(u=c=0)}return{start:function(n){n||d(),o=e()-(n?c*t:0),f=!1,u=h(s)},rewind:function(){o=e(),c=0,i&&i(c)},pause:l,cancel:d,set:function(n){t=n},isPaused:function(){return f}}}function s(n){var t=n;return{set:function(n){t=n},is:function(n){return b(y(n),t)}}}var n="Arrow",Bn=n+"Left",Hn=n+"Right",t=n+"Up",n=n+"Down",Jn="ttb",l={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[t,Hn],ArrowRight:[n,Bn]};var Z="role",$="tabindex",i="aria-",Kn=i+"controls",Vn=i+"current",Qn=i+"selected",nn=i+"label",Zn=i+"labelledby",$n=i+"hidden",nt=i+"orientation",tt=i+"roledescription",it=i+"live",rt=i+"busy",ot=i+"atomic",ut=[Z,$,"disabled",Kn,Vn,nn,Zn,$n,nt,tt],i=yn+"__",et=yn,ct=i+"track",ft=i+"list",at=i+"slide",st=at+"--clone",lt=at+"__container",dt=i+"arrows",vt=i+"arrow",ht=vt+"--prev",pt=vt+"--next",gt=i+"pagination",mt=gt+"__page",yt=i+"progress"+"__bar",bt=i+"toggle",wt=i+"sr",tn="is-active",xt="is-prev",kt="is-next",St="is-visible",Et="is-loading",Lt="is-focus-in",Ot="is-overflow",At=[tn,St,xt,kt,Et,Lt,Ot];var _t="touchstart mousedown",zt="touchmove mousemove",Dt="touchend touchcancel mouseup click";var Mt="slide",Pt="loop",It="fade";function Rt(o,r,t,u){var e,n=Q(o),i=n.on,c=n.emit,f=n.bind,a=o.Components,s=o.root,l=o.options,d=l.isNavigation,v=l.updateOnMove,h=l.i18n,p=l.pagination,g=l.slideFocus,m=a.Direction.resolve,y=z(u,"style"),b=z(u,nn),w=-1u.perPage}}},Layout:function(t,n,i){var r,o,u,e=(a=Q(t)).on,c=a.bind,f=a.emit,a=n.Slides,s=n.Direction.resolve,l=(n=n.Elements).root,d=n.track,v=n.list,h=a.getAt,p=a.style;function g(){r=i.direction===Jn,_(l,"maxWidth",W(i.width)),_(d,s("paddingLeft"),y(!1)),_(d,s("paddingRight"),y(!0)),m(!0)}function m(n){var t=N(l);!n&&o.width===t.width&&o.height===t.height||(_(d,"height",function(){var n="";r&&(bn(n=b(),"height or heightRatio is missing."),n="calc("+n+" - "+y(!1)+" - "+y(!0)+")");return n}()),p(s("marginRight"),W(i.gap)),p("width",i.autoWidth?null:W(i.fixedWidth)||(r?"":w())),p("height",W(i.fixedHeight)||(r?i.autoHeight?null:w():b()),!0),o=t,f(Nn),u!==(u=O())&&(A(l,Ot,u),f("overflow",u)))}function y(n){var t=i.padding,n=s(n?"right":"left");return t&&W(t[n]||(un(t)?0:t))||"0px"}function b(){return W(i.height||N(v).width*i.heightRatio)}function w(){var n=W(i.gap);return"calc((100%"+(n&&" + "+n)+")/"+(i.perPage||1)+(n&&" - "+n)+")"}function x(){return N(v)[s("width")]}function k(n,t){n=h(n||0);return n?N(n.slide)[s("width")]+(t?0:L()):0}function S(n,t){var i,n=h(n);return n?(n=N(n.slide)[s("right")],i=N(v)[s("left")],U(n-i)+(t?0:L())):0}function E(n){return S(t.length-1)-S(0)+k(0,n)}function L(){var n=h(0);return n&&parseFloat(_(n.slide,s("marginRight")))||0}function O(){return t.is(It)||E(!0)>x()}return{mount:function(){var n,t,i;g(),c(window,"resize load",(n=R(f,jn),i=qn(t||0,n,null,1),function(){i.isPaused()&&i.start()})),e([K,J],g),e(jn,m)},resize:m,listSize:x,slideSize:k,sliderSize:E,totalSize:S,getPadding:function(n){return parseFloat(_(d,s("padding"+(n?"Right":"Left"))))||0},isOverflow:O}},Clones:function(c,i,f){var t,r=Q(c),n=r.on,a=i.Elements,s=i.Slides,o=i.Direction.resolve,l=[];function u(){if(n(J,d),n([K,jn],v),t=h()){var o=t,u=s.get().slice(),e=u.length;if(e){for(;u.lengthc.Controller.getEnd(),(t<0||i)&&(n=w(n,i)))}return n}(n),_(p,"transform","translate"+v("X")+"("+t+"px)"),n!==t&&f(Un))}function w(n,t){var i=n-L(t),r=d();return n-=h(r*(kn(U(i)/r)||1))*(t?1:-1)}function x(){b(E(),!0),e.cancel()}function k(n){for(var t=c.Slides.get(),i=0,r=1/0,o=0;oh(L(!0));return i||n},reposition:m}},Controller:function(o,u,e){var c,f,a,s,n=Q(o),t=n.on,i=n.emit,l=u.Move,d=l.getPosition,r=l.getLimit,v=l.toPosition,h=(n=u.Slides).isEnough,p=n.getLength,g=e.omitEnd,m=o.is(Pt),y=o.is(Mt),b=R(L,!1),w=R(L,!0),x=e.start||0,k=x;function S(){f=p(!0),a=e.perMove,s=e.perPage,c=_();var n=q(x,0,g?c:f-1);n!==x&&(x=n,l.reposition())}function E(){c!==_()&&i("ei")}function L(n,t){var i=a||(P()?1:s),i=O(x+i*(n?-1:1),x,!(a||P()));return-1===i&&y&&!Sn(d(),r(!n),1)?n?0:c:t?i:A(i)}function O(n,t,i){var r;return h()||P()?((r=function(n){if(y&&"move"===e.trimSpace&&n!==x)for(var t=d();t===v(n,!0)&&En(n,0,o.length-1,!e.rewind);)n])(\d+)?/)||[],i=r[1],r=r[2],"+"===i||"-"===i?t=O(x+ +(""+i+(+r||1)),x):">"===i?t=r?z(+r):b(!0):"<"===i&&(t=w(!0))):t=m?n:q(n,0,c)}return t}(n)))&&(t||r!==x)&&(M(r),l.move(n,r,k,i))},scroll:function(n,t,i,r){u.Scroll.scroll(n,t,i,function(){var n=A(l.toIndex(d()));M(g?Y(n,c):n),r&&r()})},getNext:b,getPrev:w,getAdjacent:L,getEnd:_,setIndex:M,getIndex:function(n){return n?k:x},toIndex:z,toPage:D,toDest:function(n){return n=l.toIndex(n),y?q(n,0,c):n},hasFocus:P,isBusy:I}},Arrows:function(o,n,t){var i,r,u=Q(o),e=u.on,c=u.bind,f=u.emit,a=t.classes,s=t.i18n,l=n.Elements,d=n.Controller,v=l.arrows,h=l.track,p=v,g=l.prev,m=l.next,y={};function b(){var n=t.arrows;!n||g&&m||(p=v||j("div",a.arrows),g=S(!0),m=S(!1),i=!0,L(p,[g,m]),v||O(p,h)),g&&m&&(an(y,{prev:g,next:m}),ln(p,n?"":"none"),M(p,r=dt+"--"+t.direction),n&&(e([B,Dn,J,V,"ei"],E),c(m,"click",R(k,">")),c(g,"click",R(k,"<")),E(),I([g,m],Kn,h.id),f("arrows:mounted",g,m))),e(K,w)}function w(){x(),b()}function x(){u.destroy(),X(p,r),i?(T(v?[g,m]:p),g=m=null):P([g,m],ut)}function k(n){d.go(n,!0)}function S(n){return hn('