ng-carousel-cdk
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@angular/animations"),require("@angular/common"),require("rxjs"),require("bezier-easing"),require("@angular/cdk/a11y")):"function"==typeof define&&define.amd?define("ng-carousel-cdk",["exports","@angular/core","rxjs/operators","@angular/animations","@angular/common","rxjs","bezier-easing","@angular/cdk/a11y"],t):t((e=e||self)["ng-carousel-cdk"]={},e.ng.core,e.rxjs.operators,e.ng.animations,e.ng.common,e.rxjs,e.bezier,e.ng.cdk.a11y)}(this,(function(e,t,n,i,r,o,a,s){"use strict";var l,u;a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,(l=e.CarouselWidthMode||(e.CarouselWidthMode={})).PX="px",l.PERCENT="%",(u=e.CarouselAlignMode||(e.CarouselAlignMode={})).CENTER="center",u.LEFT="left";var c=function(t){this.items=[],this.widthMode=e.CarouselWidthMode.PERCENT,this.slideWidth=100,this.alignMode=e.CarouselAlignMode.CENTER,this.autoplayEnabled=!0,this.autoplayDelay=6e3,this.dragEnabled=!0,this.shouldLoop=!0,this.transitionDuration=280,this.shouldRecalculateOnResize=!0,this.threshold=5,this.items=t&&t.items||[],this.widthMode=t&&t.widthMode||e.CarouselWidthMode.PERCENT,this.alignMode=t&&t.alignMode||e.CarouselAlignMode.CENTER,this.slideWidth=t&&"number"==typeof t.slideWidth?t.slideWidth:100,this.autoplayEnabled=!t||"boolean"!=typeof t.autoplayEnabled||t.autoplayEnabled,this.autoplayDelay=t&&"number"==typeof t.autoplayDelay?t.autoplayDelay:6e3,this.dragEnabled=!t||"boolean"!=typeof t.dragEnabled||t.dragEnabled,this.shouldLoop=!t||"boolean"!=typeof t.shouldLoop||t.shouldLoop,this.transitionDuration=t&&"number"==typeof t.transitionDuration?t.transitionDuration:600,this.shouldRecalculateOnResize=!t||"boolean"!=typeof t.shouldRecalculateOnResize||t.shouldRecalculateOnResize},d=function(e){this.templateRef=e};d.decorators=[{type:t.Directive,args:[{selector:"[ngCarouselSlide]"}]}],d.ctorParameters=function(){return[{type:t.TemplateRef}]};var f=function(){function e(){this.index=0}return e.prototype.next=function(){return this.index++},e}(),h=function(){this.autoplaySuspenders=new Set,this.autoplaySubscription=null,this.interval=null},p=function(){this.configInitialized=!1,this.viewportWidthInitialized=!1,this.firstInitalization=!1},m=function(e){this.widthContainer=null,this.animatableContainer=null,this.config=new c,this.activeSlideIndex=0,this.activeItemIndex=0,this.template=null,this.offset=0,this.slides=[],this.initializationState=new p,this.animation=null,this.autoplay=new h,e&&Object.assign(this,e)},v=function(e,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}Object.create;var w=function(e){function t(t){var n=e.call(this)||this;return n.message=t.message,n.stack=t.stack,n}return function(e,t){function n(){this.constructor=e}v(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function I(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(n,i){var r,o,a,s,l,u=0;try{for(var c=g(t),d=c.next();!d.done;d=c.next()){var f=d.value;if("function"==typeof f){for(var h=Object.entries(null!==(a=null==l?void 0:l.procedureState)&&void 0!==a?a:{}).length?l.procedureState:n.procedureState,p={state:null!==(s=null==l?void 0:l.state)&&void 0!==s?s:n.state,procedureState:h||{},environment:n.environment},m=e+"["+u+"]",v=i?i+"->"+m:m,y=void 0;"function"==typeof y||!y;)try{y=y?y(p,v):f(p,v)}catch(e){throw e instanceof w||console.error("Procedure interrupted at "+v),new w(e)}if(u++,(l=y).shouldBreakProcedure)break}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return l}}var x=new t.InjectionToken("slideIdGenerator"),E=new t.InjectionToken("slideIdGenerator"),M=function(e,t){void 0===t&&(t={}),this.state=e,this.procedureState=t,this.shouldBreakProcedure=!1};function S(e){return void 0===e&&(e=null),function(t){var n=t.state;n=Object.assign({},n);var i=function(e,t){var n;return void 0===t&&(t=new h),null===(n=null==t?void 0:t.autoplaySubscription)||void 0===n||n.unsubscribe(),t.autoplaySuspenders||(t.autoplaySuspenders=new Set),t.autoplaySuspenders.add(e),t}(e,n.autoplay);return n.autoplay=i,new M(n)}}function C(e){return void 0===e&&(e=null),function(t){var n,i,r=t.state,a=t.environment,s=function(e,t,n,i,r,a,s){var l;return s||(s=new h),null===(l=s.autoplaySubscription)||void 0===l||l.unsubscribe(),s.autoplaySuspenders||(s.autoplaySuspenders=new Set),a&&s.autoplaySuspenders.delete(a),e&&!s.autoplaySuspenders.size&&i&&(s.interval=Math.max(t,n),s.autoplaySubscription=o.interval(s.interval).subscribe(r)),s}((r=Object.assign({},r)).config.autoplayEnabled,r.config.transitionDuration,r.config.autoplayDelay,null!==(n=null==a?void 0:a.isBrowser)&&void 0!==n&&n,null!==(i=null==a?void 0:a.autoplayAction)&&void 0!==i?i:function(){},e,r.autoplay);return r.autoplay=s,new M(r)}}function O(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.widthContainer)||void 0===t?void 0:t.offsetWidth)&&void 0!==n?n:100}function T(t){var n;return(null===(n=null==t?void 0:t.config)||void 0===n?void 0:n.widthMode)===e.CarouselWidthMode.PX?O(t):100}var A=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.modifiedOffset=e,this.slideIndex=t};function R(){return function(t){var n=t.state,i=t.procedureState,r=t.environment,o=function(t,n,i,r,o,a,s){void 0===s&&(s=null);var l=new A(n,0);if(!t.length||r<=0)return l;var u=r*t.length,c=i===e.CarouselAlignMode.LEFT?0:o/2,d=i===e.CarouselAlignMode.LEFT?r:r/2,f=i===e.CarouselAlignMode.LEFT?0:d;n+u<c?(l.slideIndex=t.length-1,l.modifiedOffset=c-u+d):n-f>c?(l.slideIndex=0,l.modifiedOffset=c-f):(l.slideIndex=Math.floor(Math.abs(c-n)/r),l.modifiedOffset=c-l.slideIndex*r-f);var h=Math.sign(s),p=n>l.modifiedOffset?-1:1;if(null!==s&&null!==a&&Math.abs(s)>Math.abs(a)&&h!==p){var m=l.slideIndex-h,v=Math.min(Math.max(0,m),t.length-1);v!==l.slideIndex&&(l.slideIndex=v,l.modifiedOffset+=h*r)}return l}(n.slides,n.offset,n.config.alignMode,n.config.slideWidth,T(n),Math.min(n.config.slideWidth/2,r.swipeThreshold),i.passedDistance||null);return n.activeSlideIndex=o.slideIndex,n.activeItemIndex=n.slides[o.slideIndex].itemIndex,new M(n)}}var D=function(e){this.offset=e};function k(){return function(t){var n=t.state,i=t.procedureState,r=function(t,n,i,r,o,a){var s=i*o,l=(n===e.CarouselAlignMode.CENTER?(r-i)/2:0)-i*t;if(!a&&n===e.CarouselAlignMode.LEFT){var u=s<=r;!u&&l+s<=r?l=r-s:u&&(l=0)}return new D(Math.round(l))}((n=Object.assign({},n)).activeSlideIndex,n.config.alignMode,n.config.slideWidth,T(n),n.slides.length,n.config.shouldLoop);return n.offset=r.offset,new M(n,i)}}function P(){return function(e){var t=e.state;return function(e){var t,n,i;try{null===(t=null==e?void 0:e.player)||void 0===t||t.finish(),null===(n=null==e?void 0:e.player)||void 0===n||n.destroy()}catch(e){}null===(i=null==e?void 0:e.onDoneSubscription$)||void 0===i||i.unsubscribe()}(t.animation),t.animation=null,new M(t)}}var F=function(e,t,n){void 0===n&&(n={}),this.id=e,this.itemIndex=t,this.options=n},L=function(e,t,n){this.slides=e,this.inViewportRangeStart=t,this.inViewportRangeEnd=n};function j(){return function(t){var n=t.state,i=t.procedureState,r=function(t,n,i,r,o,a,s){if(!t||!t.length)return new L([],0,0);for(var l=[],u=null,c=null,d=0,f=n;d<t.length;d++,f+=i){var h=f<r+a&&f+i+a>0,p={inViewport:h,isActive:d===o},m=new F(t[d].id,t[d].itemIndex,Object.assign({},t[d].options,p));l.push(m),h&&null===u?u=d:h||null===u||null!==c||(c=Math.max(0,d-1))}if(null!==u&&null===c&&(c=t.length-1),o>=0&&o<=t.length-1){if(o<=u||null===u){var v=s===e.CarouselAlignMode.LEFT?a:r/2-i/2+a,g=Math.ceil(v/i);u=Math.max(0,o-g)}if(o>=c||null===c){var y=s===e.CarouselAlignMode.LEFT?r+a:r/2+i/2+a,b=Math.ceil(y/i);c=Math.min(t.length-1,o+b)}}return new L(l,u||0,c||0)}(n.slides,n.offset,n.config.slideWidth,T(n),n.activeSlideIndex,n.config.threshold,n.config.alignMode);return n.slides=r.slides,n.activeItemIndex=r.slides[n.activeSlideIndex].itemIndex,i.inViewportRange=[r.inViewportRangeStart,r.inViewportRangeEnd],new M(n,i)}}var z=function(e,t){this.slides=e,this.offset=t};function V(){return function(e){var t=e.state,n=e.procedureState,i=function(e,t,n,i,r){if(!e||!e.length)return new z([],t);i=Math.max(0,Math.min(i,r)),r=Math.min(i,e.length-1);for(var o=[],a=[],s=new Set,l=t,u=i;u<=r;u++)s.add(e[u].itemIndex),o.push(e[u]);for(u=r+1;u<e.length;u++)s.has(e[u].itemIndex)||(s.add(e[u].itemIndex),o.push(e[u]));for(u=0;u<i;u++)s.has(e[u].itemIndex)?l+=n:(s.add(e[u].itemIndex),a.push(e[u]));var c=b(a,o);return new z(c,l)}(t.slides,t.offset,t.config.slideWidth,n.inViewportRange[0],n.inViewportRange[1]);return t.slides=i.slides,t.offset=i.offset,new M(t)}}var B=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t=0),void 0===n&&(n=[]),this.slides=e,this.modifiedOffset=t,this.unmarkedItemIndexes=n},W=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.slides=e,this.modifiedOffset=t};function $(e,t,n,i,r,o,a,s){if(void 0===a&&(a=0),void 0===s&&(s=new f),!e||!e.length)return new W([],t);if(n<=0||!o)return new W(e,t);var l=e.length*n,u=Math.max(0,Math.ceil((t+a)/n)),c=Math.max(0,Math.ceil((i+a-(t+l))/n)),d=[];if(c){var h=function(e,t,n,i,r,o){void 0===o&&(o=new f);if(n<1)return new B(e,t,[]);for(var a=[],s=[],l=0,u=!0,c=0,d=!1,h=e[e.length-1],p=h.itemIndex>=r.length-1?0:h.itemIndex+1,m=0;m<n;m++){var v=e[0].itemIndex===p;if(d||v){d=!0;var g=e[c],y=Object.assign({},g.options);y.isActive=!1,y.inViewport=!0;var w=new F(o.next(),p,y);a.push(w),g.options.inViewport&&(u=!1);var I=l+1<=e.length;u&&I&&l++,++c>=e.length&&(c=0)}else{w=new F(o.next(),p,{inViewport:!0,item:r[p],isActive:!1});a.push(w),s.push(p)}++p>=r.length&&(p=0)}l>0&&e.splice(0,l);var x=b(e,a);return new B(x,t+l*i,s)}(e,t,c,n,r,s);e=h.slides,t=h.modifiedOffset,d=h.unmarkedItemIndexes}if(u){var p=function(e,t,n,i,r,o){void 0===o&&(o=new f);if(n<1)return new B(e,t,[]);for(var a=[],s=[],l=null,u=0,c=!1,d=e.length-1,h=e[0],p=0===h.itemIndex?r.length-1:h.itemIndex-1,m=0;m<n;m++){var v=e[e.length-1].itemIndex===p;if(c||v){c=!0;var g=e[d],y=Object.assign({},g.options);y.isActive=!1,y.inViewport=!0;var w=new F(o.next(),p,y);a.push(w),--d<0&&(d=e.length-1),null===l&&g.options.inViewport&&(l=e.length-u);var I=null===l,x=u+1<=e.length;I&&x&&u++}else{w=new F(o.next(),p,{inViewport:!0,item:r[p],isActive:!1});a.push(w),s.push(p)}--p<0&&(p=r.length-1)}u>0&&(l=null===l?e.length-u:l,e.splice(l,u));var E=b(a.reverse(),e);return new B(E,t-a.length*i,s)}(e,t,u,n,r,s);e=p.slides,t=p.modifiedOffset,d=d.concat(p.unmarkedItemIndexes)}return new W(e,t)}function N(){return function(e){var t,n=e.state,i=e.procedureState,r=e.environment,o=$(n.slides,n.offset,n.config.slideWidth,T(n),n.config.items,n.config.shouldLoop,n.config.threshold,null!==(t=null==r?void 0:r.slideIdGenerator)&&void 0!==t?t:new f);return n.slides=o.slides,n.activeSlideIndex=o.slides.findIndex((function(e){return e.options.isActive}))||0,void 0!==i.offsetSnapshot&&(i.offsetSnapshot=o.modifiedOffset-n.offset+i.offsetSnapshot),n.offset=o.modifiedOffset,new M(n)}}function _(){return function(e){var t,n,i,r,o=e.state,a=(new Date).getTime(),s=function(e,t,n,i,r,o){if(void 0===n||void 0===i)return r;if(t<=0||e<0||i===n)return i;var a=Math.abs(i-n)*o(e/t);return i>n?n+a:n-a}(a-(null!==(n=null===(t=o.animation)||void 0===t?void 0:t.startTime)&&void 0!==n?n:a),o.config.transitionDuration,null===(i=o.animation)||void 0===i?void 0:i.from,null===(r=o.animation)||void 0===r?void 0:r.to,o.offset,o.animationBezierFn);return o.offset=s,new M(o)}}var G=function(e,t,n,i,r){void 0===r&&(r=(new Date).getTime()),this.from=e,this.to=t,this.player=n,this.onDoneSubscription$=i,this.startTime=r};function q(){return function(e){var t,n,r,a=e.state,s=e.procedureState,l=e.environment,u=function(e,t,n,r,a,s,l,u,c){if(!l)return null;var d="cubic-bezier("+s[0]+","+s[1]+","+s[2]+","+s[3]+")",f=c.build([i.style({transform:"translateX("+t+r+")"}),i.animate(a+"ms "+d,i.style({transform:"translateX("+n+r+")"}))]).create(e),h=o.bindCallback(f.onDone).call(f).subscribe((function(){f.destroy(),u()})),p=new G(t,n,f,h);return f.play(),p}(a.animatableContainer,s.offsetSnapshot,a.offset,a.config.widthMode,a.config.transitionDuration,null!==(t=null==l?void 0:l.animationBezierArgs)&&void 0!==t?t:[],null!==(n=null==l?void 0:l.isBrowser)&&void 0!==n&&n,null!==(r=null==l?void 0:l.afterAnimationAction)&&void 0!==r?r:function(){},null==l?void 0:l.animationBuilder);return a.animation=u,new M(a)}}function H(){return I("setSlideIndex",_(),P(),(function(e){var t=e.state,n=e.procedureState;return n.offsetSnapshot=t.offset,new M(t,n)}),j(),k(),N(),q())}function X(t){return I("dragEnd",C("drag"),function(t){return function(n){var i=n.state,r=n.procedureState;return r.passedDistance=i.config.widthMode===e.CarouselWidthMode.PERCENT?100*t/O(i):t,new M(i,r)}}(t),R(),H())}function U(t,n,i,r,o,a,s,l,u,c,d,f,h){if(t===n)return i;r===e.CarouselWidthMode.PERCENT&&(t=100*t/l,n=100*n/l);var p=n-t;if(a)return i+p;var m=function(t,n,i,r,o,a,s,l){var u=a===e.CarouselAlignMode.CENTER?i/2-r/2:0,c=a===e.CarouselAlignMode.CENTER?i/2+r/2:Math.min(u+o,i),d=null;a===e.CarouselAlignMode.LEFT&&o<i&&0!==n?d=n:n>u?d=n-u:n<c-o&&(d=n-c+o);if(null===d)return null;var f=function(e,t,n,i){var r=t*n/100,o=Math.abs(e/r);return i(o)*t*Math.sign(e)}(d,i,s,l);return t-f}(t,i,s,u,c,o,d,h);if(null===m)return J(i,p,o,s,u,c,d,f);if(t>m?n>m:n<m)return i-=function(e,t,n,i,r){var o=K(e,n,i,r),a=K(t,n,i,r);return o-a}(t-m,n-m,s,d,f);var v=K(m-t,s,d,f),g=m-t;return t=m,J(i+=v,p-=g,o,s,u,c,d,f)}function K(e,t,n,i){return t*n/100*i(Math.max(0,Math.min(Math.abs(e)/t,1)))*Math.sign(e)}function J(t,n,i,r,o,a,s,l){var u=i===e.CarouselAlignMode.CENTER?r/2-o/2:0,c=i===e.CarouselAlignMode.CENTER?r/2+o/2:Math.min(r,a),d=t+n>u,f=t+a+n<c;if(!d&&n>0||!f&&n<0)return t+n;var h=0;return d?h=t-u:f&&(h=t+a-c),t-=h,t+=K(n+h,r,s,l)}var Z=function(e,t){void 0===t&&(t=null),this.state=e,this.procedureState=t,this.shouldBreakProcedure=!0};function Q(){return function(e){var t,n=e.state;return(null===(t=null==n?void 0:n.config)||void 0===t?void 0:t.dragEnabled)?new M(n):new Z(n)}}function Y(e,t){return I("drag",Q(),_(),P(),function(e,t){return function(n){var i=n.state,r=n.environment,o=U(e,t,i.offset,i.config.widthMode,i.config.alignMode,i.config.shouldLoop,T(i),O(i),i.config.slideWidth,i.slides.length*i.config.slideWidth,r.maxOverscroll,i.dragBezierFn,i.invertedDragBezierFn);return i.offset=o,new M(i)}}(e,t),j(),N(),R(),j())}function ee(e,t,n){for(var i=n+1;i<e.length;i++)if(e[i].itemIndex===t)return{foundIndex:i};return null}function te(e,t,n){for(var i=n-1;i>=0;i--)if(e[i].itemIndex===t)return{foundIndex:i};return null}function ne(e){return function(t){var n=t.state,i=function(e,t,n){var i;if(!e)return 0;var r=e[n];if(!r)return 0;var o=r.itemIndex,a=null;return t===o||e.length<=1?n:null!==(i=null==(a=t>o?ee(e,t,n)||te(e,t,n):te(e,t,n)||ee(e,t,n))?void 0:a.foundIndex)&&void 0!==i?i:null}(n.slides,null!=e?e:n.activeItemIndex,n.activeSlideIndex);return n.activeSlideIndex=i,n.activeItemIndex=e,new M(n)}}function ie(e){return I("goTo",function(e){return function(t){var n=t.state;return n.slides&&n.slides.length?(n.postponedItemIndex=null,new M(n)):(n.postponedItemIndex=e,new Z(n))}}(e),C(),ne(e),H())}function re(){return function(e){var t=e.state,n=e.environment,i=function(e,t){if(!e||!e.length||!t)return[];for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]=new F(t.next(),i,{item:e[i],isActive:0===i});return n}(t.config.items,n.slideIdGenerator);return t.slides=i,t.offset=0,t.activeSlideIndex=0,new M(t)}}var oe=[.25,.1,.25,1],ae=[.25,.46,.45,.94];function se(){return function(e){var t=e.state;return t.slides.length&&t.postponedItemIndex?I("setPostponedIndex",ie(t.postponedItemIndex),(function(e){var t=e.state;return t.postponedItemIndex=null,new M(t)})):new M(t)}}function le(){return I("initialize",(function(e){var t,n=e.state,i=null!==(t=null==n?void 0:n.initializationState)&&void 0!==t?t:new p;return i.configInitialized&&i.viewportWidthInitialized?new M(n):new Z(n)}),(function(e){var t=e.state;return t.initializationState.firstInitalization=!0,new M(t)}),re(),k(),j(),N(),P(),C(),R(),(function(e){var t=e.state;return t.dragBezierFn||(t.dragBezierFn=a(ae[0],ae[1],ae[2],ae[3])),t.invertedDragBezierFn||(t.invertedDragBezierFn=a(1-ae[0],1-ae[1],1-ae[2],1-ae[3])),t.animationBezierFn||(t.animationBezierFn=a(oe[0],oe[1],oe[2],oe[3])),new M(t)}),se())}function ue(e){return I("initializeConfig",function(e){return function(t){var n=t.state;return n.config=e,n.initializationState.configInitialized=!0,new M(n)}}(e),le())}function ce(e,t){return I("initializeContainers",function(e,t){return function(n){var i=n.state;return i.widthContainer=e,i.animatableContainer=t,i.initializationState.viewportWidthInitialized=!0,new M(i)}}(e,t),le())}function de(e){return void 0===e&&(e=!1),I("next",e?C():null,(function(e){var t,n,i,r,o=e.state,a=(t=o.slides.length,n=o.activeSlideIndex,i=o.config.shouldLoop,(r=n+1)>=t&&(r=i?0:t-1),r);return o.activeSlideIndex=a,new M(o)}),H())}function fe(){return I("prev",C(),(function(e){var t,n,i,r,o=e.state,a=(t=o.slides.length,n=o.activeSlideIndex,i=o.config.shouldLoop,(r=n-1)<0&&(r=i?t-1:0),r);return o.activeSlideIndex=a,new M(o)}),H())}var he=function(){function e(e,t,n){this.animationBuilder=e,this.slideIdGenerator=t,this.platformId=n,this.carouselState$=new o.BehaviorSubject(new m),this.procedureEnvironment={slideIdGenerator:this.slideIdGenerator,isBrowser:r.isPlatformBrowser(this.platformId),autoplayAction:this.next.bind(this),afterAnimationAction:this.cleanup.bind(this),animationBuilder:this.animationBuilder,animationBezierArgs:oe,swipeThreshold:15,maxOverscroll:10}}return e.prototype.ngOnDestroy=function(){var e,t,n;null===(n=null===(t=null===(e=this.carouselState$.getValue())||void 0===e?void 0:e.autoplay)||void 0===t?void 0:t.autoplaySubscription)||void 0===n||n.unsubscribe()},e.prototype.carouselStateChanges=function(){return this.carouselState$.asObservable()},e.prototype.setItemIndex=function(e){this.apply(ie(e))},e.prototype.prev=function(){this.apply(fe())},e.prototype.next=function(e){void 0===e&&(e=!1),this.apply(de(e))},e.prototype.recalculate=function(){this.apply(I("recalculate",k(),j(),N()))},e.prototype.dragStart=function(){this.apply(I("dragStart",Q(),S("drag")))},e.prototype.dragEnd=function(e){this.apply(X(e))},e.prototype.drag=function(e,t){this.apply(Y(e,t))},e.prototype.setSlideTemplate=function(e){var t;this.apply((t=e,function(e){var n=e.state;return n.template=t,new M(n)}))},e.prototype.disableAutoplay=function(e){this.apply(S(e))},e.prototype.enableAutoplay=function(e){void 0===e&&(e=null),this.apply(C(e))},e.prototype.setContainers=function(e,t){this.apply(ce(e,t))},e.prototype.setConfig=function(e){this.apply(ue(e))},e.prototype.cleanup=function(){this.apply(I("cleanup",P(),j(),k(),R(),V(),N(),R()))},e.prototype.apply=function(e){var t=Object.assign({},this.carouselState$.getValue()),n=I("applier",e)({state:t,procedureState:{},environment:this.procedureEnvironment});this.carouselState$.next(n.state)},e}();function pe(){return new f}he.decorators=[{type:t.Injectable}],he.ctorParameters=function(){return[{type:i.AnimationBuilder},{type:f,decorators:[{type:t.Inject,args:[x]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]};var me=function(){function e(e){this.carousel=e,this.itemIndexChange=this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.activeItemIndex})))}return Object.defineProperty(e.prototype,"slideRef",{set:function(e){this.carousel.setSlideTemplate(e?e.templateRef:null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{set:function(e){e=new c(e),this.carousel.setConfig(e)},enumerable:!1,configurable:!0}),e.prototype.next=function(){this.carousel.next()},e.prototype.prev=function(){this.carousel.prev()},e.prototype.setIndex=function(e){this.carousel.setItemIndex(e)},e.prototype.recalculate=function(){this.carousel.recalculate()},e}();me.decorators=[{type:t.Component,args:[{selector:"ng-carousel",template:'<carousel-engine class="carousel-engine"></carousel-engine>\n',providers:[he,{provide:x,useFactory:pe},{provide:E,useFactory:pe}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,exportAs:"ngCarousel",styles:[".carousel-engine{display:block;overflow:hidden;width:100%}"]}]}],me.ctorParameters=function(){return[{type:he}]},me.propDecorators={slideRef:[{type:t.ContentChild,args:[d]}],config:[{type:t.Input}],itemIndexChange:[{type:t.Output}]};var ve=function(){function e(e){this.platformId=e,this.hammerAbsenceDeclared=!1}return e.prototype.managerFor=function(e){return r.isPlatformBrowser(this.platformId)&&window.Hammer?new Hammer(e):(t.isDevMode()&&!this.hammerAbsenceDeclared&&(console.warn("Ng-carousel could not listen to drag, because HammerJS was not found. Either disable drag or import HammerJS."),this.hammerAbsenceDeclared=!0),null)},e}();ve.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ve(t.ɵɵinject(t.PLATFORM_ID))},token:ve,providedIn:"root"}),ve.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ve.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]};var ge=function(){function e(e,t){this.elementRef=e,this.hammer=t,this.shouldPreventClick=!1}return e.prototype.processClickEvent=function(e){this.shouldPreventClick&&(e.preventDefault(),e.stopImmediatePropagation())},e.prototype.ngOnInit=function(){this.listenPanEndEvents()},e.prototype.ngOnDestroy=function(){this.hammerManager&&this.hammerManager.destroy()},e.prototype.listenPanEndEvents=function(){var e=this;this.hammerManager=this.hammer.managerFor(this.elementRef.nativeElement),this.hammerManager&&this.hammerManager.on("panend pancancel",(function(){e.shouldPreventClick=!0,o.asyncScheduler.schedule((function(){e.shouldPreventClick=!1}))}))},e}();ge.decorators=[{type:t.Directive,args:[{selector:"[ngCarouselPreventGhostClick]"}]}],ge.ctorParameters=function(){return[{type:t.ElementRef},{type:ve}]},ge.propDecorators={processClickEvent:[{type:t.HostListener,args:["click",["$event"]]}]};var ye=function(){function e(e,t){this.elementRef=e,this.interactivityChecker=t,this.untabbable=!1,this.untabbableFocused=!1,this.lastTabindexValueMap=new Map}return e.prototype.ngOnChanges=function(e){if(e.untabbable&&this.viewInitiated){var t=e.untabbable;if(t.currentValue===t.previousValue)return;t.currentValue?this.blockTabindex():this.unblockTabindex(),this.untabbableFocused&&this.untabbableFocusTrapRef&&this.untabbableFocusTrapRef.focusTrap.focusFirstTabbableElement()}},e.prototype.ngAfterViewInit=function(){this.viewInitiated=!0,this.untabbable?this.blockTabindex():this.unblockTabindex()},e.prototype.ngOnDestroy=function(){this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null)},e.prototype.blockTabindex=function(){var e,t,n=this,i=Array.from(this.elementRef.nativeElement.querySelectorAll("*"));try{for(var r=g(i),o=r.next();!o.done;o=r.next()){var a=o.value;this.blockElement(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}"undefined"!=typeof window&&"MutationObserver"in window&&(this.mutationObserver=new MutationObserver((function(e){var t,i,r=Array.from(e);try{for(var o=g(r),a=o.next();!a.done;a=o.next()){var s=a.value;"attributes"===s.type?n.blockElement(s.target):"childList"===s.type&&s.addedNodes.forEach((function(e){n.blockElement(e)}))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}})),this.mutationObserver.observe(this.elementRef.nativeElement,{attributeFilter:["tabindex"],attributes:!0,childList:!0,subtree:!0}))},e.prototype.unblockTabindex=function(){var e,t;this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null);var n=Array.from(this.elementRef.nativeElement.querySelectorAll("*"));try{for(var i=g(n),r=i.next();!r.done;r=i.next()){var o=r.value;this.unblockElement(o)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.blockElement=function(e){if(3!==e.nodeType&&this.interactivityChecker.isFocusable(e)&&this.interactivityChecker.isTabbable(e)){var t=e.getAttribute("tabindex");this.lastTabindexValueMap.set(e,t),"-1"!==t&&e.setAttribute("tabindex","-1")}},e.prototype.unblockElement=function(e){this.lastTabindexValueMap.has(e)&&"number"==typeof this.lastTabindexValueMap.get(e)?e.setAttribute("tabindex",this.lastTabindexValueMap.get(e)):e.removeAttribute("tabindex")},e}();ye.decorators=[{type:t.Directive,args:[{selector:"[untabbable]"}]}],ye.ctorParameters=function(){return[{type:t.ElementRef},{type:s.InteractivityChecker}]},ye.propDecorators={untabbable:[{type:t.Input}],untabbableFocusTrapRef:[{type:t.Input}],untabbableFocused:[{type:t.Input}]};var be=function(e,t,n,i){this.$implicit=e,this.itemIndex=t,this.isActive=n,this.inViewport=i},we=function(){function e(e,t,n,i,r){this.carousel=e,this.elementRef=t,this.renderer=n,this.hammer=i,this.platformId=r,this.transformValue$=this.transformValueChanges(),this.slideWidth$=this.slideWidthChanges(),this.template$=this.templateChanges(),this.slides$=this.slidesChanges(),this.focused=!1,this.destroyed$=new o.Subject}return Object.defineProperty(e.prototype,"htmlElement",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.listenToAutoplay(),this.listenToDragEvents(),this.listenToResizeEvents(),this.listenToKeyEvents(),this.listenToScrollEvents(),this.carousel.setContainers(this.htmlElement,this.galleryRef.nativeElement)},e.prototype.ngOnDestroy=function(){this.destroyMouseListeners(),this.destroyHammer(),this.destroyKeyboardListeners(),this.destroyElementScrollListener(),this.destroyed$.next(),this.destroyed$.complete()},e.prototype.trackByFn=function(e,t){return t.id},e.prototype.contextOf=function(e){return new be(e.options.item,e.itemIndex,e.options.isActive,e.options.inViewport)},e.prototype.focusIn=function(){this.focused=!0,this.carousel.disableAutoplay("focus")},e.prototype.focusOut=function(){this.focused=!1,this.carousel.enableAutoplay("focus")},e.prototype.destroyMouseListeners=function(){this.mouseEnterDestructor&&this.mouseEnterDestructor(),this.mouseLeaveDestructor&&this.mouseLeaveDestructor()},e.prototype.destroyHammer=function(){this.hammerManager&&this.hammerManager.destroy()},e.prototype.destroyKeyboardListeners=function(){this.keyboardListener&&this.keyboardListener()},e.prototype.destroyElementScrollListener=function(){this.containerScrollListener&&this.containerScrollListener()},e.prototype.transformValueChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return"translateX("+e.offset+e.config.widthMode+")"})))},e.prototype.slideWidthChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return""+e.config.slideWidth+e.config.widthMode})))},e.prototype.slidesChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.slides})))},e.prototype.templateChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.template})))},e.prototype.listenToAutoplay=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.config.autoplayEnabled})),n.distinctUntilChanged(),n.takeUntil(this.destroyed$)).subscribe((function(t){e.mouseEnterDestructor&&e.mouseEnterDestructor(),e.mouseLeaveDestructor&&e.mouseLeaveDestructor(),t&&(e.mouseEnterDestructor=e.renderer.listen(e.htmlElement,"mouseenter",(function(){return e.carousel.disableAutoplay("mouse")})),e.mouseLeaveDestructor=e.renderer.listen(e.htmlElement,"mouseleave",(function(){return e.carousel.enableAutoplay("mouse")})))}))},e.prototype.listenToDragEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.config.dragEnabled})),n.distinctUntilChanged(),n.takeUntil(this.destroyed$)).subscribe((function(t){if(e.hammerManager&&e.hammerManager.destroy(),t&&(e.hammerManager=e.hammer.managerFor(e.htmlElement),e.hammerManager)){var n,i=0;e.hammerManager.on("panstart",(function(t){t.offsetDirection&Hammer.DIRECTION_HORIZONTAL&&(i=Math.round(t.deltaX),e.carousel.dragStart(),n=e.htmlElement.style.touchAction,e.renderer.setStyle(e.htmlElement,"touch-action","none"))})),e.hammerManager.on("panright panleft",(function(t){if(n){var r=Math.round(t.center.x),o=Math.round(t.deltaX);e.carousel.drag(r,r+(o-i)),i=o}})),e.hammerManager.on("panend pancancel",(function(t){n&&(e.carousel.dragEnd(t.deltaX),e.renderer.setStyle(e.htmlElement,"touch-action",n),n=null)}))}}))},e.prototype.listenToResizeEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.filter((function(e){return e.config.shouldRecalculateOnResize})),n.switchMapTo(o.fromEvent(window,"resize")),n.takeUntil(this.destroyed$)).subscribe((function(){e.carousel.recalculate()}))},e.prototype.listenToKeyEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&(this.keyboardListener=this.renderer.listen(this.htmlElement,"keydown",(function(t){var n=t.key.toLowerCase();["arrowright","right"].includes(n)?e.carousel.next():["arrowleft","left"].includes(n)&&e.carousel.prev()})))},e.prototype.listenToScrollEvents=function(){var e=this;this.containerScrollListener=this.renderer.listen(this.htmlElement,"scroll",(function(){e.htmlElement.scrollTo(0,0)}))},e}();we.decorators=[{type:t.Component,args:[{selector:"carousel-engine",template:'<ul \n #galleryRef\n #focusTrapRef="cdkTrapFocus"\n [style.transform]="transformValue$ | async"\n [cdkTrapFocus]="false"\n (focusin)="focusIn()"\n (focusout)="focusOut()"\n class="ng-carousel-block">\n <li\n *ngFor="let slide of (slides$ | async); trackBy: trackByFn;"\n [style.width]="slideWidth$ | async"\n [untabbable]="!slide.options.isActive"\n [untabbableFocusTrapRef]="focusTrapRef"\n [untabbableFocused]="focused"\n class="ng-carousel-slide">\n <ng-container *ngTemplateOutlet="(template$ | async); context: contextOf(slide);"></ng-container>\n </li>\n</ul>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[".ng-carousel-block{display:flex;margin:0;padding:0;width:100%;will-change:transform}.ng-carousel-slide{flex:none;list-style:none}"]}]}],we.ctorParameters=function(){return[{type:he},{type:t.ElementRef},{type:t.Renderer2},{type:ve},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},we.propDecorators={galleryRef:[{type:t.ViewChild,args:["galleryRef",{static:!0}]}]};var Ie=function(){};Ie.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,s.A11yModule],declarations:[me,d,we,ye,ge],exports:[me,d,ge]}]}],e.CarouselComponent=me,e.CarouselConfig=c,e.CarouselModule=Ie,e.CarouselSlideDirective=d,e.PreventGhostClickDirective=ge,e.idGeneratorFactory=pe,e.ɵa=f,e.ɵb=he,e.ɵc=x,e.ɵd=E,e.ɵe=we,e.ɵf=ve,e.ɵg=ye,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@angular/animations"),require("@angular/common"),require("rxjs"),require("bezier-easing"),require("@angular/cdk/a11y")):"function"==typeof define&&define.amd?define("ng-carousel-cdk",["exports","@angular/core","rxjs/operators","@angular/animations","@angular/common","rxjs","bezier-easing","@angular/cdk/a11y"],t):t((e=e||self)["ng-carousel-cdk"]={},e.ng.core,e.rxjs.operators,e.ng.animations,e.ng.common,e.rxjs,e.bezier,e.ng.cdk.a11y)}(this,(function(e,t,n,i,r,o,a,s){"use strict";var l,u;a=a&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a,(l=e.CarouselWidthMode||(e.CarouselWidthMode={})).PX="px",l.PERCENT="%",(u=e.CarouselAlignMode||(e.CarouselAlignMode={})).CENTER="center",u.LEFT="left";var c=function(t){this.items=[],this.widthMode=e.CarouselWidthMode.PERCENT,this.slideWidth=100,this.alignMode=e.CarouselAlignMode.CENTER,this.autoplayEnabled=!0,this.autoplayDelay=6e3,this.dragEnabled=!0,this.shouldLoop=!0,this.transitionDuration=280,this.shouldRecalculateOnResize=!0,this.threshold=5,this.items=t&&t.items||[],this.widthMode=t&&t.widthMode||e.CarouselWidthMode.PERCENT,this.alignMode=t&&t.alignMode||e.CarouselAlignMode.CENTER,this.slideWidth=t&&"number"==typeof t.slideWidth?t.slideWidth:100,this.autoplayEnabled=!t||"boolean"!=typeof t.autoplayEnabled||t.autoplayEnabled,this.autoplayDelay=t&&"number"==typeof t.autoplayDelay?t.autoplayDelay:6e3,this.dragEnabled=!t||"boolean"!=typeof t.dragEnabled||t.dragEnabled,this.shouldLoop=!t||"boolean"!=typeof t.shouldLoop||t.shouldLoop,this.transitionDuration=t&&"number"==typeof t.transitionDuration?t.transitionDuration:600,this.shouldRecalculateOnResize=!t||"boolean"!=typeof t.shouldRecalculateOnResize||t.shouldRecalculateOnResize},d=function(e){this.templateRef=e};d.decorators=[{type:t.Directive,args:[{selector:"[ngCarouselSlide]"}]}],d.ctorParameters=function(){return[{type:t.TemplateRef}]};var f=function(){function e(){this.index=0}return e.prototype.next=function(){return this.index++},e}(),h=function(){this.autoplaySuspenders=new Set,this.autoplaySubscription=null,this.interval=null},p=function(){this.configInitialized=!1,this.viewportWidthInitialized=!1,this.firstInitalization=!1},v=function(e){this.widthContainer=null,this.animatableContainer=null,this.config=new c,this.activeSlideIndex=0,this.activeItemIndex=0,this.template=null,this.offset=0,this.slides=[],this.initializationState=new p,this.animation=null,this.autoplay=new h,e&&Object.assign(this,e)},m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}Object.create;var w=function(e){function t(t){var n=e.call(this)||this;return n.message=t.message,n.stack=t.stack,n}return function(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error);function I(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(n,i){var r,o,a,s,l,u=0;try{for(var c=g(t),d=c.next();!d.done;d=c.next()){var f=d.value;if("function"==typeof f){for(var h=Object.entries(null!==(a=null==l?void 0:l.procedureState)&&void 0!==a?a:{}).length?l.procedureState:n.procedureState,p={state:null!==(s=null==l?void 0:l.state)&&void 0!==s?s:n.state,procedureState:h||{},environment:n.environment},v=e+"["+u+"]",m=i?i+"->"+v:v,y=void 0;"function"==typeof y||!y;)try{y=y?y(p,m):f(p,m)}catch(e){throw e instanceof w||console.error("Procedure interrupted at "+m),new w(e)}if(u++,(l=y).shouldBreakProcedure)break}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return l}}var x=new t.InjectionToken("slideIdGenerator"),E=new t.InjectionToken("slideIdGenerator"),M=function(e,t){void 0===t&&(t={}),this.state=e,this.procedureState=t,this.shouldBreakProcedure=!1};function S(e){return void 0===e&&(e=null),function(t){var n=t.state;n=Object.assign({},n);var i=function(e,t){var n;return void 0===t&&(t=new h),null===(n=null==t?void 0:t.autoplaySubscription)||void 0===n||n.unsubscribe(),t.autoplaySuspenders||(t.autoplaySuspenders=new Set),t.autoplaySuspenders.add(e),t}(e,n.autoplay);return n.autoplay=i,new M(n)}}function C(e){return void 0===e&&(e=null),function(t){var n,i,r=t.state,a=t.environment,s=function(e,t,n,i,r,a,s){var l;return s||(s=new h),null===(l=s.autoplaySubscription)||void 0===l||l.unsubscribe(),s.autoplaySuspenders||(s.autoplaySuspenders=new Set),a&&s.autoplaySuspenders.delete(a),e&&!s.autoplaySuspenders.size&&i&&(s.interval=Math.max(t,n),s.autoplaySubscription=o.interval(s.interval).subscribe(r)),s}((r=Object.assign({},r)).config.autoplayEnabled,r.config.transitionDuration,r.config.autoplayDelay,null!==(n=null==a?void 0:a.isBrowser)&&void 0!==n&&n,null!==(i=null==a?void 0:a.autoplayAction)&&void 0!==i?i:function(){},e,r.autoplay);return r.autoplay=s,new M(r)}}function O(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.widthContainer)||void 0===t?void 0:t.offsetWidth)&&void 0!==n?n:100}function T(t){var n;return(null===(n=null==t?void 0:t.config)||void 0===n?void 0:n.widthMode)===e.CarouselWidthMode.PX?O(t):100}var A=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.modifiedOffset=e,this.slideIndex=t};function R(){return function(t){var n,i,r=t.state,o=t.procedureState,a=t.environment,s=function(t,n,i,r,o,a,s){void 0===s&&(s=null);var l=new A(n,0);if(!t.length||r<=0)return l;var u=r*t.length,c=i===e.CarouselAlignMode.LEFT?0:o/2,d=i===e.CarouselAlignMode.LEFT?r:r/2,f=i===e.CarouselAlignMode.LEFT?0:d;n+u<c?(l.slideIndex=t.length-1,l.modifiedOffset=c-u+d):n-f>c?(l.slideIndex=0,l.modifiedOffset=c-f):(l.slideIndex=Math.floor(Math.abs(c-n)/r),l.modifiedOffset=c-l.slideIndex*r-f);var h=Math.sign(s),p=n>l.modifiedOffset?-1:1;if(null!==s&&null!==a&&Math.abs(s)>Math.abs(a)&&h!==p){var v=l.slideIndex-h,m=Math.min(Math.max(0,v),t.length-1);m!==l.slideIndex&&(l.slideIndex=m,l.modifiedOffset+=h*r)}return l}(r.slides,r.offset,r.config.alignMode,r.config.slideWidth,T(r),Math.min(r.config.slideWidth/2,a.swipeThreshold),o.passedDistance||null);return r.activeSlideIndex=s.slideIndex,r.activeItemIndex=null!==(i=null===(n=r.slides[s.slideIndex])||void 0===n?void 0:n.itemIndex)&&void 0!==i?i:0,new M(r)}}var D=function(e){this.offset=e};function k(){return function(t){var n=t.state,i=t.procedureState,r=function(t,n,i,r,o,a){var s=i*o,l=(n===e.CarouselAlignMode.CENTER?(r-i)/2:0)-i*t;if(!a&&n===e.CarouselAlignMode.LEFT){var u=s<=r;!u&&l+s<=r?l=r-s:u&&(l=0)}return new D(Math.round(l))}((n=Object.assign({},n)).activeSlideIndex,n.config.alignMode,n.config.slideWidth,T(n),n.slides.length,n.config.shouldLoop);return n.offset=r.offset,new M(n,i)}}function P(){return function(e){var t=e.state;return function(e){var t,n,i;try{null===(t=null==e?void 0:e.player)||void 0===t||t.finish(),null===(n=null==e?void 0:e.player)||void 0===n||n.destroy()}catch(e){}null===(i=null==e?void 0:e.onDoneSubscription$)||void 0===i||i.unsubscribe()}(t.animation),t.animation=null,new M(t)}}var F=function(e,t,n){void 0===n&&(n={}),this.id=e,this.itemIndex=t,this.options=n},L=function(e,t,n){this.slides=e,this.inViewportRangeStart=t,this.inViewportRangeEnd=n};function j(){return function(t){var n,i,r=t.state,o=t.procedureState,a=function(t,n,i,r,o,a,s){if(!t||!t.length)return new L([],0,0);for(var l=[],u=null,c=null,d=0,f=n;d<t.length;d++,f+=i){var h=f<r+a&&f+i+a>0,p={inViewport:h,isActive:d===o},v=new F(t[d].id,t[d].itemIndex,Object.assign({},t[d].options,p));l.push(v),h&&null===u?u=d:h||null===u||null!==c||(c=Math.max(0,d-1))}if(null!==u&&null===c&&(c=t.length-1),o>=0&&o<=t.length-1){if(o<=u||null===u){var m=s===e.CarouselAlignMode.LEFT?a:r/2-i/2+a,g=Math.ceil(m/i);u=Math.max(0,o-g)}if(o>=c||null===c){var y=s===e.CarouselAlignMode.LEFT?r+a:r/2+i/2+a,b=Math.ceil(y/i);c=Math.min(t.length-1,o+b)}}return new L(l,u||0,c||0)}(r.slides,r.offset,r.config.slideWidth,T(r),r.activeSlideIndex,r.config.threshold,r.config.alignMode);return r.slides=a.slides,r.activeItemIndex=null!==(i=null===(n=a.slides[r.activeSlideIndex])||void 0===n?void 0:n.itemIndex)&&void 0!==i?i:0,o.inViewportRange=[a.inViewportRangeStart,a.inViewportRangeEnd],new M(r,o)}}var z=function(e,t){this.slides=e,this.offset=t};function V(){return function(e){var t=e.state,n=e.procedureState,i=function(e,t,n,i,r){if(!e||!e.length)return new z([],t);i=Math.max(0,Math.min(i,r)),r=Math.min(i,e.length-1);for(var o=[],a=[],s=new Set,l=t,u=i;u<=r;u++)s.add(e[u].itemIndex),o.push(e[u]);for(u=r+1;u<e.length;u++)s.has(e[u].itemIndex)||(s.add(e[u].itemIndex),o.push(e[u]));for(u=0;u<i;u++)s.has(e[u].itemIndex)?l+=n:(s.add(e[u].itemIndex),a.push(e[u]));var c=b(a,o);return new z(c,l)}(t.slides,t.offset,t.config.slideWidth,n.inViewportRange[0],n.inViewportRange[1]);return t.slides=i.slides,t.offset=i.offset,new M(t)}}var B=function(e,t,n){void 0===e&&(e=[]),void 0===t&&(t=0),void 0===n&&(n=[]),this.slides=e,this.modifiedOffset=t,this.unmarkedItemIndexes=n},W=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0),this.slides=e,this.modifiedOffset=t};function $(e,t,n,i,r,o,a,s){if(void 0===a&&(a=0),void 0===s&&(s=new f),!e||!e.length)return new W([],t);if(n<=0||!o)return new W(e,t);var l=e.length*n,u=Math.max(0,Math.ceil((t+a)/n)),c=Math.max(0,Math.ceil((i+a-(t+l))/n)),d=[];if(c){var h=function(e,t,n,i,r,o){void 0===o&&(o=new f);if(n<1)return new B(e,t,[]);for(var a=[],s=[],l=0,u=!0,c=0,d=!1,h=e[e.length-1],p=h.itemIndex>=r.length-1?0:h.itemIndex+1,v=0;v<n;v++){var m=e[0].itemIndex===p;if(d||m){d=!0;var g=e[c],y=Object.assign({},g.options);y.isActive=!1,y.inViewport=!0;var w=new F(o.next(),p,y);a.push(w),g.options.inViewport&&(u=!1);var I=l+1<=e.length;u&&I&&l++,++c>=e.length&&(c=0)}else{w=new F(o.next(),p,{inViewport:!0,item:r[p],isActive:!1});a.push(w),s.push(p)}++p>=r.length&&(p=0)}l>0&&e.splice(0,l);var x=b(e,a);return new B(x,t+l*i,s)}(e,t,c,n,r,s);e=h.slides,t=h.modifiedOffset,d=h.unmarkedItemIndexes}if(u){var p=function(e,t,n,i,r,o){void 0===o&&(o=new f);if(n<1)return new B(e,t,[]);for(var a=[],s=[],l=null,u=0,c=!1,d=e.length-1,h=e[0],p=0===h.itemIndex?r.length-1:h.itemIndex-1,v=0;v<n;v++){var m=e[e.length-1].itemIndex===p;if(c||m){c=!0;var g=e[d],y=Object.assign({},g.options);y.isActive=!1,y.inViewport=!0;var w=new F(o.next(),p,y);a.push(w),--d<0&&(d=e.length-1),null===l&&g.options.inViewport&&(l=e.length-u);var I=null===l,x=u+1<=e.length;I&&x&&u++}else{w=new F(o.next(),p,{inViewport:!0,item:r[p],isActive:!1});a.push(w),s.push(p)}--p<0&&(p=r.length-1)}u>0&&(l=null===l?e.length-u:l,e.splice(l,u));var E=b(a.reverse(),e);return new B(E,t-a.length*i,s)}(e,t,u,n,r,s);e=p.slides,t=p.modifiedOffset,d=d.concat(p.unmarkedItemIndexes)}return new W(e,t)}function N(){return function(e){var t,n=e.state,i=e.procedureState,r=e.environment,o=$(n.slides,n.offset,n.config.slideWidth,T(n),n.config.items,n.config.shouldLoop,n.config.threshold,null!==(t=null==r?void 0:r.slideIdGenerator)&&void 0!==t?t:new f);return n.slides=o.slides,n.activeSlideIndex=o.slides.findIndex((function(e){return e.options.isActive}))||0,void 0!==i.offsetSnapshot&&(i.offsetSnapshot=o.modifiedOffset-n.offset+i.offsetSnapshot),n.offset=o.modifiedOffset,new M(n)}}function _(){return function(e){var t,n,i,r,o=e.state,a=(new Date).getTime(),s=function(e,t,n,i,r,o){if(void 0===n||void 0===i)return r;if(t<=0||e<0||i===n)return i;var a=Math.abs(i-n)*o(e/t);return i>n?n+a:n-a}(a-(null!==(n=null===(t=o.animation)||void 0===t?void 0:t.startTime)&&void 0!==n?n:a),o.config.transitionDuration,null===(i=o.animation)||void 0===i?void 0:i.from,null===(r=o.animation)||void 0===r?void 0:r.to,o.offset,o.animationBezierFn);return o.offset=s,new M(o)}}var G=function(e,t,n,i,r){void 0===r&&(r=(new Date).getTime()),this.from=e,this.to=t,this.player=n,this.onDoneSubscription$=i,this.startTime=r};function q(){return function(e){var t,n,r,a=e.state,s=e.procedureState,l=e.environment,u=function(e,t,n,r,a,s,l,u,c){if(!l)return null;var d="cubic-bezier("+s[0]+","+s[1]+","+s[2]+","+s[3]+")",f=c.build([i.style({transform:"translateX("+t+r+")"}),i.animate(a+"ms "+d,i.style({transform:"translateX("+n+r+")"}))]).create(e),h=o.bindCallback(f.onDone).call(f).subscribe((function(){f.destroy(),u()})),p=new G(t,n,f,h);return f.play(),p}(a.animatableContainer,s.offsetSnapshot,a.offset,a.config.widthMode,a.config.transitionDuration,null!==(t=null==l?void 0:l.animationBezierArgs)&&void 0!==t?t:[],null!==(n=null==l?void 0:l.isBrowser)&&void 0!==n&&n,null!==(r=null==l?void 0:l.afterAnimationAction)&&void 0!==r?r:function(){},null==l?void 0:l.animationBuilder);return a.animation=u,new M(a)}}function H(){return I("setSlideIndex",_(),P(),(function(e){var t=e.state,n=e.procedureState;return n.offsetSnapshot=t.offset,new M(t,n)}),j(),k(),N(),q())}function X(t){return I("dragEnd",C("drag"),function(t){return function(n){var i=n.state,r=n.procedureState;return r.passedDistance=i.config.widthMode===e.CarouselWidthMode.PERCENT?100*t/O(i):t,new M(i,r)}}(t),R(),H())}function U(t,n,i,r,o,a,s,l,u,c,d,f,h){if(t===n)return i;r===e.CarouselWidthMode.PERCENT&&(t=100*t/l,n=100*n/l);var p=n-t;if(a)return i+p;var v=function(t,n,i,r,o,a,s,l){var u=a===e.CarouselAlignMode.CENTER?i/2-r/2:0,c=a===e.CarouselAlignMode.CENTER?i/2+r/2:Math.min(u+o,i),d=null;a===e.CarouselAlignMode.LEFT&&o<i&&0!==n?d=n:n>u?d=n-u:n<c-o&&(d=n-c+o);if(null===d)return null;var f=function(e,t,n,i){var r=t*n/100,o=Math.abs(e/r);return i(o)*t*Math.sign(e)}(d,i,s,l);return t-f}(t,i,s,u,c,o,d,h);if(null===v)return J(i,p,o,s,u,c,d,f);if(t>v?n>v:n<v)return i-=function(e,t,n,i,r){var o=K(e,n,i,r),a=K(t,n,i,r);return o-a}(t-v,n-v,s,d,f);var m=K(v-t,s,d,f),g=v-t;return t=v,J(i+=m,p-=g,o,s,u,c,d,f)}function K(e,t,n,i){return t*n/100*i(Math.max(0,Math.min(Math.abs(e)/t,1)))*Math.sign(e)}function J(t,n,i,r,o,a,s,l){var u=i===e.CarouselAlignMode.CENTER?r/2-o/2:0,c=i===e.CarouselAlignMode.CENTER?r/2+o/2:Math.min(r,a),d=t+n>u,f=t+a+n<c;if(!d&&n>0||!f&&n<0)return t+n;var h=0;return d?h=t-u:f&&(h=t+a-c),t-=h,t+=K(n+h,r,s,l)}var Z=function(e,t){void 0===t&&(t=null),this.state=e,this.procedureState=t,this.shouldBreakProcedure=!0};function Q(){return function(e){var t,n=e.state;return(null===(t=null==n?void 0:n.config)||void 0===t?void 0:t.dragEnabled)?new M(n):new Z(n)}}function Y(e,t){return I("drag",Q(),_(),P(),function(e,t){return function(n){var i=n.state,r=n.environment,o=U(e,t,i.offset,i.config.widthMode,i.config.alignMode,i.config.shouldLoop,T(i),O(i),i.config.slideWidth,i.slides.length*i.config.slideWidth,r.maxOverscroll,i.dragBezierFn,i.invertedDragBezierFn);return i.offset=o,new M(i)}}(e,t),j(),N(),R(),j())}function ee(e,t,n){for(var i=n+1;i<e.length;i++)if(e[i].itemIndex===t)return{foundIndex:i};return null}function te(e,t,n){for(var i=n-1;i>=0;i--)if(e[i].itemIndex===t)return{foundIndex:i};return null}function ne(e){return function(t){var n=t.state,i=function(e,t,n){var i;if(!e)return 0;var r=e[n];if(!r)return 0;var o=r.itemIndex,a=null;return t===o||e.length<=1?n:null!==(i=null==(a=t>o?ee(e,t,n)||te(e,t,n):te(e,t,n)||ee(e,t,n))?void 0:a.foundIndex)&&void 0!==i?i:null}(n.slides,null!=e?e:n.activeItemIndex,n.activeSlideIndex);return n.activeSlideIndex=i,n.activeItemIndex=e,new M(n)}}function ie(e){return I("goTo",function(e){return function(t){var n=t.state;return n.slides&&n.slides.length?(n.postponedItemIndex=null,new M(n)):(n.postponedItemIndex=e,new Z(n))}}(e),C(),ne(e),H())}function re(){return function(e){var t=e.state,n=e.environment,i=function(e,t){if(!e||!e.length||!t)return[];for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]=new F(t.next(),i,{item:e[i],isActive:0===i});return n}(t.config.items,n.slideIdGenerator);return t.slides=i,t.offset=0,t.activeSlideIndex=0,new M(t)}}var oe=[.25,.1,.25,1],ae=[.25,.46,.45,.94];function se(){return function(e){var t=e.state;return t.slides.length&&t.postponedItemIndex?I("setPostponedIndex",ie(t.postponedItemIndex),(function(e){var t=e.state;return t.postponedItemIndex=null,new M(t)})):new M(t)}}function le(){return I("initialize",(function(e){var t,n=e.state,i=null!==(t=null==n?void 0:n.initializationState)&&void 0!==t?t:new p;return i.configInitialized&&i.viewportWidthInitialized?new M(n):new Z(n)}),(function(e){var t=e.state;return t.initializationState.firstInitalization=!0,new M(t)}),re(),k(),j(),N(),P(),C(),R(),(function(e){var t=e.state;return t.dragBezierFn||(t.dragBezierFn=a(ae[0],ae[1],ae[2],ae[3])),t.invertedDragBezierFn||(t.invertedDragBezierFn=a(1-ae[0],1-ae[1],1-ae[2],1-ae[3])),t.animationBezierFn||(t.animationBezierFn=a(oe[0],oe[1],oe[2],oe[3])),new M(t)}),se())}function ue(e){return I("initializeConfig",function(e){return function(t){var n=t.state;return n.config=e,n.initializationState.configInitialized=!0,new M(n)}}(e),le())}function ce(e,t){return I("initializeContainers",function(e,t){return function(n){var i=n.state;return i.widthContainer=e,i.animatableContainer=t,i.initializationState.viewportWidthInitialized=!0,new M(i)}}(e,t),le())}function de(e){return void 0===e&&(e=!1),I("next",e?C():null,(function(e){var t,n,i,r,o=e.state,a=(t=o.slides.length,n=o.activeSlideIndex,i=o.config.shouldLoop,(r=n+1)>=t&&(r=i?0:t-1),r);return o.activeSlideIndex=a,new M(o)}),H())}function fe(){return I("prev",C(),(function(e){var t,n,i,r,o=e.state,a=(t=o.slides.length,n=o.activeSlideIndex,i=o.config.shouldLoop,(r=n-1)<0&&(r=i?t-1:0),r);return o.activeSlideIndex=a,new M(o)}),H())}var he=function(){function e(e,t,n){this.animationBuilder=e,this.slideIdGenerator=t,this.platformId=n,this.carouselState$=new o.BehaviorSubject(new v),this.procedureEnvironment={slideIdGenerator:this.slideIdGenerator,isBrowser:r.isPlatformBrowser(this.platformId),autoplayAction:this.next.bind(this),afterAnimationAction:this.cleanup.bind(this),animationBuilder:this.animationBuilder,animationBezierArgs:oe,swipeThreshold:15,maxOverscroll:10}}return e.prototype.ngOnDestroy=function(){var e,t,n;null===(n=null===(t=null===(e=this.carouselState$.getValue())||void 0===e?void 0:e.autoplay)||void 0===t?void 0:t.autoplaySubscription)||void 0===n||n.unsubscribe()},e.prototype.carouselStateChanges=function(){return this.carouselState$.asObservable()},e.prototype.setItemIndex=function(e){this.apply(ie(e))},e.prototype.prev=function(){this.apply(fe())},e.prototype.next=function(e){void 0===e&&(e=!1),this.apply(de(e))},e.prototype.recalculate=function(){this.apply(I("recalculate",k(),j(),N()))},e.prototype.dragStart=function(){this.apply(I("dragStart",Q(),S("drag")))},e.prototype.dragEnd=function(e){this.apply(X(e))},e.prototype.drag=function(e,t){this.apply(Y(e,t))},e.prototype.setSlideTemplate=function(e){var t;this.apply((t=e,function(e){var n=e.state;return n.template=t,new M(n)}))},e.prototype.disableAutoplay=function(e){this.apply(S(e))},e.prototype.enableAutoplay=function(e){void 0===e&&(e=null),this.apply(C(e))},e.prototype.setContainers=function(e,t){this.apply(ce(e,t))},e.prototype.setConfig=function(e){this.apply(ue(e))},e.prototype.cleanup=function(){this.apply(I("cleanup",P(),j(),k(),R(),V(),N(),R()))},e.prototype.apply=function(e){var t=Object.assign({},this.carouselState$.getValue()),n=I("applier",e)({state:t,procedureState:{},environment:this.procedureEnvironment});this.carouselState$.next(n.state)},e}();function pe(){return new f}he.decorators=[{type:t.Injectable}],he.ctorParameters=function(){return[{type:i.AnimationBuilder},{type:f,decorators:[{type:t.Inject,args:[x]}]},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]};var ve=function(){function e(e){this.carousel=e,this.itemIndexChange=this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.activeItemIndex})))}return Object.defineProperty(e.prototype,"slideRef",{set:function(e){this.carousel.setSlideTemplate(e?e.templateRef:null)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{set:function(e){e=new c(e),this.carousel.setConfig(e)},enumerable:!1,configurable:!0}),e.prototype.next=function(){this.carousel.next()},e.prototype.prev=function(){this.carousel.prev()},e.prototype.setIndex=function(e){this.carousel.setItemIndex(e)},e.prototype.recalculate=function(){this.carousel.recalculate()},e}();ve.decorators=[{type:t.Component,args:[{selector:"ng-carousel",template:'<carousel-engine class="carousel-engine"></carousel-engine>\n',providers:[he,{provide:x,useFactory:pe},{provide:E,useFactory:pe}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,exportAs:"ngCarousel",styles:[".carousel-engine{display:block;overflow:hidden;width:100%}"]}]}],ve.ctorParameters=function(){return[{type:he}]},ve.propDecorators={slideRef:[{type:t.ContentChild,args:[d]}],config:[{type:t.Input}],itemIndexChange:[{type:t.Output}]};var me=function(){function e(e){this.platformId=e,this.hammerAbsenceDeclared=!1}return e.prototype.managerFor=function(e){return r.isPlatformBrowser(this.platformId)&&window.Hammer?new Hammer(e):(t.isDevMode()&&!this.hammerAbsenceDeclared&&(console.warn("Ng-carousel could not listen to drag, because HammerJS was not found. Either disable drag or import HammerJS."),this.hammerAbsenceDeclared=!0),null)},e}();me.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new me(t.ɵɵinject(t.PLATFORM_ID))},token:me,providedIn:"root"}),me.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],me.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]};var ge=function(){function e(e,t){this.elementRef=e,this.hammer=t,this.shouldPreventClick=!1}return e.prototype.processClickEvent=function(e){this.shouldPreventClick&&(e.preventDefault(),e.stopImmediatePropagation())},e.prototype.ngOnInit=function(){this.listenPanEndEvents()},e.prototype.ngOnDestroy=function(){this.hammerManager&&this.hammerManager.destroy()},e.prototype.listenPanEndEvents=function(){var e=this;this.hammerManager=this.hammer.managerFor(this.elementRef.nativeElement),this.hammerManager&&this.hammerManager.on("panend pancancel",(function(){e.shouldPreventClick=!0,o.asyncScheduler.schedule((function(){e.shouldPreventClick=!1}))}))},e}();ge.decorators=[{type:t.Directive,args:[{selector:"[ngCarouselPreventGhostClick]"}]}],ge.ctorParameters=function(){return[{type:t.ElementRef},{type:me}]},ge.propDecorators={processClickEvent:[{type:t.HostListener,args:["click",["$event"]]}]};var ye=function(){function e(e,t){this.elementRef=e,this.interactivityChecker=t,this.untabbable=!1,this.untabbableFocused=!1,this.lastTabindexValueMap=new Map}return e.prototype.ngOnChanges=function(e){if(e.untabbable&&this.viewInitiated){var t=e.untabbable;if(t.currentValue===t.previousValue)return;t.currentValue?this.blockTabindex():this.unblockTabindex(),this.untabbableFocused&&this.untabbableFocusTrapRef&&this.untabbableFocusTrapRef.focusTrap.focusFirstTabbableElement()}},e.prototype.ngAfterViewInit=function(){this.viewInitiated=!0,this.untabbable?this.blockTabindex():this.unblockTabindex()},e.prototype.ngOnDestroy=function(){this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null)},e.prototype.blockTabindex=function(){var e,t,n=this,i=Array.from(this.elementRef.nativeElement.querySelectorAll("*"));try{for(var r=g(i),o=r.next();!o.done;o=r.next()){var a=o.value;this.blockElement(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}"undefined"!=typeof window&&"MutationObserver"in window&&(this.mutationObserver=new MutationObserver((function(e){var t,i,r=Array.from(e);try{for(var o=g(r),a=o.next();!a.done;a=o.next()){var s=a.value;"attributes"===s.type?n.blockElement(s.target):"childList"===s.type&&s.addedNodes.forEach((function(e){n.blockElement(e)}))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}})),this.mutationObserver.observe(this.elementRef.nativeElement,{attributeFilter:["tabindex"],attributes:!0,childList:!0,subtree:!0}))},e.prototype.unblockTabindex=function(){var e,t;this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null);var n=Array.from(this.elementRef.nativeElement.querySelectorAll("*"));try{for(var i=g(n),r=i.next();!r.done;r=i.next()){var o=r.value;this.unblockElement(o)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},e.prototype.blockElement=function(e){if(3!==e.nodeType&&this.interactivityChecker.isFocusable(e)&&this.interactivityChecker.isTabbable(e)){var t=e.getAttribute("tabindex");this.lastTabindexValueMap.set(e,t),"-1"!==t&&e.setAttribute("tabindex","-1")}},e.prototype.unblockElement=function(e){this.lastTabindexValueMap.has(e)&&"number"==typeof this.lastTabindexValueMap.get(e)?e.setAttribute("tabindex",this.lastTabindexValueMap.get(e)):e.removeAttribute("tabindex")},e}();ye.decorators=[{type:t.Directive,args:[{selector:"[untabbable]"}]}],ye.ctorParameters=function(){return[{type:t.ElementRef},{type:s.InteractivityChecker}]},ye.propDecorators={untabbable:[{type:t.Input}],untabbableFocusTrapRef:[{type:t.Input}],untabbableFocused:[{type:t.Input}]};var be=function(e,t,n,i){this.$implicit=e,this.itemIndex=t,this.isActive=n,this.inViewport=i},we=function(){function e(e,t,n,i,r){this.carousel=e,this.elementRef=t,this.renderer=n,this.hammer=i,this.platformId=r,this.transformValue$=this.transformValueChanges(),this.slideWidth$=this.slideWidthChanges(),this.template$=this.templateChanges(),this.slides$=this.slidesChanges(),this.focused=!1,this.destroyed$=new o.Subject}return Object.defineProperty(e.prototype,"htmlElement",{get:function(){return this.elementRef.nativeElement},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.listenToAutoplay(),this.listenToDragEvents(),this.listenToResizeEvents(),this.listenToKeyEvents(),this.listenToScrollEvents(),this.carousel.setContainers(this.htmlElement,this.galleryRef.nativeElement)},e.prototype.ngOnDestroy=function(){this.destroyMouseListeners(),this.destroyHammer(),this.destroyKeyboardListeners(),this.destroyElementScrollListener(),this.destroyed$.next(),this.destroyed$.complete()},e.prototype.trackByFn=function(e,t){return t.id},e.prototype.contextOf=function(e){return new be(e.options.item,e.itemIndex,e.options.isActive,e.options.inViewport)},e.prototype.focusIn=function(){this.focused=!0,this.carousel.disableAutoplay("focus")},e.prototype.focusOut=function(){this.focused=!1,this.carousel.enableAutoplay("focus")},e.prototype.destroyMouseListeners=function(){this.mouseEnterDestructor&&this.mouseEnterDestructor(),this.mouseLeaveDestructor&&this.mouseLeaveDestructor()},e.prototype.destroyHammer=function(){this.hammerManager&&this.hammerManager.destroy()},e.prototype.destroyKeyboardListeners=function(){this.keyboardListener&&this.keyboardListener()},e.prototype.destroyElementScrollListener=function(){this.containerScrollListener&&this.containerScrollListener()},e.prototype.transformValueChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return"translateX("+e.offset+e.config.widthMode+")"})))},e.prototype.slideWidthChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return""+e.config.slideWidth+e.config.widthMode})))},e.prototype.slidesChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.slides})))},e.prototype.templateChanges=function(){return this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.template})))},e.prototype.listenToAutoplay=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.config.autoplayEnabled})),n.distinctUntilChanged(),n.takeUntil(this.destroyed$)).subscribe((function(t){e.mouseEnterDestructor&&e.mouseEnterDestructor(),e.mouseLeaveDestructor&&e.mouseLeaveDestructor(),t&&(e.mouseEnterDestructor=e.renderer.listen(e.htmlElement,"mouseenter",(function(){return e.carousel.disableAutoplay("mouse")})),e.mouseLeaveDestructor=e.renderer.listen(e.htmlElement,"mouseleave",(function(){return e.carousel.enableAutoplay("mouse")})))}))},e.prototype.listenToDragEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.map((function(e){return e.config.dragEnabled})),n.distinctUntilChanged(),n.takeUntil(this.destroyed$)).subscribe((function(t){if(e.hammerManager&&e.hammerManager.destroy(),t&&(e.hammerManager=e.hammer.managerFor(e.htmlElement),e.hammerManager)){var n,i=0;e.hammerManager.on("panstart",(function(t){t.offsetDirection&Hammer.DIRECTION_HORIZONTAL&&(i=Math.round(t.deltaX),e.carousel.dragStart(),n=e.htmlElement.style.touchAction,e.renderer.setStyle(e.htmlElement,"touch-action","none"))})),e.hammerManager.on("panright panleft",(function(t){if(n){var r=Math.round(t.center.x),o=Math.round(t.deltaX);e.carousel.drag(r,r+(o-i)),i=o}})),e.hammerManager.on("panend pancancel",(function(t){n&&(e.carousel.dragEnd(t.deltaX),e.renderer.setStyle(e.htmlElement,"touch-action",n),n=null)}))}}))},e.prototype.listenToResizeEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&this.carousel.carouselStateChanges().pipe(n.filter((function(e){return e.config.shouldRecalculateOnResize})),n.switchMapTo(o.fromEvent(window,"resize")),n.takeUntil(this.destroyed$)).subscribe((function(){e.carousel.recalculate()}))},e.prototype.listenToKeyEvents=function(){var e=this;r.isPlatformBrowser(this.platformId)&&(this.keyboardListener=this.renderer.listen(this.htmlElement,"keydown",(function(t){var n=t.key.toLowerCase();["arrowright","right"].includes(n)?e.carousel.next():["arrowleft","left"].includes(n)&&e.carousel.prev()})))},e.prototype.listenToScrollEvents=function(){var e=this;this.containerScrollListener=this.renderer.listen(this.htmlElement,"scroll",(function(){e.htmlElement.scrollTo(0,0)}))},e}();we.decorators=[{type:t.Component,args:[{selector:"carousel-engine",template:'<ul \n #galleryRef\n #focusTrapRef="cdkTrapFocus"\n [style.transform]="transformValue$ | async"\n [cdkTrapFocus]="false"\n (focusin)="focusIn()"\n (focusout)="focusOut()"\n class="ng-carousel-block">\n <li\n *ngFor="let slide of (slides$ | async); trackBy: trackByFn;"\n [style.width]="slideWidth$ | async"\n [untabbable]="!slide.options.isActive"\n [untabbableFocusTrapRef]="focusTrapRef"\n [untabbableFocused]="focused"\n class="ng-carousel-slide">\n <ng-container *ngTemplateOutlet="(template$ | async); context: contextOf(slide);"></ng-container>\n </li>\n</ul>\n',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,styles:[".ng-carousel-block{display:flex;margin:0;padding:0;width:100%;will-change:transform}.ng-carousel-slide{flex:none;list-style:none}"]}]}],we.ctorParameters=function(){return[{type:he},{type:t.ElementRef},{type:t.Renderer2},{type:me},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},we.propDecorators={galleryRef:[{type:t.ViewChild,args:["galleryRef",{static:!0}]}]};var Ie=function(){};Ie.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,s.A11yModule],declarations:[ve,d,we,ye,ge],exports:[ve,d,ge]}]}],e.CarouselComponent=ve,e.CarouselConfig=c,e.CarouselModule=Ie,e.CarouselSlideDirective=d,e.PreventGhostClickDirective=ge,e.idGeneratorFactory=pe,e.ɵa=f,e.ɵb=he,e.ɵc=x,e.ɵd=E,e.ɵe=we,e.ɵf=me,e.ɵg=ye,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ng-carousel-cdk.umd.min.js.map |
@@ -9,8 +9,9 @@ import { ContinueWith } from '../../../models/procedure/handler/contiue-with.model'; | ||
return ({ state, procedureState, environment }) => { | ||
var _a, _b; | ||
const result = calculateActiveSlide(state.slides, state.offset, state.config.alignMode, state.config.slideWidth, getViewportWidth(state), Math.min(state.config.slideWidth / 2, environment.swipeThreshold), procedureState.passedDistance || null); | ||
state.activeSlideIndex = result.slideIndex; | ||
state.activeItemIndex = state.slides[result.slideIndex].itemIndex; | ||
state.activeItemIndex = (_b = (_a = state.slides[result.slideIndex]) === null || _a === void 0 ? void 0 : _a.itemIndex) !== null && _b !== void 0 ? _b : 0; | ||
return new ContinueWith(state); | ||
}; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsY3VsYXRlLWFjdGl2ZS1zbGlkZS1wcm9jZWR1cmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1jYXJvdXNlbC9zcmMvbGliL3ByaXZhdGUvc2VydmljZS9oZWxwZXJzL2NhbGN1bGF0ZS1hY3RpdmUtc2xpZGUvY2FsY3VsYXRlLWFjdGl2ZS1zbGlkZS1wcm9jZWR1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBSXBGLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDBDQUEwQyxDQUFDO0FBQzVFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRWhFOztHQUVHO0FBQ0gsTUFBTSxVQUFVLDZCQUE2QjtJQUN6QyxPQUFPLENBQUMsRUFBQyxLQUFLLEVBQUUsY0FBYyxFQUFFLFdBQVcsRUFBdUIsRUFBb0IsRUFBRTtRQUNwRixNQUFNLE1BQU0sR0FBRyxvQkFBb0IsQ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BDb250aW51ZVdpdGgoc3RhdGUpO1xuICAgIH07XG59XG4iXX0= |
@@ -9,5 +9,6 @@ import { ContinueWith } from '../../../models/procedure/handler/contiue-with.model'; | ||
return ({ state, procedureState }) => { | ||
var _a, _b; | ||
const result = markVisibleAndActive(state.slides, state.offset, state.config.slideWidth, getViewportWidth(state), state.activeSlideIndex, state.config.threshold, state.config.alignMode); | ||
state.slides = result.slides; | ||
state.activeItemIndex = result.slides[state.activeSlideIndex].itemIndex; | ||
state.activeItemIndex = (_b = (_a = result.slides[state.activeSlideIndex]) === null || _a === void 0 ? void 0 : _a.itemIndex) !== null && _b !== void 0 ? _b : 0; // Undefined when no slides available | ||
procedureState.inViewportRange = [result.inViewportRangeStart, result.inViewportRangeEnd]; | ||
@@ -17,2 +18,2 @@ return new ContinueWith(state, procedureState); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFyay12aXNpYmxlLWFuZC1hY3RpdmUtcHJvY2VkdXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmctY2Fyb3VzZWwvc3JjL2xpYi9wcml2YXRlL3NlcnZpY2UvaGVscGVycy9tYXJrLXZpc2libGUtYW5kLWFjdGl2ZS9tYXJrLXZpc2libGUtYW5kLWFjdGl2ZS1wcm9jZWR1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLHNEQUFzRCxDQUFDO0FBR3BGLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDBDQUEwQyxDQUFDO0FBQzVFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRWpFOztHQUVHO0FBQ0gsTUFBTSxVQUFVLDZCQUE2QjtJQUN6QyxPQUFPLENBQUMsRUFBQyxLQUFLL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ZVN0YXRlKTtcbiAgICB9O1xufVxuIl19 |
{ | ||
"name": "ng-carousel-cdk", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1298308
8495
0