/*! * Glide.js v3.4.0 * (c) 2013-2021 Jędrzej Chałubek (http://jedrzejchalubek.com/) * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var n={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"|",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t=function(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t};function s(t,e){for(var n=0;n":"<","<":">","=":"="};function O(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function P(i,r,s){var o=[function(t,n){return{modify:function(t){var e=Math.floor(t/n.Sizes.slideWidth);return t+n.Gaps.value*e}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return a(e)?t-e.before:t-e}return t}}},function(s,o){return{modify:function(t){var e=o.Gaps.value,n=o.Sizes.width,i=s.settings.focusAt,r=o.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}}].concat(i._t,[O]);return{mutate:function(t){for(var e=0;e")||r.Run.isOffset("|>")?t+(e-n):(e+n)%t},getTravelDistance:function(){var t=r.Sizes.slideWidth*i.settings.perView;return r.Run.isOffset(">")||r.Run.isOffset("|>")?-1*t:t}};return n.on("move",function(t){if(!i.isType("carousel")||!r.Run.isOffset())return s.set(t.movement);r.Transition.after(function(){n.emit("translate.jump"),s.set(r.Sizes.slideWidth*i.index)});var e=r.Sizes.slideWidth*r.Translate.getStartIndex();return s.set(e-r.Translate.getTravelDistance())}),n.on("destroy",function(){s.remove()}),s},Transition:function(n,i,t){var r=!1,e={compose:function(t){var e=n.settings;return r?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(t){var e=0"!==i||">"!==n)if("<"!==i||"<"!==n){if("|"===i&&(r=a.settings.perView||1),">"===i||"|"===i&&">"===n){var s=function(t){var e=a.index;if(a.isType("carousel"))return e+t;return e+(t-e%t)}(r);return e=this.length},isOffset:function(t){var e=0"===e?"|"===this.move.direction&&">"===this.move.steps:"|<"===e?"|"===this.move.direction&&"<"===this.move.steps:this.move.direction===e):this._o},isBound:function(){return a.isType("slider")&&"center"!==a.settings.focusAt&&a.settings.bound}};return d(u,"move",{get:function(){return this._m},set:function(t){var e=t.substr(1);this._m={direction:t.substr(0,1),steps:e?y(e)?y(e):e:0}}}),d(u,"length",{get:function(){var t=a.settings,e=n.Html.slides.length;return this.isBound()?e-1-(y(t.perView)-1)+y(t.focusAt):e-1}}),d(u,"offset",{get:function(){return this._o}}),u},Swipe:function(d,h,v){var r=new H,p=0,m=0,g=0,n=!1,s=!!L&&{passive:!0},t={mount:function(){this.bindSwipeStart()},start:function(t){if(!n&&!d.disabled){this.disable();var e=this.touches(t);p=null,m=y(e.pageX),g=y(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),v.emit("swipe.start")}},move:function(t){if(!d.disabled){var e=d.settings,n=e.touchAngle,i=e.touchRatio,r=e.classes,s=this.touches(t),o=y(s.pageX)-m,a=y(s.pageY)-g,u=Math.abs(o<<2),c=Math.abs(a<<2),l=Math.sqrt(u+c),f=Math.sqrt(c);if(!(180*(p=Math.asin(f/l))/Math.PI")):h.Move.make(),h.Html.root.classList.remove(r.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),v.emit("swipe.end")}},bindSwipeStart:function(){var e=this,t=d.settings,n=t.swipeThreshold,i=t.dragThreshold;n&&r.on(z[0],h.Html.wrapper,function(t){e.start(t)},s),i&&r.on(z[1],h.Html.wrapper,function(t){e.start(t)},s)},unbindSwipeStart:function(){r.off(z[0],h.Html.wrapper,s),r.off(z[1],h.Html.wrapper,s)},bindSwipeMove:function(){var e=this;r.on(E,h.Html.wrapper,w(function(t){e.move(t)},d.settings.throttle),s)},unbindSwipeMove:function(){r.off(E,h.Html.wrapper,s)},bindSwipeEnd:function(){var e=this;r.on(R,h.Html.wrapper,function(t){e.end(t)})},unbindSwipeEnd:function(){r.off(R,h.Html.wrapper)},touches:function(t){return-1")),(!('ctrlKey' in t && !!t.ctrlKey) && !('shiftKey' in t && !!t.shiftKey) && !(('altKey' in t && !!t.altKey) || ('metaKey' in t && !!t.metaKey)))&&37===t.keyCode&&i.Run.make(i.Direction.resolve(e+"<"))}};return t.on(["destroy","update"],function(){r.unbind()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){e.destroy()}),r},Autoplay:function(e,n,i){var r=new H,t={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&l(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start(),i.emit("autoplay")},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;r.on("mouseenter",n.Html.root,function(){t.stop(),i.emit("autoplay.enter")}),r.on("mouseleave",n.Html.root,function(){t.start(),i.emit("autoplay.leave")})},unbind:function(){r.off(["mouseover","mouseout"],n.Html.root)}};return d(t,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return y(t||e.settings.autoplay)}}),i.on(["destroy","update"],function(){t.unbind()}),i.on(["run.before","pause","destroy","swipe.start","update"],function(){t.stop()}),i.on(["run.after","play","swipe.end"],function(){t.start()}),i.on("update",function(){t.mount()}),i.on("destroy",function(){r.destroy()}),t},Breakpoints:function(t,e,n){var i=new H,r=t.settings,s=W(r.breakpoints),o=u({},r),a={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return o}};return u(r,a.match(s)),i.on("resize",window,w(function(){t.settings=h(r,a.match(s))},t.settings.throttle)),n.on("update",function(){s=W(s),o=u({},r)}),n.on("destroy",function(){i.off("resize",window)}),a}};function q(){return i(this,q),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(q.__proto__||Object.getPrototypeOf(q)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(q,p),t(q,[{key:"mount",value:function(t){var e=0