@splidejs/splide
Advanced tools
Comparing version 1.2.1 to 1.2.2
/*! | ||
* Splide.js | ||
* Version : 1.2.0 | ||
* Version : 1.2.1 | ||
* License : MIT | ||
* Copyright: 2019 Naotoshi Fujita | ||
*/!function(i){var e={};function o(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return i[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=i,o.c=e,o.d=function(t,n,i){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)o.d(i,e,function(t){return n[t]}.bind(null,e));return i},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,i){"use strict";function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}function r(i,e){Object.keys(i).some(function(t,n){return e(i[t],t,n)})}function a(n){return Object.keys(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function s(t,n){var i=e({},t);return o(i)&&o(n)&&r(n,function(t,n){o(t)?(o(i[n])||(i[n]={}),i[n]=s(i[n],t)):i[n]=t}),i}i.r(n);var u="splide",l={active:"is-active",visible:"is-visible",loading:"is-loading"},d={type:"slide",rewind:!1,speed:400,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,perPage:1,perMove:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:!0,drag:!0,flickThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,isNavigation:!1,trimSpace:!0,breakpoints:!1,classes:{root:u,slider:u+"__slider",track:u+"__track",list:u+"__list",slide:u+"__slide",container:u+"__slide__container",arrows:u+"__arrows",arrow:u+"__arrow",prev:u+"__arrow--prev",next:u+"__arrow--next",pagination:u+"__pagination",page:u+"__pagination__page",clone:u+"__slide--clone",progress:u+"__progress",bar:u+"__progress__bar",autoplay:u+"__autoplay",play:u+"__play",pause:u+"__pause",spinner:u+"__spinner",sr:u+"__sr"},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 f(t,n){return t&&n?t.querySelector(n.split(" ")[0]):null}function c(t,n){if(t){var i=a(t.children);for(var e in i){var o=i[e];if(m(o,n.split(" ")[0]))return o}}return null}function p(t,n){var i=document.createElement(t);return r(n,function(t,n){return y(i,n,t)}),i}function h(i,t){i&&r(t,function(t,n){i.style[n]=t||""})}function g(n){if(n){for(var t=arguments.length,i=new Array(1<t?t-1:0),e=1;e<t;e++)i[e-1]=arguments[e];i.forEach(function(t){t&&n.classList.add(t)})}}function v(t,n){t&&t.classList.remove(n)}function m(t,n){return!!t&&t.classList.contains(n)}function y(t,n,i){t&&t.setAttribute(n,i)}function x(t,n){t&&t.removeAttribute(n)}function b(n,t,i,e){return void 0===e&&(e=!0),n?t.split(" ").map(function(t){return n.addEventListener(t,i,{passive:e}),function(){return n.removeEventListener(t,i)}}):[]}function w(o,t){var r,s;return{mount:function(){b(r=t.Elements.list,"transitionend",function(t){t.target===r&&s&&s()})},start:function(t,n,i,e){s=e,h(r,{transition:"transform "+o.options.speed+"ms "+o.options.easing,transform:"translate("+i.x+"px,"+i.y+"px)"})}}}function _(e,o){function r(t){var n=o.Slides.getSlide(t),i=e.options;n&&h(n.slide,{transition:"opacity "+i.speed+"ms "+i.easing})}return o.Options.fix({perPage:1,gap:0,padding:0}),o.Drag&&(o.Drag.required=!1),{mount:function(){r(e.index)},start:function(t,n,i,e){r(n),e()}}}var S="loop",k="fade";var P="[SPLIDE]";function C(t){console.error(P+" "+t)}function E(t,n){if(!t)throw new Error(n);return t}function I(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function M(t){var n=t.root.getAttribute("data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){C('"data-splide" must be a valid JSON.')}return{mount:function(){t.index=t.options.start},fix:function(i){var e=s(t.options,i),o=e.breakpoints;o&&r(o,function(t,n){e.breakpoints[n]=s(o[n],i)}),t.options=e}}}function O(i){var e=i.root,o=i.classes;if(!e.id){var t=window[H]||0;window[H]=++t,e.id="splide"+(t<10?"0"+t:t)}var r={mount:function(){var t="was not found.";this.slider=c(e,o.slider),this.track=f(e,"."+o.track),E(this.track,"A track "+t),this.list=c(this.track,o.list),E(this.list,"A list "+t),this.slides=a(this.list.children),E(this.slides.length,"A slide "+t);var n=s(o.arrows);this.arrows={prev:f(n,"."+o.prev),next:f(n,"."+o.next)};var i=s(o.autoplay);this.bar=f(s(o.progress),"."+o.bar),this.play=f(i,"."+o.play),this.pause=f(i,"."+o.pause),function(){r.track.id||(r.track.id=e.id+"-track");r.list.id||(r.list.id=e.id+"-list")}()},mounted:function(){var t=o.root,n=i.options;g(e,""+t,t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":"")}};function s(t){return c(e,t)||c(r.slider,t)}return r}var W=function(){function t(t,n,i){var e=this;void 0===n&&(n={}),void 0===i&&(i={}),this.root=t instanceof HTMLElement?t:f(document,t),E(this.root,"An invalid root element or selector was given."),this.Components={},this.Event=function(){var i={};return{on:function(t,n){t.split(" ").forEach(function(t){-1<t.indexOf(".")&&i[t]||(i[t]||(i[t]=[]),i[t].push(n))})},off:function(t){t.split(" ").forEach(function(t){return delete i[t]})},emit:function(e){for(var t=arguments.length,o=new Array(1<t?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];r(i,function(t,n){if(n.split(".")[0]===e&&t)for(var i in t)t[i].apply(t,o)})}}}(),this.State=function(t){var n=t;return{set:function(t){n=t},is:function(t){return t===n}}}(1),this._options=s(d,n),this._index=0,this._components=i,this.on("move drag",function(){return e.State.set(4)}).on("moved dragged",function(){return e.State.set(3)})}var n=t.prototype;return n.mount=function(t,n){var e=this;void 0===t&&(t={}),void 0===n&&(n=null),this.Components=function(i,t,n){var e={};return r(t,function(t,n){e[n]=t(i,e,n.toLowerCase())}),n=n||i.is(k)?_:w,e.Transition=n(i,e),e}(this,s(this._components,t),n);try{r(this.Components,function(t,n){var i=t.required;void 0===i||i?t.mount&&t.mount():delete e.Components[n]})}catch(t){return C(t.message),null}return r(this.Components,function(t){t.mounted&&t.mounted()}),this.State.set(2),this.emit("mounted"),this.State.set(3),this.emit("ready"),h(this.root,{visibility:"visible"}),this},n.sync=function(t){return this.sibling=t,this},n.on=function(t,n){return this.Event.on(t,n),this},n.off=function(t){return this.Event.off(t),this},n.emit=function(t){for(var n,i=arguments.length,e=new Array(1<i?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(e)),this},n.go=function(t,n){void 0===n&&(n=!0),(this.State.is(3)||this.State.is(4)&&!n)&&this.Components.Controller.go(t,!1)},n.is=function(t){return t===this._options.type},function(t,n,i){n&&I(t.prototype,n),i&&I(t,i)}(t,[{key:"index",get:function(){return this._index},set:function(t){this._index=parseInt(t)}},{key:"length",get:function(){return this.Components.Slides.length}},{key:"options",get:function(){return this._options},set:function(t){this._options=s(this._options,t),this.State.is(1)||this.emit("updated",this._options)}},{key:"classes",get:function(){return this._options.classes}},{key:"i18n",get:function(){return this._options.i18n}}]),t}(),H="splideUid";function L(t,n,i){return Math.min(Math.max(t,i<n?i:n),i<n?n:i)}function A(t){for(var n=arguments.length,i=new Array(1<n?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];var o=0;return t.replace(/%s/g,function(){return i[o++]})}function T(t){var n=typeof t;return"string"==n?t:"number"==n&&0<t?parseFloat(t)+"px":""}function j(t,n){if("number"==typeof n)return n;var i=p("div",{});h(i,{position:"absolute",width:n}),t.appendChild(i);var e=i.clientWidth;return t.removeChild(i),e}function q(r,e){var o,n={mount:function(){o=r.options,r.on("move",function(t){r.index=t}).on("updated",function(t){o=t,r.index=n.rewind(n.trim(r.index))})},go:function(t,n){var i=this.trim(this.parse(t));e.Track.go(i,this.rewind(i),n)},parse:function(t){var n=r.index,i=String(t).match(/([+\-<>])(\d+)?/),e=i&&i[1]||"",o=i?parseInt(i[2]):0;switch(e){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1<o?o:this.indexToPage(n)+1);break;case"<":n=this.pageToIndex(-1<o?o:this.indexToPage(n)-1);break;default:n=parseInt(t)}return n},pageToIndex:function(t){if(s())return t;var n=r.length,i=o.perPage,e=t*i;return n-i<=(e-=(this.pageLength*i-n)*z(e/n))&&e<n&&(e=n-i),e},indexToPage:function(t){if(s())return t;var n=r.length,i=o.perPage;return z(n-i<=t&&t<n?(n-1)/i:t/i)},trim:function(t){return r.is(S)||(t=o.rewind?this.rewind(t):L(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(r.is(S)){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return"rtl"===o.direction},get pageLength(){var t=r.length;return s()?t:Math.ceil(t/o.perPage)},get edgeIndex(){var t=r.length;return s()||o.isNavigation||r.is(S)?t-1:t-o.perPage},get prevIndex(){var t=r.index-1;return(r.is(S)||o.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=r.index+1;return(r.is(S)||o.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};function s(){return!1!==r.options.focus}return n}var z=Math.floor;function R(o,r){var i=[],s=[];return{mount:function(){for(var t in i=r.Elements.slides)this.register(parseInt(t),-1,i[t])},register:function(t,n,i){var e=function(u,t,o,d){return{slide:o,index:u,realIndex:t,container:f(o,"."+d.classes.container),isClone:-1<t,init:function(){var t=this;if(!o.id&&!this.isClone){var n=u+1;o.id=d.root.id+"-slide"+(n<10?"0"+n:n)}d.on("mounted moved updated",function(){t.update(t.isActive(),!1),t.update(t.isVisible(),!0)}).on("resize",function(){t.update(t.isVisible(),!0)})},update:function(t,n){var i=n?"visible":"active",e=l[i];t?(g(o,e),d.emit(i,this)):m(o,e)&&(v(o,e),d.emit(n?"hidden":"inactive",this))},isActive:function(){return d.index===u},isVisible:function(){var t=d.options,n=t.focus,i=t.trimSpace,e=d.index,o=d.length,r="center"===n,s=d.Components.Layout.numInView,a=r?s/2:parseInt(n)||0;if(i){if(e<a)return u<s;if(o-(s-a)<=e)return o-s<=u}return e-a+(r&&s%2==0?1:0)<=u&&u<e+s-a},isWithin:function(t,n){var i=Math.abs(t-u);return d.is("slide")||this.isClone||(i=Math.min(i,d.length-i)),i<n}}}(t,n,i,o);e.init(),s.push(e)},getSlide:function(n){return s.filter(function(t){return t.index===n})[0]},getSlides:function(t,n){return n?t?s:s.filter(function(t){return!t.isClone}):t?s.map(function(t){return t.slide}):i},getSlidesByPage:function(t){var i=r.Controller.pageToIndex(t),n=o.options,e=!1!==n.focus?1:n.perPage;return s.filter(function(t){var n=t.index;return i<=n&&n<i+e})},get length(){return i.length},get total(){return s.length}}}function N(s,a){var o,n,u=0,i="ttb"===s.options.direction;return{mount:function(){o=a.Elements.list,n=i?function(r,s){var a=s.Layout;return{translate:function(t,n){h(t,{transform:"translateY("+n+"px)"})},toPosition:function(t){return-(t*(a.slideHeight+a.gap)+this.offset)},toIndex:function(t){return Math.round(-(t+this.offset)/(a.slideHeight+a.gap))},trim:function(t){return L(t,-(a.listHeight-(a.height+a.gap)),0)},get offset(){var t,n=a.height,i=a.slideHeight,e=a.gap,o=r.options.focus;return t="center"===o?(n-i)/2:(parseInt(o)||0)*(i+e),(i+e)*s.Clones.length/2-t}}}(s,a):function(r,s){var a=s.Layout;return{translate:function(t,n){h(t,{transform:"translateX("+n+"px)"})},toPosition:function(t){return this.sign*(t*(a.slideWidth+a.gap)+this.offset)},toIndex:function(t){return Math.round((this.sign*t-this.offset)/(a.slideWidth+a.gap))},trim:function(t){return L(t,this.sign*(a.listWidth-(a.width+a.gap)),0)},get sign(){return s.Controller.isRtl()?1:-1},get offset(){var t,n=a.width,i=a.slideWidth,e=a.gap,o=r.options.focus;return t="center"===o?(n-i)/2:(parseInt(o)||0)*(i+e),(i+e)*s.Clones.length/2-t}}}(s,a)},mounted:function(){var t=this;s.is(k)||s.on("mounted resize updated",function(){t.jump(s.index)})},go:function(t,n,i){var e=this,o=this.trim(this.toPosition(t)),r=s.index;i||s.emit("move",n,r,t),1<=Math.abs(o-u)||s.is(k)?a.Transition.start(t,n,this.toCoord(o),function(){e.end(t,n,r,i)}):this.end(t,n,r,i)},end:function(t,n,i,e){h(o,{transition:""}),s.is(k)||this.jump(n),e||s.emit("moved",n,i,t)},jump:function(t){var n=this.trim(this.toPosition(t));this.translate(n)},translate:function(t){u=t,n.translate(o,t)},toPosition:function(t){return n.toPosition(t)},toIndex:function(t){return n.toIndex(t)},trim:function(t){return!s.options.trimSpace||s.is(S)?t:n.trim(t)},toCoord:function(t){return{x:i?0:t,y:i?t:0}},get position(){return u},get offset(){return n.offset}}}function B(c,l){var f=[];function p(t){var n=t.cloneNode(!0);return g(n,c.classes.clone),x(n,"id"),n}return{mount:function(){c.is(S)&&function(){var e=l.Slides,o=l.Elements.list,t=c.options,n=t.perPage,i=t.drag,r=t.flickMaxPages,s=void 0===r?1:r,a=e.length,u=n*(i?s+1:1)+(a<n?n:0),d=e.getSlides(!1,!1);for(;d.length<u;)d=d.concat(d);d.slice(0,u).forEach(function(t,n){var i=p(t);o.appendChild(i),f.push(i),e.register(n+a,n,i)}),d.slice(-u).forEach(function(t,n){var i=p(t);o.insertBefore(i,d[0]),f.push(i),e.register(n-u,n,i)})}()},get clones(){return f},get length(){return f.length}}}function D(e,s){var a,u,d,o=e.root,r="ttb"===e.options.direction,t=s.Elements,c={mount:function(){a=t.list,u=s.Slides.getSlides(!0,!0),function(){var t=function(t,n){var i=null;return function(){i=i||setTimeout(function(){t(),i=null},n)}}(function(){e.emit("resize")},50);b(window,"resize",t),e.on("mounted resize",l).on("updated",n)}(),n()},get width(){return d.width},get height(){return d.height},get listWidth(){return d.listWidth},get listHeight(){return d.listHeight},get slideWidth(){return d.slideWidth},get slideHeight(){return d.slideHeight},get gap(){return d.gap},get padding(){return d.padding},get numInView(){return d.numInView}};function n(){var t=e.options;for(var n in(d=r?function(n,t,i){var e,o,r,s,a,u=t.Elements,d=n.root,c=u.track;return{marginProp:"marginBottom",gap:j(d,i.gap),padding:(e=i.padding,o=e.top,r=void 0===o?e:o,s=e.bottom,a=void 0===s?e:s,{top:j(d,r),bottom:j(d,a)}),init:function(){h(c,{paddingTop:T(this.padding.top),paddingBottom:T(this.padding.bottom)})},get width(){return c.clientWidth},get height(){var t=i.height||this.width*i.heightRatio;return E(t,'"height" or "heightRatio" is missing.'),j(n.root,t)-this.padding.top-this.padding.bottom},get listWidth(){return this.width},get listHeight(){return(this.slideHeight+this.gap)*t.Slides.total},get slideWidth(){return j(n.root,i.fixedWidth||this.width)},get slideHeight(){var t=i.fixedHeight||(this.height+this.gap)/i.perPage-this.gap;return j(n.root,t)},get numInView(){return i.fixedHeight?Math.floor((this.height+this.gap)/(this.slideHeight+this.gap))||1:i.perPage}}}(e,s,t):function(t,n,i){var e,o,r,s,a,u=n.Elements,d=t.root,c=u.track;return{marginProp:"rtl"===i.direction?"marginLeft":"marginRight",height:0,listHeight:0,gap:j(d,i.gap),padding:(e=i.padding,o=e.left,r=void 0===o?e:o,s=e.right,a=void 0===s?e:s,{left:j(d,r),right:j(d,a)}),init:function(){h(c,{paddingLeft:T(this.padding.left),paddingRight:T(this.padding.right)})},get width(){return c.clientWidth-this.padding.left-this.padding.right},get listWidth(){return(this.slideWidth+this.gap)*n.Slides.total},get slideWidth(){var t=i.fixedWidth||(this.width+this.gap)/i.perPage-this.gap;return j(d,t)},get slideHeight(){var t=i.height||i.fixedHeight||this.width*i.heightRatio;return j(d,t)},get numInView(){return i.fixedWidth?Math.floor((this.width+this.gap)/(this.slideWidth+this.gap))||1:i.perPage}}}(e,s,t)).init(),h(o,{maxWidth:T(t.width)}),u){var i;h(u[n].slide,((i={})[d.marginProp]=T(d.gap),i))}l()}function l(){h(a,{width:T(c.listWidth),height:T(c.listHeight)}),h(s.Elements.track,{height:T(c.height)});var t=T(d.slideWidth),n=T(d.slideHeight);for(var i in u){var e=u[i],o=e.slide,r=e.container;h(r,{height:n}),h(o,{width:t,height:r?"":n})}}return c}function V(u,d){var i,e,o,c=d.Track,l=d.Controller,r=!1,s="ttb"===u.options.direction,f=s?"y":"x",n={required:u.options.drag,disabled:!1,mount:function(){var t=d.Elements.list;b(t,"touchstart mousedown",a),b(t,"touchmove mousemove",p,!1),b(t,"touchend touchcancel mouseleave mouseup dragend",h)}};function a(t){n.disabled||r||!u.State.is(3)||(i=c.toCoord(c.position),e=g(t,{}),o=e)}function p(t){if(e)if(o=g(t,e),r){t.cancelable&&t.preventDefault();var n=i[f]+o.offset[f];c.translate(function(t){if(!u.is(S)){var n=c.trim,i=c.toPosition,e=l.isRtl()?-1:1,o=e*n(i(0)),r=e*n(i(l.edgeIndex));o<(t*=e)?t=5*Math.log(t-o)+o:t<r&&(t=-5*Math.log(r-t)+r),t*=e}return t}(n))}else!function(t){var n=t.offset;if(u.State.is(3)){var i=180*Math.atan(Math.abs(n.y)/Math.abs(n.x))/Math.PI;return s&&(i=90-i),i<30}return!1}(o)||(u.emit("drag",e),r=!0)}function h(){e=null,r&&(u.emit("dragged",o),function(t){var n=t.velocity[f],i=Math.abs(n);if(0<i){var e=d.Layout,o=u.options,r=n<0?-1:1,s=c.position;i>o.flickThreshold&&Math.abs(t.offset[f])<150&&(s+=r*Math.min(i*o.flickPower,e.width*(o.flickMaxPages||1)));var a=c.toIndex(s);a===u.index&&(a+=l.isRtl()?r:-r),u.is(S)||(a=L(a,0,l.edgeIndex)),l.go(a,o.isNavigation)}}(o),r=!1)}function g(t,n){var i=t.timeStamp,e=t.touches,o=e?e[0]:t,r=o.clientX,s=o.clientY,a=n.to||{},u=a.x,d=void 0===u?r:u,c=a.y,l=void 0===c?s:c,f={x:r-d,y:s-l},p=i-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:s},offset:f,timeStamp:i,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,s){var a,i=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,i=n.slides,e=n.bar;i.length>t.perPage&&(a=function(n,i,e){function o(t){d||(a=(s=t-(r=r||t))/i,i<=s&&(r=0,a=1,n()),e&&e(a),u(o))}var r,s,a,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(s+":playing",t),e&&h(e,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,i=o.sub,e=[o.root,i?i.root:null];t.pauseOnHover&&(d(e,"mouseleave",J,!0),d(e,"mouseenter",J,!1));t.pauseOnFocus&&(d(e,"focusout",Y,!0),d(e,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(i=i.filter(function(t){return t!==n})).length||(o.emit(s+":play"),a.play())},pause:function(t){void 0===t&&(t=0),a.pause(),-1===i.indexOf(t)&&i.push(t),1===i.length&&o.emit(s+":pause")}};function d(t,n,i,e){for(var o in t)b(t[o],n,function(){u[e?"play":"pause"](i)})}return u}function F(a,u,d){var c,o=a.classes,r=a.root;function s(t){var n=p("button",{class:o.arrow+" "+(t?o.prev:o.next)});return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 40 40"\twidth="40"\theight="40"><path d="'+(a.options.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")+'" /></svg>',n}return{required:a.options.arrows,mount:function(){var t=u.Elements,n=a.options.arrows;if((!(c=t.arrows).prev||!c.next)&&n){c=function(){var t=p("div",{class:o.arrows}),n=s(!0),i=s(!1);return t.appendChild(n),t.appendChild(i),{wrapper:t,prev:n,next:i}}();var i=t.slider,e="slider"===n&&i?i:r;e.insertBefore(c.wrapper,e.firstChild)}c&&(function(){var t=a.options.perMove;b(c.prev,"click",function(){a.go(t?"-"+t:"<")}),b(c.next,"click",function(){a.go(t?"+"+t:">")})}(),a.on("mounted move updated",function(){var t=c,n=t.prev,i=t.next,e=u.Controller,o=e.prevIndex,r=e.nextIndex,s=1<a.length;n.disabled=o<0||!s,i.disabled=r<0||!s,a.emit(d+":updated",n,i,o,r)})),this.arrows=c},mounted:function(){a.emit(d+":mounted",c.prev,c.next)}}}function G(a,i,o){var n,r={},s={required:a.options.pagination,mount:function(){r=function(){var n=a.options,o=a.classes,r=p("ul",{class:o.pagination}),s=i.Slides,t=s.getSlides(!1,!0).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var i=p("li",{}),e=p("button",{class:o.page});return i.appendChild(e),r.appendChild(i),b(e,"click",function(){a.go(">"+n)}),{li:i,button:e,page:n,Slides:s.getSlidesByPage(n)}});return{list:r,items:t}}();var t=i.Elements.slider;(n="slider"===a.options.pagination&&t?t:a.root).appendChild(r.list),a.on(Q,e).on("updated.page",function(){s.destroy(),a.options.pagination&&(s.mount(),s.mounted())})},mounted:function(){var t=a.index;a.emit(o+":mounted",r,this.getItem(t)),e(t,-1)},destroy:function(){r&&r.list&&n.removeChild(r.list),a.off(Q),r=null},getItem:function(t){return r.items[i.Controller.indexToPage(t)]},get data(){return r}};function e(t,n){var i=s.getItem(n),e=s.getItem(t);i&&v(i.button,l.active),e&&g(e.button,l.active),a.emit(o+":updated",r,i,e)}return s}function U(a,e){var u=a.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){var i=e.Elements.track.id;y(t,nt,i),y(n,nt,i)}function i(t,n,i,e){var o=a.index,r=-1<i&&o<i?u.last:u.prev,s=-1<e&&e<o?u.first:u.next;y(t,it,r),y(n,it,s)}function o(t,n){n&&y(n.button,tt,!0),t.items.forEach(function(t){var n=a.options,i=A(!1===n.focus&&1<n.perPage?u.pageX:u.slideX,t.page+1),e=t.button,o=[];t.Slides.forEach(function(t){o.push(t.slide.id)}),y(e,nt,o.join(" ")),y(e,it,i)})}function r(t,n,i){n&&x(n.button,tt),i&&y(i.button,tt,!0)}function s(r){e.Slides.getSlides(!0,!0).forEach(function(t){var n=t.slide;c(n)||y(n,"role","button");var i=-1<t.realIndex?t.realIndex:t.index,e=A(u.slideX,i+1),o=r.Components.Slides.getSlide(i);y(n,it,e),o&&y(n,nt,o.slide.id)})}function d(t,n){var i=t.slide;n?y(i,tt,!0):x(i,tt)}function c(t){return"button"===t.tagName.toLowerCase()}return{required:a.options.accessibility,mount:function(){a.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",i).on("pagination:mounted",o).on("pagination:updated",r),a.options.isNavigation&&a.on("navigation:mounted",s).on("active",function(t){d(t,!0)}).on("inactive",function(t){d(t,!1)}),function(){var i=e.Elements;[i.play,i.pause].forEach(function(t,n){t&&(c(t)||y(t,"role","button"),y(t,nt,i.track.id),y(t,it,u[0===n?"play":"pause"]))})}()}}}var J=1,Y=2,K=3,Q="move.page",Z="data-splide-lazy",$={horizontal:{ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},vertical:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},tt="aria-current",nt="aria-controls",it="aria-label",et="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:O,Controller:q,Slides:R,Track:N,Clones:B,Layout:D,Drag:V,Autoplay:X,Cover:function(t,n){var i=t.options;function e(t){var n=t.parentElement;n&&(h(n,{background:'center/cover no-repeat url("'+t.src+'")'}),h(t,{display:"none"}))}return{required:i.cover&&(i.height||i.heightRatio||i.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&e(n)}),t.on("lazyload:loaded",function(t){e(t)})}}},Arrows:F,Pagination:G,LazyLoad:function(o,t,r){var n=0,e=[],i=o.options.lazyLoad,s="sequential"===i;function a(n){var i=o.options;(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){g(n.slide,l.loading);var i=p("span",{class:o.classes.spinner});t.parentElement.appendChild(i),t.onload=function(){c(t,i,n,!1)},t.onerror=function(){c(t,i,n,!0)},h(t,{visibility:"hidden"}),y(t,"src",t.getAttribute(Z))}function d(){if(n<e.length){var t=e[n];u(t.img,t.Slide)}n++}function c(t,n,i,e){v(i.slide,l.loading),e||(t.parentElement.removeChild(n),h(t,{visibility:"visible"}),o.emit(r+":loaded",t)),s&&d()}return{required:i,mount:function(){t.Slides.getSlides(!0,!0).forEach(function(t){var n=f(t.slide,"["+Z+"]");n&&e.push({img:n,Slide:t})}),e.length&&(s?d():o.on("mounted",function(){a(o.index)}).on("moved."+r,function(t){a(t)}))}}},Keyboard:function(i){var t;return{mount:function(){var n=$["ttb"===i.options.direction?"vertical":"horizontal"];i.on("mounted updated",function(){t&&(t[0](),t=void 0),i.options.keyboard&&(t=b(i.root,"keydown",function(t){n[t.key]&&i.go(n[t.key])}))})}}},Sync:function(e){var o=e.sibling,t=o&&o.options.isNavigation;function r(){e.on(et,function(t,n,i){o.off(et).go(o.is(S)?i:t,!1),s()})}function s(){o.on(et,function(t,n,i){e.off(et).go(e.is(S)?i:t,!1),r()})}function i(t){e.State.is(3)&&o.go(t)}return{required:!!o,mount:function(){r(),s(),t&&o.Components.Slides.getSlides(!0,!0).forEach(function(n){var t=n.slide;b(t,"mouseup touchend",function(t){t.button&&0!==t.button||i(n.index)}),b(t,"keyup",function(t){-1<ot.indexOf(t.key)&&(t.preventDefault(),i(n.index))},!1)})},mounted:function(){t&&o.emit("navigation:mounted",e)}}},A11y:U,Breakpoints:function(n){var i,e,o=n.options.breakpoints,r=[];return{required:o&&matchMedia,mount:function(){r=Object.keys(o).sort(function(t,n){return parseInt(t)-parseInt(n)}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),n.on("mounted resize",function(){var t=function(){var t=r.filter(function(t){return t.mql.matches})[0];return t?t.point:-1}();t!==e&&(n.options=o[t]||i,e=t)})},mounted:function(){i=n.options}}}};i.d(n,"Splide",function(){return st});var st=function(i){function t(t,n){return i.call(this,t,n,rt)||this}return function(t,n){t.prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n}(t,i),t}(W);window.Splide=st}]); | ||
*/!function(i){var e={};function o(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return i[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=i,o.c=e,o.d=function(t,n,i){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)o.d(i,e,function(t){return n[t]}.bind(null,e));return i},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,i){"use strict";function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}function r(i,e){Object.keys(i).some(function(t,n){return e(i[t],t,n)})}function a(n){return Object.keys(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function s(t,n){var i=e({},t);return o(i)&&o(n)&&r(n,function(t,n){o(t)?(o(i[n])||(i[n]={}),i[n]=s(i[n],t)):i[n]=t}),i}i.r(n);var u="splide",l={active:"is-active",visible:"is-visible",loading:"is-loading"},d={type:"slide",rewind:!1,speed:400,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,perPage:1,perMove:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:!0,drag:!0,flickThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,isNavigation:!1,trimSpace:!0,breakpoints:!1,classes:{root:u,slider:u+"__slider",track:u+"__track",list:u+"__list",slide:u+"__slide",container:u+"__slide__container",arrows:u+"__arrows",arrow:u+"__arrow",prev:u+"__arrow--prev",next:u+"__arrow--next",pagination:u+"__pagination",page:u+"__pagination__page",clone:u+"__slide--clone",progress:u+"__progress",bar:u+"__progress__bar",autoplay:u+"__autoplay",play:u+"__play",pause:u+"__pause",spinner:u+"__spinner",sr:u+"__sr"},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 f(t,n){return t&&n?t.querySelector(n.split(" ")[0]):null}function c(t,n){if(t){var i=a(t.children);for(var e in i){var o=i[e];if(m(o,n.split(" ")[0]))return o}}return null}function p(t,n){var i=document.createElement(t);return r(n,function(t,n){return y(i,n,t)}),i}function h(i,t){i&&r(t,function(t,n){i.style[n]=t||""})}function g(n){if(n){for(var t=arguments.length,i=new Array(1<t?t-1:0),e=1;e<t;e++)i[e-1]=arguments[e];i.forEach(function(t){t&&n.classList.add(t)})}}function v(t,n){t&&t.classList.remove(n)}function m(t,n){return!!t&&t.classList.contains(n)}function y(t,n,i){t&&t.setAttribute(n,i)}function x(t,n){t&&t.removeAttribute(n)}function b(n,t,i,e){return void 0===e&&(e=!0),n?t.split(" ").map(function(t){return n.addEventListener(t,i,{passive:e}),function(){return n.removeEventListener(t,i)}}):[]}function w(o,t){var r,s;return{mount:function(){b(r=t.Elements.list,"transitionend",function(t){t.target===r&&s&&s()})},start:function(t,n,i,e){s=e,h(r,{transition:"transform "+o.options.speed+"ms "+o.options.easing,transform:"translate("+i.x+"px,"+i.y+"px)"})}}}function _(e,o){function r(t){var n=o.Slides.getSlide(t),i=e.options;n&&h(n.slide,{transition:"opacity "+i.speed+"ms "+i.easing})}return o.Options.fix({perPage:1,gap:0,padding:0}),o.Drag&&(o.Drag.required=!1),{mount:function(){r(e.index)},start:function(t,n,i,e){r(n),e()}}}var S="loop",k="fade";var P="[SPLIDE]";function C(t){console.error(P+" "+t)}function E(t,n){if(!t)throw new Error(n);return t}function I(t,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function M(t){var n=t.root.getAttribute("data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){C('"data-splide" must be a valid JSON.')}return{mount:function(){t.index=t.options.start},fix:function(i){var e=s(t.options,i),o=e.breakpoints;o&&r(o,function(t,n){e.breakpoints[n]=s(o[n],i)}),t.options=e}}}function O(i){var e=i.root,o=i.classes;if(!e.id){var t=window[H]||0;window[H]=++t,e.id="splide"+(t<10?"0"+t:t)}var r={mount:function(){var t="was not found.";this.slider=c(e,o.slider),this.track=f(e,"."+o.track),E(this.track,"A track "+t),this.list=c(this.track,o.list),E(this.list,"A list "+t),this.slides=a(this.list.children),E(this.slides.length,"A slide "+t);var n=s(o.arrows);this.arrows={prev:f(n,"."+o.prev),next:f(n,"."+o.next)};var i=s(o.autoplay);this.bar=f(s(o.progress),"."+o.bar),this.play=f(i,"."+o.play),this.pause=f(i,"."+o.pause),function(){r.track.id||(r.track.id=e.id+"-track");r.list.id||(r.list.id=e.id+"-list")}()},mounted:function(){var t=o.root,n=i.options;g(e,""+t,t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":"")}};function s(t){return c(e,t)||c(r.slider,t)}return r}var W=function(){function t(t,n,i){var e=this;void 0===n&&(n={}),void 0===i&&(i={}),this.root=t instanceof HTMLElement?t:f(document,t),E(this.root,"An invalid root element or selector was given."),this.Components={},this.Event=function(){var i={};return{on:function(t,n){t.split(" ").forEach(function(t){-1<t.indexOf(".")&&i[t]||(i[t]||(i[t]=[]),i[t].push(n))})},off:function(t){t.split(" ").forEach(function(t){return delete i[t]})},emit:function(e){for(var t=arguments.length,o=new Array(1<t?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];r(i,function(t,n){if(n.split(".")[0]===e&&t)for(var i in t)t[i].apply(t,o)})}}}(),this.State=function(t){var n=t;return{set:function(t){n=t},is:function(t){return t===n}}}(1),this._options=s(d,n),this._index=0,this._components=i,this.on("move drag",function(){return e.State.set(4)}).on("moved dragged",function(){return e.State.set(3)})}var n=t.prototype;return n.mount=function(t,n){var e=this;void 0===t&&(t={}),void 0===n&&(n=null),this.Components=function(i,t,n){var e={};return r(t,function(t,n){e[n]=t(i,e,n.toLowerCase())}),n=n||i.is(k)?_:w,e.Transition=n(i,e),e}(this,s(this._components,t),n);try{r(this.Components,function(t,n){var i=t.required;void 0===i||i?t.mount&&t.mount():delete e.Components[n]})}catch(t){return C(t.message),null}return r(this.Components,function(t){t.mounted&&t.mounted()}),this.State.set(2),this.emit("mounted"),this.State.set(3),this.emit("ready"),h(this.root,{visibility:"visible"}),this},n.sync=function(t){return this.sibling=t,this},n.on=function(t,n){return this.Event.on(t,n),this},n.off=function(t){return this.Event.off(t),this},n.emit=function(t){for(var n,i=arguments.length,e=new Array(1<i?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(e)),this},n.go=function(t,n){void 0===n&&(n=!0),(this.State.is(3)||this.State.is(4)&&!n)&&this.Components.Controller.go(t,!1)},n.is=function(t){return t===this._options.type},function(t,n,i){n&&I(t.prototype,n),i&&I(t,i)}(t,[{key:"index",get:function(){return this._index},set:function(t){this._index=parseInt(t)}},{key:"length",get:function(){return this.Components.Slides.length}},{key:"options",get:function(){return this._options},set:function(t){this._options=s(this._options,t),this.State.is(1)||this.emit("updated",this._options)}},{key:"classes",get:function(){return this._options.classes}},{key:"i18n",get:function(){return this._options.i18n}}]),t}(),H="splideUid";function L(t,n,i){return Math.min(Math.max(t,i<n?i:n),i<n?n:i)}function A(t){for(var n=arguments.length,i=new Array(1<n?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];var o=0;return t.replace(/%s/g,function(){return i[o++]})}function T(t){var n=typeof t;return"string"==n?t:"number"==n&&0<t?parseFloat(t)+"px":""}function j(t,n){if("number"==typeof n)return n;var i=p("div",{});h(i,{position:"absolute",width:n}),t.appendChild(i);var e=i.clientWidth;return t.removeChild(i),e}function q(r,e){var o,n={mount:function(){o=r.options,r.on("move",function(t){r.index=t}).on("updated",function(t){o=t,r.index=n.rewind(n.trim(r.index))})},go:function(t,n){var i=this.trim(this.parse(t));e.Track.go(i,this.rewind(i),n)},parse:function(t){var n=r.index,i=String(t).match(/([+\-<>])(\d+)?/),e=i&&i[1]||"",o=i?parseInt(i[2]):0;switch(e){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1<o?o:this.indexToPage(n)+1);break;case"<":n=this.pageToIndex(-1<o?o:this.indexToPage(n)-1);break;default:n=parseInt(t)}return n},pageToIndex:function(t){if(s())return t;var n=r.length,i=o.perPage,e=t*i;return n-i<=(e-=(this.pageLength*i-n)*z(e/n))&&e<n&&(e=n-i),e},indexToPage:function(t){if(s())return t;var n=r.length,i=o.perPage;return z(n-i<=t&&t<n?(n-1)/i:t/i)},trim:function(t){return r.is(S)||(t=o.rewind?this.rewind(t):L(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(r.is(S)){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return"rtl"===o.direction},get pageLength(){var t=r.length;return s()?t:Math.ceil(t/o.perPage)},get edgeIndex(){var t=r.length;return s()||o.isNavigation||r.is(S)?t-1:t-o.perPage},get prevIndex(){var t=r.index-1;return(r.is(S)||o.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=r.index+1;return(r.is(S)||o.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};function s(){return!1!==r.options.focus}return n}var z=Math.floor;function R(o,r){var i=[],s=[];return{mount:function(){for(var t in i=r.Elements.slides)this.register(parseInt(t),-1,i[t])},register:function(t,n,i){var e=function(u,t,o,d){return{slide:o,index:u,realIndex:t,container:f(o,"."+d.classes.container),isClone:-1<t,init:function(){var t=this;if(!o.id&&!this.isClone){var n=u+1;o.id=d.root.id+"-slide"+(n<10?"0"+n:n)}d.on("mounted moved updated",function(){t.update(t.isActive(),!1),t.update(t.isVisible(),!0)}).on("resize",function(){t.update(t.isVisible(),!0)})},update:function(t,n){var i=n?"visible":"active",e=l[i];t?(g(o,e),d.emit(i,this)):m(o,e)&&(v(o,e),d.emit(n?"hidden":"inactive",this))},isActive:function(){return d.index===u},isVisible:function(){var t=d.options,n=t.focus,i=t.trimSpace,e=d.index,o=d.length,r="center"===n,s=d.Components.Layout.numInView,a=r?s/2:parseInt(n)||0;if(i){if(e<a)return u<s;if(o-(s-a)<=e)return o-s<=u}return e-a+(r&&s%2==0?1:0)<=u&&u<e+s-a},isWithin:function(t,n){var i=Math.abs(t-u);return d.is("slide")||this.isClone||(i=Math.min(i,d.length-i)),i<n}}}(t,n,i,o);e.init(),s.push(e)},getSlide:function(n){return s.filter(function(t){return t.index===n})[0]},getSlides:function(t,n){return n?t?s:s.filter(function(t){return!t.isClone}):t?s.map(function(t){return t.slide}):i},getSlidesByPage:function(t){var i=r.Controller.pageToIndex(t),n=o.options,e=!1!==n.focus?1:n.perPage;return s.filter(function(t){var n=t.index;return i<=n&&n<i+e})},get length(){return i.length},get total(){return s.length}}}function N(s,a){var o,n,u=0,i="ttb"===s.options.direction;return{mount:function(){o=a.Elements.list,n=i?function(r,s){var a=s.Layout;return{translate:function(t,n){h(t,{transform:"translateY("+n+"px)"})},toPosition:function(t){return-(t*(a.slideHeight+a.gap)+this.offset)},toIndex:function(t){return Math.round(-(t+this.offset)/(a.slideHeight+a.gap))},trim:function(t){return L(t,-(a.listHeight-(a.height+a.gap)),0)},get offset(){var t,n=a.height,i=a.slideHeight,e=a.gap,o=r.options.focus;return t="center"===o?(n-i)/2:(parseInt(o)||0)*(i+e),(i+e)*s.Clones.length/2-t}}}(s,a):function(r,s){var a=s.Layout;return{translate:function(t,n){h(t,{transform:"translateX("+n+"px)"})},toPosition:function(t){return this.sign*(t*(a.slideWidth+a.gap)+this.offset)},toIndex:function(t){return Math.round((this.sign*t-this.offset)/(a.slideWidth+a.gap))},trim:function(t){return L(t,this.sign*(a.listWidth-(a.width+a.gap)),0)},get sign(){return s.Controller.isRtl()?1:-1},get offset(){var t,n=a.width,i=a.slideWidth,e=a.gap,o=r.options.focus;return t="center"===o?(n-i)/2:(parseInt(o)||0)*(i+e),(i+e)*s.Clones.length/2-t}}}(s,a)},mounted:function(){var t=this;s.is(k)||s.on("mounted resize updated",function(){t.jump(s.index)})},go:function(t,n,i){var e=this,o=this.trim(this.toPosition(t)),r=s.index;i||s.emit("move",n,r,t),1<=Math.abs(o-u)||s.is(k)?a.Transition.start(t,n,this.toCoord(o),function(){e.end(t,n,r,i)}):this.end(t,n,r,i)},end:function(t,n,i,e){h(o,{transition:""}),s.is(k)||this.jump(n),e||s.emit("moved",n,i,t)},jump:function(t){var n=this.trim(this.toPosition(t));this.translate(n)},translate:function(t){u=t,n.translate(o,t)},toPosition:function(t){return n.toPosition(t)},toIndex:function(t){return n.toIndex(t)},trim:function(t){return!s.options.trimSpace||s.is(S)?t:n.trim(t)},toCoord:function(t){return{x:i?0:t,y:i?t:0}},get position(){return u},get offset(){return n.offset}}}function B(c,l){var f=[];function p(t){var n=t.cloneNode(!0);return g(n,c.classes.clone),x(n,"id"),n}return{mount:function(){c.is(S)&&function(){var e=l.Slides,o=l.Elements.list,t=c.options,n=t.perPage,i=t.drag,r=t.flickMaxPages,s=void 0===r?1:r,a=e.length,u=n*(i?s+1:1)+(a<n?n:0),d=e.getSlides(!1,!1);for(;d.length<u;)d=d.concat(d);d.slice(0,u).forEach(function(t,n){var i=p(t);o.appendChild(i),f.push(i),e.register(n+a,n,i)}),d.slice(-u).forEach(function(t,n){var i=p(t);o.insertBefore(i,d[0]),f.push(i),e.register(n-u,n,i)})}()},get clones(){return f},get length(){return f.length}}}function D(e,s){var a,u,d,o=e.root,r="ttb"===e.options.direction,t=s.Elements,c={mount:function(){a=t.list,u=s.Slides.getSlides(!0,!0),function(){var t=function(t,n){var i=null;return function(){i=i||setTimeout(function(){t(),i=null},n)}}(function(){e.emit("resize")},50);b(window,"resize",t),e.on("mounted resize",l).on("updated",n)}(),n()},get width(){return d.width},get height(){return d.height},get listWidth(){return d.listWidth},get listHeight(){return d.listHeight},get slideWidth(){return d.slideWidth},get slideHeight(){return d.slideHeight},get gap(){return d.gap},get padding(){return d.padding},get numInView(){return d.numInView}};function n(){var t=e.options;for(var n in(d=r?function(n,t,i){var e,o,r,s,a,u=t.Elements,d=n.root,c=u.track;return{marginProp:"marginBottom",gap:j(d,i.gap),padding:(e=i.padding,o=e.top,r=void 0===o?e:o,s=e.bottom,a=void 0===s?e:s,{top:j(d,r),bottom:j(d,a)}),init:function(){h(c,{paddingTop:T(this.padding.top),paddingBottom:T(this.padding.bottom)})},get width(){return c.clientWidth},get height(){var t=i.height||this.width*i.heightRatio;return E(t,'"height" or "heightRatio" is missing.'),j(n.root,t)-this.padding.top-this.padding.bottom},get listWidth(){return this.width},get listHeight(){return(this.slideHeight+this.gap)*t.Slides.total},get slideWidth(){return j(n.root,i.fixedWidth||this.width)},get slideHeight(){var t=i.fixedHeight||(this.height+this.gap)/i.perPage-this.gap;return j(n.root,t)},get numInView(){return i.fixedHeight?Math.floor((this.height+this.gap)/(this.slideHeight+this.gap))||1:i.perPage}}}(e,s,t):function(t,n,i){var e,o,r,s,a,u=n.Elements,d=t.root,c=u.track;return{marginProp:"rtl"===i.direction?"marginLeft":"marginRight",height:0,listHeight:0,gap:j(d,i.gap),padding:(e=i.padding,o=e.left,r=void 0===o?e:o,s=e.right,a=void 0===s?e:s,{left:j(d,r),right:j(d,a)}),init:function(){h(c,{paddingLeft:T(this.padding.left),paddingRight:T(this.padding.right)})},get width(){return c.clientWidth-this.padding.left-this.padding.right},get listWidth(){return(this.slideWidth+this.gap)*n.Slides.total},get slideWidth(){var t=i.fixedWidth||(this.width+this.gap)/i.perPage-this.gap;return j(d,t)},get slideHeight(){var t=i.height||i.fixedHeight||this.width*i.heightRatio;return j(d,t)},get numInView(){return i.fixedWidth?Math.floor((this.width+this.gap)/(this.slideWidth+this.gap))||1:i.perPage}}}(e,s,t)).init(),h(o,{maxWidth:T(t.width)}),u){var i;h(u[n].slide,((i={})[d.marginProp]=T(d.gap),i))}l()}function l(){h(a,{width:T(c.listWidth),height:T(c.listHeight)}),h(s.Elements.track,{height:T(c.height)});var t=T(d.slideWidth),n=T(d.slideHeight);for(var i in u){var e=u[i],o=e.slide,r=e.container;h(r,{height:n}),h(o,{width:t,height:r?"":n})}}return c}function V(u,d){var i,e,o,c=d.Track,l=d.Controller,r=!1,s="ttb"===u.options.direction,f=s?"y":"x",n={required:u.options.drag,disabled:!1,mount:function(){var t=d.Elements.list;b(t,"touchstart mousedown",a),b(t,"touchmove mousemove",p,!1),b(t,"touchend touchcancel mouseleave mouseup dragend",h)}};function a(t){n.disabled||r||!u.State.is(3)||(i=c.toCoord(c.position),e=g(t,{}),o=e)}function p(t){if(e)if(o=g(t,e),r){t.cancelable&&t.preventDefault();var n=i[f]+o.offset[f];c.translate(function(t){if(!u.is(S)){var n=c.trim,i=c.toPosition,e=l.isRtl()?-1:1,o=e*n(i(0)),r=e*n(i(l.edgeIndex));o<(t*=e)?t=5*Math.log(t-o)+o:t<r&&(t=-5*Math.log(r-t)+r),t*=e}return t}(n))}else!function(t){var n=t.offset;if(u.State.is(3)){var i=180*Math.atan(Math.abs(n.y)/Math.abs(n.x))/Math.PI;return s&&(i=90-i),i<30}return!1}(o)||(u.emit("drag",e),r=!0)}function h(){e=null,r&&(u.emit("dragged",o),function(t){var n=t.velocity[f],i=Math.abs(n);if(0<i){var e=d.Layout,o=u.options,r=n<0?-1:1,s=c.position;i>o.flickThreshold&&Math.abs(t.offset[f])<150&&(s+=r*Math.min(i*o.flickPower,e.width*(o.flickMaxPages||1)));var a=c.toIndex(s);a===u.index&&(a+=l.isRtl()?r:-r),u.is(S)||(a=L(a,0,l.edgeIndex)),l.go(a,o.isNavigation)}}(o),r=!1)}function g(t,n){var i=t.timeStamp,e=t.touches,o=e?e[0]:t,r=o.clientX,s=o.clientY,a=n.to||{},u=a.x,d=void 0===u?r:u,c=a.y,l=void 0===c?s:c,f={x:r-d,y:s-l},p=i-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:s},offset:f,timeStamp:i,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,s){var a,i=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,i=n.slides,e=n.bar;i.length>t.perPage&&(a=function(n,i,e){function o(t){d||(a=(s=t-(r=r||t))/i,i<=s&&(r=0,a=1,n()),e&&e(a),u(o))}var r,s,a,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(s+":playing",t),e&&h(e,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,i=o.sub,e=[o.root,i?i.root:null];t.pauseOnHover&&(d(e,"mouseleave",J,!0),d(e,"mouseenter",J,!1));t.pauseOnFocus&&(d(e,"focusout",Y,!0),d(e,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(i=i.filter(function(t){return t!==n})).length||(o.emit(s+":play"),a.play())},pause:function(t){void 0===t&&(t=0),a.pause(),-1===i.indexOf(t)&&i.push(t),1===i.length&&o.emit(s+":pause")}};function d(t,n,i,e){for(var o in t)b(t[o],n,function(){u[e?"play":"pause"](i)})}return u}function F(a,u,d){var c,o=a.classes,r=a.root;function s(t){var n=p("button",{class:o.arrow+" "+(t?o.prev:o.next)});return n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 40 40"\twidth="40"\theight="40"><path d="'+(a.options.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")+'" /></svg>',n}return{required:a.options.arrows,mount:function(){var t=u.Elements,n=a.options.arrows;if((!(c=t.arrows).prev||!c.next)&&n){c=function(){var t=p("div",{class:o.arrows}),n=s(!0),i=s(!1);return t.appendChild(n),t.appendChild(i),{wrapper:t,prev:n,next:i}}();var i=t.slider,e="slider"===n&&i?i:r;e.insertBefore(c.wrapper,e.firstChild)}c&&(function(){var t=a.options.perMove;b(c.prev,"click",function(){a.go(t?"-"+t:"<")}),b(c.next,"click",function(){a.go(t?"+"+t:">")})}(),a.on("mounted move updated",function(){var t=c,n=t.prev,i=t.next,e=u.Controller,o=e.prevIndex,r=e.nextIndex,s=1<a.length;n.disabled=o<0||!s,i.disabled=r<0||!s,a.emit(d+":updated",n,i,o,r)})),this.arrows=c},mounted:function(){a.emit(d+":mounted",c.prev,c.next)}}}function G(a,i,o){var n,r={},s={required:a.options.pagination,mount:function(){r=function(){var n=a.options,o=a.classes,r=p("ul",{class:o.pagination}),s=i.Slides,t=s.getSlides(!1,!0).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var i=p("li",{}),e=p("button",{class:o.page});return i.appendChild(e),r.appendChild(i),b(e,"click",function(){a.go(">"+n)}),{li:i,button:e,page:n,Slides:s.getSlidesByPage(n)}});return{list:r,items:t}}();var t=i.Elements.slider;(n="slider"===a.options.pagination&&t?t:a.root).appendChild(r.list),a.on(Q,e).on("updated.page",function(){s.destroy(),a.options.pagination&&(s.mount(),s.mounted())})},mounted:function(){var t=a.index;a.emit(o+":mounted",r,this.getItem(t)),e(t,-1)},destroy:function(){r&&r.list&&n.removeChild(r.list),a.off(Q),r=null},getItem:function(t){return r.items[i.Controller.indexToPage(t)]},get data(){return r}};function e(t,n){var i=s.getItem(n),e=s.getItem(t);i&&v(i.button,l.active),e&&g(e.button,l.active),a.emit(o+":updated",r,i,e)}return s}function U(a,e){var u=a.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){var i=e.Elements.track.id;y(t,nt,i),y(n,nt,i)}function i(t,n,i,e){var o=a.index,r=-1<i&&o<i?u.last:u.prev,s=-1<e&&e<o?u.first:u.next;y(t,it,r),y(n,it,s)}function o(t,n){n&&y(n.button,tt,!0),t.items.forEach(function(t){var n=a.options,i=A(!1===n.focus&&1<n.perPage?u.pageX:u.slideX,t.page+1),e=t.button,o=[];t.Slides.forEach(function(t){o.push(t.slide.id)}),y(e,nt,o.join(" ")),y(e,it,i)})}function r(t,n,i){n&&x(n.button,tt),i&&y(i.button,tt,!0)}function s(r){e.Slides.getSlides(!0,!0).forEach(function(t){var n=t.slide;c(n)||y(n,"role","button");var i=-1<t.realIndex?t.realIndex:t.index,e=A(u.slideX,i+1),o=r.Components.Slides.getSlide(i);y(n,it,e),o&&y(n,nt,o.slide.id)})}function d(t,n){var i=t.slide;n?y(i,tt,!0):x(i,tt)}function c(t){return"button"===t.tagName.toLowerCase()}return{required:a.options.accessibility,mount:function(){a.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",i).on("pagination:mounted",o).on("pagination:updated",r),a.options.isNavigation&&a.on("navigation:mounted",s).on("active",function(t){d(t,!0)}).on("inactive",function(t){d(t,!1)}),function(){var i=e.Elements;[i.play,i.pause].forEach(function(t,n){t&&(c(t)||y(t,"role","button"),y(t,nt,i.track.id),y(t,it,u[0===n?"play":"pause"]))})}()}}}var J=1,Y=2,K=3,Q="move.page",Z="data-splide-lazy",$={horizontal:{ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},vertical:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},tt="aria-current",nt="aria-controls",it="aria-label",et="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:O,Controller:q,Slides:R,Track:N,Clones:B,Layout:D,Drag:V,Autoplay:X,Cover:function(t,n){var i=t.options;function e(t){var n=t.parentElement;n&&(h(n,{background:'center/cover no-repeat url("'+t.src+'")'}),h(t,{display:"none"}))}return{required:i.cover&&(i.height||i.heightRatio||i.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&e(n)}),t.on("lazyload:loaded",function(t){e(t)})}}},Arrows:F,Pagination:G,LazyLoad:function(o,t,r){var n=0,e=[],i=o.options.lazyLoad,s="sequential"===i;function a(n){var i=o.options;(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){g(n.slide,l.loading);var i=p("span",{class:o.classes.spinner});t.parentElement.appendChild(i),t.onload=function(){c(t,i,n,!1)},t.onerror=function(){c(t,i,n,!0)},y(t,"src",t.getAttribute(Z))}function d(){if(n<e.length){var t=e[n];u(t.img,t.Slide)}n++}function c(t,n,i,e){v(i.slide,l.loading),e||(t.parentElement.removeChild(n),h(t,{visibility:"visible"}),o.emit(r+":loaded",t)),s&&d()}return{required:i,mount:function(){t.Slides.getSlides(!0,!0).forEach(function(t){var n=f(t.slide,"["+Z+"]");n&&(e.push({img:n,Slide:t}),h(n,{visibility:"hidden"}))}),e.length&&(s?d():o.on("mounted",function(){a(o.index)}).on("moved."+r,function(t){a(t)}))}}},Keyboard:function(i){var t;return{mount:function(){var n=$["ttb"===i.options.direction?"vertical":"horizontal"];i.on("mounted updated",function(){t&&(t[0](),t=void 0),i.options.keyboard&&(t=b(i.root,"keydown",function(t){n[t.key]&&i.go(n[t.key])}))})}}},Sync:function(e){var o=e.sibling,t=o&&o.options.isNavigation;function r(){e.on(et,function(t,n,i){o.off(et).go(o.is(S)?i:t,!1),s()})}function s(){o.on(et,function(t,n,i){e.off(et).go(e.is(S)?i:t,!1),r()})}function i(t){e.State.is(3)&&o.go(t)}return{required:!!o,mount:function(){r(),s(),t&&o.Components.Slides.getSlides(!0,!0).forEach(function(n){var t=n.slide;b(t,"mouseup touchend",function(t){t.button&&0!==t.button||i(n.index)}),b(t,"keyup",function(t){-1<ot.indexOf(t.key)&&(t.preventDefault(),i(n.index))},!1)})},mounted:function(){t&&o.emit("navigation:mounted",e)}}},A11y:U,Breakpoints:function(n){var i,e,o=n.options.breakpoints,r=[];return{required:o&&matchMedia,mount:function(){r=Object.keys(o).sort(function(t,n){return parseInt(t)-parseInt(n)}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),n.on("mounted resize",function(){var t=function(){var t=r.filter(function(t){return t.mql.matches})[0];return t?t.point:-1}();t!==e&&(n.options=o[t]||i,e=t)})},mounted:function(){i=n.options}}}};i.d(n,"Splide",function(){return st});var st=function(i){function t(t,n){return i.call(this,t,n,rt)||this}return function(t,n){t.prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n}(t,i),t}(W);window.Splide=st}]); |
{ | ||
"name": "@splidejs/splide", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Splide is a lightweight and powerful slider without any dependencies.", | ||
@@ -5,0 +5,0 @@ "author": "Naotoshi Fujita", |
@@ -79,2 +79,3 @@ /** | ||
images.push( { img, Slide } ); | ||
applyStyle( img, { visibility: 'hidden' } ); | ||
} | ||
@@ -135,3 +136,2 @@ } ); | ||
applyStyle( img, { visibility: 'hidden' } ); | ||
setAttribute( img, 'src', img.getAttribute( SRC_DATA_NAME ) ); | ||
@@ -138,0 +138,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
307276
0