12345678 |
- function wt(n,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}
- /*!
- * Splide.js
- * Version : 3.0.0
- * License : MIT
- * Copyright: 2021 Naotoshi Fujita
- */
- var n,t;n=this,t=function(){"use strict";var m="splide",a="data-"+m,n={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,DESTROYED:5},E=10;function _(n){n.length=0}function x(n){return!u(n)&&"object"==typeof n}function r(n){return Array.isArray(n)}function z(n){return"string"==typeof n}function R(n){return void 0===n}function u(n){return null===n}function y(n){return n instanceof HTMLElement}function b(n){return n instanceof HTMLButtonElement}function w(n){return r(n)?n:[n]}function k(n,t){w(n).forEach(t)}function A(n,t){return-1<n.indexOf(t)}function L(n,t){return n.push.apply(n,w(t)),n}var o=Array.prototype;function e(n,t,i){return o.slice.call(n,t,i)}function s(n,t){return e(n).filter(t)[0]}function S(t,n,i){t&&k(n,function(n){n&&t.classList[i?"add":"remove"](n)})}function M(n,t){S(n,z(t)?t.split(" "):t,!0)}function P(n,t){k(t,n.appendChild.bind(n))}function O(n,i){k(n,function(n){var t=i.parentNode;t&&t.insertBefore(n,i)})}function D(n,t){return(n.msMatchesSelector||n.matches).call(n,t)}function T(n,t){return n?e(n.children).filter(function(n){return D(n,t)}):[]}function F(n,t){return t?T(n,t)[0]:n.firstElementChild}function c(n,t){if(n)for(var i=Object.keys(n),r=0;r<i.length;r++){var u=i[r];if("__proto__"!==u&&!1===t(n[u],u))break}return n}function I(r){return e(arguments,1).forEach(function(i){c(i,function(n,t){r[t]=i[t]})}),r}function l(i,n){return c(n,function(n,t){r(n)?i[t]=n.slice():x(n)?i[t]=l(x(i[t])?i[t]:{},n):i[t]=n}),i}function j(t,n){t&&k(n,function(n){t.removeAttribute(n)})}function B(i,n,t){x(n)?c(n,function(n,t){B(i,t,n)}):u(t)?j(i,n):i.setAttribute(n,String(t))}function C(n,t,i){n=document.createElement(n);return t&&(z(t)?M:B)(n,t),i&&P(i,n),n}function W(i,n){if(z(n))return getComputedStyle(i)[n];c(n,function(n,t){u(n)||(i.style[t]=""+n)})}function X(n,t){W(n,{display:t})}function g(n,t){return n.getAttribute(t)}function G(n,t){return n&&n.classList.contains(t)}function H(n){return n.getBoundingClientRect()}function N(n){k(n,function(n){n&&n.parentNode&&n.parentNode.removeChild(n)})}function Y(n){return F((new DOMParser).parseFromString(n,"text/html").body)}function U(n,t){n.preventDefault(),t&&(n.stopPropagation(),n.stopImmediatePropagation())}function q(n,t){return n&&n.querySelector(t)}function J(n,t){return e(n.querySelectorAll(t))}function K(n,t){S(n,t,!1)}function V(n){return z(n)?n:n?n+"px":""}function Q(n,t){if(void 0===t&&(t=""),!n)throw new Error("["+m+"] "+t)}function f(n){setTimeout(n)}function d(){}function v(n){return requestAnimationFrame(n)}var Z=Math.min,$=Math.max,nn=Math.floor,tn=Math.ceil,rn=Math.abs;function un(n,t,i,r){var u=Z(t,i),i=$(t,i);return r?u<n&&n<i:u<=n&&n<=i}function on(n,t,i){var r=Z(t,i),i=$(t,i);return Z($(r,n),i)}function en(n){return(0<n)-(n<0)}function cn(t,n){return k(n,function(n){t=t.replace("%s",""+n)}),t}function fn(n){return n<10?"0"+n:""+n}var an={};function h(){var o={};function r(n,r){t(n,function(n,t){var i=o[n];o[n]=i&&i.filter(function(n){return n.n?n.n!==r:n.t!==t})})}function t(n,t){w(n).join(" ").split(" ").forEach(function(n){n=n.split(".");t(n[0],n[1])})}return{on:function(n,i,r,u){void 0===u&&(u=E),t(n,function(n,t){o[n]=o[n]||[],L(o[n],{i:n,r:i,t:t,u:u,n:r}).sort(function(n,t){return n.u-t.u})})},off:r,offBy:function(i){c(o,function(n,t){r(t,i)})},emit:function(n){var t=arguments;(o[n]||[]).forEach(function(n){n.r.apply(n,e(t,1))})},destroy:function(){o={}}}}var sn="mounted",ln="move",dn="moved",vn="click",hn="active",gn="inactive",pn="visible",mn="hidden",yn="slide:keydown",wn="refresh",_n="undated",bn="resize",xn="resized",kn="scrolled",p="destroy",An="lazyload:loaded";function Ln(n){var r=n.event,u={},o=[];function t(n,t){e(n,t,function(t,i){o=o.filter(function(n){return n[0]!==t||n[1]!==i||(t.removeEventListener(i,n[2],n[3]),!1)})})}function e(n,t,i){k(n,function(n){n&&t.split(" ").forEach(i.bind(null,n))})}function i(){o=o.filter(function(n){return t(n[0],n[1])}),r.offBy(u)}return r.on(p,i,u),{on:function(n,t,i){r.on(n,t,u,i)},off:function(n){r.off(n,u)},emit:r.emit,bind:function(n,t,i,r){e(n,t,function(n,t){o.push([n,t,i,r]),n.addEventListener(t,i,r)})},unbind:t,destroy:i}}function Sn(t,i,r,u){var o,n,e=Date.now,c=0,f=!0,a=0;function s(){if(!f){var n=e()-o;if(t<=n?(c=1,o=e()):c=n/t,r&&r(c),1===c&&(i(),u&&++a>=u))return l();v(s)}}function l(){f=!0}function d(){cancelAnimationFrame(n),f=!(n=c=0)}return{start:function(n){n||d(),o=e()-(n?c*t:0),f=!1,v(s)},rewind:function(){o=e(),c=0,r&&r(c)},pause:l,cancel:d,isPaused:function(){return f}}}function En(n){var t=n;return{set:function(n){t=n},is:function(n){return A(w(n),t)}}}function zn(i,r){var u;return function(){var n=arguments,t=this;u||(u=Sn(r||0,function(){i.apply(t,n),u=null},null,1)).start()}}var Rn={marginRight:["marginBottom","marginLeft"],autoWidth:["autoHeight"],fixedWidth:["fixedHeight"],paddingLeft:["paddingTop","paddingRight"],paddingRight:["paddingBottom","paddingLeft"],width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};var Mn=m,Pn=m+"__slider",On=m+"__track",Dn=m+"__list",Tn=m+"__slide",Fn=Tn+"--clone",In=Tn+"__container",jn=m+"__arrows",t=m+"__arrow",Bn=t+"--prev",Cn=t+"--next",i=m+"__pagination",Wn=m+"__progress",Xn=Wn+"__bar",Gn=m+"__autoplay",Hn=m+"__play",Nn=m+"__pause",Yn="is-active",Un="is-prev",qn="is-next",Jn="is-visible",Kn="is-loading",Vn=[Yn,Jn,Un,qn,Kn];var Qn="role",Zn="aria-controls",$n="aria-current",nt="aria-label",tt="aria-hidden",it="tabindex",rt=[Qn,Zn,$n,nt,tt,it,"disabled"],ut="slide",ot="loop",et="fade";function ct(u,r,i,o){var e,n=Ln(u),c=n.on,f=n.emit,a=n.bind,t=n.destroy,s=u.Components,l=u.root,d=u.options,v=d.isNavigation,h=d.updateOnMove,g=s.Direction.resolve,p=-1<i,m=F(o,"."+In);function y(){var n;e||(n=u.index,w.call(this,_()),function(n){var t=!n&&!_();B(o,tt,t||null),B(o,it,!t&&d.slideFocus?0:null),n!==G(o,Jn)&&(S(o,Jn,n),f(n?pn:mn,this))}.call(this,function(){if(u.is(et))return _();var n=H(s.Elements.track),t=H(o),i=g("left"),r=g("right");return nn(n[i])<=tn(t[i])&&nn(t[r])<=tn(n[r])}()),S(o,Un,r===n-1),S(o,qn,r===n+1))}function w(n){n!==G(o,Yn)&&(S(o,Yn,n),v&&B(o,$n,n||null),f(n?hn:gn,this))}function _(){return u.index===r}return{index:r,slideIndex:i,slide:o,container:m,isClone:p,mount:function(){var t=this;!function(){p||(o.id=l.id+"-slide"+fn(r+1));{var n,t;v&&(b(o)||B(o,Qn,"button"),t=p?i:r,n=cn(d.i18n.slideX,t+1),t=u.splides.map(function(n){return n.root.id}).join(" "),B(o,nt,n),B(o,Zn,t))}}(),a(o,"click keydown",function(n){f("click"===n.type?vn:yn,t,n)}),c([xn,dn,_n,wn,kn],y.bind(this)),h&&c(ln,function(n,t,i){e||(y.call(this),i===r&&w.call(this,!0))}.bind(this)),y.call(this)},destroy:function(){e=!0,t(),K(o,Vn),j(o,rt)},rule:function(n,t,i){i="#"+o.id+(m&&i?" > ."+In:""),s.Style.rule(i,n,t)},isWithin:function(n,t){return n=rn(n-r),(n=!u.is(ut)&&!p?Z(n,u.length-n):n)<=t}}}var ft="touchmove mousemove",at="touchend touchcancel mouseup mouseleave";var st=["Left","Right","Up","Down"];var lt=a+"-lazy",dt=lt+"-srcset",vt="["+lt+"], ["+dt+"]";var ht=[" ","Enter","Spacebar"];var gt=Object.freeze({__proto__:null,Options:function(t,n,r){var i,u,o,e=zn(f);function c(n){n&&removeEventListener("resize",e)}function f(){var n=s(u,function(n){return n[1].matches})||[];n[0]!==o&&function(n){n=r.breakpoints[n]||i;n.destroy?(t.options=i,t.destroy("completely"===n.destroy)):(t.state.is(5)&&(c(!0),t.mount()),t.options=n)}(o=n[0])}return{setup:function(){try{l(r,JSON.parse(g(t.root,a)))}catch(n){Q(!1,n.message)}i=l({},r)},mount:function(){var n=r.breakpoints,i="min"===r.mediaQuery;n&&(u=Object.keys(n).sort(function(n,t){return i?+t-+n:+n-+t}).map(function(n){return[n,matchMedia("("+(i?"min":"max")+"-width:"+n+"px)")]}),addEventListener("resize",e),f())},destroy:c}},Direction:function(n,t,r){return{resolve:function(n,t){var i=r.direction;return Rn[n]["rtl"!==i||t?"ttb"===i?0:-1:1]||n},orient:function(n){return n*("rtl"===r.direction?1:-1)}}},Elements:function(n,t,i){var r,u,o,e,c=Ln(n).on,f=n.root,a={},s=[];function l(){var n;!function(){u=F(f,"."+Pn),o=q(f,"."+On),e=F(o,"."+Dn),Q(o&&e,"A track/list element is missing."),L(s,T(e,"."+Tn+":not(."+Fn+")"));var n=g("."+Gn),t=g("."+jn);I(a,{root:f,slider:u,track:o,list:e,slides:s,arrows:t,prev:q(t,"."+Bn),next:q(t,"."+Cn),bar:q(g("."+Wn),"."+Xn),play:q(n,"."+Hn),pause:q(n,"."+Nn)})}(),n=f.id||function(n){return""+n+fn(an[n]=(an[n]||0)+1)}(m),f.id=n,o.id=o.id||n+"-track",e.id=e.id||n+"-list",M(f,r=p())}function d(){_(s),K(f,r)}function v(){d(),l()}function h(){K(f,r),M(f,r=p())}function g(n){return F(f,n)||F(u,n)}function p(){return[Mn+"--"+i.type,Mn+"--"+i.direction,i.drag&&Mn+"--draggable",i.isNavigation&&Mn+"--nav",Yn]}return I(a,{setup:l,mount:function(){c(wn,v),c(_n,h)},destroy:d})},Style:function(){var n,u;function r(t,n,i){var r=u.cssRules,r=s(r,function(n){return o(n)&&n.selectorText===t})||r[u.insertRule(t+"{}",0)];!o(r)||(r=r.style)[n]!==(i=""+i)&&(r[n]=i)}function o(n){return n instanceof CSSStyleRule}return{mount:function(){n=C("style",{},document.head),u=n.sheet},destroy:function(){N(n),u=null},rule:r,ruleBy:function(n,t,i){r("#"+(y(n)?n.id:n),t,i)}}},Slides:function(r,u,o){var n=Ln(r),t=n.on,e=n.emit,c=n.bind,f=(n=u.Elements).slides,a=n.list,s=[];function i(){f.forEach(function(n,t){v(n,t,-1)})}function l(){g(function(n){n.destroy()}),_(s)}function d(){l(),i()}function v(n,t,i){n=ct(r,t,i,n);n.mount(),s.push(n)}function h(n){return n?p(function(n){return!n.isClone}):s}function g(n,t){h(t).forEach(n)}function p(t){return s.filter("function"==typeof t?t:function(n){return z(t)?D(n.slide,t):A(w(t),n.index)})}return{mount:function(){i(),t(wn,d)},destroy:l,register:v,get:h,getIn:function(n){var t=u.Controller,i=t.toIndex(n),r=t.hasFocus()?1:o.perPage;return p(function(n){return un(n.index,i,i+r-1)})},getAt:function(n){return p(n)[0]},add:function(n,u){k(n,function(n){var t,i,r;y(n=z(n)?Y(n):n)&&((t=f[u])?O(n,t):P(a,n),M(n,o.classes.slide),n=n,i=e.bind(null,bn),n=J(n,"img"),(r=n.length)?n.forEach(function(n){c(n,"load error",function(){--r||i()})}):i())}),e(wn)},remove:function(n){N(p(n).map(function(n){return n.slide})),e(wn)},forEach:g,filter:p,rule:function(t,i,r){g(function(n){n.rule(t,i,r)})},getLength:function(n){return(n?f:s).length},isEnough:function(){return s.length>o.perPage}}},Clones:function(c,n,f){var t,i=Ln(c),r=i.on,u=i.emit,a=n.Elements,s=n.Slides,o=n.Direction.resolve,l=[];function e(){(t=g())&&function(u){var o=s.get().slice(),e=o.length;if(e){for(;o.length<u;)L(o,o);L(o.slice(-u),o.slice(0,u)).forEach(function(n,t){var i=t<u,r=function(n,t){n=n.cloneNode(!0);return M(n,f.classes.clone),n.id=c.root.id+"-clone"+fn(t+1),n}(n.slide,t);i?O(r,o[0].slide):P(a.list,r),L(l,r),s.register(r,t-u+(i?0:e),n.index)})}}(t)}function d(){N(l),_(l)}function v(){d(),e()}function h(){t!==g()&&u(wn)}function g(){var n,t,i=f.clones;return c.is(ot)?i||(n=a.list,z(t=f[o("fixedWidth")])&&(t=H(n=C("div",{style:"width: "+t+"; position: absolute;"},n)).width,N(n)),i=((t=t)&&tn(H(a.track)[o("width")]/t)||f[o("autoWidth")]&&c.length||f.perPage)*(f.drag?(f.flickMaxPages||1)+1:2)):i=0,i}return{mount:function(){e(),r(wn,v),r([_n,bn],h)},destroy:d}},Layout:function(n,t,i){var r=Ln(n),u=r.on,o=r.bind,e=r.emit,c=t.Slides,f=t.Style.ruleBy,a=t.Direction.resolve,s=(t=t.Elements).track,l=t.list,d=c.getAt,v="ttb"===i.direction;function h(){f(n.root,"maxWidth",V(i.width)),f(s,a("paddingLeft"),m(!1)),f(s,a("paddingRight"),m(!0)),c.rule(a("marginRight"),V(i.gap)),c.rule("width",i.autoWidth?"":V(i.fixedWidth)||(v?"":w())),p(),g()}function g(){f(s,"height",function(){var n="";v&&(Q(n=y(),"height or heightRatio is missing."),n="calc("+n+" - "+m(!1)+" - "+m(!0)+")");return n}()),i.heightRatio&&p(),e(xn)}function p(){c.rule("height",V(i.fixedHeight)||(v?i.autoHeight?"":w():y()),!0)}function m(n){var t=i.padding,n=a(n?"right":"left",!0);return t&&V(t[n]||(x(t)?0:t))||"0px"}function y(){return V(i.height||H(l).width*i.heightRatio)}function w(){var n=V(i.gap);return"calc((100%"+(n&&" + "+n)+")/"+(i.perPage||1)+(n&&" - "+n)+")"}function _(n,t){var i=d(n);if(i){n=H(i.slide)[a("right")],i=H(l)[a("left")];return rn(n-i)+(t?0:b())}return 0}function b(){var n=d(0);return n&&parseFloat(W(n.slide,a("marginRight")))||0}return{mount:function(){h(),o(window,"resize load",zn(e.bind(this,bn))),u([_n,wn],h),u(bn,g)},listSize:function(){return H(l)[a("width")]},slideSize:function(n,t){return(n=d(n||0))?H(n.slide)[a("width")]+(t?0:b()):0},sliderSize:function(){return _(n.length-1,!0)-_(-1,!0)},totalSize:_,getPadding:function(n){return parseFloat(W(s,a("padding"+(n?"Right":"Left"),!0)))||0}}},Move:function(c,f,a){var s,n=Ln(c),t=n.on,l=n.emit,r=(n=f.Layout).slideSize,i=n.getPadding,u=n.totalSize,o=n.listSize,e=n.sliderSize,d=(n=f.Direction).resolve,v=n.orient,h=(n=f.Elements).list,g=n.track,p=!0;function m(){S(!0)?w(k(!0)):(p=p||A())&&y(c.index)}function y(n){w(b(n,!0))}function w(n){n=function(n){{var t,i,r;!s&&c.is(ot)&&(t=n-x(),i=S(!1,n),r=S(!0,n),(i&&0<t||r&&t<0)&&(n+=v(e()*(i?1:-1))))}return n}(n),p=A(n),f.Style.ruleBy(h,"transform","translate"+d("X")+"("+100*n/o()+"%)")}function _(n){for(var t=f.Slides.get(),i=0,r=1/0,u=0;u<t.length;u++){var o=t[u].index,e=rn(b(o,!0)-n);if(!(e<r))break;r=e,i=o}return i}function b(n,t){var i,i=v(u(n-1)-(i=n,"center"===(n=a.focus)?(o()-r(i,!0))/2:+n*r(i)||0));return t?function(n){a.trimSpace&&c.is(ut)&&(n=on(n,0,v(e()-o())));return n}(i):i}function x(){var n=d("left");return H(h)[n]-H(g)[n]+v(i(!1))}function k(n){return b(n?f.Controller.getEnd():0,!!a.trimSpace)}function A(n){return n=R(n)?x():n,rn(n-b(_(n),!0))<10}function L(){return!!s}function S(n,t){t=R(t)?x():t;var i=!0!==n&&v(t)<v(k(!1)),t=!1!==n&&v(t)>v(k(!0));return i||t}return{mount:function(){c.is(et)||t([xn,_n,wn],m,E-1)},move:function(n,t,i,r){var u,o,e;s||(u=c.state.set,o=x(),s=(e=n!==t)||a.waitForTransition,u(4),l(ln,t,i,n),f.Transition.start(n,function(){e&&y(t),s=!1,u(3),l(dn,t,i,n),"move"===a.trimSpace&&n!==i&&o===x()?f.Controller.go(i<n?">":"<",!1,r):r&&r()}))},jump:y,translate:w,cancel:function(){s=!1,f.Transition.cancel(),w(x())},toIndex:_,toPosition:b,getPosition:x,getLimit:k,isBusy:L,exceededLimit:S}},Controller:function(e,n,u){var o,c,f,t=Ln(e).on,a=n.Move,i=a.jump,s=a.getPosition,l=a.getLimit,d=(n=n.Slides).isEnough,r=n.getLength,v=e.is(ot),h=u.start||0,g=h;function p(){o=r(!0),c=u.perMove,f=u.perPage,h=Z(h,o-1),i(h)}function m(){S(a.toIndex(s()))}function y(n){return _(!1,n)}function w(n){return _(!0,n)}function _(n,t){var i,r,u=c||E()?1:f,o=b(h+u*(n?-1:1),h);return-1!==o||!e.is(ut)||(i=s(),r=l(!n),u=1,rn(i-r)<u)?t?o:k(o):n?0:x()}function b(n,t,i){var r;return d()?(r=x(),n<0||r<n?n=un(0,n,t,!0)||un(r,t,n,!0)?A(L(n)):v?c?n:n<0?-(o%f||f):o:u.rewind?n<0?r:0:-1:v||i||n===t||(n=c?n:A(L(t)+(n<t?-1:1)))):n=-1,n}function x(){var n=o-f;return(E()||v&&c)&&(n=o-1),$(n,0)}function k(n){return v?d()?n%o+(n<0?o:0):-1:n}function A(n){return on(E()?n:f*n,0,x())}function L(n){return E()||(n=un(n,o-f,o-1)?o-1:n,n=nn(n/f)),n}function S(n){n!==h&&(g=h,h=n)}function E(){return!R(u.focus)||u.isNavigation}return{mount:function(){p(),i(h),t([_n,wn],p),t(kn,m,0)},go:function(n,t,i){var r=function(n){var t=h;{var i,r;z(n)?(r=n.match(/([+\-<>])(\d+)?/)||[],i=r[1],r=r[2],"+"===i||"-"===i?t=b(h+ +(""+i+(+r||1)),h,!0):">"===i?t=r?A(+r):y(!0):"<"===i&&(t=w(!0))):t=v?on(n,-f,o+f-1):on(n,0,x())}return t}(n);-1<(n=k(r))&&!a.isBusy()&&(t||n!==h)&&(S(n),a.move(r,n,g,i))},getNext:y,getPrev:w,getEnd:x,setIndex:S,getIndex:function(n){return n?g:h},toIndex:A,toPage:L,hasFocus:E}},Arrows:function(u,n,i){var r,t=Ln(u),o=t.on,e=t.bind,c=t.emit,f=i.classes,a=i.i18n,s=n.Elements,l=n.Controller,d=s.arrows,v=s.prev,h=s.next,g={};function p(){var n,t;i.arrows&&(v&&h||(d=C("div",f.arrows),v=m(!0),h=m(!1),r=!0,P(d,[v,h]),O(d,F("slider"===i.arrows&&s.slider||u.root)))),v&&h&&(g.prev?X(d,!1===i.arrows?"none":""):(n=s.track.id,B(v,Zn,n),B(h,Zn,n),g.prev=v,g.next=h,t=l.go,o([sn,dn,_n,wn,kn],y),e(h,"click",function(){t(">",!0)}),e(v,"click",function(){t("<",!0)}),c("arrows:mounted",v,h)))}function m(n){return Y('<button class="'+f.arrow+" "+(n?f.prev:f.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40"><path d="'+(i.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 y(){var n=u.index,t=l.getPrev(),i=l.getNext(),r=-1<t&&n<t?a.last:a.prev,n=-1<i&&i<n?a.first:a.next;v.disabled=t<0,h.disabled=i<0,B(v,nt,r),B(h,nt,n),c("arrows:updated",v,h,t,i)}return{arrows:g,mount:function(){p(),o(_n,p)},destroy:function(){r?N(d):(j(v,rt),j(h,rt))}}},Autoplay:function(n,t,r){var i,u,o,e=Ln(n),c=e.on,f=e.bind,a=e.emit,s=t.Elements,l=Sn(r.interval,n.go.bind(n,">"),function(n){var t=s.bar;t&&W(t,{width:100*n+"%"});a("autoplay:playing",n)}),d=l.isPaused;function v(n){var t=n?"pause":"play",i=s[t];i&&(b(i)||B(i,Qn,"button"),B(i,Zn,s.track.id),B(i,nt,r.i18n[t]),f(i,"click",n?g:h))}function h(){d()&&t.Slides.isEnough()&&(l.start(!r.resetProgress),i=u=!1,a("autoplay:play"))}function g(n){void 0===n&&(n=!0),d()||(l.pause(),a("autoplay:pause")),o=n}function p(){o||(i||u?g(!1):h())}return{mount:function(){var n=r.autoplay;n&&(v(!0),v(!1),function(){var n=s.root;r.pauseOnHover&&f(n,"mouseenter mouseleave",function(n){i="mouseenter"===n.type,p()});r.pauseOnFocus&&f(n,"focusin focusout",function(n){u="focusin"===n.type,p()});c([ln,"scroll",wn],l.rewind)}(),"pause"!==n&&h())},destroy:l.cancel,play:h,pause:g,isPaused:d}},Cover:function(n,t,i){var r=Ln(n).on;function u(i){t.Slides.forEach(function(n){var t=F(n.container||n.slide,"img");t&&t.src&&o(i,t,n)})}function o(n,t,i){i.rule("background",n?'center/cover no-repeat url("'+t.src+'")':"",!0),X(t,n?"none":"")}return{mount:function(){i.cover&&(r(An,function(n,t){o(!0,n,t)}),r([sn,_n,wn],u.bind(null,!0)))},destroy:function(){u(!1)}}},Scroll:function(c,n,f){var i,t=Ln(c),r=t.on,a=t.emit,s=n.Move,l=s.getPosition,d=s.getLimit,v=s.exceededLimit;function h(r,n,u){var t,o=l(),e=1;n=n||(t=rn(r-o),$(t/1.5,800)),p(),i=Sn(n,g,function(n){var t=l(),i=(o+(r-o)*(i=n,(n=f.easingFunc)?n(i):1-Math.pow(1-i,4))-l())*e;s.translate(t+i),c.is(ut)&&!u&&v()&&(e*=.6,rn(i)<10&&(i=v(!1),h(d(!i),600,!0)))},1),a("scroll"),i.start()}function g(){a(kn)}function p(){i&&i.cancel()}function u(){i&&!i.isPaused()&&(p(),g())}return{mount:function(){r(ln,p),r([_n,wn],u)},destroy:p,scroll:h,cancel:u}},Drag:function(r,u,o){var e,c,f,a,s,l,d,v,t,h,n=Ln(r),i=n.on,g=n.emit,p=n.bind,m=n.unbind,y=u.Move,w=u.Scroll,_=u.Controller,b=u.Elements.track,x=(n=u.Direction).resolve,k=n.orient,A=y.getPosition,L=y.exceededLimit,S=r.is(ut),E=r.is(et),z=!1;function R(){var n=o.drag;B(!n),s="free"===n}function M(n){t||(d="mousedown"===n.type)&&n.button||(y.isBusy()?U(n,!0):(h=d?window:b,a=f=null,v=!1,p(h,ft,P),p(h,at,O),y.cancel(),w.cancel(),D(n)))}function P(n){var t,i;a||(v=!0,g("drag")),(a=n).cancelable&&(l?(t=50<j(n)-j(c),i=z!==(z=L()),(t||i)&&D(n),E||y.translate(e+(I(n)-I(c))/(z&&S?5:1)),g("dragging"),U(n)):(i=o.dragMinThreshold||15,l=d||rn(I(n)-I(c))>i,F()&&U(n)))}function O(n){var t,i;m(h,ft+" "+at),a&&((l||n.cancelable&&F())&&(t=function(n){if(r.is(ot)||!z){var t=c===a&&f||c,i=I(a)-I(t),t=j(n)-j(t),n=j(n)-j(a)<50;if(t&&n)return i/t}return 0}(n),i=t,i=A()+en(i)*Z(rn(i)*(o.flickPower||600),s?1/0:u.Layout.listSize()*(o.flickMaxPages||1)),s?w.scroll(i):E?_.go(r.index+k(en(t))):_.go(function(n){n=y.toIndex(n);return S?on(n,0,_.getEnd()):n}(i),!0),U(n)),g("dragged")),l=!1}function D(n){f=c,c=n,e=A()}function T(n){!t&&v&&U(n,!0)}function F(){var n=rn(I(a)-I(c));return rn(I(a,!0)-I(c,!0))<n}function I(n,t){t="page"+x(t?"Y":"X");return(d?n:n.touches[0])[t]}function j(n){return n.timeStamp}function B(n){t=n}return{mount:function(){p(b,"touchstart mousedown",M,{passive:!1,capture:!0}),p(b,"click",T,{capture:!0}),i([sn,_n],R)},disable:B}},Keyboard:function(t,n,i){var r,u=Ln(t),o=u.on,e=u.bind,c=u.unbind,f=n.Elements.root,a=n.Direction.resolve;function s(){var n=i.keyboard,n=void 0===n?"global":n;n&&("focused"===n?B(r=f,it,0):r=window,e(r,"keydown",d))}function l(){c(r,"keydown"),y(r)&&j(r,it)}function d(n){n=n.key,n=A(st,n)?"Arrow"+n:n;n===a("ArrowLeft")?t.go("<"):n===a("ArrowRight")&&t.go(">")}return{mount:function(){s(),o(_n,function(){l(),s()})},destroy:l}},LazyLoad:function(t,n,o){var i=Ln(t),r=i.on,u=i.off,e=i.bind,c=i.emit,f="sequential"===o.lazyLoad,a=[],s=0;function l(){s=0,a=[]}function d(){(a=a.filter(function(n){return!n.o.isWithin(t.index,o.perPage*((o.preloadPages||1)+1))||v(n)})).length||u(dn)}function v(t){var i=t.e;M(t.o.slide,Kn),e(i,"load error",function(n){!function(n,t){var i=n.o;K(i.slide,Kn),t||(N(n.c),X(n.e,""),c(An,n.e,i),c(bn));f&&h()}(t,"error"===n.type)}),["src","srcset"].forEach(function(n){t[n]&&(B(i,n,t[n]),j(i,"src"===n?lt:dt))})}function h(){s<a.length&&v(a[s++])}return{mount:function(){o.lazyLoad&&(r([sn,wn],function(){l(),n.Slides.forEach(function(u){J(u.slide,vt).forEach(function(n){var t,i=g(n,lt),r=g(n,dt);i===n.src&&r===n.srcset||(B(t=C("span",o.classes.spinner,n.parentElement),Qn,"presentation"),a.push({e:n,o:u,src:i,srcset:r,c:t}),X(n,"none"))})}),f&&h()}),f||r([sn,wn,dn],d))},destroy:l}},Pagination:function(l,n,d){var v,t=Ln(l),i=t.on,r=t.emit,h=t.bind,u=t.unbind,g=n.Slides,p=n.Elements,o=n.Controller,m=o.hasFocus,e=o.getIndex,y=[];function c(){f(),d.pagination&&g.isEnough()&&(function(){var n=l.length,t=d.classes,i=d.i18n,r=d.perPage,u="slider"===d.pagination&&p.slider||p.root,o=m()?n:tn(n/r);v=C("ul",t.pagination,u);for(var e=0;e<o;e++){var c=C("li",null,v),f=C("button",{class:t.page,type:"button"},c),a=g.getIn(e).map(function(n){return n.slide.id}),s=!m()&&1<r?i.pageX:i.slideX;h(f,"click",w.bind(null,e)),B(f,Zn,a.join(" ")),B(f,nt,cn(s,e+1)),y.push({li:c,button:f,page:e})}}(),r("pagination:mounted",{list:v,items:y},a(l.index)),s())}function f(){v&&(N(v),y.forEach(function(n){u(n.button,"click")}),_(y),v=null)}function w(t){o.go(">"+t,!0,function(){var n=g.getAt(o.toIndex(t));n&&n.slide.focus()})}function a(n){return y[o.toPage(n)]}function s(){var n=a(e(!0)),t=a(e());n&&(K(n.button,Yn),j(n.button,$n)),t&&(M(t.button,Yn),B(t.button,$n,!0)),r("pagination:updated",{list:v,items:y},n,t)}return{items:y,mount:function(){c(),i([_n,wn],c),i([ln,kn],s)},destroy:f,getAt:a}},Sync:function(i,n,r){var u=i.splides;return{mount:function(){var o,n,t;r.isNavigation?(n=Ln(i),t=n.on,n=n.emit,t(vn,function(n){i.go(n.index)}),t(yn,function(n,t){A(ht,t.key)&&(i.go(n.index),U(t))}),n("navigation:mounted",i.splides)):(o=[],u.concat(i).forEach(function(r,n,u){Ln(r).on(ln,function(t,n,i){u.forEach(function(n){n===r||A(o,r)||(o.push(n),n.go(n.is(ot)?i:t))}),_(o)})}))}}},Wheel:function(i,n,t){var r=Ln(i).bind;function u(n){var t=n.deltaY;t&&(i.go(t<0?"<":">"),U(n))}return{mount:function(){t.wheel&&r(n.Elements.track,"wheel",u,{passive:!1,capture:!0})}}}}),pt={type:"slide",speed:400,waitForTransition:!0,perPage:1,arrows:!0,pagination:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(.42,.65,.27,.99)",drag:!0,direction:"ltr",slideFocus:!0,trimSpace:!0,classes:{slide:Tn,clone:Fn,arrows:jn,arrow:t,prev:Bn,next:Cn,pagination:i,page:i+"__page",spinner:m+"__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"}};function mt(n,r,t){var i=Ln(n).on,u=r.Style.ruleBy;return{mount:function(){i([sn,wn],function(){f(function(){r.Slides.forEach(function(n){u(n.slide,"transition","opacity "+t.speed+"ms "+t.easing)})})})},start:function(n,t){var i=r.Elements.track;u(i,"height",V(H(i).height)),f(function(){t(),u(i,"height","")})},cancel:d}}function yt(o,t,e){var c,n=Ln(o).bind,f=t.Move,a=t.Controller,i=t.Elements.list;function r(){s("")}function s(n){t.Style.ruleBy(i,"transition",n)}return{mount:function(){n(i,"transitionend",function(n){n.target===i&&c&&(r(),c())})},start:function(n,t){var i=f.toPosition(n,!0),r=f.getPosition(),u=function(n){var t=e.rewindSpeed;if(o.is(ut)&&t){var i=a.getIndex(!0),r=a.getEnd();if(0===i&&r<=n||r<=i&&0===n)return t}return e.speed}(n);1<=rn(i-r)&&1<=u?(s("transform "+u+"ms "+e.easing),f.translate(i),c=t):(f.jump(n),t())},cancel:r}}i=function(){function i(n,t){this.event=h(),this.Components={},this.state=En(1),this.splides=[],this.f={},this.a={};n=z(n)?q(document,n):n;Q(n,n+" is invalid."),this.root=n,l(pt,i.defaults),l(l(this.f,pt),t||{})}var n,t,r=i.prototype;return r.mount=function(n,t){var i=this,r=this.state,u=this.Components;return Q(r.is([1,5]),"Already mounted."),r.set(1),this.s=u,this.l=t||this.l||(this.is(et)?mt:yt),this.a=n||this.a,c(I({},gt,this.a,{Transition:this.l}),function(n,t){n=n(i,u,i.f);(u[t]=n).setup&&n.setup()}),c(u,function(n){n.mount&&n.mount()}),this.emit(sn),M(this.root,"is-initialized"),r.set(3),this.emit("ready"),this},r.sync=function(n){return this.splides.push(n),n.splides.push(this),this},r.go=function(n){return this.s.Controller.go(n),this},r.on=function(n,t){return this.event.on(n,t,null,20),this},r.off=function(n){return this.event.off(n),this},r.emit=function(n){var t;return(t=this.event).emit.apply(t,[n].concat(e(arguments,1))),this},r.add=function(n,t){return this.s.Slides.add(n,t),this},r.remove=function(n){return this.s.Slides.remove(n),this},r.is=function(n){return this.f.type===n},r.refresh=function(){return this.emit(wn),this},r.destroy=function(t){var n=this.event,i=this.state;return i.is(1)?n.on("ready",this.destroy.bind(this,t),this):(c(this.s,function(n){n.destroy&&n.destroy(t)}),n.emit(p),n.destroy(),_(this.splides),i.set(5)),this},n=i,(r=[{key:"options",get:function(){return this.f},set:function(n){var t=this.f;l(t,n),this.state.is(1)||this.emit(_n,t)}},{key:"length",get:function(){return this.s.Slides.getLength(!0)}},{key:"index",get:function(){return this.s.Controller.getIndex()}}])&&wt(n.prototype,r),t&&wt(n,t),i}();return i.defaults={},i.STATES=n,i},"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();
|