{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./app/javascript/packs/slideshow.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","slide","$slideshow","slideTo","$items","find","$itemCurrent","$counter","$next","$prev","$dotCurrent","total","index","length","removeClass","eq","addClass","html","prop","timeout","setInterval","each","this","current","window","width","clearInterval","on","parents","$this","hasClass","jQuery"],"mappings":"aACE,IAAIA,EAAmB,CAAC,EAGxB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,CAAC,GAUX,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,OACf,CAIAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,GAEhE,EAGAZ,EAAoBkB,EAAI,SAAShB,GACX,qBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,GACvD,EAOArB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,kBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,E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MO,SAAS,gCAAgCE,KAAK,YAAY,EAGxE,CAaA,IAAIC,EAAUC,aAAY,WACtBpB,EAAE,0BAA0BqB,MAAK,WAC7B,IAAInB,EAAaF,EAAEsB,MACfC,EAAUrB,EAAWG,KAAK,6BAA6BO,QACvDD,EAAQT,EAAWG,KAAK,oBAAoBQ,OAG5CZ,EAAMC,EADNqB,EAAU,IAAMZ,EACE,EAEAY,EAAU,EAEpC,GACJ,GAAG,KAECvB,EAAEwB,QAAQC,QAAU,KACtBC,cAAcP,GAMhBnB,EAAE,mBAAmB2B,GAAG,SAAS,WAC7B1B,EAAOD,EAAEsB,MAAMM,QAAQ,cAAe5B,EAAEsB,MAAMV,SAC9Cc,cAAcP,EAClB,IAKAnB,EAAE,uBAAuB2B,GAAG,SAAS,WACjC,IAAIE,EAAQ7B,EAAEsB,MACVpB,EAAa2B,EAAMD,QAAQ,cAC3BL,EAAUrB,EAAWG,KAAK,6BAA6BO,QACvDD,EAAQT,EAAWG,KAAK,oBAAoBQ,OAC5CV,EAAU,EAKd,GAAI0B,EAAMC,SAAS,4BAA8B,CAC7C,GAAIP,EAAU,IAAMZ,EAChB,OAEAR,EAAUoB,EAAU,CAE5B,CAEA,GAAIM,EAAMC,SAAS,4BAA8B,CAC7C,GAAgB,IAAZP,EACA,OAEApB,EAAUoB,EAAU,CAE5B,CAEAtB,EAAOD,EAAEsB,MAAMM,QAAQ,cAAezB,GACtCuB,cAAcP,EAClB,GAGH,CAzGD,CAyGGY,O","file":"js/slideshow-ca62a2c6b21ccd8eaa9e.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n","(function($) {\n\n function slide($slideshow, slideTo) {\n var $items = $slideshow.find('.slideshow__item')\n var $itemCurrent = $slideshow.find('.slideshow__item--current');\n var $counter = $slideshow.find('.slideshow__counter');\n var $next = $slideshow.find('.slideshow__control--next');\n var $prev = $slideshow.find('.slideshow__control--prev');\n var $dots = $slideshow.find('.slideshow__dot');\n var $dotCurrent = $slideshow.find('.slideshow__dot--current');\n var current = $itemCurrent.index();\n var total = $items.length;\n\n $itemCurrent.removeClass('slideshow__item--current');\n $slideshow.find('.slideshow__item').eq(slideTo).addClass('slideshow__item--current');\n $counter.html( (slideTo + 1) + '/' + total )\n\n $dotCurrent.removeClass('slideshow__dot--current');\n $slideshow.find('.slideshow__dot').eq(slideTo).addClass('slideshow__dot--current');\n\n\n /* Disabling arrows */\n\n $prev.removeClass('slideshow__control--disabled').prop('disabled', false);\n $next.removeClass('slideshow__control--disabled').prop('disabled', false);\n\n if ( slideTo === total - 1 ) {\n $next.addClass('slideshow__control--disabled').prop('disabled', true);\n } else if ( slideTo === 0 ) {\n $prev.addClass('slideshow__control--disabled').prop('disabled', true);\n }\n\n }\n\n\n /* Navigation using timeout */\n\n /* This may need extra work if more than one autoscroll slideshow will appear on the page.\n * Now we have one Interval for all slideshow and it should be rewritten the way\n * each slideshow has it's own interval. But there is a problem that we don't\n * have such thing as slideshow in JavaScript, they are just in DOM.\n * So need to connect \"var timeout = setInterval\" with DOM so it can be\n * clearInterval(timeout) by clicking arrows or dots in DOM.\n */\n\n var timeout = setInterval(function () {\n $('.slideshow--autoscroll').each(function () {\n var $slideshow = $(this);\n var current = $slideshow.find('.slideshow__item--current').index();\n var total = $slideshow.find('.slideshow__item').length;\n\n if (current + 1 === total) {\n slide($slideshow, 0);\n } else {\n slide($slideshow, current + 1);\n }\n });\n }, 10000);\n\n if ($(window).width() < 768) {\n clearInterval(timeout);\n }\n\n\n /* Navigation using dots */\n\n $('.slideshow__dot').on('click', function () {\n slide( $(this).parents('.slideshow'), $(this).index());\n clearInterval(timeout);\n });\n\n\n /* Navigation using arrows */\n\n $('.slideshow__control').on('click', function () {\n var $this = $(this);\n var $slideshow = $this.parents('.slideshow');\n var current = $slideshow.find('.slideshow__item--current').index();\n var total = $slideshow.find('.slideshow__item').length;\n var slideTo = 0;\n\n\n /* Sliding */\n\n if( $this.hasClass('slideshow__control--next') ) {\n if (current + 1 === total) {\n return;\n } else {\n slideTo = current + 1;\n }\n }\n\n if( $this.hasClass('slideshow__control--prev') ) {\n if (current === 0) {\n return;\n } else {\n slideTo = current - 1;\n }\n }\n\n slide( $(this).parents('.slideshow'), slideTo);\n clearInterval(timeout);\n });\n\n\n})(jQuery);\n"],"sourceRoot":""}