From fdde371e53c19102b19aa538ed30f7fcb6dada49 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2019 20:53:15 +0100 Subject: [PATCH] added homepage, included styles --- dev/index.js | 2 ++ dist/index.html | 1 - dist/tidy-carousel.js | 9 ++++++++- dist/tidy-carousel.min.js | 2 +- package.json | 1 + readme.md | 11 ++++------- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/dev/index.js b/dev/index.js index 751db86..960b268 100644 --- a/dev/index.js +++ b/dev/index.js @@ -1,5 +1,7 @@ import polyfills from './scripts/polyfills'; import Controllers from './scripts/controllers'; +import './scss/styles.scss'; + polyfills(); // Options provided: // - slider_container: # It should be a element wich contains slides. Otherwise it will look for an element with the attribute named data-carousel="name" diff --git a/dist/index.html b/dist/index.html index 764cd64..e1fd095 100644 --- a/dist/index.html +++ b/dist/index.html @@ -20,6 +20,5 @@ - diff --git a/dist/tidy-carousel.js b/dist/tidy-carousel.js index 35890fc..93d1c43 100644 --- a/dist/tidy-carousel.js +++ b/dist/tidy-carousel.js @@ -100,7 +100,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return TidyCarousel; });\n/* harmony import */ var _scripts_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./dev/scripts/polyfills.js\");\n/* harmony import */ var _scripts_controllers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./dev/scripts/controllers.js\");\n\n\nObject(_scripts_polyfills__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(); // Options provided:\n// - slider_container: # It should be a element wich contains slides. Otherwise it will look for an element with the attribute named data-carousel=\"name\"\n// - controllers: # It should be an array of two elements with the attribute data-carousel-controller=\"left or right\"\n// - Duration: # It should be an integer.\n// - Delay: # It should be an integer.\n// - Auto: # It should be a boolean. (Optional) {Defaults to false}\n// - Reset: # It should be a boolean. This option indicates if the carousel should continute sliding when it reach the last slide.(optional)\n// - Warns: # It should be a boolean.\n// - Direction: # It should be a string. E.g: 'left' or right. This is only required if auto is set to true.\n// - pauseOnMouseEnter: # It should be a boolean. This is only required if auto is set to true.\n// - pager: # It can be a boolean or an Object.\n// - If is a boolean, carousel will lookup for an element in the dom with the attribute data-carousel-pager.\n// - If is an Object carousel will use this element as the container of the indicators, wich will be generated.\n\nclass TidyCarousel extends _scripts_controllers__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n constructor(opts) {\n super(opts);\n }\n\n} // new TidyCarousel({pager: true, swipe: true, drag: true, infinite: true, auto: {direction: 'left'}});\n\n//# sourceURL=webpack://TidyCarousel/./dev/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return TidyCarousel; });\n/* harmony import */ var _scripts_polyfills__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"./dev/scripts/polyfills.js\");\n/* harmony import */ var _scripts_controllers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./dev/scripts/controllers.js\");\n/* harmony import */ var _scss_styles_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./dev/scss/styles.scss\");\n/* harmony import */ var _scss_styles_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_scss_styles_scss__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nObject(_scripts_polyfills__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(); // Options provided:\n// - slider_container: # It should be a element wich contains slides. Otherwise it will look for an element with the attribute named data-carousel=\"name\"\n// - controllers: # It should be an array of two elements with the attribute data-carousel-controller=\"left or right\"\n// - Duration: # It should be an integer.\n// - Delay: # It should be an integer.\n// - Auto: # It should be a boolean. (Optional) {Defaults to false}\n// - Reset: # It should be a boolean. This option indicates if the carousel should continute sliding when it reach the last slide.(optional)\n// - Warns: # It should be a boolean.\n// - Direction: # It should be a string. E.g: 'left' or right. This is only required if auto is set to true.\n// - pauseOnMouseEnter: # It should be a boolean. This is only required if auto is set to true.\n// - pager: # It can be a boolean or an Object.\n// - If is a boolean, carousel will lookup for an element in the dom with the attribute data-carousel-pager.\n// - If is an Object carousel will use this element as the container of the indicators, wich will be generated.\n\nclass TidyCarousel extends _scripts_controllers__WEBPACK_IMPORTED_MODULE_1__[\"default\"] {\n constructor(opts) {\n super(opts);\n }\n\n} // new TidyCarousel({pager: true, swipe: true, drag: true, infinite: true, auto: {direction: 'left'}});\n\n//# sourceURL=webpack://TidyCarousel/./dev/index.js?"); /***/ }), @@ -144,6 +144,13 @@ eval("__webpack_require__.r(__webpack_exports__);\nconst path = () => {\n if (! /***/ }), +/***/ "./dev/scss/styles.scss": +/***/ (function(module, exports, __webpack_require__) { + +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://TidyCarousel/./dev/scss/styles.scss?"); + +/***/ }), + /***/ "./node_modules/web-animations-js/web-animations.min.js": /***/ (function(module, exports) { diff --git a/dist/tidy-carousel.min.js b/dist/tidy-carousel.min.js index 55518d7..9215e9e 100644 --- a/dist/tidy-carousel.min.js +++ b/dist/tidy-carousel.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TidyCarousel=e():t.TidyCarousel=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist",i(i.s=0)}([function(t,e,i){t.exports=i(2)},function(t,e){var i,r;r={},function(t,e){function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=d}function r(){return t.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function n(e,r,n){var s=new i;return r&&(s.fill="both",s.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach((function(i){if("auto"!=e[i]){if(("number"==typeof s[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&-1==h.indexOf(e[i]))return;if("direction"==i&&-1==c.indexOf(e[i]))return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;s[i]=e[i]}})):s.duration=e,s}function s(t,e,i,r){return t<0||t>1||i<0||i>1?d:function(n){function s(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(n<=0){var o=0;return t>0?o=e/t:!e&&i>0&&(o=r/i),o*n}if(n>=1){var a=0;return i<1?a=(r-1)/(i-1):1==i&&t<1&&(a=(e-1)/(t-1)),1+a*(n-1)}for(var l=0,u=1;l=1)return 1;var r=1/t;return(i+=e*r)-i%r}}function a(t){_||(_=document.createElement("div").style),_.animationTimingFunction="",_.animationTimingFunction=t;var e=_.animationTimingFunction;if(""==e&&r())throw new TypeError(t+" is not a valid value for easing");return e}function l(t){if("linear"==t)return d;var e=y.exec(t);if(e)return s.apply(this,e.slice(1).map(Number));var i=b.exec(t);if(i)return o(Number(i[1]),m);var r=x.exec(t);return r?o(Number(r[1]),{start:f,middle:p,end:m}[r[2]]):g[t]||d}function u(t,e,i){if(null==e)return w;var r=i.delay+t+i.endDelay;return e=Math.min(i.delay+t,r)?A:E}var h="backwards|forwards|both|none".split("|"),c="reverse|alternate|alternate-reverse".split("|"),d=function(t){return t};i.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterationStart must be a non-negative number, received: "+t);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||t<0)&&r())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=l(a(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var f=1,p=.5,m=0,g={ease:s(.25,.1,.25,1),"ease-in":s(.42,0,1,1),"ease-out":s(0,0,.58,1),"ease-in-out":s(.42,0,.58,1),"step-start":o(1,f),"step-middle":o(1,p),"step-end":o(1,m)},_=null,v="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",y=new RegExp("cubic-bezier\\("+v+","+v+","+v+","+v+"\\)"),b=/steps\(\s*(\d+)\s*\)/,x=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,w=0,T=1,A=2,E=3;t.cloneTimingInput=function(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e},t.makeTiming=n,t.numericTimingToObject=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t},t.normalizeTimingInput=function(e,i){return n(e=t.numericTimingToObject(e),i)},t.calculateActiveDuration=function(t){return Math.abs(function(t){return 0===t.duration||0===t.iterations?0:t.duration*t.iterations}(t)/t.playbackRate)},t.calculateIterationProgress=function(t,e,i){var r=u(t,e,i),n=function(t,e,i,r,n){switch(r){case T:return"backwards"==e||"both"==e?0:null;case E:return i-n;case A:return"forwards"==e||"both"==e?t:null;case w:return null}}(t,i.fill,e,r,i.delay);if(null===n)return null;var s=function(t,e,i,r,n){var s=n;return 0===t?e!==T&&(s+=i):s+=r/t,s}(i.duration,r,i.iterations,n,i.iterationStart),o=function(t,e,i,r,n,s){var o=t===1/0?e%1:t%1;return 0!==o||i!==A||0===r||0===n&&0!==s||(o=1),o}(s,i.iterationStart,r,i.iterations,n,i.duration),a=function(t,e,i,r){return t===A&&e===1/0?1/0:1===i?Math.floor(r)-1:Math.floor(r)}(r,i.iterations,o,s),l=function(t,e,i){var r=t;if("normal"!==t&&"reverse"!==t){var n=e;"alternate-reverse"===t&&(n+=1),r="normal",n!==1/0&&n%2!=0&&(r="reverse")}return"normal"===r?i:1-i}(i.direction,a,o);return i._easingFunction(l)},t.calculatePhase=u,t.normalizeEasing=a,t.parseEasingFunction=l}(i={}),function(t,e){function i(t,e){return t in l&&l[t][e]||e}function r(t,e,r){if(!function(t){return"display"===t||0===t.lastIndexOf("animation",0)||0===t.lastIndexOf("transition",0)}(t)){var n=s[t];if(n)for(var a in o.style[t]=e,n){var l=n[a],u=o.style[l];r[l]=i(l,u)}else r[t]=i(t,e)}}function n(t){var e=[];for(var i in t)if(!(i in["easing","offset","composite"])){var r=t[i];Array.isArray(r)||(r=[r]);for(var n,s=r.length,o=0;o1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==n){if("add"==s||"accumulate"==s)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=s)throw new TypeError("Invalid composite mode "+s+".")}else s="easing"==n?t.normalizeEasing(s):""+s;r(n,s,i)}return null==i.offset&&(i.offset=null),null==i.easing&&(i.easing="linear"),i})),s=!0,o=-1/0,a=0;a=0&&t.offset<=1})),s||function(){var t=i.length;null==i[t-1].offset&&(i[t-1].offset=1),t>1&&null==i[0].offset&&(i[0].offset=0);for(var e=0,r=i[0].offset,n=1;n=t.applyFrom&&ithis._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(e,i){this._style[e]=i,this._isAnimatedProperty[e]=!0,this._updateSvgTransformAttr&&"transform"==t.unprefixedPropertyName(e)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",t.transformToSvgMatrix(i)))},_clear:function(e){this._style[e]=this._surrogateStyle[e],this._updateSvgTransformAttr&&"transform"==t.unprefixedPropertyName(e)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[e]}},a)r.prototype[u]=function(t,e){return function(){var i=this._surrogateStyle[t].apply(this._surrogateStyle,arguments);return e&&(this._isAnimatedProperty[arguments[0]]||this._style[t].apply(this._style,arguments),this._updateIndices()),i}}(u,u in l);for(var h in document.documentElement.style)h in o||h in a||function(t){i(r.prototype,t,{get:function(){return this._surrogateStyle[t]},set:function(e){this._surrogateStyle[t]=e,this._updateIndices(),this._isAnimatedProperty[t]||(this._style[t]=e)}})}(h);t.apply=function(e,i,r){n(e),e.style._set(t.propertyName(i),r)},t.clear=function(e,i){e._webAnimationsPatchedStyle&&e.style._clear(t.propertyName(i))}}(r),function(t){window.Element.prototype.animate=function(e,i){var r="";return i&&i.id&&(r=i.id),t.timeline._play(t.KeyframeEffect(this,e,i,r))}}(r),function(t,e){t.Interpolation=function(t,e,i){return function(r){return i(function t(e,i,r){if("number"==typeof e&&"number"==typeof i)return e*(1-r)+i*r;if("boolean"==typeof e&&"boolean"==typeof i)return r<.5?e:i;if(e.length==i.length){for(var n=[],s=0;s0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),e.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var i=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)),null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,e.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),e.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){if(this._isFinished){if(!this._finishedFlag){var e=new r(this,this._currentTime,t),i=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout((function(){i.forEach((function(t){t.call(e.target,e)}))}),0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();-1===t.indexOf(this)&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}}}(i,r),function(t,e,i){function r(t){var e=u;u=[],t1e-4?(g=.5/Math.sqrt(v),_=[(d[2][1]-d[1][2])*g,(d[0][2]-d[2][0])*g,(d[1][0]-d[0][1])*g,.25/g]):d[0][0]>d[1][1]&&d[0][0]>d[2][2]?_=[.25*(g=2*Math.sqrt(1+d[0][0]-d[1][1]-d[2][2])),(d[0][1]+d[1][0])/g,(d[0][2]+d[2][0])/g,(d[2][1]-d[1][2])/g]:d[1][1]>d[2][2]?(g=2*Math.sqrt(1+d[1][1]-d[0][0]-d[2][2]),_=[(d[0][1]+d[1][0])/g,.25*g,(d[1][2]+d[2][1])/g,(d[0][2]-d[2][0])/g]):(g=2*Math.sqrt(1+d[2][2]-d[0][0]-d[1][1]),_=[(d[0][2]+d[2][0])/g,(d[1][2]+d[2][1])/g,.25*g,(d[1][0]-d[0][1])/g]),[c,f,p,_,u]}}();t.dot=i,t.makeMatrixDecomposition=function(t){return[a(o(t))]},t.transformListToMatrix=o}(r),function(t){function e(t,e){var i=t.exec(e);if(i)return[i=t.ignoreCase?i[0].toLowerCase():i[0],e.substr(i.length)]}function i(t,e){var i=t(e=e.replace(/^\s*/,""));if(i)return[i[0],i[1].replace(/^\s*/,"")]}function r(t,e,i,r,n){for(var s=[],o=[],a=[],l=function(t,e){for(var i=t,r=e;i&&r;)i>r?i%=r:r%=i;return t*e/(i+r)}(r.length,n.length),u=0;u=1?e:"visible"}]}),["visibility"])}(r),function(t,e){function i(t){t=t.trim(),s.fillStyle="#000",s.fillStyle=t;var e=s.fillStyle;if(s.fillStyle="#fff",s.fillStyle=t,e==s.fillStyle){s.fillRect(0,0,1,1);var i=s.getImageData(0,0,1,1).data;s.clearRect(0,0,1,1);var r=i[3]/255;return[i[0]*r,i[1]*r,i[2]*r,r]}}function r(e,i){return[e,i,function(e){function i(t){return Math.max(0,Math.min(255,t))}if(e[3])for(var r=0;r<3;r++)e[r]=Math.round(i(e[r]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=n.height=1;var s=n.getContext("2d");t.addPropertiesHandler(i,r,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,i),t.mergeColors=r}(r),function(t,e){function i(t){function e(){var e=o.exec(t);s=e?e[0]:void 0}function i(){if("("!==s)return function(){var t=Number(s);return e(),t}();e();var t=n();return")"!==s?NaN:(e(),t)}function r(){for(var t=i();"*"===s||"/"===s;){var r=s;e();var n=i();"*"===r?t*=n:t/=n}return t}function n(){for(var t=r();"+"===s||"-"===s;){var i=s;e();var n=r();"+"===i?t+=n:t-=n}return t}var s,o=/([\+\-\w\.]+|[\(\)\*\/])/g;return e(),n()}function r(t,e){if("0"==(e=e.trim().toLowerCase())&&"px".search(t)>=0)return{px:0};if(/^[^(]*$|^calc/.test(e)){e=e.replace(/calc\(/g,"(");var r={};e=e.replace(t,(function(t){return r[t]=null,"U"+t}));for(var n="U("+t.source+")",s=e.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+n,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),o=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],a=0;a1?"calc("+i+")":i}]}var o="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",a=r.bind(null,new RegExp(o,"g")),l=r.bind(null,new RegExp(o+"|%","g")),u=r.bind(null,/deg|rad|grad|turn/g);t.parseLength=a,t.parseLengthOrPercent=l,t.consumeLengthOrPercent=t.consumeParenthesised.bind(null,l),t.parseAngle=u,t.mergeDimensions=s;var h=t.consumeParenthesised.bind(null,a),c=t.consumeRepeated.bind(void 0,h,/^/),d=t.consumeRepeated.bind(void 0,c,/^,/);t.consumeSizePairList=d;var f=t.mergeNestedRepeated.bind(void 0,n," "),p=t.mergeNestedRepeated.bind(void 0,f,",");t.mergeNonNegativeSizePair=f,t.addPropertiesHandler((function(t){var e=d(t);if(e&&""==e[1])return e[0]}),p,["background-size"]),t.addPropertiesHandler(l,n,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),t.addPropertiesHandler(l,s,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(r),function(t,e){function i(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function r(e){var r=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,i,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],e);if(r&&4==r[0].length)return r[0]}var n=t.mergeWrappedNestedRepeated.bind(null,(function(t){return"rect("+t+")"}),(function(e,i){return"auto"==e||"auto"==i?[!0,!1,function(r){var n=r?e:i;if("auto"==n)return"auto";var s=t.mergeDimensions(n,n);return s[2](s[0])}]:t.mergeDimensions(e,i)}),", ");t.parseBox=r,t.mergeBoxes=n,t.addPropertiesHandler(r,n,["clip"])}(r),function(t,e){function i(t){return function(e){var i=0;return t.map((function(t){return t===u?e[i++]:t}))}}function r(t){return t}function n(e){if("none"==(e=e.toLowerCase().trim()))return[];for(var i,r=/\s*(\w+)\(([^)]*)\)/g,n=[],s=0;i=r.exec(e);){if(i.index!=s)return;s=i.index+i[0].length;var o=i[1],a=d[o];if(!a)return;var l=i[2].split(","),u=a[0];if(u.length900||e%100!=0))return e}),(function(t,i){return[t,i,e]}),["font-weight"])}(r),function(t){function e(t){var e={};for(var i in t)e[i]=-t[i];return e}function i(e){return t.consumeToken(/^(left|center|right|top|bottom)\b/i,e)||t.consumeLengthOrPercent(e)}function r(e,r){var n=t.consumeRepeated(i,/^/,r);if(n&&""==n[1]){var o=n[0];if(o[0]=o[0]||"center",o[1]=o[1]||"center",3==e&&(o[2]=o[2]||{px:0}),o.length==e){if(/top|bottom/.test(o[0])||/left|right/.test(o[1])){var a=o[0];o[0]=o[1],o[1]=a}if(/left|right|center|Object/.test(o[0])&&/top|bottom|center|Object/.test(o[1]))return o.map((function(t){return"object"==typeof t?t:s[t]}))}}}function n(r){var n=t.consumeRepeated(i,/^/,r);if(n){for(var o=n[0],a=[{"%":50},{"%":50}],l=0,u=!1,h=0;h=0&&this._cancelHandlers.splice(i,1)}else l.call(this,t,e)},s}}}(),function(t){var e=document.documentElement,i=null,r=!1;try{var n="0"==getComputedStyle(e).getPropertyValue("opacity")?"1":"0";(i=e.animate({opacity:[n,n]},{duration:1})).currentTime=0,r=getComputedStyle(e).getPropertyValue("opacity")==n}catch(t){}finally{i&&i.cancel()}if(!r){var s=window.Element.prototype.animate;window.Element.prototype.animate=function(e,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||null===e||(e=t.convertToArrayForm(e)),s.call(this,e,i)}}}(i)},function(t,e,i){"use strict";i.r(e);var r=()=>{"path"in Event.prototype||Object.defineProperty(Event.prototype,"path",{get:function(){const t=[];let e=this.target;for(;e;)t.push(e),e=e.parentElement;return-1===t.indexOf(window)&&-1===t.indexOf(document)&&t.push(document),-1===t.indexOf(window)&&t.push(window),t}})};var n=class{constructor(t){this.opts=t||{};for(let t in this.opts)t&&(this[t]=this.opts[t])}get name(){return void 0!==this.opts.name?this.opts.name:null}set name(t){if("string"!=typeof t)throw new TypeError(`Opts.name should be a string, but received instead ${typeof t}`);return t}get container(){const{opts:{container:t}}=this,e=this.name&&`[data-name="${this.name}"]`;switch(typeof t){case"string":return document.querySelector(`${t+(null!==e?e:"")}`);case"object":return t;default:return document.querySelector(`.tidy__carousel${null!==e?e:""}`)}}set container(t){let e;const i=this.name&&`[data-name="${this.name}"]`;switch(typeof t){case"string":if(null===(e=document.querySelector(t+(null!==i?i:""))))throw new TypeError(`Could not find any maching element for "${t}" with the name ${this.name}. Make sure the element is loaded before initializing.`);return e;case"object":if(null===t)throw new TypeError("Please make sure the container element is loaded before initialization.");if(!t instanceof HTMLElement)throw new TypeError("'container' should be a instance of an html element, but received instead other type of object.");if(!t.children.length>2)throw new Error(`The container should have at least two children elements but it has instead ${t.length}`);return t;default:throw new TypeError(`'"container" should be a string (pseudo selector) or boolean, received instead ${typeof t}'`)}}get slides(){if(!this.opts.slides&&!this.container.children.length)throw new Error("Can't find any slides");return this.opts.slides?this.opts.slides:null}set slides(t){if(!Array.isArray(t))throw new TypeError(`The slides it should be an array. Received instead ${typeof t}`);return t}get controllers(){const{opts:{controllers:t}}=this;let e,i=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":return e=document.querySelectorAll(`[data-carousel-controller]${null!==i?i:""}`),!!t&&e;case"string":return e=document.querySelectorAll(`${t+(null!==i?i:"")}`);case"object":return t instanceof HTMLCollection?Array.from(t):t;case"undefined":return e=null!==(e=document.querySelectorAll(`[data-carousel-controller]${null!==i?i:""}`))&&Array.from(e);default:throw new TypeError("controllers can only have the following types: string, array/Nodelist")}}set controllers(t){const{opts:{controllers:e}}=this;let i,r=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":if(i=document.querySelectorAll(`[carousel-controller]${null!==r?r:""}`),t&&!i.length)throw new TypeError("Could not find any element containing the attribute of carousel-controller. Bind this attribute [carousel-controller] to an element specify the value lef/right.");return!(!t||!i)&&i;case"string":if((i=document.querySelectorAll(`${e+(null!==r?r:"")}`)).length)return i.forEach(t=>{if(!t.hasAttribute("carousel-controller"))throw new TypeError("The controllers selected doesn't have the attribute 'carousel-controller'. Set this attribute to a string left/right");if(t.hasAttribute("carousel-controller")&&""===t.attributes["carousel-controller"].value)throw new TypeError("The controllers selected doesn't have the attribute 'carousel-controller'. Set this attribute to a string left/right")}),i;throw new TypeError("Could not find any element containing the attribute of carousel-controller. Bind this attribute [carousel-controller] to an element specify the value lef/right.");case"object":if(t instanceof NodeList||Array.isArray(t))return t;if(t instanceof HTMLCollection)return Array.from(t);throw new TypeError("controllers can only have the following types: string, array/Nodelist");default:throw new TypeError("controllers can only have the following types: string, array/Nodelist")}}get easing(){return this.opts.easing?this.opts.easing:"ease"}set easing(t){if("string"!=typeof t)throw new TypeError(`'easing' should be a string, received instead ${typeof t}`);return t}get duration(){return this.opts.duration?this.opts.duration:500}set duration(t){if("number"!=typeof t)throw new Error(`Type error: "duration" should be a number instead of ${typeof t}`);if(t<0)throw new Error(`Value error: "duration" should be a number > 0, but received instead ${t}`);return t}get delay(){return this.opts.delay?this.opts.delay:500}set delay(t){if("number"!=typeof t)throw new Error(`Type error: "duration" should be a number instead of ${typeof t}`);if(t<0)throw new Error(`Value error: "duration" should be a number > 0, but received instead ${t}`);return t}get infinite(){return void 0===this.opts.infinite||this.opts.infinite}set infinite(t){if("boolean"!=typeof t)throw new TypeError(`'infinite' option should be a boolean instead of ${typeof t}`);return t}get auto(){return void 0===this.opts.auto||this.opts.auto}set auto(t){if("object"==typeof t)return t.direction?(this.autoDirection=t.direction,t):t;if("boolean"==typeof t)return!0===t?(this.autoDirection="left",{direction:"left"}):(this.autoDirection=null,{direction:null});throw new Error(`Type error: "auto" should be a boolean or an object containing direction instead of ${typeof t}`)}get autoDirection(){return"object"==typeof this.auto?this.auto.direction:"boolean"==typeof this.auto?!0===this.auto?"left":null:void 0}set autoDirection(t){if(null===t)return!1;if("string"!=typeof t)throw new TypeError(`Direction should be a string, received ${typeof t}`);if(!t.toLowerCase().includes("left")&&!t.toLowerCase().includes("right"))throw new Error(`Value error: "direction" can be 'left' or 'right', received instead: ${t}`)}get startAt(){return void 0!==this.opts.startAt?this.opts.startAt:Array.isArray(this.slides)?this.slides.length-1:this.container.children.length-1!=-1?this.container.children.length-1:0}set startAt(t){if("number"!=typeof t)throw new TypeError(`'startAt' should be a number, received instead. ${typeof t}`);if(Array.isArray(this.slides)&&this.slides.length){if(t>=this.slides.length)throw new Error("'startAt' should be a number <= the total slides counting from 0.")}else if(t>=this.container.children.length)throw new Error("'startAt' should be a number <= the total slides counting from 0.");return t}get pager(){const{opts:t}=this;let e=this.name&&`[data-for="${this.name}"]`;switch(typeof t.pager){case"boolean":const i=document.querySelector(`ul[data-carousel-pager]${null!==e?e:""}`);return!(!t.pager||!i)&&i;case"object":let r=t.pager.container;if(r instanceof HTMLElement)return r||!1;if("object"==typeof r)throw new TypeError("Container should be a html element, but received instead an object");if("string"==typeof r){if(null!==(r=document.querySelector(r+(null!==e?e:""))))return r;throw new TypeError(`${r} wasn't found in the document. Make sure the element is available in the DOM before you give me the selector.`)}default:return t.pager}}set pager(t){const{opts:e}=this;let i=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":const r=document.querySelector(`ul[data-carousel-pager]${null!==i?i:""}`);return!(!e.pager||!r)&&r;case"object":if(t.container){const e=t.container;return(e instanceof NodeList&&e.length>0||e instanceof HTMLElement)&&e}throw new TypeError(`Pager should be an object containing the container or a string, received instead ${typeof t}.`);default:throw new TypeError(`Pager should be an object containing the container or a string, received instead ${typeof t}.`)}}get pauseOnMouseEnter(){return"boolean"!=typeof this.opts.pauseOnMouseEnter||this.opts.pauseOnMouseEnter}set pauseOnMouseEnter(t){if("boolean"!=typeof t)throw new Error("Value error: warns can only be false or true");return t}get swipe(){return!this.opts.swipe||this.opts.swipe}set swipe(t){if("boolean"!=typeof t)throw new TypeError(`'swipe' should be a boolean, received instead ${typeof t}`);return t}get drag(){return!this.opts.drag||this.opts.drag}set drag(t){if("boolean"!=typeof t)throw new TypeError(`'drag' should be a boolean instead of ${typeof t}`);return t}};i(1);const s=(t,e,i)=>{return new Promise((r,n)=>{for(let s in t)if(void 0!==t[s].animate){const o=t[s].animate([e[s].from,e[s].to],i);o.onfinish=t=>{r(t)},o.onCancel=t=>{n(t)}}else setTimeout(()=>{r()},i.duration)})};var o=class extends n{constructor(t){super(t),this.pages=[]}setActivePage(){this.pages[this.current_slide].classList.remove("page-active"),this.pages[this.next_slide].classList.add("page-active")}doAnimation(t,e,i,r){const n=this.container.children.length-1;let o=t||this.direction,a=null;r&&("left"===this.direction&&(a=this.current_slide-1==-1?n:this.current_slide-1),"right"===this.direction&&(a=this.current_slide+1>n?0:this.current_slide+1));let l={current_slide:this.container.children[this.current_slide],next_slide:this.container.children[null!==a?a:this.next_slide]};const u={easing:this.easing,duration:r?this.duration/2:this.duration};this.direction;const h={current_slide:{from:{transform:`translateX(${e||0}%)`,zIndex:"2"},to:{transform:`translateX(${r?0:"left"===o?-100:100}%)`,zIndex:"2"}},next_slide:{from:{transform:`translateX(${i&&"left"===o?100-i:i&&"right"===o?e-100:"left"!==o||i?-100:100}%)`,zIndex:"1"},to:{transform:`translateX(${r&&"right"===o?-100:r&&"left"===o?100:0}%)`,zIndex:"1"}}};return r||(this.swipe_stopped=!0,this.container.children[this.current_slide].classList.remove("current-slide"),this.container.children[this.next_slide].classList.add("current-slide")),s(l,h,u)}swipeAnimation(t,e){let i=100+e,r=100-e,n=-Math.abs(i);this.container.children[this.current_slide].setAttribute("style",`transform: translateX(${t}%); z-index: 2;`),this.container.children[this.next_slide].setAttribute("style",`transform: translateX(${"left"===this.direction?r:n}%); z-index: 1;`)}generatePager(){const t=this.pager instanceof NodeList?this.pager[0]:this.pager,e=this.container.children.length-1;let i,r;for(i=0;i<=e;i++)t.insertAdjacentHTML("beforeend",``);r=t instanceof NodeList?t[0].childNodes:t.childNodes,this.pages=Array.from(r),this.pages.length>e+1&&this.pages.shift(),this.pages[this.startAt].classList.add("page-active")}generateSlides(){const t=this.container;const e=t=>`${this.slides[t].alt}`,i=t=>`${this.slides[t].html}`;for(let r=0;r<=this.slides.length-1;r++)t.insertAdjacentHTML("beforeend",``),r===this.startAt&&t.children[r].classList.add("current-slide")}setActiveSlide(){null===this.slides?(this.container.children[this.startAt].classList.add("current-slide"),this.opts.beforeAnimation&&this.beforeAnimationStarts(),this.opts.afterAnimation&&this.afterAnimationEnds()):(this.slides[this.startAt].beforeAnimation&&this.beforeAnimationStarts(),this.slides[this.startAt].afterAnimation&&this.afterAnimationEnds())}};var a=class extends o{constructor(t){if(super(t),this.pause=!1,this.current_slide=this.startAt,this.next_slide=this.startAt,this.delay_timer=0,this.duration_timer=0,this.direction=null,this.dragable=!1,this.start_x=0,this.end_x=0,this.current_continue_from=0,this.next_continue_from=0,this.swipe_stopped=!1,this.mouseenter=!1,Array.isArray(this.slides)&&this.generateSlides(),this.pager&&(this.generatePager(),this.pages.forEach(t=>{t.addEventListener("click",this.onPagerClick.bind(this))})),this.setActiveSlide(),this.auto){this.delayTimer()}this.controllers&&this.controllers.forEach(t=>{t.addEventListener("click",this.shouldPause.bind(this))}),this.container.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.container.addEventListener("mouseleave",this.onMouseLeave.bind(this)),this.drag&&(this.container.addEventListener("mousedown",this.onSwipe.bind(this)),this.container.addEventListener("mousemove",this.onSwipeStart.bind(this),{passive:!0}),this.container.addEventListener("mouseup",this.onSwipeEnd.bind(this))),this.swipe&&(this.container.addEventListener("touchstart",this.onSwipe.bind(this),{passive:!0}),this.container.addEventListener("touchmove",this.onSwipeStart.bind(this),{passive:!0}),this.container.addEventListener("touchend",this.onSwipeEnd.bind(this)))}onSwipe(t){return this.mouseenter=!0,clearTimeout(this.delay_timer),clearTimeout(this.duration_timer),!this.pause&&!this.dragable&&((this.start_x-this.end_x==0||!this.swipe_stopped)&&(this.start_x=t.clientX||t.changedTouches[0].clientX,this.dragable=!0,void(this.current_slide=null===this.current_slide?0:null!==this.next_slide?this.next_slide:this.current_slide)))}onSwipeStart(t){const e=this.container.children.length-1;if(this.mouseenter=!0,this.swipe_stopped)return!1;let i=t.target.clientWidth||t.view.clientWidth;if(this.shouldInfinite(!1),this.dragable){this.end_x=t.pageX||t.changedTouches[0].clientX,this.direction=this.start_x-this.end_x>0?"left":"right",this.shouldInfinite(!1)||(this.current_continue_from=100*(this.end_x-this.start_x)/i,this.next_continue_from=100*(this.start_x-this.end_x)/i,"left"===this.direction&&(this.next_slide=this.current_slide-1<0?e:this.current_slide-1),"right"===this.direction&&(this.next_slide=this.current_slide+1>e?0:this.current_slide+1),this.swipeAnimation(this.current_continue_from,this.next_continue_from))}}onSwipeEnd(t){const e=this.container.children.length-1;if(this.dragable=!1,this.mouseenter=!1,this.current_slide===this.next_slide)return!1;if(this.swipe_stopped||0===this.end_x)return!1;if((this.start_x-this.end_x>100||this.start_x-this.end_x<-100)&&!this.swipe_stopped)this.beforeAnimationStarts(),this.doAnimation(null,this.current_continue_from,this.next_continue_from,!1).then(()=>{this.afterAnimationEnds(),this.end_x=0,this.start_x=0,"left"===this.direction&&(this.current_slide=this.current_slide-1==-1?e:this.current_slide-1),"right"===this.direction&&(this.current_slide=this.current_slide+1>e?0:this.current_slide+1);for(let t of this.container.children)t.hasAttribute("style")&&t.removeAttribute("style")});else{this.next_slide=this.current_slide,this.end_x=0,this.start_x=0;for(let t of this.container.children)t.hasAttribute("style")&&this.doAnimation(null,this.current_continue_from,this.next_continue_from,!0).then(()=>{this.end_x=0,this.start_x=0,t.removeAttribute("style"),this.pause=!1,this.shouldRestart()})}this.mouseenter=!1}beforeAnimationStarts(){this.pause=!0,this.pager&&this.setActivePage(),Array.isArray(this.slides)&&this.slides[this.next_slide].beforeAnimation&&this.slides[this.next_slide].beforeAnimation(this.container.children[this.next_slide],this.next_slide),this.opts.beforeAnimation&&this.opts.beforeAnimation(this.container.children[this.next_slide],this.next_slide)}shouldInfinite(t,e){if(!this.infinite){if(t){if("right"===this.autoDirection){return this.next_slide===this.container.children.length-1}if("left"===this.autoDirection){return 0===this.next_slide}}else if(e){if("right"===this.direction){return this.next_slide===this.container.children.length-1}if("left"===this.direction){return 0===this.next_slide}}else if(!t&&!e){if("right"===this.direction){return this.current_slide===this.container.children.length-1}if("left"===this.direction){return 0===this.current_slide}}return!1}}shouldRestart(){if(this.mouseenter)return!1;this.auto&&this.delayTimer()}afterAnimationEnds(t){this.swipe_stopped=!1,this.pause=!0,this.auto?Array.isArray(this.slides)?"function"==typeof this.slides[this.next_slide].afterAnimation?this.slides[this.next_slide].afterAnimation(this.container.children[this.next_slide],this.next_slide).then(()=>{this.pause=!1,this.shouldRestart()}):(this.pause=!1,this.shouldRestart()):this.opts.afterAnimation?this.opts.afterAnimation(this.container.children[this.next_slide],this.next_slide).then(t=>{this.pause=!1,this.shouldRestart()}):(this.pause=!1,this.shouldRestart()):this.pause=!1}onMouseEnter(){return this.pauseOnMouseEnter&&this.auto&&(clearTimeout(this.delay_timer),this.mouseenter=!0),!1}onMouseLeave(t){this.onSwipeEnd(t),this.auto&&(clearTimeout(this.duration_timer),clearTimeout(this.delay_timer),this.mouseenter=!1,this.delayTimer())}delayTimer(t){if(this.shouldInfinite(!0))return!1;this.pause||(this.delay_timer=setTimeout(()=>{this.autoDirection&&!this.mouseenter&&this.durationTimer()},this.delay))}durationTimer(){const t=this.shouldReset(this.autoDirection);if(this.mouseenter)return!1;this.pause||(this.duration_timer=setTimeout(()=>{if(this.delayTimer(),clearTimeout(this.delay_timer),!this.infinite&&t)return clearTimeout(this.delay_timer);this.mouseenter||this.autoControl()},this.duration))}getDirection(t){return t.path.filter(t=>{if(t.attributes)return t.hasAttribute("data-carousel-controller")})[0].attributes.getNamedItem("data-carousel-controller").value}shouldPause(t){const e=this.getDirection(t),i=this.shouldReset(e);return!this.pause&&(!i&&void this.onArrowClick(t))}shouldReset(t){let e=null!==this.container&&this.container.length-1;return!!e&&("left"===t&&this.next_slide-1==-1||"right"===t&&this.next_slide+1>e)}onArrowClick(t){const e=this.getDirection(t),i=this.container.children.length-1,r=null!==this.direction&&e!==this.direction;if(this.shouldInfinite(!1,!0)&&!r)return!1;this.mouseenter=!1,r&&this.next_slide!==this.current_slide&&(this.next_slide^=this.current_slide,this.current_slide^=this.next_slide,this.next_slide^=this.current_slide,this.next_slide===this.current_slide&&(this.next_slide="left"===e?this.current_slide-1:this.current_slide+1),this.direction=e),r&&this.next_slide===this.current_slide&&("left"===e&&null!==this.current_slide&&null!==this.next_slide&&(this.next_slide=this.current_slide-1==-1?i:this.current_slide-1),"right"===e&&null!==this.current_slide&&null!==this.next_slide&&(this.next_slide=this.current_slide+1>i?0:this.current_slide+1),this.direction=e),"left"!==e||r||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide-1==-1?i:this.current_slide-1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide-1==-1?i:this.current_slide-1:(this.current_slide=null===this.current_slide?0:this.current_slide-1==-1?i:this.current_slide-1,this.next_slide=null===this.next_slide?i:0===this.current_slide?i:this.current_slide-1),this.direction=e),"right"!==e||r||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide+1>i?0:this.current_slide+1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide+1>i?0:this.current_slide+1:(this.current_slide=null===this.current_slide?0:this.current_slide+1>i?0:this.current_slide+1,this.next_slide=null===this.next_slide?1:this.current_slide+1>i?0:this.current_slide+1),this.direction=e),this.beforeAnimationStarts(),this.doAnimation().then(()=>{this.afterAnimationEnds()})}onPagerClick(t){let e,i;if(t.preventDefault(),this.pause)return!1;if(t.target.id){if(e=parseInt(t.target.id),this.current_slide=null===this.current_slide?0:this.next_slide,this.next_slide=e,i=ee+1?0:this.current_slide+1))),"left"!==this.autoDirection||t?"right"!==this.autoDirection||t||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide+1===e+1?0:this.current_slide+1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide+1===e+1?0:this.current_slide+1:(this.current_slide=null===this.current_slide?0:this.current_slide+1>e?0:this.current_slide+1,this.next_slide=null===this.next_slide?1:this.current_slide+1>e?0:this.current_slide+1)):this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide-1==-1?e:this.current_slide-1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide-1==-1?e:this.current_slide-1:(this.current_slide=null===this.current_slide?0:this.current_slide-1==-1?e:this.current_slide-1,this.next_slide=null===this.next_slide?e:0===this.current_slide?e:this.current_slide-1),this.direction=this.autoDirection,this.beforeAnimationStarts(),void this.doAnimation(this.autoDirection).then(this.afterAnimationEnds.bind(this)))):(clearTimeout(this.delay_timer),!1)}};i.d(e,"default",(function(){return l})),r();class l extends a{constructor(t){super(t)}}}]).default})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TidyCarousel=e():t.TidyCarousel=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist",i(i.s=0)}([function(t,e,i){t.exports=i(3)},function(t,e){var i,r;r={},function(t,e){function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=d}function r(){return t.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function n(e,r,n){var s=new i;return r&&(s.fill="both",s.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach((function(i){if("auto"!=e[i]){if(("number"==typeof s[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&-1==h.indexOf(e[i]))return;if("direction"==i&&-1==c.indexOf(e[i]))return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;s[i]=e[i]}})):s.duration=e,s}function s(t,e,i,r){return t<0||t>1||i<0||i>1?d:function(n){function s(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(n<=0){var o=0;return t>0?o=e/t:!e&&i>0&&(o=r/i),o*n}if(n>=1){var a=0;return i<1?a=(r-1)/(i-1):1==i&&t<1&&(a=(e-1)/(t-1)),1+a*(n-1)}for(var l=0,u=1;l=1)return 1;var r=1/t;return(i+=e*r)-i%r}}function a(t){_||(_=document.createElement("div").style),_.animationTimingFunction="",_.animationTimingFunction=t;var e=_.animationTimingFunction;if(""==e&&r())throw new TypeError(t+" is not a valid value for easing");return e}function l(t){if("linear"==t)return d;var e=y.exec(t);if(e)return s.apply(this,e.slice(1).map(Number));var i=b.exec(t);if(i)return o(Number(i[1]),m);var r=x.exec(t);return r?o(Number(r[1]),{start:f,middle:p,end:m}[r[2]]):g[t]||d}function u(t,e,i){if(null==e)return w;var r=i.delay+t+i.endDelay;return e=Math.min(i.delay+t,r)?A:E}var h="backwards|forwards|both|none".split("|"),c="reverse|alternate|alternate-reverse".split("|"),d=function(t){return t};i.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterationStart must be a non-negative number, received: "+t);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||t<0)&&r())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=l(a(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||t<0)&&r())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var f=1,p=.5,m=0,g={ease:s(.25,.1,.25,1),"ease-in":s(.42,0,1,1),"ease-out":s(0,0,.58,1),"ease-in-out":s(.42,0,.58,1),"step-start":o(1,f),"step-middle":o(1,p),"step-end":o(1,m)},_=null,v="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",y=new RegExp("cubic-bezier\\("+v+","+v+","+v+","+v+"\\)"),b=/steps\(\s*(\d+)\s*\)/,x=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,w=0,T=1,A=2,E=3;t.cloneTimingInput=function(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e},t.makeTiming=n,t.numericTimingToObject=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t},t.normalizeTimingInput=function(e,i){return n(e=t.numericTimingToObject(e),i)},t.calculateActiveDuration=function(t){return Math.abs(function(t){return 0===t.duration||0===t.iterations?0:t.duration*t.iterations}(t)/t.playbackRate)},t.calculateIterationProgress=function(t,e,i){var r=u(t,e,i),n=function(t,e,i,r,n){switch(r){case T:return"backwards"==e||"both"==e?0:null;case E:return i-n;case A:return"forwards"==e||"both"==e?t:null;case w:return null}}(t,i.fill,e,r,i.delay);if(null===n)return null;var s=function(t,e,i,r,n){var s=n;return 0===t?e!==T&&(s+=i):s+=r/t,s}(i.duration,r,i.iterations,n,i.iterationStart),o=function(t,e,i,r,n,s){var o=t===1/0?e%1:t%1;return 0!==o||i!==A||0===r||0===n&&0!==s||(o=1),o}(s,i.iterationStart,r,i.iterations,n,i.duration),a=function(t,e,i,r){return t===A&&e===1/0?1/0:1===i?Math.floor(r)-1:Math.floor(r)}(r,i.iterations,o,s),l=function(t,e,i){var r=t;if("normal"!==t&&"reverse"!==t){var n=e;"alternate-reverse"===t&&(n+=1),r="normal",n!==1/0&&n%2!=0&&(r="reverse")}return"normal"===r?i:1-i}(i.direction,a,o);return i._easingFunction(l)},t.calculatePhase=u,t.normalizeEasing=a,t.parseEasingFunction=l}(i={}),function(t,e){function i(t,e){return t in l&&l[t][e]||e}function r(t,e,r){if(!function(t){return"display"===t||0===t.lastIndexOf("animation",0)||0===t.lastIndexOf("transition",0)}(t)){var n=s[t];if(n)for(var a in o.style[t]=e,n){var l=n[a],u=o.style[l];r[l]=i(l,u)}else r[t]=i(t,e)}}function n(t){var e=[];for(var i in t)if(!(i in["easing","offset","composite"])){var r=t[i];Array.isArray(r)||(r=[r]);for(var n,s=r.length,o=0;o1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==n){if("add"==s||"accumulate"==s)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=s)throw new TypeError("Invalid composite mode "+s+".")}else s="easing"==n?t.normalizeEasing(s):""+s;r(n,s,i)}return null==i.offset&&(i.offset=null),null==i.easing&&(i.easing="linear"),i})),s=!0,o=-1/0,a=0;a=0&&t.offset<=1})),s||function(){var t=i.length;null==i[t-1].offset&&(i[t-1].offset=1),t>1&&null==i[0].offset&&(i[0].offset=0);for(var e=0,r=i[0].offset,n=1;n=t.applyFrom&&ithis._surrogateStyle.length;)this._length--,Object.defineProperty(this,this._length,{configurable:!0,enumerable:!1,value:void 0})},_set:function(e,i){this._style[e]=i,this._isAnimatedProperty[e]=!0,this._updateSvgTransformAttr&&"transform"==t.unprefixedPropertyName(e)&&(null==this._savedTransformAttr&&(this._savedTransformAttr=this._element.getAttribute("transform")),this._element.setAttribute("transform",t.transformToSvgMatrix(i)))},_clear:function(e){this._style[e]=this._surrogateStyle[e],this._updateSvgTransformAttr&&"transform"==t.unprefixedPropertyName(e)&&(this._savedTransformAttr?this._element.setAttribute("transform",this._savedTransformAttr):this._element.removeAttribute("transform"),this._savedTransformAttr=null),delete this._isAnimatedProperty[e]}},a)r.prototype[u]=function(t,e){return function(){var i=this._surrogateStyle[t].apply(this._surrogateStyle,arguments);return e&&(this._isAnimatedProperty[arguments[0]]||this._style[t].apply(this._style,arguments),this._updateIndices()),i}}(u,u in l);for(var h in document.documentElement.style)h in o||h in a||function(t){i(r.prototype,t,{get:function(){return this._surrogateStyle[t]},set:function(e){this._surrogateStyle[t]=e,this._updateIndices(),this._isAnimatedProperty[t]||(this._style[t]=e)}})}(h);t.apply=function(e,i,r){n(e),e.style._set(t.propertyName(i),r)},t.clear=function(e,i){e._webAnimationsPatchedStyle&&e.style._clear(t.propertyName(i))}}(r),function(t){window.Element.prototype.animate=function(e,i){var r="";return i&&i.id&&(r=i.id),t.timeline._play(t.KeyframeEffect(this,e,i,r))}}(r),function(t,e){t.Interpolation=function(t,e,i){return function(r){return i(function t(e,i,r){if("number"==typeof e&&"number"==typeof i)return e*(1-r)+i*r;if("boolean"==typeof e&&"boolean"==typeof i)return r<.5?e:i;if(e.length==i.length){for(var n=[],s=0;s0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),e.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var i=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)),null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,e.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),e.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){if(this._isFinished){if(!this._finishedFlag){var e=new r(this,this._currentTime,t),i=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout((function(){i.forEach((function(t){t.call(e.target,e)}))}),0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();-1===t.indexOf(this)&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}}}(i,r),function(t,e,i){function r(t){var e=u;u=[],t1e-4?(g=.5/Math.sqrt(v),_=[(d[2][1]-d[1][2])*g,(d[0][2]-d[2][0])*g,(d[1][0]-d[0][1])*g,.25/g]):d[0][0]>d[1][1]&&d[0][0]>d[2][2]?_=[.25*(g=2*Math.sqrt(1+d[0][0]-d[1][1]-d[2][2])),(d[0][1]+d[1][0])/g,(d[0][2]+d[2][0])/g,(d[2][1]-d[1][2])/g]:d[1][1]>d[2][2]?(g=2*Math.sqrt(1+d[1][1]-d[0][0]-d[2][2]),_=[(d[0][1]+d[1][0])/g,.25*g,(d[1][2]+d[2][1])/g,(d[0][2]-d[2][0])/g]):(g=2*Math.sqrt(1+d[2][2]-d[0][0]-d[1][1]),_=[(d[0][2]+d[2][0])/g,(d[1][2]+d[2][1])/g,.25*g,(d[1][0]-d[0][1])/g]),[c,f,p,_,u]}}();t.dot=i,t.makeMatrixDecomposition=function(t){return[a(o(t))]},t.transformListToMatrix=o}(r),function(t){function e(t,e){var i=t.exec(e);if(i)return[i=t.ignoreCase?i[0].toLowerCase():i[0],e.substr(i.length)]}function i(t,e){var i=t(e=e.replace(/^\s*/,""));if(i)return[i[0],i[1].replace(/^\s*/,"")]}function r(t,e,i,r,n){for(var s=[],o=[],a=[],l=function(t,e){for(var i=t,r=e;i&&r;)i>r?i%=r:r%=i;return t*e/(i+r)}(r.length,n.length),u=0;u=1?e:"visible"}]}),["visibility"])}(r),function(t,e){function i(t){t=t.trim(),s.fillStyle="#000",s.fillStyle=t;var e=s.fillStyle;if(s.fillStyle="#fff",s.fillStyle=t,e==s.fillStyle){s.fillRect(0,0,1,1);var i=s.getImageData(0,0,1,1).data;s.clearRect(0,0,1,1);var r=i[3]/255;return[i[0]*r,i[1]*r,i[2]*r,r]}}function r(e,i){return[e,i,function(e){function i(t){return Math.max(0,Math.min(255,t))}if(e[3])for(var r=0;r<3;r++)e[r]=Math.round(i(e[r]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=n.height=1;var s=n.getContext("2d");t.addPropertiesHandler(i,r,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,i),t.mergeColors=r}(r),function(t,e){function i(t){function e(){var e=o.exec(t);s=e?e[0]:void 0}function i(){if("("!==s)return function(){var t=Number(s);return e(),t}();e();var t=n();return")"!==s?NaN:(e(),t)}function r(){for(var t=i();"*"===s||"/"===s;){var r=s;e();var n=i();"*"===r?t*=n:t/=n}return t}function n(){for(var t=r();"+"===s||"-"===s;){var i=s;e();var n=r();"+"===i?t+=n:t-=n}return t}var s,o=/([\+\-\w\.]+|[\(\)\*\/])/g;return e(),n()}function r(t,e){if("0"==(e=e.trim().toLowerCase())&&"px".search(t)>=0)return{px:0};if(/^[^(]*$|^calc/.test(e)){e=e.replace(/calc\(/g,"(");var r={};e=e.replace(t,(function(t){return r[t]=null,"U"+t}));for(var n="U("+t.source+")",s=e.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+n,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),o=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],a=0;a1?"calc("+i+")":i}]}var o="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",a=r.bind(null,new RegExp(o,"g")),l=r.bind(null,new RegExp(o+"|%","g")),u=r.bind(null,/deg|rad|grad|turn/g);t.parseLength=a,t.parseLengthOrPercent=l,t.consumeLengthOrPercent=t.consumeParenthesised.bind(null,l),t.parseAngle=u,t.mergeDimensions=s;var h=t.consumeParenthesised.bind(null,a),c=t.consumeRepeated.bind(void 0,h,/^/),d=t.consumeRepeated.bind(void 0,c,/^,/);t.consumeSizePairList=d;var f=t.mergeNestedRepeated.bind(void 0,n," "),p=t.mergeNestedRepeated.bind(void 0,f,",");t.mergeNonNegativeSizePair=f,t.addPropertiesHandler((function(t){var e=d(t);if(e&&""==e[1])return e[0]}),p,["background-size"]),t.addPropertiesHandler(l,n,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),t.addPropertiesHandler(l,s,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(r),function(t,e){function i(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function r(e){var r=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,i,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],e);if(r&&4==r[0].length)return r[0]}var n=t.mergeWrappedNestedRepeated.bind(null,(function(t){return"rect("+t+")"}),(function(e,i){return"auto"==e||"auto"==i?[!0,!1,function(r){var n=r?e:i;if("auto"==n)return"auto";var s=t.mergeDimensions(n,n);return s[2](s[0])}]:t.mergeDimensions(e,i)}),", ");t.parseBox=r,t.mergeBoxes=n,t.addPropertiesHandler(r,n,["clip"])}(r),function(t,e){function i(t){return function(e){var i=0;return t.map((function(t){return t===u?e[i++]:t}))}}function r(t){return t}function n(e){if("none"==(e=e.toLowerCase().trim()))return[];for(var i,r=/\s*(\w+)\(([^)]*)\)/g,n=[],s=0;i=r.exec(e);){if(i.index!=s)return;s=i.index+i[0].length;var o=i[1],a=d[o];if(!a)return;var l=i[2].split(","),u=a[0];if(u.length900||e%100!=0))return e}),(function(t,i){return[t,i,e]}),["font-weight"])}(r),function(t){function e(t){var e={};for(var i in t)e[i]=-t[i];return e}function i(e){return t.consumeToken(/^(left|center|right|top|bottom)\b/i,e)||t.consumeLengthOrPercent(e)}function r(e,r){var n=t.consumeRepeated(i,/^/,r);if(n&&""==n[1]){var o=n[0];if(o[0]=o[0]||"center",o[1]=o[1]||"center",3==e&&(o[2]=o[2]||{px:0}),o.length==e){if(/top|bottom/.test(o[0])||/left|right/.test(o[1])){var a=o[0];o[0]=o[1],o[1]=a}if(/left|right|center|Object/.test(o[0])&&/top|bottom|center|Object/.test(o[1]))return o.map((function(t){return"object"==typeof t?t:s[t]}))}}}function n(r){var n=t.consumeRepeated(i,/^/,r);if(n){for(var o=n[0],a=[{"%":50},{"%":50}],l=0,u=!1,h=0;h=0&&this._cancelHandlers.splice(i,1)}else l.call(this,t,e)},s}}}(),function(t){var e=document.documentElement,i=null,r=!1;try{var n="0"==getComputedStyle(e).getPropertyValue("opacity")?"1":"0";(i=e.animate({opacity:[n,n]},{duration:1})).currentTime=0,r=getComputedStyle(e).getPropertyValue("opacity")==n}catch(t){}finally{i&&i.cancel()}if(!r){var s=window.Element.prototype.animate;window.Element.prototype.animate=function(e,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||null===e||(e=t.convertToArrayForm(e)),s.call(this,e,i)}}}(i)},function(t,e,i){},function(t,e,i){"use strict";i.r(e);var r=()=>{"path"in Event.prototype||Object.defineProperty(Event.prototype,"path",{get:function(){const t=[];let e=this.target;for(;e;)t.push(e),e=e.parentElement;return-1===t.indexOf(window)&&-1===t.indexOf(document)&&t.push(document),-1===t.indexOf(window)&&t.push(window),t}})};var n=class{constructor(t){this.opts=t||{};for(let t in this.opts)t&&(this[t]=this.opts[t])}get name(){return void 0!==this.opts.name?this.opts.name:null}set name(t){if("string"!=typeof t)throw new TypeError(`Opts.name should be a string, but received instead ${typeof t}`);return t}get container(){const{opts:{container:t}}=this,e=this.name&&`[data-name="${this.name}"]`;switch(typeof t){case"string":return document.querySelector(`${t+(null!==e?e:"")}`);case"object":return t;default:return document.querySelector(`.tidy__carousel${null!==e?e:""}`)}}set container(t){let e;const i=this.name&&`[data-name="${this.name}"]`;switch(typeof t){case"string":if(null===(e=document.querySelector(t+(null!==i?i:""))))throw new TypeError(`Could not find any maching element for "${t}" with the name ${this.name}. Make sure the element is loaded before initializing.`);return e;case"object":if(null===t)throw new TypeError("Please make sure the container element is loaded before initialization.");if(!t instanceof HTMLElement)throw new TypeError("'container' should be a instance of an html element, but received instead other type of object.");if(!t.children.length>2)throw new Error(`The container should have at least two children elements but it has instead ${t.length}`);return t;default:throw new TypeError(`'"container" should be a string (pseudo selector) or boolean, received instead ${typeof t}'`)}}get slides(){if(!this.opts.slides&&!this.container.children.length)throw new Error("Can't find any slides");return this.opts.slides?this.opts.slides:null}set slides(t){if(!Array.isArray(t))throw new TypeError(`The slides it should be an array. Received instead ${typeof t}`);return t}get controllers(){const{opts:{controllers:t}}=this;let e,i=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":return e=document.querySelectorAll(`[data-carousel-controller]${null!==i?i:""}`),!!t&&e;case"string":return e=document.querySelectorAll(`${t+(null!==i?i:"")}`);case"object":return t instanceof HTMLCollection?Array.from(t):t;case"undefined":return e=null!==(e=document.querySelectorAll(`[data-carousel-controller]${null!==i?i:""}`))&&Array.from(e);default:throw new TypeError("controllers can only have the following types: string, array/Nodelist")}}set controllers(t){const{opts:{controllers:e}}=this;let i,r=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":if(i=document.querySelectorAll(`[carousel-controller]${null!==r?r:""}`),t&&!i.length)throw new TypeError("Could not find any element containing the attribute of carousel-controller. Bind this attribute [carousel-controller] to an element specify the value lef/right.");return!(!t||!i)&&i;case"string":if((i=document.querySelectorAll(`${e+(null!==r?r:"")}`)).length)return i.forEach(t=>{if(!t.hasAttribute("carousel-controller"))throw new TypeError("The controllers selected doesn't have the attribute 'carousel-controller'. Set this attribute to a string left/right");if(t.hasAttribute("carousel-controller")&&""===t.attributes["carousel-controller"].value)throw new TypeError("The controllers selected doesn't have the attribute 'carousel-controller'. Set this attribute to a string left/right")}),i;throw new TypeError("Could not find any element containing the attribute of carousel-controller. Bind this attribute [carousel-controller] to an element specify the value lef/right.");case"object":if(t instanceof NodeList||Array.isArray(t))return t;if(t instanceof HTMLCollection)return Array.from(t);throw new TypeError("controllers can only have the following types: string, array/Nodelist");default:throw new TypeError("controllers can only have the following types: string, array/Nodelist")}}get easing(){return this.opts.easing?this.opts.easing:"ease"}set easing(t){if("string"!=typeof t)throw new TypeError(`'easing' should be a string, received instead ${typeof t}`);return t}get duration(){return this.opts.duration?this.opts.duration:500}set duration(t){if("number"!=typeof t)throw new Error(`Type error: "duration" should be a number instead of ${typeof t}`);if(t<0)throw new Error(`Value error: "duration" should be a number > 0, but received instead ${t}`);return t}get delay(){return this.opts.delay?this.opts.delay:500}set delay(t){if("number"!=typeof t)throw new Error(`Type error: "duration" should be a number instead of ${typeof t}`);if(t<0)throw new Error(`Value error: "duration" should be a number > 0, but received instead ${t}`);return t}get infinite(){return void 0===this.opts.infinite||this.opts.infinite}set infinite(t){if("boolean"!=typeof t)throw new TypeError(`'infinite' option should be a boolean instead of ${typeof t}`);return t}get auto(){return void 0===this.opts.auto||this.opts.auto}set auto(t){if("object"==typeof t)return t.direction?(this.autoDirection=t.direction,t):t;if("boolean"==typeof t)return!0===t?(this.autoDirection="left",{direction:"left"}):(this.autoDirection=null,{direction:null});throw new Error(`Type error: "auto" should be a boolean or an object containing direction instead of ${typeof t}`)}get autoDirection(){return"object"==typeof this.auto?this.auto.direction:"boolean"==typeof this.auto?!0===this.auto?"left":null:void 0}set autoDirection(t){if(null===t)return!1;if("string"!=typeof t)throw new TypeError(`Direction should be a string, received ${typeof t}`);if(!t.toLowerCase().includes("left")&&!t.toLowerCase().includes("right"))throw new Error(`Value error: "direction" can be 'left' or 'right', received instead: ${t}`)}get startAt(){return void 0!==this.opts.startAt?this.opts.startAt:Array.isArray(this.slides)?this.slides.length-1:this.container.children.length-1!=-1?this.container.children.length-1:0}set startAt(t){if("number"!=typeof t)throw new TypeError(`'startAt' should be a number, received instead. ${typeof t}`);if(Array.isArray(this.slides)&&this.slides.length){if(t>=this.slides.length)throw new Error("'startAt' should be a number <= the total slides counting from 0.")}else if(t>=this.container.children.length)throw new Error("'startAt' should be a number <= the total slides counting from 0.");return t}get pager(){const{opts:t}=this;let e=this.name&&`[data-for="${this.name}"]`;switch(typeof t.pager){case"boolean":const i=document.querySelector(`ul[data-carousel-pager]${null!==e?e:""}`);return!(!t.pager||!i)&&i;case"object":let r=t.pager.container;if(r instanceof HTMLElement)return r||!1;if("object"==typeof r)throw new TypeError("Container should be a html element, but received instead an object");if("string"==typeof r){if(null!==(r=document.querySelector(r+(null!==e?e:""))))return r;throw new TypeError(`${r} wasn't found in the document. Make sure the element is available in the DOM before you give me the selector.`)}default:return t.pager}}set pager(t){const{opts:e}=this;let i=this.name&&`[data-for="${this.name}"]`;switch(typeof t){case"boolean":const r=document.querySelector(`ul[data-carousel-pager]${null!==i?i:""}`);return!(!e.pager||!r)&&r;case"object":if(t.container){const e=t.container;return(e instanceof NodeList&&e.length>0||e instanceof HTMLElement)&&e}throw new TypeError(`Pager should be an object containing the container or a string, received instead ${typeof t}.`);default:throw new TypeError(`Pager should be an object containing the container or a string, received instead ${typeof t}.`)}}get pauseOnMouseEnter(){return"boolean"!=typeof this.opts.pauseOnMouseEnter||this.opts.pauseOnMouseEnter}set pauseOnMouseEnter(t){if("boolean"!=typeof t)throw new Error("Value error: warns can only be false or true");return t}get swipe(){return!this.opts.swipe||this.opts.swipe}set swipe(t){if("boolean"!=typeof t)throw new TypeError(`'swipe' should be a boolean, received instead ${typeof t}`);return t}get drag(){return!this.opts.drag||this.opts.drag}set drag(t){if("boolean"!=typeof t)throw new TypeError(`'drag' should be a boolean instead of ${typeof t}`);return t}};i(1);const s=(t,e,i)=>{return new Promise((r,n)=>{for(let s in t)if(void 0!==t[s].animate){const o=t[s].animate([e[s].from,e[s].to],i);o.onfinish=t=>{r(t)},o.onCancel=t=>{n(t)}}else setTimeout(()=>{r()},i.duration)})};var o=class extends n{constructor(t){super(t),this.pages=[]}setActivePage(){this.pages[this.current_slide].classList.remove("page-active"),this.pages[this.next_slide].classList.add("page-active")}doAnimation(t,e,i,r){const n=this.container.children.length-1;let o=t||this.direction,a=null;r&&("left"===this.direction&&(a=this.current_slide-1==-1?n:this.current_slide-1),"right"===this.direction&&(a=this.current_slide+1>n?0:this.current_slide+1));let l={current_slide:this.container.children[this.current_slide],next_slide:this.container.children[null!==a?a:this.next_slide]};const u={easing:this.easing,duration:r?this.duration/2:this.duration};this.direction;const h={current_slide:{from:{transform:`translateX(${e||0}%)`,zIndex:"2"},to:{transform:`translateX(${r?0:"left"===o?-100:100}%)`,zIndex:"2"}},next_slide:{from:{transform:`translateX(${i&&"left"===o?100-i:i&&"right"===o?e-100:"left"!==o||i?-100:100}%)`,zIndex:"1"},to:{transform:`translateX(${r&&"right"===o?-100:r&&"left"===o?100:0}%)`,zIndex:"1"}}};return r||(this.swipe_stopped=!0,this.container.children[this.current_slide].classList.remove("current-slide"),this.container.children[this.next_slide].classList.add("current-slide")),s(l,h,u)}swipeAnimation(t,e){let i=100+e,r=100-e,n=-Math.abs(i);this.container.children[this.current_slide].setAttribute("style",`transform: translateX(${t}%); z-index: 2;`),this.container.children[this.next_slide].setAttribute("style",`transform: translateX(${"left"===this.direction?r:n}%); z-index: 1;`)}generatePager(){const t=this.pager instanceof NodeList?this.pager[0]:this.pager,e=this.container.children.length-1;let i,r;for(i=0;i<=e;i++)t.insertAdjacentHTML("beforeend",``);r=t instanceof NodeList?t[0].childNodes:t.childNodes,this.pages=Array.from(r),this.pages.length>e+1&&this.pages.shift(),this.pages[this.startAt].classList.add("page-active")}generateSlides(){const t=this.container;const e=t=>`${this.slides[t].alt}`,i=t=>`${this.slides[t].html}`;for(let r=0;r<=this.slides.length-1;r++)t.insertAdjacentHTML("beforeend",``),r===this.startAt&&t.children[r].classList.add("current-slide")}setActiveSlide(){null===this.slides?(this.container.children[this.startAt].classList.add("current-slide"),this.opts.beforeAnimation&&this.beforeAnimationStarts(),this.opts.afterAnimation&&this.afterAnimationEnds()):(this.slides[this.startAt].beforeAnimation&&this.beforeAnimationStarts(),this.slides[this.startAt].afterAnimation&&this.afterAnimationEnds())}};var a=class extends o{constructor(t){if(super(t),this.pause=!1,this.current_slide=this.startAt,this.next_slide=this.startAt,this.delay_timer=0,this.duration_timer=0,this.direction=null,this.dragable=!1,this.start_x=0,this.end_x=0,this.current_continue_from=0,this.next_continue_from=0,this.swipe_stopped=!1,this.mouseenter=!1,Array.isArray(this.slides)&&this.generateSlides(),this.pager&&(this.generatePager(),this.pages.forEach(t=>{t.addEventListener("click",this.onPagerClick.bind(this))})),this.setActiveSlide(),this.auto){this.delayTimer()}this.controllers&&this.controllers.forEach(t=>{t.addEventListener("click",this.shouldPause.bind(this))}),this.container.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.container.addEventListener("mouseleave",this.onMouseLeave.bind(this)),this.drag&&(this.container.addEventListener("mousedown",this.onSwipe.bind(this)),this.container.addEventListener("mousemove",this.onSwipeStart.bind(this),{passive:!0}),this.container.addEventListener("mouseup",this.onSwipeEnd.bind(this))),this.swipe&&(this.container.addEventListener("touchstart",this.onSwipe.bind(this),{passive:!0}),this.container.addEventListener("touchmove",this.onSwipeStart.bind(this),{passive:!0}),this.container.addEventListener("touchend",this.onSwipeEnd.bind(this)))}onSwipe(t){return this.mouseenter=!0,clearTimeout(this.delay_timer),clearTimeout(this.duration_timer),!this.pause&&!this.dragable&&((this.start_x-this.end_x==0||!this.swipe_stopped)&&(this.start_x=t.clientX||t.changedTouches[0].clientX,this.dragable=!0,void(this.current_slide=null===this.current_slide?0:null!==this.next_slide?this.next_slide:this.current_slide)))}onSwipeStart(t){const e=this.container.children.length-1;if(this.mouseenter=!0,this.swipe_stopped)return!1;let i=t.target.clientWidth||t.view.clientWidth;if(this.shouldInfinite(!1),this.dragable){this.end_x=t.pageX||t.changedTouches[0].clientX,this.direction=this.start_x-this.end_x>0?"left":"right",this.shouldInfinite(!1)||(this.current_continue_from=100*(this.end_x-this.start_x)/i,this.next_continue_from=100*(this.start_x-this.end_x)/i,"left"===this.direction&&(this.next_slide=this.current_slide-1<0?e:this.current_slide-1),"right"===this.direction&&(this.next_slide=this.current_slide+1>e?0:this.current_slide+1),this.swipeAnimation(this.current_continue_from,this.next_continue_from))}}onSwipeEnd(t){const e=this.container.children.length-1;if(this.dragable=!1,this.mouseenter=!1,this.current_slide===this.next_slide)return!1;if(this.swipe_stopped||0===this.end_x)return!1;if((this.start_x-this.end_x>100||this.start_x-this.end_x<-100)&&!this.swipe_stopped)this.beforeAnimationStarts(),this.doAnimation(null,this.current_continue_from,this.next_continue_from,!1).then(()=>{this.afterAnimationEnds(),this.end_x=0,this.start_x=0,"left"===this.direction&&(this.current_slide=this.current_slide-1==-1?e:this.current_slide-1),"right"===this.direction&&(this.current_slide=this.current_slide+1>e?0:this.current_slide+1);for(let t of this.container.children)t.hasAttribute("style")&&t.removeAttribute("style")});else{this.next_slide=this.current_slide,this.end_x=0,this.start_x=0;for(let t of this.container.children)t.hasAttribute("style")&&this.doAnimation(null,this.current_continue_from,this.next_continue_from,!0).then(()=>{this.end_x=0,this.start_x=0,t.removeAttribute("style"),this.pause=!1,this.shouldRestart()})}this.mouseenter=!1}beforeAnimationStarts(){this.pause=!0,this.pager&&this.setActivePage(),Array.isArray(this.slides)&&this.slides[this.next_slide].beforeAnimation&&this.slides[this.next_slide].beforeAnimation(this.container.children[this.next_slide],this.next_slide),this.opts.beforeAnimation&&this.opts.beforeAnimation(this.container.children[this.next_slide],this.next_slide)}shouldInfinite(t,e){if(!this.infinite){if(t){if("right"===this.autoDirection){return this.next_slide===this.container.children.length-1}if("left"===this.autoDirection){return 0===this.next_slide}}else if(e){if("right"===this.direction){return this.next_slide===this.container.children.length-1}if("left"===this.direction){return 0===this.next_slide}}else if(!t&&!e){if("right"===this.direction){return this.current_slide===this.container.children.length-1}if("left"===this.direction){return 0===this.current_slide}}return!1}}shouldRestart(){if(this.mouseenter)return!1;this.auto&&this.delayTimer()}afterAnimationEnds(t){this.swipe_stopped=!1,this.pause=!0,this.auto?Array.isArray(this.slides)?"function"==typeof this.slides[this.next_slide].afterAnimation?this.slides[this.next_slide].afterAnimation(this.container.children[this.next_slide],this.next_slide).then(()=>{this.pause=!1,this.shouldRestart()}):(this.pause=!1,this.shouldRestart()):this.opts.afterAnimation?this.opts.afterAnimation(this.container.children[this.next_slide],this.next_slide).then(t=>{this.pause=!1,this.shouldRestart()}):(this.pause=!1,this.shouldRestart()):this.pause=!1}onMouseEnter(){return this.pauseOnMouseEnter&&this.auto&&(clearTimeout(this.delay_timer),this.mouseenter=!0),!1}onMouseLeave(t){this.onSwipeEnd(t),this.auto&&(clearTimeout(this.duration_timer),clearTimeout(this.delay_timer),this.mouseenter=!1,this.delayTimer())}delayTimer(t){if(this.shouldInfinite(!0))return!1;this.pause||(this.delay_timer=setTimeout(()=>{this.autoDirection&&!this.mouseenter&&this.durationTimer()},this.delay))}durationTimer(){const t=this.shouldReset(this.autoDirection);if(this.mouseenter)return!1;this.pause||(this.duration_timer=setTimeout(()=>{if(this.delayTimer(),clearTimeout(this.delay_timer),!this.infinite&&t)return clearTimeout(this.delay_timer);this.mouseenter||this.autoControl()},this.duration))}getDirection(t){return t.path.filter(t=>{if(t.attributes)return t.hasAttribute("data-carousel-controller")})[0].attributes.getNamedItem("data-carousel-controller").value}shouldPause(t){const e=this.getDirection(t),i=this.shouldReset(e);return!this.pause&&(!i&&void this.onArrowClick(t))}shouldReset(t){let e=null!==this.container&&this.container.length-1;return!!e&&("left"===t&&this.next_slide-1==-1||"right"===t&&this.next_slide+1>e)}onArrowClick(t){const e=this.getDirection(t),i=this.container.children.length-1,r=null!==this.direction&&e!==this.direction;if(this.shouldInfinite(!1,!0)&&!r)return!1;this.mouseenter=!1,r&&this.next_slide!==this.current_slide&&(this.next_slide^=this.current_slide,this.current_slide^=this.next_slide,this.next_slide^=this.current_slide,this.next_slide===this.current_slide&&(this.next_slide="left"===e?this.current_slide-1:this.current_slide+1),this.direction=e),r&&this.next_slide===this.current_slide&&("left"===e&&null!==this.current_slide&&null!==this.next_slide&&(this.next_slide=this.current_slide-1==-1?i:this.current_slide-1),"right"===e&&null!==this.current_slide&&null!==this.next_slide&&(this.next_slide=this.current_slide+1>i?0:this.current_slide+1),this.direction=e),"left"!==e||r||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide-1==-1?i:this.current_slide-1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide-1==-1?i:this.current_slide-1:(this.current_slide=null===this.current_slide?0:this.current_slide-1==-1?i:this.current_slide-1,this.next_slide=null===this.next_slide?i:0===this.current_slide?i:this.current_slide-1),this.direction=e),"right"!==e||r||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide+1>i?0:this.current_slide+1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide+1>i?0:this.current_slide+1:(this.current_slide=null===this.current_slide?0:this.current_slide+1>i?0:this.current_slide+1,this.next_slide=null===this.next_slide?1:this.current_slide+1>i?0:this.current_slide+1),this.direction=e),this.beforeAnimationStarts(),this.doAnimation().then(()=>{this.afterAnimationEnds()})}onPagerClick(t){let e,i;if(t.preventDefault(),this.pause)return!1;if(t.target.id){if(e=parseInt(t.target.id),this.current_slide=null===this.current_slide?0:this.next_slide,this.next_slide=e,i=ee+1?0:this.current_slide+1))),"left"!==this.autoDirection||t?"right"!==this.autoDirection||t||(this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide+1===e+1?0:this.current_slide+1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide+1===e+1?0:this.current_slide+1:(this.current_slide=null===this.current_slide?0:this.current_slide+1>e?0:this.current_slide+1,this.next_slide=null===this.next_slide?1:this.current_slide+1>e?0:this.current_slide+1)):this.current_slide&&null===this.next_slide?this.next_slide=this.current_slide-1==-1?e:this.current_slide-1:this.next_slide===this.current_slide&&null!==this.current_slide&&null!==this.next_slide?this.next_slide=this.current_slide-1==-1?e:this.current_slide-1:(this.current_slide=null===this.current_slide?0:this.current_slide-1==-1?e:this.current_slide-1,this.next_slide=null===this.next_slide?e:0===this.current_slide?e:this.current_slide-1),this.direction=this.autoDirection,this.beforeAnimationStarts(),void this.doAnimation(this.autoDirection).then(this.afterAnimationEnds.bind(this)))):(clearTimeout(this.delay_timer),!1)}};i(2);i.d(e,"default",(function(){return l})),r();class l extends a{constructor(t){super(t)}}}]).default})); \ No newline at end of file diff --git a/package.json b/package.json index 02a5e01..6d07ebc 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "./dist/tidy-carousel.min.js", "unpkg": "./dist/tidy-carousel.min.js", "module": "./dist/tidy-carousel.min.js", + "homepage": "http://tidy-carousel.com", "keywords": [ "carousel", "slider", diff --git a/readme.md b/readme.md index 05c7eca..b0ee799 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,9 @@ # ****Tidy carousel**** [![Build Status](https://travis-ci.com/dorultan/tidy-carousel.svg?branch=master)](https://travis-ci.com/dorultan/tidy-carousel) This is a simple UI widget mobile-friendly, responsive built in vanilla javascript (es2015+) for modern browsers. Tidy carousel is inspired by a card deck as multiple slides stack together and based on an event an element is picked transforming its x-axis using percentage. Tidy carousel is also highly -configurable (See [config](http://localhost:8080/documentation/configuration)) -having features such as [mouse drag](http://localhost:8080/documentation/configuration), - [swipe](http://localhost:8080/documentation/configuration), -[pager](http://localhost:8080/documentation/configuration), -[infinite sliding](http://localhost:8080/documentation/configuration) -and [more](http://localhost:8080/documentation/configuration). +configurable (See [config](http:/tidy-carousel.com/documentation/configuration) +having features such as mouse drag, swipe, pager, infinite sliding +and [more](http://tidy-carousel.com/documentation/configuration). ## ****Installation**** @@ -20,7 +17,7 @@ Using yarn: Using unpkg: -`` +`` ## ****Configuration.****