| 12 |
- function _defineProperties(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function _createClass(n,t,e){return t&&_defineProperties(n.prototype,t),e&&_defineProperties(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).Splide=t()}(this,function(){"use strict";var l="(prefers-reduced-motion: reduce)",R=4,W=5,n={CREATED:1,MOUNTED:2,IDLE:3,MOVING:R,SCROLLING:W,DRAGGING:6,DESTROYED:7};function x(n){n.length=0}function _(n,t,e){return Array.prototype.slice.call(n,t,e)}function D(n){return n.bind.apply(n,[null].concat(_(arguments,1)))}function G(){}var v=setTimeout;function p(n){return requestAnimationFrame(n)}function t(n,t){return typeof t===n}function X(n){return!r(n)&&t("object",n)}var o=Array.isArray,w=D(t,"function"),M=D(t,"string"),z=D(t,"undefined");function r(n){return null===n}function g(n){return n instanceof HTMLElement}function m(n){return o(n)?n:[n]}function y(n,t){m(n).forEach(t)}function b(n,t){return-1<n.indexOf(t)}function E(n,t){return n.push.apply(n,m(t)),n}function L(t,n,e){t&&y(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function P(n,t){L(n,M(t)?t.split(" "):t,!0)}function C(n,t){y(t,n.appendChild.bind(n))}function k(n,e){y(n,function(n){var t=(e||n).parentNode;t&&t.insertBefore(n,e)})}function B(n,t){return g(n)&&(n.msMatchesSelector||n.matches).call(n,t)}function S(n,t){n=n?_(n.children):[];return t?n.filter(function(n){return B(n,t)}):n}function A(n,t){return t?S(n,t)[0]:n.firstElementChild}var d=Object.keys;function N(n,t,e){if(n)for(var i=d(n),i=e?i.reverse():i,o=0;o<i.length;o++){var r=i[o];if("__proto__"!==r&&!1===t(n[r],r))break}return n}function T(i){return _(arguments,1).forEach(function(e){N(e,function(n,t){i[t]=e[t]})}),i}function h(e){return _(arguments,1).forEach(function(n){N(n,function(n,t){o(n)?e[t]=n.slice():X(n)?e[t]=h({},X(e[t])?e[t]:{},n):e[t]=n})}),e}function O(t,n){m(n||d(t)).forEach(function(n){delete t[n]})}function I(n,e){y(n,function(t){y(e,function(n){t&&t.removeAttribute(n)})})}function F(e,t,i){X(t)?N(t,function(n,t){F(e,t,n)}):y(e,function(n){r(i)||""===i?I(n,t):n.setAttribute(t,String(i))})}function j(n,t,e){n=document.createElement(n);return t&&(M(t)?P:F)(n,t),e&&C(e,n),n}function H(n,t,e){if(z(e))return getComputedStyle(n)[t];r(e)||(n.style[t]=""+e)}function Y(n,t){H(n,"display",t)}function q(n){n.setActive&&n.setActive()||n.focus({preventScroll:!0})}function U(n,t){return n.getAttribute(t)}function K(n,t){return n&&n.classList.contains(t)}function J(n){return n.getBoundingClientRect()}function Q(n){y(n,function(n){n&&n.parentNode&&n.parentNode.removeChild(n)})}function V(n){return A((new DOMParser).parseFromString(n,"text/html").body)}function Z(n,t){n.preventDefault(),t&&(n.stopPropagation(),n.stopImmediatePropagation())}function $(n,t){return n&&n.querySelector(t)}function nn(n,t){return t?_(n.querySelectorAll(t)):[]}function tn(n,t){L(n,t,!1)}function en(n){return n.timeStamp}function on(n){return M(n)?n:n?n+"px":""}var rn="splide",i="data-"+rn;function un(n,t){if(!n)throw new Error("["+rn+"] "+(t||""))}var sn=Math.min,cn=Math.max,an=Math.floor,fn=Math.ceil,ln=Math.abs;function dn(n,t,e){return ln(n-t)<e}function pn(n,t,e,i){var o=sn(t,e),e=cn(t,e);return i?o<n&&n<e:o<=n&&n<=e}function hn(n,t,e){var i=sn(t,e),e=cn(t,e);return sn(cn(i,n),e)}function vn(n){return(0<n)-(n<0)}function gn(t,n){return y(n,function(n){t=t.replace("%s",""+n)}),t}function mn(n){return n<10?"0"+n:""+n}var yn={};function bn(){var s=[];function e(n,e,i){y(n,function(t){t&&y(e,function(n){n.split(" ").forEach(function(n){n=n.split(".");i(t,n[0],n[1])})})})}return{bind:function(n,t,r,u){e(n,t,function(n,t,e){var i="addEventListener"in n,o=i?n.removeEventListener.bind(n,t,r,u):n.removeListener.bind(n,r);i?n.addEventListener(t,r,u):n.addListener(r),s.push([n,t,e,r,o])})},unbind:function(n,t,o){e(n,t,function(t,e,i){s=s.filter(function(n){return!!(n[0]!==t||n[1]!==e||n[2]!==i||o&&n[3]!==o)||(n[4](),!1)})})},dispatch:function(n,t,e){var i;return"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:!0,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!1,e),n.dispatchEvent(i),i},destroy:function(){s.forEach(function(n){n[4]()}),x(s)}}}var wn="mounted",En="move",Sn="moved",xn="shifted",_n="click",Pn="active",Cn="inactive",kn="visible",Ln="hidden",An="slide:keydown",Dn="refresh",Mn="updated",zn="resize",Nn="resized",Tn="scroll",On="scrolled",u="destroy",In="navigation:mounted",Fn="autoplay:play",jn="autoplay:pause",Rn="lazyload:loaded";function Wn(n){var e=n?n.event.bus:document.createDocumentFragment(),i=bn();return n&&n.event.on(u,i.destroy),T(i,{bus:e,on:function(n,t){i.bind(e,m(n).join(" "),function(n){t.apply(t,o(n.detail)?n.detail:[])})},off:D(i.unbind,e),emit:function(n){i.dispatch(e,n,_(arguments,1))}})}function Gn(t,n,e,i){var o,r,u=Date.now,s=0,c=!0,a=0;function f(){if(!c){if(s=t?sn((u()-o)/t,1):1,e&&e(s),1<=s&&(n(),o=u(),i&&++a>=i))return l();p(f)}}function l(){c=!0}function d(){r&&cancelAnimationFrame(r),c=!(r=s=0)}return{start:function(n){n||d(),o=u()-(n?s*t:0),c=!1,p(f)},rewind:function(){o=u(),s=0,e&&e(s)},pause:l,cancel:d,set:function(n){t=n},isPaused:function(){return c}}}function s(n){var t=n;return{set:function(n){t=n},is:function(n){return b(m(n),t)}}}var e="Arrow",Xn=e+"Left",Bn=e+"Right",c=e+"Up",a=e+"Down",Hn="ttb",f={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[c,Bn],ArrowRight:[a,Xn]};var Yn="role",qn="tabindex",e="aria-",Un=e+"controls",Kn=e+"current",Jn=e+"selected",Qn=e+"label",Vn=e+"labelledby",Zn=e+"hidden",$n=e+"orientation",nt=e+"roledescription",tt=e+"live",et=e+"relevant",it=[Yn,qn,"disabled",Un,Kn,Qn,Vn,Zn,$n,nt],ot=rn,rt=rn+"__track",ut=rn+"__list",st=rn+"__slide",ct=st+"--clone",at=st+"__container",ft=rn+"__arrows",lt=rn+"__arrow",dt=lt+"--prev",pt=lt+"--next",ht=rn+"__pagination",vt=ht+"__page",gt=rn+"__progress"+"__bar",mt=rn+"__toggle",yt=rn+"__sr",bt="is-active",wt="is-prev",Et="is-next",St="is-visible",xt="is-loading",_t="is-focus-in",Pt=[bt,St,wt,Et,xt,_t];var Ct="touchstart mousedown",kt="touchmove mousemove",Lt="touchend touchcancel mouseup";var At="slide",Dt="loop",Mt="fade";function zt(o,e,t,r){var i,n=Wn(o),u=n.on,s=n.emit,c=n.bind,a=o.Components,f=o.root,l=o.options,d=l.isNavigation,p=l.updateOnMove,h=l.i18n,v=l.pagination,g=l.slideFocus,m=a.Direction.resolve,y=U(r,"style"),b=U(r,Qn),w=-1<t,E=A(r,"."+at),S=nn(r,l.focusableNodes||"");function x(){var n=o.splides.map(function(n){n=n.splide.Components.Slides.getAt(e);return n?n.slide.id:""}).join(" ");F(r,Qn,gn(h.slideX,(w?t:e)+1)),F(r,Un,n),F(r,Yn,g?"button":""),g&&I(r,nt)}function _(){i||P()}function P(){var n,t;i||(n=o.index,(t=C())!==K(r,bt)&&(L(r,bt,t),F(r,Kn,d&&t||""),s(t?Pn:Cn,k)),function(){var n=function(){if(o.is(Mt))return C();var n=J(a.Elements.track),t=J(r),e=m("left"),i=m("right");return an(n[e])<=fn(t[e])&&an(t[i])<=fn(n[i])}(),t=!n&&(!C()||w);o.state.is([R,W])||F(r,Zn,t||"");F(S,qn,t?-1:""),g&&F(r,qn,t?-1:0);n!==K(r,St)&&(L(r,St,n),s(n?kn:Ln,k));n||document.activeElement!==r||(n=a.Slides.getAt(o.index))&&q(n.slide)}(),L(r,wt,e===n-1),L(r,Et,e===n+1))}function C(){var n=o.index;return n===e||l.cloneStatus&&n===t}var k={index:e,slideIndex:t,slide:r,container:E,isClone:w,mount:function(){w||(r.id=f.id+"-slide"+mn(e+1),F(r,Yn,v?"tabpanel":"group"),F(r,nt,h.slide),F(r,Qn,b||gn(h.slideLabel,[e+1,o.length]))),c(r,"click",D(s,_n,k)),c(r,"keydown",D(s,An,k)),u([Sn,xn,On],P),u(In,x),p&&u(En,_)},destroy:function(){i=!0,n.destroy(),tn(r,Pt),I(r,it),F(r,"style",y),F(r,Qn,b||"")},update:P,style:function(n,t,e){H(e&&E||r,n,t)},isWithin:function(n,t){return n=ln(n-e),(n=!w&&(l.rewind||o.is(Dt))?sn(n,o.length-n):n)<=t}};return k}var Nt=i+"-interval";var Tt={passive:!1,capture:!0};var Ot={Spacebar:" ",Right:Bn,Left:Xn,Up:c,Down:a};function It(n){return n=M(n)?n:n.key,Ot[n]||n}var Ft="keydown";var jt=i+"-lazy",Rt=jt+"-srcset",Wt="["+jt+"], ["+Rt+"]";var Gt=[" ","Enter"];var Xt=Object.freeze({__proto__:null,Media:function(i,n,o){var r=i.state,t=o.breakpoints||{},u=o.reducedMotion||{},e=bn(),s=[];function c(n){n&&e.destroy()}function a(n,t){t=matchMedia(t);e.bind(t,"change",f),s.push([n,t])}function f(){var n=r.is(7),t=o.direction,e=s.reduce(function(n,t){return h(n,t[1].matches?t[0]:{})},{});O(o),h(o,e),r.is(1)||i.emit(Mn,o),o.destroy?i.destroy("completely"===o.destroy):n?(c(!0),i.mount()):t!==o.direction&&i.refresh()}return{setup:function(){var e="min"===o.mediaQuery;d(t).sort(function(n,t){return e?+n-+t:+t-+n}).forEach(function(n){a(t[n],"("+(e?"min":"max")+"-width:"+n+"px)")}),a(u,l),f()},destroy:c,reduce:function(n){matchMedia(l).matches&&(n?h(o,u):O(o,d(u)))}}},Direction:function(n,t,o){return{resolve:function(n,t,e){var i="rtl"!==(e=e||o.direction)||t?e===Hn?0:-1:1;return f[n]&&f[n][i]||n.replace(/width|left|right/i,function(n,t){n=f[n.toLowerCase()][i]||n;return 0<t?n.charAt(0).toUpperCase()+n.slice(1):n})},orient:function(n){return n*("rtl"===o.direction?1:-1)}}},Elements:function(n,t,e){var i,o,r,u=Wn(n),s=u.on,c=u.bind,a=n.root,f=e.i18n,l={},d=[],p=[],h=[];function v(){i=y("."+rt),o=A(i,"."+ut),un(i&&o,"A track/list element is missing."),E(d,S(o,"."+st+":not(."+ct+")")),N({arrows:ft,pagination:ht,prev:dt,next:pt,bar:gt,toggle:mt},function(n,t){l[t]=y("."+n)}),T(l,{root:a,track:i,list:o,slides:d}),function(){var n=a.id||function(n){return""+n+mn(yn[n]=(yn[n]||0)+1)}(rn),t=e.role;a.id=n,i.id=i.id||n+"-track",o.id=o.id||n+"-list",!U(a,Yn)&&"SECTION"!==a.tagName&&t&&F(a,Yn,t);F(a,nt,f.carousel),F(o,Yn,"presentation")}(),m()}function g(n){var t=it.concat("style");x(d),tn(a,p),tn(i,h),I([i,o],t),I(a,n?t:["style",nt])}function m(){tn(a,p),tn(i,h),p=b(ot),h=b(rt),P(a,p),P(i,h),F(a,Qn,e.label),F(a,Vn,e.labelledby)}function y(n){n=$(a,n);return n&&function(n,t){if(w(n.closest))return n.closest(t);for(var e=n;e&&1===e.nodeType&&!B(e,t);)e=e.parentElement;return e}(n,"."+ot)===a?n:void 0}function b(n){return[n+"--"+e.type,n+"--"+e.direction,e.drag&&n+"--draggable",e.isNavigation&&n+"--nav",n===ot&&bt]}return T(l,{setup:v,mount:function(){s(Dn,g),s(Dn,v),s(Mn,m),c(document,Ct+" keydown",function(n){r="keydown"===n.type},{capture:!0}),c(a,"focusin",function(){L(a,_t,!!r)})},destroy:g})},Slides:function(i,o,r){var n=Wn(i),t=n.on,u=n.emit,s=n.bind,c=(n=o.Elements).slides,a=n.list,f=[];function e(){c.forEach(function(n,t){d(n,t,-1)})}function l(){h(function(n){n.destroy()}),x(f)}function d(n,t,e){n=zt(i,t,e,n);n.mount(),f.push(n)}function p(n){return n?v(function(n){return!n.isClone}):f}function h(n,t){p(t).forEach(n)}function v(t){return f.filter(w(t)?t:function(n){return M(t)?B(n.slide,t):b(m(t),n.index)})}return{mount:function(){e(),t(Dn,l),t(Dn,e),t([wn,Dn],function(){f.sort(function(n,t){return n.index-t.index})})},destroy:l,update:function(){h(function(n){n.update()})},register:d,get:p,getIn:function(n){var t=o.Controller,e=t.toIndex(n),i=t.hasFocus()?1:r.perPage;return v(function(n){return pn(n.index,e,e+i-1)})},getAt:function(n){return v(n)[0]},add:function(n,o){y(n,function(n){var t,e,i;g(n=M(n)?V(n):n)&&((t=c[o])?k(n,t):C(a,n),P(n,r.classes.slide),n=n,e=D(u,zn),n=nn(n,"img"),(i=n.length)?n.forEach(function(n){s(n,"load error",function(){--i||e()})}):e())}),u(Dn)},remove:function(n){Q(v(n).map(function(n){return n.slide})),u(Dn)},forEach:h,filter:v,style:function(t,e,i){h(function(n){n.style(t,e,i)})},getLength:function(n){return(n?c:f).length},isEnough:function(){return f.length>r.perPage}}},Layout:function(n,t,e){var i,o,r=(c=Wn(n)).on,u=c.bind,s=c.emit,c=t.Slides,a=t.Direction.resolve,f=(t=t.Elements).root,l=t.track,d=t.list,p=c.getAt,h=c.style;function v(){o=null,i=e.direction===Hn,H(f,"maxWidth",on(e.width)),H(l,a("paddingLeft"),m(!1)),H(l,a("paddingRight"),m(!0)),g()}function g(){var n=J(f);o&&o.width===n.width&&o.height===n.height||(H(l,"height",function(){var n="";i&&(un(n=y(),"height or heightRatio is missing."),n="calc("+n+" - "+m(!1)+" - "+m(!0)+")");return n}()),h(a("marginRight"),on(e.gap)),h("width",e.autoWidth?null:on(e.fixedWidth)||(i?"":b())),h("height",on(e.fixedHeight)||(i?e.autoHeight?null:b():y()),!0),o=n,s(Nn))}function m(n){var t=e.padding,n=a(n?"right":"left");return t&&on(t[n]||(X(t)?0:t))||"0px"}function y(){return on(e.height||J(d).width*e.heightRatio)}function b(){var n=on(e.gap);return"calc((100%"+(n&&" + "+n)+")/"+(e.perPage||1)+(n&&" - "+n)+")"}function w(n,t){var e=p(n);if(e){n=J(e.slide)[a("right")],e=J(d)[a("left")];return ln(n-e)+(t?0:E())}return 0}function E(){var n=p(0);return n&&parseFloat(H(n.slide,a("marginRight")))||0}return{mount:function(){var n,t,e;v(),u(window,"resize load",(n=D(s,zn),function(){e||(e=Gn(t||0,function(){n(),e=null},null,1)).start()})),r([Mn,Dn],v),r(zn,g)},listSize:function(){return J(d)[a("width")]},slideSize:function(n,t){return(n=p(n||0))?J(n.slide)[a("width")]+(t?0:E()):0},sliderSize:function(){return w(n.length-1,!0)-w(-1,!0)},totalSize:w,getPadding:function(n){return parseFloat(H(l,a("padding"+(n?"Right":"Left"))))||0}}},Clones:function(s,e,c){var n,t=Wn(s),i=t.on,o=t.emit,a=e.Elements,f=e.Slides,r=e.Direction.resolve,l=[];function u(){(n=h())&&(function(o){var r=f.get().slice(),u=r.length;if(u){for(;r.length<o;)E(r,r);E(r.slice(-o),r.slice(0,o)).forEach(function(n,t){var e=t<o,i=function(n,t){n=n.cloneNode(!0);return P(n,c.classes.clone),n.id=s.root.id+"-clone"+mn(t+1),n}(n.slide,t);e?k(i,r[0].slide):C(a.list,i),E(l,i),f.register(i,t-o+(e?0:u),n.index)})}}(n),o(zn))}function d(){Q(l),x(l)}function p(){n<h()&&o(Dn)}function h(){var n,t=c.clones;return s.is(Dt)?t||(t=(n=c[r("fixedWidth")]&&e.Layout.slideSize(0))&&fn(J(a.track)[r("width")]/n)||c[r("autoWidth")]&&s.length||2*c.perPage):t=0,t}return{mount:function(){u(),i(Dn,d),i(Dn,u),i([Mn,zn],p)},destroy:d}},Move:function(i,s,o){var c,n=Wn(i),t=n.on,a=n.emit,f=i.state.set,r=(n=s.Layout).slideSize,e=n.getPadding,u=n.totalSize,l=n.listSize,d=n.sliderSize,p=(n=s.Direction).resolve,h=n.orient,v=(n=s.Elements).list,g=n.track;function m(){s.Controller.isBusy()||(s.Scroll.cancel(),y(i.index),s.Slides.update())}function y(n){b(S(n,!0))}function b(n,t){i.is(Mt)||(t=t?n:function(n){{var t,e;i.is(Dt)&&(e=h(n-x()),t=P(!1,n)&&e<0,e=P(!0,n)&&0<e,(t||e)&&(n=w(n,e)))}return n}(n),H(v,"transform","translate"+p("X")+"("+t+"px)"),n!==t&&a(xn))}function w(n,t){var e=n-_(t),i=d();return n-=h(i*(fn(ln(e)/i)||1))*(t?1:-1)}function E(){b(x()),c.cancel()}function S(n,t){var e=h(u(n-1)-(e=n,"center"===(n=o.focus)?(l()-r(e,!0))/2:+n*r(e)||0));return t?function(n){o.trimSpace&&i.is(At)&&(n=hn(n,0,h(d()-l())));return n}(e):e}function x(){var n=p("left");return J(v)[n]-J(g)[n]+h(e(!1))}function _(n){return S(n?s.Controller.getEnd():0,!!o.trimSpace)}function P(n,t){t=z(t)?x():t;var e=!0!==n&&h(t)<h(_(!1)),t=!1!==n&&h(t)>h(_(!0));return e||t}return{mount:function(){c=s.Transition,t([wn,Nn,Mn,Dn],m)},move:function(n,t,e,i){var o,r,u=x();n!==t&&(o=t<n,r=h(w(x(),o)),o?0<=r:r<=v["scroll"+p("Width")]-J(g)[p("width")])&&(E(),b(w(u,t<n),!0)),f(R),a(En,t,e,n),c.start(t,function(){f(3),a(Sn,t,e,n),i&&i()})},jump:y,translate:b,shift:w,cancel:E,toIndex:function(n){for(var t=s.Slides.get(),e=0,i=1/0,o=0;o<t.length;o++){var r=t[o].index,u=ln(S(r,!0)-n);if(!(u<=i))break;i=u,e=r}return e},toPosition:S,getPosition:x,getLimit:_,exceededLimit:P,reposition:m}},Controller:function(r,o,u){var s,i,c,n=Wn(r).on,a=o.Move,f=a.getPosition,l=a.getLimit,d=a.toPosition,t=o.Slides,p=t.isEnough,e=t.getLength,h=r.is(Dt),v=r.is(At),g=D(E,!1),m=D(E,!0),y=u.start||0,b=y;function w(){s=e(!0),i=u.perMove,c=u.perPage;var n=hn(y,0,s-1);n!==y&&(y=n,a.reposition())}function E(n,t){var e=i||(L()?1:c),e=S(y+e*(n?-1:1),y,!(i||L()));return-1===e&&v&&!dn(f(),l(!n),1)?n?0:_():t?e:x(e)}function S(n,t,e){var i,o;return p()?(i=_(),(o=function(n){if(v&&"move"===u.trimSpace&&n!==y)for(var t=f();t===d(n,!0)&&pn(n,0,r.length-1,!u.rewind);)n<y?--n:++n;return n}(n))!==n&&(t=n,n=o,e=!1),n<0||i<n?n=pn(0,n,t,!0)||pn(i,t,n,!0)?P(C(n)):h?e?n<0?-(s%c||c):s:n:u.rewind?n<0?i:0:-1:e&&n!==t&&(n=P(C(t)+(n<t?-1:1)))):n=-1,n}function x(n){return h?(n+s)%s||0:n}function _(){return cn(s-(L()||h&&i?1:c),0)}function P(n){return hn(L()?n:c*n,0,_())}function C(n){return L()?n:an((n>=_()?s-1:n)/c)}function k(n){n!==y&&(b=y,y=n)}function L(){return!z(u.focus)||u.isNavigation}function A(){return r.state.is([R,W])&&!!u.waitForTransition}return{mount:function(){w(),n([Mn,Dn],w)},go:function(n,t,e){var i;A()||-1<(n=x(i=function(n){var t=y;{var e,i;M(n)?(i=n.match(/([+\-<>])(\d+)?/)||[],e=i[1],i=i[2],"+"===e||"-"===e?t=S(y+ +(""+e+(+i||1)),y):">"===e?t=i?P(+i):g(!0):"<"===e&&(t=m(!0))):t=h?n:hn(n,0,_())}return t}(n)))&&(t||n!==y)&&(k(n),a.move(i,n,b,e))},scroll:function(n,t,e,i){o.Scroll.scroll(n,t,e,function(){k(x(a.toIndex(a.getPosition()))),i&&i()})},getNext:g,getPrev:m,getAdjacent:E,getEnd:_,setIndex:k,getIndex:function(n){return n?b:y},toIndex:P,toPage:C,toDest:function(n){return n=a.toIndex(n),v?hn(n,0,_()):n},hasFocus:L,isBusy:A}},Arrows:function(o,n,t){var e,i,r=Wn(o),u=r.on,s=r.bind,c=r.emit,a=t.classes,f=t.i18n,l=n.Elements,d=n.Controller,p=l.arrows,h=l.track,v=p,g=l.prev,m=l.next,y={};function b(){!function(){var n=t.arrows;!n||g&&m||(v=p||j("div",a.arrows),g=x(!0),m=x(!1),e=!0,C(v,[g,m]),p||k(v,h));g&&m&&(T(y,{prev:g,next:m}),Y(v,n?"":"none"),P(v,i=ft+"--"+t.direction),n&&(u([Sn,Dn,On],_),s(m,"click",D(S,">")),s(g,"click",D(S,"<")),_(),F([g,m],Un,h.id),c("arrows:mounted",g,m)))}(),u(Mn,w)}function w(){E(),b()}function E(){r.destroy(),tn(v,i),e?(Q(p?[g,m]:v),g=m=null):I([g,m],it)}function S(n){d.go(n,!0)}function x(n){return V('<button class="'+a.arrow+" "+(n?a.prev:a.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(t.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function _(){var n=o.index,t=d.getPrev(),e=d.getNext(),i=-1<t&&n<t?f.last:f.prev,n=-1<e&&e<n?f.first:f.next;g.disabled=t<0,m.disabled=e<0,F(g,Qn,i),F(m,Qn,n),c("arrows:updated",g,m,t,e)}return{arrows:y,mount:b,destroy:E}},Autoplay:function(n,t,e){var i,o,r=Wn(n),u=r.on,s=r.bind,c=r.emit,a=Gn(e.interval,n.go.bind(n,">"),function(n){var t=l.bar;t&&H(t,"width",100*n+"%"),c("autoplay:playing",n)}),f=a.isPaused,l=t.Elements,d=(n=t.Elements).root,p=n.toggle,h=e.autoplay,v="pause"===h;function g(){f()&&t.Slides.isEnough()&&(a.start(!e.resetProgress),o=i=v=!1,b(),c(Fn))}function m(n){v=!!(n=void 0===n?!0:n),b(),f()||(a.pause(),c(jn))}function y(){v||(i||o?m(!1):g())}function b(){p&&(L(p,bt,!v),F(p,Qn,e.i18n[v?"play":"pause"]))}function w(n){n=t.Slides.getAt(n);a.set(n&&+U(n.slide,Nt)||e.interval)}return{mount:function(){h&&(function(){e.pauseOnHover&&s(d,"mouseenter mouseleave",function(n){i="mouseenter"===n.type,y()});e.pauseOnFocus&&s(d,"focusin focusout",function(n){o="focusin"===n.type,y()});p&&s(p,"click",function(){v?g():m(!0)});u([En,Tn,Dn],a.rewind),u(En,w)}(),p&&F(p,Un,l.track.id),v||g(),b())},destroy:a.cancel,play:g,pause:m,isPaused:f}},Cover:function(n,t,e){var i=Wn(n).on;function o(e){t.Slides.forEach(function(n){var t=A(n.container||n.slide,"img");t&&t.src&&r(e,t,n)})}function r(n,t,e){e.style("background",n?'center/cover no-repeat url("'+t.src+'")':"",!0),Y(t,n?"none":"")}return{mount:function(){e.cover&&(i(Rn,D(r,!0)),i([wn,Mn,Dn],D(o,!0)))},destroy:D(o,!1)}},Scroll:function(r,s,u){var c,a,n=Wn(r),t=n.on,f=n.emit,l=r.state.set,d=s.Move,p=d.getPosition,h=d.getLimit,v=d.exceededLimit,g=d.translate,m=1;function y(n,t,e,i,o){var r=p();E(),e&&(e=s.Layout.sliderSize(),u=vn(n)*e*an(ln(n)/e)||0,n=d.toPosition(s.Controller.toDest(n%e))+u);var u=dn(r,n,1);m=1,t=u?0:t||cn(ln(n-r)/1.5,800),a=i,c=Gn(t,b,D(w,r,n,o),1),l(W),f(Tn),c.start()}function b(){l(3),a&&a(),f(On)}function w(n,t,e,i){var o=p(),n=(n+(t-n)*(n=i,(i=u.easingFunc)?i(n):1-Math.pow(1-n,4))-o)*m;g(o+n),r.is(At)&&!e&&v()&&(m*=.6,ln(n)<10&&y(h(v(!0)),600,!1,void 0,!0))}function E(){c&&c.cancel()}function e(){c&&!c.isPaused()&&(E(),b())}return{mount:function(){t(En,E),t([Mn,Dn],e)},destroy:E,scroll:y,cancel:e}},Drag:function(r,i,u){var s,t,o,c,a,f,l,d,n=Wn(r),e=n.on,p=n.emit,h=n.bind,v=n.unbind,g=r.state,m=i.Move,y=i.Scroll,b=i.Controller,w=i.Elements.track,E=i.Media.reduce,S=(n=i.Direction).resolve,x=n.orient,_=m.getPosition,P=m.exceededLimit,C=!1;function k(){var n=u.drag;j(!n),c="free"===n}function L(n){var t,e,i;f=!1,l||(t=F(n),e=n.target,i=u.noDrag,B(e,"."+vt+", ."+lt)||i&&B(e,i)||!t&&n.button||(b.isBusy()?Z(n,!0):(d=t?w:window,a=g.is([R,W]),o=null,h(d,kt,A,Tt),h(d,Lt,D,Tt),m.cancel(),y.cancel(),z(n))))}function A(n){var t,e,i,o;g.is(6)||(g.set(6),p("drag")),n.cancelable&&(a?(m.translate(s+N(n)/(C&&r.is(At)?5:1)),e=200<T(n),i=C!==(C=P()),(e||i)&&z(n),f=!0,p("dragging"),Z(n)):ln(N(o=n))>ln(N(o,!0))&&(t=n,e=u.dragMinThreshold,i=X(e),o=i&&e.mouse||0,e=(i?e.touch:+e)||10,a=ln(N(t))>(F(t)?e:o),Z(n)))}function D(n){g.is(6)&&(g.set(3),p("dragged")),a&&(function(n){var t=function(n){if(r.is(Dt)||!C){var t=T(n);if(t&&t<200)return N(n)/t}return 0}(n),e=function(n){return _()+vn(n)*sn(ln(n)*(u.flickPower||600),c?1/0:i.Layout.listSize()*(u.flickMaxPages||1))}(t),n=u.rewind&&u.rewindByDrag;E(!1),c?b.scroll(e,0,u.snap):r.is(Mt)?b.go(x(vn(t))<0?n?"<":"-":n?">":"+"):r.is(At)&&C&&n?b.go(P(!0)?">":"<"):b.go(b.toDest(e),!0);E(!0)}(n),Z(n)),v(d,kt,A),v(d,Lt,D),a=!1}function M(n){!l&&f&&Z(n,!0)}function z(n){o=t,t=n,s=_()}function N(n,t){return I(n,t)-I(O(n),t)}function T(n){return en(n)-en(O(n))}function O(n){return t===n&&o||t}function I(n,t){return(F(n)?n.changedTouches[0]:n)["page"+S(t?"Y":"X")]}function F(n){return"undefined"!=typeof TouchEvent&&n instanceof TouchEvent}function j(n){l=n}return{mount:function(){h(w,kt,G,Tt),h(w,Lt,G,Tt),h(w,Ct,L,Tt),h(w,"click",M,{capture:!0}),h(w,"dragstart",Z),e([wn,Mn],k)},disable:j,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,o,r=Wn(t),u=r.on,s=r.bind,c=r.unbind,a=t.root,f=n.Direction.resolve;function l(){var n=e.keyboard;n&&(i="global"===n?window:a,s(i,Ft,h))}function d(){c(i,Ft)}function p(){var n=o;o=!0,v(function(){o=n})}function h(n){o||((n=It(n))===f(Xn)?t.go("<"):n===f(Bn)&&t.go(">"))}return{mount:function(){l(),u(Mn,d),u(Mn,l),u(En,p)},destroy:d,disable:function(n){o=n}}},LazyLoad:function(e,n,o){var t=Wn(e),i=t.on,r=t.off,u=t.bind,s=t.emit,c="sequential"===o.lazyLoad,a=[wn,Dn,Sn,On],f=[];function l(){x(f),n.Slides.forEach(function(i){nn(i.slide,Wt).forEach(function(n){var t=U(n,jt),e=U(n,Rt);t===n.src&&e===n.srcset||(t=o.classes.spinner,e=A(e=n.parentElement,"."+t)||j("span",t,e),f.push([n,i,e]),n.src||Y(n,"none"))})}),c&&v()}function d(){(f=f.filter(function(n){var t=o.perPage*((o.preloadPages||1)+1)-1;return!n[1].isWithin(e.index,t)||p(n)})).length||r(a)}function p(n){var t=n[0];P(n[1].slide,xt),u(t,"load error",D(h,n)),F(t,"src",U(t,jt)),F(t,"srcset",U(t,Rt)),I(t,jt),I(t,Rt)}function h(n,t){var e=n[0],i=n[1];tn(i.slide,xt),"error"!==t.type&&(Q(n[2]),Y(e,""),s(Rn,e,i),s(zn)),c&&v()}function v(){f.length&&p(f.shift())}return{mount:function(){o.lazyLoad&&(l(),i(Dn,l),c||i(a,d))},destroy:D(x,f)}},Pagination:function(f,n,l){var d,p,t=Wn(f),e=t.on,i=t.emit,h=t.bind,v=n.Slides,g=n.Elements,o=n.Controller,m=o.hasFocus,r=o.getIndex,u=o.go,s=n.Direction.resolve,y=[];function c(){d&&(Q(g.pagination?_(d.children):d),tn(d,p),x(y),d=null),t.destroy()}function b(n){u(">"+n,!0)}function w(n,t){var e=y.length,i=It(t),o=E(),r=-1;i===s(Bn,!1,o)?r=++n%e:i===s(Xn,!1,o)?r=(--n+e)%e:"Home"===i?r=0:"End"===i&&(r=e-1);e=y[r];e&&(q(e.button),u(">"+r),Z(t,!0))}function E(){return l.paginationDirection||l.direction}function a(n){return y[o.toPage(n)]}function S(){var n,t=a(r(!0)),e=a(r());t&&(tn(n=t.button,bt),I(n,Jn),F(n,qn,-1)),e&&(P(n=e.button,bt),F(n,Jn,!0),F(n,qn,"")),i("pagination:updated",{list:d,items:y},t,e)}return{items:y,mount:function n(){c(),e([Mn,Dn],n),l.pagination&&v.isEnough()&&(e([En,Tn,On],S),function(){var n=f.length,t=l.classes,e=l.i18n,i=l.perPage,o=m()?n:fn(n/i);P(d=g.pagination||j("ul",t.pagination,g.track.parentElement),p=ht+"--"+E()),F(d,Yn,"tablist"),F(d,Qn,e.select),F(d,$n,E()===Hn?"vertical":"");for(var r=0;r<o;r++){var u=j("li",null,d),s=j("button",{class:t.page,type:"button"},u),c=v.getIn(r).map(function(n){return n.slide.id}),a=!m()&&1<i?e.pageX:e.slideX;h(s,"click",D(b,r)),l.paginationKeyboard&&h(s,"keydown",D(w,r)),F(u,Yn,"presentation"),F(s,Yn,"tab"),F(s,Un,c.join(" ")),F(s,Qn,gn(a,r+1)),F(s,qn,-1),y.push({li:u,button:s,page:r})}}(),S(),i("pagination:mounted",{list:d,items:y},a(f.index)))},destroy:c,getAt:a,update:S}},Sync:function(e,n,t){var i=t.isNavigation,o=t.slideFocus,r=[];function u(){var n,t;e.splides.forEach(function(n){n.isParent||(c(e,n.splide),c(n.splide,e))}),i&&(n=Wn(e),(t=n.on)(_n,f),t(An,l),t([wn,Mn],a),r.push(n),n.emit(In,e.splides))}function s(){r.forEach(function(n){n.destroy()}),x(r)}function c(n,i){n=Wn(n);n.on(En,function(n,t,e){i.go(i.is(Dt)?e:n)}),r.push(n)}function a(){F(n.Elements.list,$n,t.direction===Hn?"vertical":"")}function f(n){e.go(n.index)}function l(n,t){b(Gt,It(t))&&(f(n),Z(t))}return{setup:function(){e.options={slideFocus:z(o)?i:o}},mount:u,destroy:s,remount:function(){s(),u()}}},Wheel:function(u,s,c){var n=Wn(u).bind,a=0;function t(n){var t,e,i,o,r;n.cancelable&&(r=(t=n.deltaY)<0,e=en(n),i=c.wheelMinThreshold||0,o=c.wheelSleep||0,ln(t)>i&&o<e-a&&(u.go(r?"<":">"),a=e),r=r,c.releaseWheel&&!u.state.is(R)&&-1===s.Controller.getAdjacent(r)||Z(n))}return{mount:function(){c.wheel&&n(s.Elements.track,"wheel",t,Tt)}}},Live:function(n,t,e){var i=Wn(n).on,o=t.Elements.track,r=e.live&&!e.isNavigation,u=j("span",yt);function s(n){r&&F(o,tt,n?"off":"polite")}return{mount:function(){r&&(s(!t.Autoplay.isPaused()),F(o,et,"additions"),u.textContent="…",i(Fn,D(s,!0)),i(jn,D(s,!1)),i([Sn,On],D(C,o,u)))},disable:s,destroy:function(){I(o,[tt,et]),Q(u)}}}}),Bt={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:{slide:st,clone:ct,arrows:ft,arrow:lt,prev:dt,next:pt,pagination:ht,page:vt,spinner:rn+"__spinner"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ht(n,i,t){var e=Wn(n).on;return{mount:function(){e([wn,Dn],function(){v(function(){i.Slides.style("transition","opacity "+t.speed+"ms "+t.easing)})})},start:function(n,t){var e=i.Elements.track;H(e,"height",on(J(e).height)),v(function(){t(),H(e,"height","")})},cancel:G}}function Yt(r,n,u){var s,t=Wn(r).bind,c=n.Move,a=n.Controller,f=n.Scroll,e=n.Elements.list,l=D(H,e,"transition");function i(){l(""),f.cancel()}return{mount:function(){t(e,"transitionend",function(n){n.target===e&&s&&(i(),s())})},start:function(n,t){var e=c.toPosition(n,!0),i=c.getPosition(),o=function(n){var t=u.rewindSpeed;if(r.is(At)&&t){var e=a.getIndex(!0),i=a.getEnd();if(0===e&&i<=n||i<=e&&0===n)return t}return u.speed}(n);1<=ln(e-i)&&1<=o?u.useScroll?f.scroll(e,o,!1,t):(l("transform "+o+"ms "+u.easing),c.translate(e,!0),s=t):(c.jump(n),t())},cancel:i}}a=function(){function e(n,t){this.event=Wn(),this.Components={},this.state=s(1),this.splides=[],this._o={},this._E={};n=M(n)?$(document,n):n;un(n,n+" is invalid."),t=h({label:U(this.root=n,Qn)||"",labelledby:U(n,Vn)||""},Bt,e.defaults,t||{});try{h(t,JSON.parse(U(n,i)))}catch(n){un(!1,"Invalid JSON")}this._o=Object.create(h({},t))}var n=e.prototype;return n.mount=function(n,t){var e=this,i=this.state,o=this.Components;return un(i.is([1,7]),"Already mounted!"),i.set(1),this._C=o,this._T=t||this._T||(this.is(Mt)?Ht:Yt),this._E=n||this._E,N(T({},Xt,this._E,{Transition:this._T}),function(n,t){n=n(e,o,e._o);(o[t]=n).setup&&n.setup()}),N(o,function(n){n.mount&&n.mount()}),this.emit(wn),P(this.root,"is-initialized"),i.set(3),this.emit("ready"),this},n.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),n.Components.Sync.remount()),this},n.go=function(n){return this._C.Controller.go(n),this},n.on=function(n,t){return this.event.on(n,t),this},n.off=function(n){return this.event.off(n),this},n.emit=function(n){var t;return(t=this.event).emit.apply(t,[n].concat(_(arguments,1))),this},n.add=function(n,t){return this._C.Slides.add(n,t),this},n.remove=function(n){return this._C.Slides.remove(n),this},n.is=function(n){return this._o.type===n},n.refresh=function(){return this.emit(Dn),this},n.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?Wn(this).on("ready",this.destroy.bind(this,t)):(N(this._C,function(n){n.destroy&&n.destroy(t)},!0),n.emit(u),n.destroy(),t&&x(this.splides),e.set(7)),this},_createClass(e,[{key:"options",get:function(){return this._o},set:function(n){var t=this._o;h(t,n),h(Object.getPrototypeOf(t),n),this.state.is(1)||this.emit(Mn,t)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e}();return a.defaults={},a.STATES=n,a});
- //# sourceMappingURL=splide.min.js.map
|