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