/*! * Splide.js * Version : 1.0.11 * License : MIT * Copyright: 2019 Naotoshi Fujita */ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Splide=n():t.Splide=n()}(window,function(){return i={},o.m=e=[function(t,n,e){"use strict";function i(){return(i=Object.assign||function(t){for(var n=1;n])(\d+)?/),i=e&&e[1]||"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1o.flickThreshold&&Math.abs(t.offset[f])<150&&(a+=r*Math.min(e*o.flickPower,i.width*(o.flickMaxPages||1)));var s=l.toIndex(a);s===u.index&&(s+=c.isRtl()?r:-r),u.is(_)||(s=W(s,0,c.edgeIndex)),c.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,l=s.y,c=void 0===l?a:l,f={x:r-d,y:a-c},p=e-(n.timeStamp||0);return{from:{x:d,y:c},to:{x:r,y:a},offset:f,timeStamp:e,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,a){var s,e=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,e=n.slides,i=n.bar;e.length>t.perPage&&(s=function(n,e,i){function o(t){d||(s=(a=t-(r=r||t))/e,e<=a&&(r=0,s=1,n()),i&&i(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),i&&m(i,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,e=o.sub,i=[o.root,e?e.root:null];t.pauseOnHover&&(d(i,"mouseleave",V,!0),d(i,"mouseenter",V,!1));t.pauseOnFocus&&(d(i,"focusout",Y,!0),d(i,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(e=e.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===e.indexOf(t)&&e.push(t),1===e.length&&o.emit(a+":pause")}};function d(t,n,e,i){for(var o in t)b(t[o],n,function(){u[i?"play":"pause"](e)})}return u}function D(s,u,d){var l,i=s.classes,n=s.root;function o(t){var n=p("button",{class:i.arrow+" "+(t?i.prev:i.next)});return n.innerHTML='',n}return{required:s.options.arrows,mount:function(){var t=u.Elements;(l=t.arrows).prev&&l.next||!s.options.arrows||(l=function(){var t=p("div",{class:i.arrows}),n=o(!0),e=o(!1);return t.appendChild(n),t.appendChild(e),{wrapper:t,prev:n,next:e}}(),n.insertBefore(l.wrapper,t.track)),l&&(function(){var t=s.options.perMove;b(l.prev,"click",function(){s.go(t?"-"+t:"<")}),b(l.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=l,n=t.prev,e=t.next,i=u.Controller,o=i.prevIndex,r=i.nextIndex,a=1"+n)}),{li:e,button:i,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=s.root;"top"===s.options.pagination?t.insertBefore(r.list,e.Elements.track):t.appendChild(r.list),s.on(U,n).on(Q,function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),n(t,-1)},destroy:function(){r&&r.list&&s.root.removeChild(r.list),s.off(U).off(Q),r=null},getItem:function(t){return r.items[e.Controller.indexToPage(t)]},get data(){return r}};function n(t,n){var e=a.getItem(n),i=a.getItem(t);e&&g(e.button,c.active),i&&h(i.button,c.active),s.emit(o+":updated",r,e,i)}return a}function J(s,i){var u,d,l=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){u=f(l.prev),d=f(l.next),t.appendChild(u),n.appendChild(d);var e=i.Elements.track.id;y(t,nt,e),y(n,nt,e)}function e(t,n,e,i){var o=s.index,r=-1",Left:"<",Right:">"},tt="aria-current",nt="aria-controls",et="aria-label",it="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:L,Controller:A,Slides:F,Track:R,Clones:z,Layout:B,Drag:N,Autoplay:X,Cover:function(t,n){var e=t.options;function i(t){var n=t.parentElement;n&&(m(n,{background:'center/cover no-repeat url("'+t.src+'")'}),m(t,{display:"none"}))}return{required:e.cover&&(e.height||e.heightRatio||e.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&i(n)}),t.on("lazyload:loaded",function(t){i(t)})}}},Arrows:D,Pagination:G,LazyLoad:function(o,t,r){var n=0,i=[],e=o.options.lazyLoad,a="sequential"===e;function s(n){var e=o.options;(i=i.filter(function(t){return!t.Slide.isWithin(n,e.perPage*(e.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){h(n.slide,c.loading);var e=p("span",{class:o.classes.spinner});t.parentElement.appendChild(e),t.onload=function(){l(t,e,n,!1)},t.onerror=function(){l(t,e,n,!0)},m(t,{visibility:"hidden"}),y(t,"src",t.getAttribute(Z))}function d(){if(n