{"version":3,"file":"homeslider.min.js","sources":["https:\/\/conalepvirtual.conalep.edu.mx\/theme\/academi\/amd\/src\/homeslider.js"],"sourcesContent":["define(['jquery', 'theme_academi\/jquery.sudoSlider'], function($) {\n var defaults = {\n autoplay: false,\n interval: 500,\n };\n var Carousel = function(selector, options) {\n var results = $.extend(defaults, options);\n this.initializeslider(selector, results);\n };\n\n \/\/ Initialize the slider.\n Carousel.prototype.initializeslider = function(selector, data) {\n var autostopped = false;\n var sudoSlider = $(selector).sudoSlider({\n prevNext: true,\n prevHtml: '.homepage-carousel .prevBtn.carousel-control',\n nextHtml: '.homepage-carousel .nextBtn.carousel-control',\n speed: 1400,\n ease: 'swing',\n responsive: true,\n updateBefore: true,\n useCSS: true,\n interruptible: false,\n numeric: true,\n pause: (data.autoplay == 'false') ? false : data.interval,\n auto: (data.autoplay == 'true') ? true : false,\n customLink: \".homepage-carouselLink\",\n afterAnimation: function(t) {\n $('.homecarousel-slide-item.carousel-item').not('[data-slide=\"' + t + '\"]').removeClass('active');\n $('.homecarousel-slide-item.carousel-item[data-slide=\"' + t + '\"]').addClass('active');\n $('.slide-text').show();\n },\n beforeAnimation: function() {\n animation();\n }\n });\n\n sudoSlider.mouseenter(function() {\n var auto = sudoSlider.getValue('autoAnimation');\n if (auto) {\n sudoSlider.stopAuto();\n } else {\n autostopped = true;\n }\n }).mouseleave(function() {\n if (!autostopped) {\n sudoSlider.startAuto();\n }\n });\n\n \/**\n * Animation for slider.\n *\/\n function animation() {\n var $this = $('.slide-content .slide-text');\n var $content = $this.find('.heading-content [data-animation ^= \"animated\"]');\n var index = 0;\n if ($content != \"undefined\" && $content.length != \"\") {\n $content.css({'opacity': 0});\n var $time = setInterval(function() {\n $this = $content;\n var da = $content.eq(index);\n var ani = da.attr('data-animation');\n da.addClass(ani);\n da.css({'opacity': 1});\n index++;\n if (index == $this.length) {\n clearInterval($time);\n }\n doAnimations(da);\n }, 400);\n }\n }\n\n \/**\n * Sider animation.\n * @param {string} elems Elements.\n *\/\n function doAnimations(elems) {\n var animEndEv = 'webkitAnimationEnd animationend';\n elems.each(function() {\n var $this = $(this),\n $animationType = $this.data('animation');\n $this.addClass($animationType).one(animEndEv, function() {\n $this.removeClass($animationType);\n });\n });\n }\n };\n\n return {\n init: function(selector) {\n var homecarouselconfig;\n var options = homecarouselconfig;\n return new Carousel(selector, options);\n }\n };\n});"],"names":["define","$","defaults","autoplay","interval","Carousel","selector","options","results","extend","initializeslider","prototype","data","autostopped","sudoSlider","prevNext","prevHtml","nextHtml","speed","ease","responsive","updateBefore","useCSS","interruptible","numeric","pause","auto","customLink","afterAnimation","t","not","removeClass","addClass","show","beforeAnimation","$this","$content","find","index","length","css","$time","setInterval","animEndEv","da","eq","ani","attr","clearInterval","each","this","$animationType","one","animation","mouseenter","getValue","stopAuto","mouseleave","startAuto","init","homecarouselconfig"],"mappings":"AAAAA,kCAAO,CAAC,SAAU,oCAAoC,SAASC,OACvDC,SAAW,CACXC,UAAU,EACVC,SAAU,KAEVC,SAAW,SAASC,SAAUC,aAC1BC,QAAUP,EAAEQ,OAAOP,SAAUK,cAC5BG,iBAAiBJ,SAAUE,iBAIpCH,SAASM,UAAUD,iBAAmB,SAASJ,SAAUM,UACjDC,aAAc,EACdC,WAAab,EAAEK,UAAUQ,WAAW,CACpCC,UAAU,EACVC,SAAU,+CACVC,SAAU,+CACVC,MAAO,KACPC,KAAM,QACNC,YAAY,EACZC,cAAc,EACdC,QAAQ,EACRC,eAAe,EACfC,SAAS,EACTC,MAAyB,SAAjBb,KAAKT,UAA+BS,KAAKR,SACjDsB,KAAwB,QAAjBd,KAAKT,SACZwB,WAAY,yBACZC,eAAgB,SAASC,GACrB5B,EAAE,0CAA0C6B,IAAI,gBAAkBD,EAAI,MAAME,YAAY,UACxF9B,EAAE,sDAAwD4B,EAAI,MAAMG,SAAS,UAC7E\/B,EAAE,eAAegC,QAErBC,gBAAiB,2BAsBbC,MAAQlC,EAAE,8BACVmC,SAAWD,MAAME,KAAK,mDACt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