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