{"version":3,"sources":["scroll.js"],"names":["require","Error","code","exports","call","length","window","ntaraScroll","arguments","Timer","innerWidth","classList","contains","prepend","lastChild","addEventListener","stop","start","Object","defineProperty","value","setInterval","clearInterval","reset"],"mappings":"AAAA,CAAC,UAAU,CAAC,iBAAiB,CAAC,eAAe,CAAC,GAAG,CAAC,IAAJ,CAAS,CAAC,GAAG,CAAC,IAAJ,CAAS,CAAC,GAAI,GAAE,YAAY,MAAOA,QAAnB,EAA4BA,OAAlC,CAA0C,GAAG,KAAH,CAAS,MAAO,KAAI,CAAC,CAAL,CAAP,CAAe,KAAK,MAAO,KAAI,CAAC,CAAL,CAAP,CAAe,GAAI,GAAE,GAAIC,MAAJ,CAAU,yBAAyB,GAAnC,CAAN,CAA8C,KAAM,GAAEC,IAAF,CAAO,kBAAP,EAA4B,IAAI,GAAE,KAAK,CAACC,UAAD,CAAX,CAAwB,KAAK,CAAL,EAAQC,IAAR,CAAa,EAAED,OAAf,CAAuB,WAAW,CAAC,GAAI,GAAE,KAAK,CAAL,IAAN,CAAiB,MAAO,GAAE,IAAF,CAAQ,CAAnE,GAAsE,EAAEA,OAAxE,SAAyF,OAAO,MAAKA,OAAQ,KAAI,GAAI,GAAE,YAAY,MAAOH,QAAnB,EAA4BA,OAAlC,CAA0C,EAAE,CAAhD,CAAkD,EAAE,EAAEK,MAAtD,CAA6D,GAA7D,CAAiE,EAAE,IAAF,EAAQ,QAAS,SAAS,CAAxc,IAA4c,CAAC,EAAE,CAAC,WAAgC,CAChf,aAEA,GAAI,GAAS,EAAQ,oBAAR,CAAb,CAIAC,OAAOC,WAAP,CAAqB,WAAmB,IACnC,GAA0B,CAAnB,WAAUF,MAAV,EAAwBG,UAAU,CAAV,UAAxB,CAAqDA,UAAU,CAAV,CAArD,IAD4B,CAEnC,EAAkC,CAAnB,WAAUH,MAAV,EAAwBG,UAAU,CAAV,UAAvC,EAAoEA,UAAU,CAAV,CAFjC,CAGnC,EAAgC,CAAnB,WAAUH,MAAV,EAAwBG,UAAU,CAAV,UAArC,EAAkEA,UAAU,CAAV,CAH/B,CAKnC,GALmC,CAOnC,EAAU,GAAI,GAAOC,KAAX,CAAiB,UAAY,CAClB,IAApB,QAAOC,UAAP,KAA0C,EAAQC,SAAR,CAAkBC,QAAlB,CAA2B,aAA3B,CADJ,EAI1C,EAAWC,OAAX,CAAmB,EAAQC,SAA3B,CACA,CALa,GAPyB,KActC,EAAWC,gBAAX,CAA4B,WAA5B,CAAyC,UAAY,CACpD,EAAQC,IAAR,EACA,CAFD,CAdsC,CAiBtC,EAAWD,gBAAX,CAA4B,UAA5B,CAAwC,UAAY,CACnD,EAAQE,KAAR,EACA,CAFD,CAjBsC,CAqBvC,CAEA,CA9B8c,0BAAH,CA8Bhb,EAAE,CAAC,eAAgC,CAC/D,aAoBAC,OAAOC,cAAP,GAA+B,YAA/B,CAA6C,CAC5CC,QAD4C,CAA7C,CArB+D,CAwB/D,EAAQX,KAAR,CACA,aAAsB,CACrB,GAAI,GAAWY,gBAAf,CAEA,KAAKL,IAAL,CAAY,UAAY,CAKvB,WAHCM,gBAGD,CAFC,EAAW,IAEZ,EAAO,IACP,CAToB,CAYrB,KAAKL,KAAL,CAAa,UAAY,CAKxB,WAHC,KAAKD,IAAL,EAGD,CAFC,EAAWK,gBAEZ,EAAO,IACP,CAlBoB,CAqBrB,KAAKE,KAAL,CAAa,WAAgB,CAE5B,MADA,IACA,CAAO,KAAKP,IAAL,GAAYC,KAAZ,EACP,CACD,CAEA,CApD6B,IA9B8a,CAA5c,Q","file":"scroll.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i 1 && arguments[1] !== undefined ? arguments[1] : 3000;\n\tvar pauseOnHover = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\tvar mobileOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n\tvar sliderList = element;\n\n\tvar rotator = new _timer.Timer(function () {\n\t\tif (window.innerWidth > 1024 && mobileOnly || element.classList.contains('scrollPause')) {\n\t\t\treturn;\n\t\t}\n\t\tsliderList.prepend(element.lastChild);\n\t}, time);\n\tif (pauseOnHover) {\n\t\tsliderList.addEventListener('mouseover', function () {\n\t\t\trotator.stop();\n\t\t});\n\t\tsliderList.addEventListener('mouseout', function () {\n\t\t\trotator.start();\n\t\t});\n\t}\n};\n\n},{\"./../modules/timer\":2}],2:[function(require,module,exports){\n'use strict';\n// Simple timer function with reset\n// Source: https://stackoverflow.com/posts/8126515\n// Example:\n// import {Timer} from './modules/timer'\n/*\r\n\tvar timer = new Timer(function() {\r\n\t// your function here\r\n\t}, 5000);\r\n\r\n\t// switch interval to 10 seconds\r\n\ttimer.reset(10000);\r\n\r\n\t// stop the timer\r\n\ttimer.stop();\r\n\r\n\t// start the timer\r\n\ttimer.start();\r\n */\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.Timer = Timer;\nfunction Timer(fn, t) {\n\tvar timerObj = setInterval(fn, t);\n\n\tthis.stop = function () {\n\t\tif (timerObj) {\n\t\t\tclearInterval(timerObj);\n\t\t\ttimerObj = null;\n\t\t}\n\t\treturn this;\n\t};\n\n\t// start timer using current settings (if it's not already running)\n\tthis.start = function () {\n\t\tif (!timerObj) {\n\t\t\tthis.stop();\n\t\t\ttimerObj = setInterval(fn, t);\n\t\t}\n\t\treturn this;\n\t};\n\n\t// start with new interval, stop current interval\n\tthis.reset = function (newT) {\n\t\tt = newT;\n\t\treturn this.stop().start();\n\t};\n}\n\n},{}]},{},[1]);\n"]}