@lanaco/lnc-react-ui 4.0.178 → 4.0.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BannerSectionCarousel.cjs +2 -2
- package/dist/BannerSectionCarousel.js +132 -130
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +22 -20
- package/dist/UrgentSaleProductsSection.cjs +4 -4
- package/dist/UrgentSaleProductsSection.js +8 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const S=require("react/jsx-runtime"),E=require("react"),k=require("./_commonjsHelpers-DwTZ_eVU.cjs"),D=require("./index-BpbMKBf_.cjs"),vt=require("./Button.cjs"),gt=require("./useDetectMobile-zkbzoOGV.cjs"),at=require("./emotion-styled.browser.esm-BtEseadx.cjs"),lt=require("./style-BAcV7F53.cjs"),yt=require("./consts-goSZX3xP.cjs");var q={},K={},m={},F={};(function(o){function i(l,n,a){var u=n.slidesToShow,d=n.currentSlide;return a.length>2*u?l+2*u:d>=a.length?a.length+l:l}function t(l,n){if(n.length>2*l){for(var a={},u=n.length-2*l,d=n.length-u,c=u,h=0;h<d;h++)a[h]=c,c++;var p=n.length+d,f=p+n.slice(0,2*l).length,g=0;for(h=p;h<=f;h++)a[h]=g,g++;var b=p,_=0;for(h=d;h<b;h++)a[h]=_,_++;return a}a={};var C=3*n.length,y=0;for(h=0;h<C;h++)a[h]=y,++y===n.length&&(y=0);return a}function e(l,n){return n.length<l?n:n.length>2*l?n.slice(n.length-2*l,n.length).concat(n,n.slice(0,2*l)):n.concat(n,n)}function r(l,n){return n.length>2*l?2*l:n.length}function s(l,n,a){var u,d=l.currentSlide,c=l.slidesToShow,h=l.itemWidth,p=l.totalItems,f=0,g=0,b=d===0,_=n.length-(n.length-2*c);return n.length<c?(g=f=0,b=u=!1):n.length>2*c?((u=d>=_+n.length)&&(g=-h*(f=d-n.length)),b&&(g=-h*(f=_+(n.length-2*c)))):((u=d>=2*n.length)&&(g=-h*(f=d-n.length)),b&&(g=a.showDots?-h*(f=n.length):-h*(f=p/3))),{isReachingTheEnd:u,isReachingTheStart:b,nextSlide:f,nextPosition:g}}Object.defineProperty(o,"__esModule",{value:!0}),o.getOriginalCounterPart=i,o.getOriginalIndexLookupTableByClones=t,o.getClones=e,o.getInitialSlideInInfiniteMode=r,o.checkClonesPosition=s})(F);var A={};Object.defineProperty(A,"__esModule",{value:!0});var ot=!1;function St(o,i,t,e){var r=0,s=e||t;return i&&s&&(!ot&&process.env.NODE_ENV!=="production"&&o[s].paritialVisibilityGutter&&(ot=!0,console.warn("You appear to be using paritialVisibilityGutter instead of partialVisibilityGutter which will be moved to partialVisibilityGutter in the future completely")),r=o[s].partialVisibilityGutter||o[s].paritialVisibilityGutter),r}function Tt(o,i){var t;return i[o]&&(t=(100/i[o].items).toFixed(1)),t}function wt(o,i,t){return Math.round(t/(i+(o.centerMode?1:0)))}A.getPartialVisibilityGutter=St,A.getWidthFromDeviceType=Tt,A.getItemClientSideWidth=wt;var T={};Object.defineProperty(T,"__esModule",{value:!0});var Y=A;function Z(o){var i=o.slidesToShow;return o.totalItems<i}function bt(o,i){var t,e=o.domLoaded,r=o.slidesToShow,s=o.containerWidth,l=o.itemWidth,n=i.deviceType,a=i.responsive,u=i.ssr,d=i.partialVisbile,c=i.partialVisible,h=!!(e&&r&&s&&l);u&&n&&!h&&(t=Y.getWidthFromDeviceType(n,a));var p=!!(u&&n&&!h&&t);return{shouldRenderOnSSR:p,flexBisis:t,domFullyLoaded:h,partialVisibilityGutter:Y.getPartialVisibilityGutter(a,d||c,n,o.deviceType),shouldRenderAtAll:p||h}}function _t(o,i){var t=i.currentSlide,e=i.slidesToShow;return t<=o&&o<t+e}function ut(o,i,t){var e=t||o.transform;return!i.infinite&&o.currentSlide===0||Z(o)?e:e+o.itemWidth/2}function Ct(o){return!(0<o.currentSlide)}function dt(o){var i=o.currentSlide,t=o.totalItems;return!(i+o.slidesToShow<t)}function ht(o,i,t,e){i===void 0&&(i=0);var r=o.currentSlide,s=o.slidesToShow,l=dt(o),n=!t.infinite&&l,a=e||o.transform;if(Z(o))return a;var u=a+r*i;return n?u+(o.containerWidth-(o.itemWidth-i)*s):u}function ct(o,i){return o.rtl?-1*i:i}function It(o,i,t){var e=i.partialVisbile,r=i.partialVisible,s=i.responsive,l=i.deviceType,n=i.centerMode,a=t||o.transform,u=Y.getPartialVisibilityGutter(s,e||r,l,o.deviceType);return ct(i,r||e?ht(o,u,i,t):n?ut(o,i,t):a)}function Mt(o,i){var t=o.domLoaded,e=o.slidesToShow,r=o.containerWidth,s=o.itemWidth,l=i.deviceType,n=i.responsive,a=i.slidesToSlide||1,u=!!(t&&e&&r&&s);return i.ssr&&i.deviceType&&!u&&Object.keys(n).forEach(function(d){var c=n[d].slidesToSlide;l===d&&c&&(a=c)}),u&&Object.keys(n).forEach(function(d){var c=n[d],h=c.breakpoint,p=c.slidesToSlide,f=h.max,g=h.min;p&&window.innerWidth>=g&&window.innerWidth<=f&&(a=p)}),a}T.notEnoughChildren=Z,T.getInitialState=bt,T.getIfSlideIsVisbile=_t,T.getTransformForCenterMode=ut,T.isInLeftEnd=Ct,T.isInRightEnd=dt,T.getTransformForPartialVsibile=ht,T.parsePosition=ct,T.getTransform=It,T.getSlidesToSlide=Mt;var J={};Object.defineProperty(J,"__esModule",{value:!0});var Pt=function(o,i,t){var e;return function(){var r=arguments;e||(o.apply(this,r),e=!0,typeof t=="function"&&t(!0),setTimeout(function(){e=!1,typeof t=="function"&&t(!1)},i))}};J.default=Pt;var pt={};(function(o){function i(t,e){var r=e.partialVisbile,s=e.partialVisible,l=e.centerMode,n=e.ssr,a=e.responsive;if((r||s)&&l)throw new Error("center mode can not be used at the same time with partialVisible");if(!a)throw n?new Error("ssr mode need to be used in conjunction with responsive prop"):new Error("Responsive prop is needed for deciding the amount of items to show on the screen");if(a&&typeof a!="object")throw new Error("responsive prop must be an object")}Object.defineProperty(o,"__esModule",{value:!0}),o.default=i})(pt);var Q={};Object.defineProperty(Q,"__esModule",{value:!0});var xt=T;function Et(o,i,t){t===void 0&&(t=0);var e,r,s=o.slidesToShow,l=o.currentSlide,n=o.itemWidth,a=o.totalItems,u=xt.getSlidesToSlide(o,i),d=l+1+t+s+(0<t?0:u);return r=d<=a?-n*(e=l+t+(0<t?0:u)):a<d&&l!==a-s?-n*(e=a-s):e=void 0,{nextSlides:e,nextPosition:r}}Q.populateNextSlides=Et;var H={};Object.defineProperty(H,"__esModule",{value:!0});var Rt=E,Ot=T,At=T;function Wt(o,i,t){t===void 0&&(t=0);var e,r,s=o.currentSlide,l=o.itemWidth,n=o.slidesToShow,a=i.children,u=i.showDots,d=i.infinite,c=Ot.getSlidesToSlide(o,i),h=s-t-(0<t?0:c),p=(Rt.Children.toArray(a).length-n)%c;return r=0<=h?(e=h,u&&!d&&0<p&&At.isInRightEnd(o)&&(e=s-p),-l*e):e=h<0&&s!==0?0:void 0,{nextSlides:e,nextPosition:r}}H.populatePreviousSlides=Wt;var ft={};(function(o){function i(t,e,r,s,l,n){var a,u,d=t.itemWidth,c=t.slidesToShow,h=t.totalItems,p=t.currentSlide,f=e.infinite,g=!1,b=Math.round((r-s)/d),_=Math.round((s-r)/d),C=r<l;if(l<r&&b<=c){a="right";var y=Math.abs(-d*(h-c)),M=n-(s-l),I=p===h-c;(Math.abs(M)<=y||I&&f)&&(u=M,g=!0)}return C&&_<=c&&(a="left",((M=n+(l-s))<=0||p===0&&f)&&(g=!0,u=M)),{direction:a,nextPosition:u,canContinue:g}}Object.defineProperty(o,"__esModule",{value:!0}),o.populateSlidesOnMouseTouchMove=i})(ft);Object.defineProperty(m,"__esModule",{value:!0});var V=F;m.getOriginalCounterPart=V.getOriginalCounterPart,m.getClones=V.getClones,m.checkClonesPosition=V.checkClonesPosition,m.getInitialSlideInInfiniteMode=V.getInitialSlideInInfiniteMode;var X=A;m.getWidthFromDeviceType=X.getWidthFromDeviceType,m.getPartialVisibilityGutter=X.getPartialVisibilityGutter,m.getItemClientSideWidth=X.getItemClientSideWidth;var x=T;m.getInitialState=x.getInitialState,m.getIfSlideIsVisbile=x.getIfSlideIsVisbile,m.getTransformForCenterMode=x.getTransformForCenterMode,m.getTransformForPartialVsibile=x.getTransformForPartialVsibile,m.isInLeftEnd=x.isInLeftEnd,m.isInRightEnd=x.isInRightEnd,m.notEnoughChildren=x.notEnoughChildren,m.getSlidesToSlide=x.getSlidesToSlide;var Dt=J;m.throttle=Dt.default;var Lt=pt;m.throwError=Lt.default;var kt=Q;m.populateNextSlides=kt.populateNextSlides;var jt=H;m.populatePreviousSlides=jt.populatePreviousSlides;var Vt=ft;m.populateSlidesOnMouseTouchMove=Vt.populateSlidesOnMouseTouchMove;var $={},Gt=k.commonjsGlobal&&k.commonjsGlobal.__extends||function(){var o=function(i,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(i,t)};return function(i,t){function e(){this.constructor=i}o(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty($,"__esModule",{value:!0});var Bt=E;function Nt(o){return"clientY"in o}$.isMouseMoveEvent=Nt;var Ft=function(o){function i(){return o!==null&&o.apply(this,arguments)||this}return Gt(i,o),i}(Bt.Component);$.default=Ft;var tt={},et={};Object.defineProperty(et,"__esModule",{value:!0});var $t=F,zt=T;function Xt(o,i,t,e){var r={},s=zt.getSlidesToSlide(i,t);return Array(o).fill(0).forEach(function(l,n){var a=$t.getOriginalCounterPart(n,i,e);if(n===0)r[0]=a;else{var u=r[n-1]+s;r[n]=u}}),r}et.getLookupTableForNextSlides=Xt;Object.defineProperty(tt,"__esModule",{value:!0});var L=E,Ut=F,Yt=et,rt=T,qt=function(o){var i=o.props,t=o.state,e=o.goToSlide,r=o.getState,s=i.showDots,l=i.customDot,n=i.dotListClass,a=i.infinite,u=i.children;if(!s||rt.notEnoughChildren(t))return null;var d,c=t.currentSlide,h=t.slidesToShow,p=rt.getSlidesToSlide(t,i),f=L.Children.toArray(u);d=a?Math.ceil(f.length/p):Math.ceil((f.length-h)/p)+1;var g=Yt.getLookupTableForNextSlides(d,t,i,f),b=Ut.getOriginalIndexLookupTableByClones(h,f),_=b[c];return L.createElement("ul",{className:"react-multi-carousel-dot-list "+n},Array(d).fill(0).map(function(C,y){var M,I;if(a){I=g[y];var O=b[I];M=_===O||O<=_&&_<O+p}else{var W=f.length-h,j=y*p;M=(I=W<j?W:j)===c||I<c&&c<I+p&&c<f.length-h}return l?L.cloneElement(l,{index:y,active:M,key:y,onClick:function(){return e(I)},carouselState:r()}):L.createElement("li",{"data-index":y,key:y,className:"react-multi-carousel-dot "+(M?"react-multi-carousel-dot--active":"")},L.createElement("button",{"aria-label":"Go to slide "+(y+1),onClick:function(){return e(I)}}))}))};tt.default=qt;var z={};Object.defineProperty(z,"__esModule",{value:!0});var N=E,Kt=function(o){var i=o.customLeftArrow,t=o.getState,e=o.previous,r=o.disabled,s=o.rtl;if(i)return N.cloneElement(i,{onClick:function(){return e()},carouselState:t(),disabled:r,rtl:s});var l=s?"rtl":"";return N.createElement("button",{"aria-label":"Go to previous slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--left "+l,onClick:function(){return e()},type:"button",disabled:r})};z.LeftArrow=Kt;var Zt=function(o){var i=o.customRightArrow,t=o.getState,e=o.next,r=o.disabled,s=o.rtl;if(i)return N.cloneElement(i,{onClick:function(){return e()},carouselState:t(),disabled:r,rtl:s});var l=s?"rtl":"";return N.createElement("button",{"aria-label":"Go to next slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--right "+l,onClick:function(){return e()},type:"button",disabled:r})};z.RightArrow=Zt;var it={};Object.defineProperty(it,"__esModule",{value:!0});var G=E,U=m,Jt=function(o){var i=o.props,t=o.state,e=o.goToSlide,r=o.clones,s=o.notEnoughChildren,l=t.itemWidth,n=i.children,a=i.infinite,u=i.itemClass,d=i.itemAriaLabel,c=i.partialVisbile,h=i.partialVisible,p=U.getInitialState(t,i),f=p.flexBisis,g=p.shouldRenderOnSSR,b=p.domFullyLoaded,_=p.partialVisibilityGutter;return p.shouldRenderAtAll?(c&&console.warn('WARNING: Please correct props name: "partialVisible" as old typo will be removed in future versions!'),G.createElement(G.Fragment,null,(a?r:G.Children.toArray(n)).map(function(C,y){return G.createElement("li",{key:y,"data-index":y,onClick:function(){i.focusOnSelect&&e(y)},"aria-hidden":U.getIfSlideIsVisbile(y,t)?"false":"true","aria-label":d||(C.props.ariaLabel?C.props.ariaLabel:null),style:{flex:g?"1 0 "+f+"%":"auto",position:"relative",width:b?((c||h)&&_&&!s?l-_:l)+"px":"auto"},className:"react-multi-carousel-item "+(U.getIfSlideIsVisbile(y,t)?"react-multi-carousel-item--active":"")+" "+u},C)}))):null};it.default=Jt;var Qt=k.commonjsGlobal&&k.commonjsGlobal.__extends||function(){var o=function(i,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(i,t)};return function(i,t){function e(){this.constructor=i}o(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty(K,"__esModule",{value:!0});var w=E,v=m,R=$,Ht=tt,nt=z,te=it,B=T,P=400,st="transform 400ms ease-in-out",ee=function(o){function i(t){var e=o.call(this,t)||this;return e.containerRef=w.createRef(),e.listRef=w.createRef(),e.state={itemWidth:0,slidesToShow:0,currentSlide:0,totalItems:w.Children.count(t.children),deviceType:"",domLoaded:!1,transform:0,containerWidth:0},e.onResize=e.onResize.bind(e),e.handleDown=e.handleDown.bind(e),e.handleMove=e.handleMove.bind(e),e.handleOut=e.handleOut.bind(e),e.onKeyUp=e.onKeyUp.bind(e),e.handleEnter=e.handleEnter.bind(e),e.setIsInThrottle=e.setIsInThrottle.bind(e),e.next=v.throttle(e.next.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.previous=v.throttle(e.previous.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.goToSlide=v.throttle(e.goToSlide.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.onMove=!1,e.initialX=0,e.lastX=0,e.isAnimationAllowed=!1,e.direction="",e.initialY=0,e.isInThrottle=!1,e.transformPlaceHolder=0,e}return Qt(i,o),i.prototype.resetTotalItems=function(){var t=this,e=w.Children.count(this.props.children),r=v.notEnoughChildren(this.state)?0:Math.max(0,Math.min(this.state.currentSlide,e));this.setState({totalItems:e,currentSlide:r},function(){t.setContainerAndItemWidth(t.state.slidesToShow,!0)})},i.prototype.setIsInThrottle=function(t){t===void 0&&(t=!1),this.isInThrottle=t},i.prototype.setTransformDirectly=function(t,e){var r=this.props.additionalTransfrom;this.transformPlaceHolder=t;var s=B.getTransform(this.state,this.props,this.transformPlaceHolder);this.listRef&&this.listRef.current&&(this.setAnimationDirectly(e),this.listRef.current.style.transform="translate3d("+(s+r)+"px,0,0)")},i.prototype.setAnimationDirectly=function(t){this.listRef&&this.listRef.current&&(this.listRef.current.style.transition=t?this.props.customTransition||st:"none")},i.prototype.componentDidMount=function(){this.setState({domLoaded:!0}),this.setItemsToShow(),window.addEventListener("resize",this.onResize),this.onResize(!0),this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),this.props.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},i.prototype.setClones=function(t,e,r,s){var l=this;s===void 0&&(s=!1),this.isAnimationAllowed=!1;var n=w.Children.toArray(this.props.children),a=v.getInitialSlideInInfiniteMode(t||this.state.slidesToShow,n),u=v.getClones(this.state.slidesToShow,n),d=n.length<this.state.slidesToShow?0:this.state.currentSlide;this.setState({totalItems:u.length,currentSlide:r&&!s?d:a},function(){l.correctItemsPosition(e||l.state.itemWidth)})},i.prototype.setItemsToShow=function(t,e){var r=this,s=this.props.responsive;Object.keys(s).forEach(function(l){var n=s[l],a=n.breakpoint,u=n.items,d=a.max,c=a.min,h=[window.innerWidth];window.screen&&window.screen.width&&h.push(window.screen.width);var p=Math.min.apply(Math,h);c<=p&&p<=d&&(r.setState({slidesToShow:u,deviceType:l}),r.setContainerAndItemWidth(u,t,e))})},i.prototype.setContainerAndItemWidth=function(t,e,r){var s=this;if(this.containerRef&&this.containerRef.current){var l=this.containerRef.current.offsetWidth,n=v.getItemClientSideWidth(this.props,t,l);this.setState({containerWidth:l,itemWidth:n},function(){s.props.infinite&&s.setClones(t,n,e,r)}),e&&this.correctItemsPosition(n)}},i.prototype.correctItemsPosition=function(t,e,r){e&&(this.isAnimationAllowed=!0),!e&&this.isAnimationAllowed&&(this.isAnimationAllowed=!1);var s=this.state.totalItems<this.state.slidesToShow?0:-t*this.state.currentSlide;r&&this.setTransformDirectly(s,!0),this.setState({transform:s})},i.prototype.onResize=function(t){var e;e=!!this.props.infinite&&(typeof t!="boolean"||!t),this.setItemsToShow(e)},i.prototype.componentDidUpdate=function(t,e){var r=this,s=t.keyBoardControl,l=t.autoPlay,n=t.children,a=e.containerWidth,u=e.domLoaded,d=e.currentSlide;if(this.containerRef&&this.containerRef.current&&this.containerRef.current.offsetWidth!==a&&(this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),this.itemsToShowTimeout=setTimeout(function(){r.setItemsToShow(!0)},this.props.transitionDuration||P)),s&&!this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),!s&&this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),l&&!this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),l||!this.props.autoPlay||this.autoPlay||(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed)),n.length!==this.props.children.length?i.clonesTimeout=setTimeout(function(){r.props.infinite?r.setClones(r.state.slidesToShow,r.state.itemWidth,!0,!0):r.resetTotalItems()},this.props.transitionDuration||P):this.props.infinite&&this.state.currentSlide!==d&&this.correctClonesPosition({domLoaded:u}),this.transformPlaceHolder!==this.state.transform&&(this.transformPlaceHolder=this.state.transform),this.props.autoPlay&&this.props.rewind&&!this.props.infinite&&v.isInRightEnd(this.state)){var c=this.props.transitionDuration||P;i.isInThrottleTimeout=setTimeout(function(){r.setIsInThrottle(!1),r.resetAutoplayInterval(),r.goToSlide(0,void 0,!!r.props.rewindWithAnimation)},c+this.props.autoPlaySpeed)}},i.prototype.correctClonesPosition=function(t){var e=this,r=t.domLoaded,s=w.Children.toArray(this.props.children),l=v.checkClonesPosition(this.state,s,this.props),n=l.isReachingTheEnd,a=l.isReachingTheStart,u=l.nextSlide,d=l.nextPosition;this.state.domLoaded&&r&&(n||a)&&(this.isAnimationAllowed=!1,i.transformTimeout=setTimeout(function(){e.setState({transform:d,currentSlide:u})},this.props.transitionDuration||P))},i.prototype.next=function(t){var e=this;t===void 0&&(t=0);var r=this.props,s=r.afterChange,l=r.beforeChange;if(!v.notEnoughChildren(this.state)){var n=v.populateNextSlides(this.state,this.props,t),a=n.nextSlides,u=n.nextPosition,d=this.state.currentSlide;a!==void 0&&u!==void 0&&(typeof l=="function"&&l(a,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:u,currentSlide:a},function(){typeof s=="function"&&(i.afterChangeTimeout=setTimeout(function(){s(d,e.getState())},e.props.transitionDuration||P))}))}},i.prototype.previous=function(t){var e=this;t===void 0&&(t=0);var r=this.props,s=r.afterChange,l=r.beforeChange;if(!v.notEnoughChildren(this.state)){var n=v.populatePreviousSlides(this.state,this.props,t),a=n.nextSlides,u=n.nextPosition;if(a!==void 0&&u!==void 0){var d=this.state.currentSlide;typeof l=="function"&&l(a,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:u,currentSlide:a},function(){typeof s=="function"&&(i.afterChangeTimeout2=setTimeout(function(){s(d,e.getState())},e.props.transitionDuration||P))})}}},i.prototype.resetAutoplayInterval=function(){this.props.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},i.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize),this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),i.clonesTimeout&&clearTimeout(i.clonesTimeout),i.isInThrottleTimeout&&clearTimeout(i.isInThrottleTimeout),i.transformTimeout&&clearTimeout(i.transformTimeout),i.afterChangeTimeout&&clearTimeout(i.afterChangeTimeout),i.afterChangeTimeout2&&clearTimeout(i.afterChangeTimeout2),i.afterChangeTimeout3&&clearTimeout(i.afterChangeTimeout3)},i.prototype.resetMoveStatus=function(){this.onMove=!1,this.initialX=0,this.lastX=0,this.direction="",this.initialY=0},i.prototype.getCords=function(t){var e=t.clientX,r=t.clientY;return{clientX:B.parsePosition(this.props,e),clientY:B.parsePosition(this.props,r)}},i.prototype.handleDown=function(t){if(!(!R.isMouseMoveEvent(t)&&!this.props.swipeable||R.isMouseMoveEvent(t)&&!this.props.draggable||this.isInThrottle)){var e=this.getCords(R.isMouseMoveEvent(t)?t:t.touches[0]),r=e.clientX,s=e.clientY;this.onMove=!0,this.initialX=r,this.initialY=s,this.lastX=r,this.isAnimationAllowed=!1}},i.prototype.handleMove=function(t){if(!(!R.isMouseMoveEvent(t)&&!this.props.swipeable||R.isMouseMoveEvent(t)&&!this.props.draggable||v.notEnoughChildren(this.state))){var e=this.getCords(R.isMouseMoveEvent(t)?t:t.touches[0]),r=e.clientX,s=e.clientY,l=this.initialX-r,n=this.initialY-s;if(this.onMove){if(!(Math.abs(l)>Math.abs(n)))return;var a=v.populateSlidesOnMouseTouchMove(this.state,this.props,this.initialX,this.lastX,r,this.transformPlaceHolder),u=a.direction,d=a.nextPosition,c=a.canContinue;u&&(this.direction=u,c&&d!==void 0&&this.setTransformDirectly(d)),this.lastX=r}}},i.prototype.handleOut=function(t){this.props.autoPlay&&!this.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed));var e=t.type==="touchend"&&!this.props.swipeable,r=(t.type==="mouseleave"||t.type==="mouseup")&&!this.props.draggable;if(!e&&!r&&this.onMove){if(this.setAnimationDirectly(!0),this.direction==="right")if(this.initialX-this.lastX>=this.props.minimumTouchDrag){var s=Math.round((this.initialX-this.lastX)/this.state.itemWidth);this.next(s)}else this.correctItemsPosition(this.state.itemWidth,!0,!0);this.direction==="left"&&(this.lastX-this.initialX>this.props.minimumTouchDrag?(s=Math.round((this.lastX-this.initialX)/this.state.itemWidth),this.previous(s)):this.correctItemsPosition(this.state.itemWidth,!0,!0)),this.resetMoveStatus()}},i.prototype.isInViewport=function(t){var e=t.getBoundingClientRect(),r=e.top,s=r===void 0?0:r,l=e.left,n=l===void 0?0:l,a=e.bottom,u=a===void 0?0:a,d=e.right,c=d===void 0?0:d;return 0<=s&&0<=n&&u<=(window.innerHeight||document.documentElement.clientHeight)&&c<=(window.innerWidth||document.documentElement.clientWidth)},i.prototype.isChildOfCarousel=function(t){return!!(t instanceof Element&&this.listRef&&this.listRef.current)&&this.listRef.current.contains(t)},i.prototype.onKeyUp=function(t){var e=t.target;switch(t.keyCode){case 37:if(this.isChildOfCarousel(e))return this.previous();break;case 39:if(this.isChildOfCarousel(e))return this.next();break;case 9:if(this.isChildOfCarousel(e)&&e instanceof HTMLInputElement&&this.isInViewport(e))return this.next()}},i.prototype.handleEnter=function(t){R.isMouseMoveEvent(t)&&this.autoPlay&&this.props.autoPlay&&this.props.pauseOnHover&&(clearInterval(this.autoPlay),this.autoPlay=void 0)},i.prototype.goToSlide=function(t,e,r){var s=this;if(r===void 0&&(r=!0),!this.isInThrottle){var l=this.state.itemWidth,n=this.props,a=n.afterChange,u=n.beforeChange,d=this.state.currentSlide;typeof u!="function"||e&&(typeof e!="object"||e.skipBeforeChange)||u(t,this.getState()),this.isAnimationAllowed=r,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({currentSlide:t,transform:-l*t},function(){s.props.infinite&&s.correctClonesPosition({domLoaded:!0}),typeof a!="function"||e&&(typeof e!="object"||e.skipAfterChange)||(i.afterChangeTimeout3=setTimeout(function(){a(d,s.getState())},s.props.transitionDuration||P))})}},i.prototype.getState=function(){return this.state},i.prototype.renderLeftArrow=function(t){var e=this,r=this.props,s=r.customLeftArrow,l=r.rtl;return w.createElement(nt.LeftArrow,{customLeftArrow:s,getState:function(){return e.getState()},previous:this.previous,disabled:t,rtl:l})},i.prototype.renderRightArrow=function(t){var e=this,r=this.props,s=r.customRightArrow,l=r.rtl;return w.createElement(nt.RightArrow,{customRightArrow:s,getState:function(){return e.getState()},next:this.next,disabled:t,rtl:l})},i.prototype.renderButtonGroups=function(){var t=this,e=this.props.customButtonGroup;return e?w.cloneElement(e,{previous:function(){return t.previous()},next:function(){return t.next()},goToSlide:function(r,s){return t.goToSlide(r,s)},carouselState:this.getState()}):null},i.prototype.renderDotsList=function(){var t=this;return w.createElement(Ht.default,{state:this.state,props:this.props,goToSlide:this.goToSlide,getState:function(){return t.getState()}})},i.prototype.renderCarouselItems=function(){var t=[];if(this.props.infinite){var e=w.Children.toArray(this.props.children);t=v.getClones(this.state.slidesToShow,e)}return w.createElement(te.default,{clones:t,goToSlide:this.goToSlide,state:this.state,notEnoughChildren:v.notEnoughChildren(this.state),props:this.props})},i.prototype.render=function(){var t=this.props,e=t.deviceType,r=t.arrows,s=t.renderArrowsWhenDisabled,l=t.removeArrowOnDeviceType,n=t.infinite,a=t.containerClass,u=t.sliderClass,d=t.customTransition,c=t.additionalTransfrom,h=t.renderDotsOutside,p=t.renderButtonGroupOutside,f=t.className,g=t.rtl;process.env.NODE_ENV!=="production"&&v.throwError(this.state,this.props);var b=v.getInitialState(this.state,this.props),_=b.shouldRenderOnSSR,C=b.shouldRenderAtAll,y=v.isInLeftEnd(this.state),M=v.isInRightEnd(this.state),I=r&&!(l&&(e&&-1<l.indexOf(e)||this.state.deviceType&&-1<l.indexOf(this.state.deviceType)))&&!v.notEnoughChildren(this.state)&&C,O=!n&&y,W=!n&&M,j=B.getTransform(this.state,this.props);return w.createElement(w.Fragment,null,w.createElement("div",{className:"react-multi-carousel-list "+a+" "+f,dir:g?"rtl":"ltr",ref:this.containerRef},w.createElement("ul",{ref:this.listRef,className:"react-multi-carousel-track "+u,style:{transition:this.isAnimationAllowed?d||st:"none",overflow:_?"hidden":"unset",transform:"translate3d("+(j+c)+"px,0,0)"},onMouseMove:this.handleMove,onMouseDown:this.handleDown,onMouseUp:this.handleOut,onMouseEnter:this.handleEnter,onMouseLeave:this.handleOut,onTouchStart:this.handleDown,onTouchMove:this.handleMove,onTouchEnd:this.handleOut},this.renderCarouselItems()),I&&(!O||s)&&this.renderLeftArrow(O),I&&(!W||s)&&this.renderRightArrow(W),C&&!p&&this.renderButtonGroups(),C&&!h&&this.renderDotsList()),C&&h&&this.renderDotsList(),C&&p&&this.renderButtonGroups())},i.defaultProps={slidesToSlide:1,infinite:!1,draggable:!0,swipeable:!0,arrows:!0,renderArrowsWhenDisabled:!1,containerClass:"",sliderClass:"",itemClass:"",keyBoardControl:!0,autoPlaySpeed:3e3,showDots:!1,renderDotsOutside:!1,renderButtonGroupOutside:!1,minimumTouchDrag:80,className:"",dotListClass:"",focusOnSelect:!1,centerMode:!1,additionalTransfrom:0,pauseOnHover:!0,shouldResetAutoplay:!0,rewind:!1,rtl:!1,rewindWithAnimation:!1},i}(w.Component);K.default=ee;Object.defineProperty(q,"__esModule",{value:!0});var ie=K;q.default=ie.default;var oe=q;const re=k.getDefaultExportFromCjs(oe),ne=at.styled.div`
|
|
1
|
+
"use strict";const S=require("react/jsx-runtime"),E=require("react"),k=require("./_commonjsHelpers-DwTZ_eVU.cjs"),D=require("./index-BpbMKBf_.cjs"),vt=require("./Button.cjs"),gt=require("./useDetectMobile-zkbzoOGV.cjs"),at=require("./emotion-styled.browser.esm-BtEseadx.cjs"),lt=require("./style-BAcV7F53.cjs"),yt=require("./consts-goSZX3xP.cjs");var q={},K={},m={},F={};(function(o){function i(a,n,u){var l=n.slidesToShow,d=n.currentSlide;return u.length>2*l?a+2*l:d>=u.length?u.length+a:a}function t(a,n){if(n.length>2*a){for(var u={},l=n.length-2*a,d=n.length-l,c=l,h=0;h<d;h++)u[h]=c,c++;var p=n.length+d,f=p+n.slice(0,2*a).length,g=0;for(h=p;h<=f;h++)u[h]=g,g++;var b=p,_=0;for(h=d;h<b;h++)u[h]=_,_++;return u}u={};var C=3*n.length,y=0;for(h=0;h<C;h++)u[h]=y,++y===n.length&&(y=0);return u}function e(a,n){return n.length<a?n:n.length>2*a?n.slice(n.length-2*a,n.length).concat(n,n.slice(0,2*a)):n.concat(n,n)}function r(a,n){return n.length>2*a?2*a:n.length}function s(a,n,u){var l,d=a.currentSlide,c=a.slidesToShow,h=a.itemWidth,p=a.totalItems,f=0,g=0,b=d===0,_=n.length-(n.length-2*c);return n.length<c?(g=f=0,b=l=!1):n.length>2*c?((l=d>=_+n.length)&&(g=-h*(f=d-n.length)),b&&(g=-h*(f=_+(n.length-2*c)))):((l=d>=2*n.length)&&(g=-h*(f=d-n.length)),b&&(g=u.showDots?-h*(f=n.length):-h*(f=p/3))),{isReachingTheEnd:l,isReachingTheStart:b,nextSlide:f,nextPosition:g}}Object.defineProperty(o,"__esModule",{value:!0}),o.getOriginalCounterPart=i,o.getOriginalIndexLookupTableByClones=t,o.getClones=e,o.getInitialSlideInInfiniteMode=r,o.checkClonesPosition=s})(F);var A={};Object.defineProperty(A,"__esModule",{value:!0});var ot=!1;function St(o,i,t,e){var r=0,s=e||t;return i&&s&&(!ot&&process.env.NODE_ENV!=="production"&&o[s].paritialVisibilityGutter&&(ot=!0,console.warn("You appear to be using paritialVisibilityGutter instead of partialVisibilityGutter which will be moved to partialVisibilityGutter in the future completely")),r=o[s].partialVisibilityGutter||o[s].paritialVisibilityGutter),r}function Tt(o,i){var t;return i[o]&&(t=(100/i[o].items).toFixed(1)),t}function wt(o,i,t){return Math.round(t/(i+(o.centerMode?1:0)))}A.getPartialVisibilityGutter=St,A.getWidthFromDeviceType=Tt,A.getItemClientSideWidth=wt;var T={};Object.defineProperty(T,"__esModule",{value:!0});var Y=A;function Z(o){var i=o.slidesToShow;return o.totalItems<i}function bt(o,i){var t,e=o.domLoaded,r=o.slidesToShow,s=o.containerWidth,a=o.itemWidth,n=i.deviceType,u=i.responsive,l=i.ssr,d=i.partialVisbile,c=i.partialVisible,h=!!(e&&r&&s&&a);l&&n&&!h&&(t=Y.getWidthFromDeviceType(n,u));var p=!!(l&&n&&!h&&t);return{shouldRenderOnSSR:p,flexBisis:t,domFullyLoaded:h,partialVisibilityGutter:Y.getPartialVisibilityGutter(u,d||c,n,o.deviceType),shouldRenderAtAll:p||h}}function _t(o,i){var t=i.currentSlide,e=i.slidesToShow;return t<=o&&o<t+e}function ut(o,i,t){var e=t||o.transform;return!i.infinite&&o.currentSlide===0||Z(o)?e:e+o.itemWidth/2}function Ct(o){return!(0<o.currentSlide)}function dt(o){var i=o.currentSlide,t=o.totalItems;return!(i+o.slidesToShow<t)}function ht(o,i,t,e){i===void 0&&(i=0);var r=o.currentSlide,s=o.slidesToShow,a=dt(o),n=!t.infinite&&a,u=e||o.transform;if(Z(o))return u;var l=u+r*i;return n?l+(o.containerWidth-(o.itemWidth-i)*s):l}function ct(o,i){return o.rtl?-1*i:i}function It(o,i,t){var e=i.partialVisbile,r=i.partialVisible,s=i.responsive,a=i.deviceType,n=i.centerMode,u=t||o.transform,l=Y.getPartialVisibilityGutter(s,e||r,a,o.deviceType);return ct(i,r||e?ht(o,l,i,t):n?ut(o,i,t):u)}function Mt(o,i){var t=o.domLoaded,e=o.slidesToShow,r=o.containerWidth,s=o.itemWidth,a=i.deviceType,n=i.responsive,u=i.slidesToSlide||1,l=!!(t&&e&&r&&s);return i.ssr&&i.deviceType&&!l&&Object.keys(n).forEach(function(d){var c=n[d].slidesToSlide;a===d&&c&&(u=c)}),l&&Object.keys(n).forEach(function(d){var c=n[d],h=c.breakpoint,p=c.slidesToSlide,f=h.max,g=h.min;p&&window.innerWidth>=g&&window.innerWidth<=f&&(u=p)}),u}T.notEnoughChildren=Z,T.getInitialState=bt,T.getIfSlideIsVisbile=_t,T.getTransformForCenterMode=ut,T.isInLeftEnd=Ct,T.isInRightEnd=dt,T.getTransformForPartialVsibile=ht,T.parsePosition=ct,T.getTransform=It,T.getSlidesToSlide=Mt;var J={};Object.defineProperty(J,"__esModule",{value:!0});var Pt=function(o,i,t){var e;return function(){var r=arguments;e||(o.apply(this,r),e=!0,typeof t=="function"&&t(!0),setTimeout(function(){e=!1,typeof t=="function"&&t(!1)},i))}};J.default=Pt;var pt={};(function(o){function i(t,e){var r=e.partialVisbile,s=e.partialVisible,a=e.centerMode,n=e.ssr,u=e.responsive;if((r||s)&&a)throw new Error("center mode can not be used at the same time with partialVisible");if(!u)throw n?new Error("ssr mode need to be used in conjunction with responsive prop"):new Error("Responsive prop is needed for deciding the amount of items to show on the screen");if(u&&typeof u!="object")throw new Error("responsive prop must be an object")}Object.defineProperty(o,"__esModule",{value:!0}),o.default=i})(pt);var Q={};Object.defineProperty(Q,"__esModule",{value:!0});var xt=T;function Et(o,i,t){t===void 0&&(t=0);var e,r,s=o.slidesToShow,a=o.currentSlide,n=o.itemWidth,u=o.totalItems,l=xt.getSlidesToSlide(o,i),d=a+1+t+s+(0<t?0:l);return r=d<=u?-n*(e=a+t+(0<t?0:l)):u<d&&a!==u-s?-n*(e=u-s):e=void 0,{nextSlides:e,nextPosition:r}}Q.populateNextSlides=Et;var H={};Object.defineProperty(H,"__esModule",{value:!0});var Rt=E,Ot=T,At=T;function Wt(o,i,t){t===void 0&&(t=0);var e,r,s=o.currentSlide,a=o.itemWidth,n=o.slidesToShow,u=i.children,l=i.showDots,d=i.infinite,c=Ot.getSlidesToSlide(o,i),h=s-t-(0<t?0:c),p=(Rt.Children.toArray(u).length-n)%c;return r=0<=h?(e=h,l&&!d&&0<p&&At.isInRightEnd(o)&&(e=s-p),-a*e):e=h<0&&s!==0?0:void 0,{nextSlides:e,nextPosition:r}}H.populatePreviousSlides=Wt;var ft={};(function(o){function i(t,e,r,s,a,n){var u,l,d=t.itemWidth,c=t.slidesToShow,h=t.totalItems,p=t.currentSlide,f=e.infinite,g=!1,b=Math.round((r-s)/d),_=Math.round((s-r)/d),C=r<a;if(a<r&&b<=c){u="right";var y=Math.abs(-d*(h-c)),M=n-(s-a),I=p===h-c;(Math.abs(M)<=y||I&&f)&&(l=M,g=!0)}return C&&_<=c&&(u="left",((M=n+(a-s))<=0||p===0&&f)&&(g=!0,l=M)),{direction:u,nextPosition:l,canContinue:g}}Object.defineProperty(o,"__esModule",{value:!0}),o.populateSlidesOnMouseTouchMove=i})(ft);Object.defineProperty(m,"__esModule",{value:!0});var V=F;m.getOriginalCounterPart=V.getOriginalCounterPart,m.getClones=V.getClones,m.checkClonesPosition=V.checkClonesPosition,m.getInitialSlideInInfiniteMode=V.getInitialSlideInInfiniteMode;var X=A;m.getWidthFromDeviceType=X.getWidthFromDeviceType,m.getPartialVisibilityGutter=X.getPartialVisibilityGutter,m.getItemClientSideWidth=X.getItemClientSideWidth;var x=T;m.getInitialState=x.getInitialState,m.getIfSlideIsVisbile=x.getIfSlideIsVisbile,m.getTransformForCenterMode=x.getTransformForCenterMode,m.getTransformForPartialVsibile=x.getTransformForPartialVsibile,m.isInLeftEnd=x.isInLeftEnd,m.isInRightEnd=x.isInRightEnd,m.notEnoughChildren=x.notEnoughChildren,m.getSlidesToSlide=x.getSlidesToSlide;var Dt=J;m.throttle=Dt.default;var Lt=pt;m.throwError=Lt.default;var kt=Q;m.populateNextSlides=kt.populateNextSlides;var jt=H;m.populatePreviousSlides=jt.populatePreviousSlides;var Vt=ft;m.populateSlidesOnMouseTouchMove=Vt.populateSlidesOnMouseTouchMove;var $={},Gt=k.commonjsGlobal&&k.commonjsGlobal.__extends||function(){var o=function(i,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(i,t)};return function(i,t){function e(){this.constructor=i}o(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty($,"__esModule",{value:!0});var Bt=E;function Nt(o){return"clientY"in o}$.isMouseMoveEvent=Nt;var Ft=function(o){function i(){return o!==null&&o.apply(this,arguments)||this}return Gt(i,o),i}(Bt.Component);$.default=Ft;var tt={},et={};Object.defineProperty(et,"__esModule",{value:!0});var $t=F,zt=T;function Xt(o,i,t,e){var r={},s=zt.getSlidesToSlide(i,t);return Array(o).fill(0).forEach(function(a,n){var u=$t.getOriginalCounterPart(n,i,e);if(n===0)r[0]=u;else{var l=r[n-1]+s;r[n]=l}}),r}et.getLookupTableForNextSlides=Xt;Object.defineProperty(tt,"__esModule",{value:!0});var L=E,Ut=F,Yt=et,rt=T,qt=function(o){var i=o.props,t=o.state,e=o.goToSlide,r=o.getState,s=i.showDots,a=i.customDot,n=i.dotListClass,u=i.infinite,l=i.children;if(!s||rt.notEnoughChildren(t))return null;var d,c=t.currentSlide,h=t.slidesToShow,p=rt.getSlidesToSlide(t,i),f=L.Children.toArray(l);d=u?Math.ceil(f.length/p):Math.ceil((f.length-h)/p)+1;var g=Yt.getLookupTableForNextSlides(d,t,i,f),b=Ut.getOriginalIndexLookupTableByClones(h,f),_=b[c];return L.createElement("ul",{className:"react-multi-carousel-dot-list "+n},Array(d).fill(0).map(function(C,y){var M,I;if(u){I=g[y];var O=b[I];M=_===O||O<=_&&_<O+p}else{var W=f.length-h,j=y*p;M=(I=W<j?W:j)===c||I<c&&c<I+p&&c<f.length-h}return a?L.cloneElement(a,{index:y,active:M,key:y,onClick:function(){return e(I)},carouselState:r()}):L.createElement("li",{"data-index":y,key:y,className:"react-multi-carousel-dot "+(M?"react-multi-carousel-dot--active":"")},L.createElement("button",{"aria-label":"Go to slide "+(y+1),onClick:function(){return e(I)}}))}))};tt.default=qt;var z={};Object.defineProperty(z,"__esModule",{value:!0});var N=E,Kt=function(o){var i=o.customLeftArrow,t=o.getState,e=o.previous,r=o.disabled,s=o.rtl;if(i)return N.cloneElement(i,{onClick:function(){return e()},carouselState:t(),disabled:r,rtl:s});var a=s?"rtl":"";return N.createElement("button",{"aria-label":"Go to previous slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--left "+a,onClick:function(){return e()},type:"button",disabled:r})};z.LeftArrow=Kt;var Zt=function(o){var i=o.customRightArrow,t=o.getState,e=o.next,r=o.disabled,s=o.rtl;if(i)return N.cloneElement(i,{onClick:function(){return e()},carouselState:t(),disabled:r,rtl:s});var a=s?"rtl":"";return N.createElement("button",{"aria-label":"Go to next slide",className:"react-multiple-carousel__arrow react-multiple-carousel__arrow--right "+a,onClick:function(){return e()},type:"button",disabled:r})};z.RightArrow=Zt;var it={};Object.defineProperty(it,"__esModule",{value:!0});var G=E,U=m,Jt=function(o){var i=o.props,t=o.state,e=o.goToSlide,r=o.clones,s=o.notEnoughChildren,a=t.itemWidth,n=i.children,u=i.infinite,l=i.itemClass,d=i.itemAriaLabel,c=i.partialVisbile,h=i.partialVisible,p=U.getInitialState(t,i),f=p.flexBisis,g=p.shouldRenderOnSSR,b=p.domFullyLoaded,_=p.partialVisibilityGutter;return p.shouldRenderAtAll?(c&&console.warn('WARNING: Please correct props name: "partialVisible" as old typo will be removed in future versions!'),G.createElement(G.Fragment,null,(u?r:G.Children.toArray(n)).map(function(C,y){return G.createElement("li",{key:y,"data-index":y,onClick:function(){i.focusOnSelect&&e(y)},"aria-hidden":U.getIfSlideIsVisbile(y,t)?"false":"true","aria-label":d||(C.props.ariaLabel?C.props.ariaLabel:null),style:{flex:g?"1 0 "+f+"%":"auto",position:"relative",width:b?((c||h)&&_&&!s?a-_:a)+"px":"auto"},className:"react-multi-carousel-item "+(U.getIfSlideIsVisbile(y,t)?"react-multi-carousel-item--active":"")+" "+l},C)}))):null};it.default=Jt;var Qt=k.commonjsGlobal&&k.commonjsGlobal.__extends||function(){var o=function(i,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var s in r)r.hasOwnProperty(s)&&(e[s]=r[s])})(i,t)};return function(i,t){function e(){this.constructor=i}o(i,t),i.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}();Object.defineProperty(K,"__esModule",{value:!0});var w=E,v=m,R=$,Ht=tt,nt=z,te=it,B=T,P=400,st="transform 400ms ease-in-out",ee=function(o){function i(t){var e=o.call(this,t)||this;return e.containerRef=w.createRef(),e.listRef=w.createRef(),e.state={itemWidth:0,slidesToShow:0,currentSlide:0,totalItems:w.Children.count(t.children),deviceType:"",domLoaded:!1,transform:0,containerWidth:0},e.onResize=e.onResize.bind(e),e.handleDown=e.handleDown.bind(e),e.handleMove=e.handleMove.bind(e),e.handleOut=e.handleOut.bind(e),e.onKeyUp=e.onKeyUp.bind(e),e.handleEnter=e.handleEnter.bind(e),e.setIsInThrottle=e.setIsInThrottle.bind(e),e.next=v.throttle(e.next.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.previous=v.throttle(e.previous.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.goToSlide=v.throttle(e.goToSlide.bind(e),t.transitionDuration||P,e.setIsInThrottle),e.onMove=!1,e.initialX=0,e.lastX=0,e.isAnimationAllowed=!1,e.direction="",e.initialY=0,e.isInThrottle=!1,e.transformPlaceHolder=0,e}return Qt(i,o),i.prototype.resetTotalItems=function(){var t=this,e=w.Children.count(this.props.children),r=v.notEnoughChildren(this.state)?0:Math.max(0,Math.min(this.state.currentSlide,e));this.setState({totalItems:e,currentSlide:r},function(){t.setContainerAndItemWidth(t.state.slidesToShow,!0)})},i.prototype.setIsInThrottle=function(t){t===void 0&&(t=!1),this.isInThrottle=t},i.prototype.setTransformDirectly=function(t,e){var r=this.props.additionalTransfrom;this.transformPlaceHolder=t;var s=B.getTransform(this.state,this.props,this.transformPlaceHolder);this.listRef&&this.listRef.current&&(this.setAnimationDirectly(e),this.listRef.current.style.transform="translate3d("+(s+r)+"px,0,0)")},i.prototype.setAnimationDirectly=function(t){this.listRef&&this.listRef.current&&(this.listRef.current.style.transition=t?this.props.customTransition||st:"none")},i.prototype.componentDidMount=function(){this.setState({domLoaded:!0}),this.setItemsToShow(),window.addEventListener("resize",this.onResize),this.onResize(!0),this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),this.props.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},i.prototype.setClones=function(t,e,r,s){var a=this;s===void 0&&(s=!1),this.isAnimationAllowed=!1;var n=w.Children.toArray(this.props.children),u=v.getInitialSlideInInfiniteMode(t||this.state.slidesToShow,n),l=v.getClones(this.state.slidesToShow,n),d=n.length<this.state.slidesToShow?0:this.state.currentSlide;this.setState({totalItems:l.length,currentSlide:r&&!s?d:u},function(){a.correctItemsPosition(e||a.state.itemWidth)})},i.prototype.setItemsToShow=function(t,e){var r=this,s=this.props.responsive;Object.keys(s).forEach(function(a){var n=s[a],u=n.breakpoint,l=n.items,d=u.max,c=u.min,h=[window.innerWidth];window.screen&&window.screen.width&&h.push(window.screen.width);var p=Math.min.apply(Math,h);c<=p&&p<=d&&(r.setState({slidesToShow:l,deviceType:a}),r.setContainerAndItemWidth(l,t,e))})},i.prototype.setContainerAndItemWidth=function(t,e,r){var s=this;if(this.containerRef&&this.containerRef.current){var a=this.containerRef.current.offsetWidth,n=v.getItemClientSideWidth(this.props,t,a);this.setState({containerWidth:a,itemWidth:n},function(){s.props.infinite&&s.setClones(t,n,e,r)}),e&&this.correctItemsPosition(n)}},i.prototype.correctItemsPosition=function(t,e,r){e&&(this.isAnimationAllowed=!0),!e&&this.isAnimationAllowed&&(this.isAnimationAllowed=!1);var s=this.state.totalItems<this.state.slidesToShow?0:-t*this.state.currentSlide;r&&this.setTransformDirectly(s,!0),this.setState({transform:s})},i.prototype.onResize=function(t){var e;e=!!this.props.infinite&&(typeof t!="boolean"||!t),this.setItemsToShow(e)},i.prototype.componentDidUpdate=function(t,e){var r=this,s=t.keyBoardControl,a=t.autoPlay,n=t.children,u=e.containerWidth,l=e.domLoaded,d=e.currentSlide;if(this.containerRef&&this.containerRef.current&&this.containerRef.current.offsetWidth!==u&&(this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),this.itemsToShowTimeout=setTimeout(function(){r.setItemsToShow(!0)},this.props.transitionDuration||P)),s&&!this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),!s&&this.props.keyBoardControl&&window.addEventListener("keyup",this.onKeyUp),a&&!this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),a||!this.props.autoPlay||this.autoPlay||(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed)),n.length!==this.props.children.length?i.clonesTimeout=setTimeout(function(){r.props.infinite?r.setClones(r.state.slidesToShow,r.state.itemWidth,!0,!0):r.resetTotalItems()},this.props.transitionDuration||P):this.props.infinite&&this.state.currentSlide!==d&&this.correctClonesPosition({domLoaded:l}),this.transformPlaceHolder!==this.state.transform&&(this.transformPlaceHolder=this.state.transform),this.props.autoPlay&&this.props.rewind&&!this.props.infinite&&v.isInRightEnd(this.state)){var c=this.props.transitionDuration||P;i.isInThrottleTimeout=setTimeout(function(){r.setIsInThrottle(!1),r.resetAutoplayInterval(),r.goToSlide(0,void 0,!!r.props.rewindWithAnimation)},c+this.props.autoPlaySpeed)}},i.prototype.correctClonesPosition=function(t){var e=this,r=t.domLoaded,s=w.Children.toArray(this.props.children),a=v.checkClonesPosition(this.state,s,this.props),n=a.isReachingTheEnd,u=a.isReachingTheStart,l=a.nextSlide,d=a.nextPosition;this.state.domLoaded&&r&&(n||u)&&(this.isAnimationAllowed=!1,i.transformTimeout=setTimeout(function(){e.setState({transform:d,currentSlide:l})},this.props.transitionDuration||P))},i.prototype.next=function(t){var e=this;t===void 0&&(t=0);var r=this.props,s=r.afterChange,a=r.beforeChange;if(!v.notEnoughChildren(this.state)){var n=v.populateNextSlides(this.state,this.props,t),u=n.nextSlides,l=n.nextPosition,d=this.state.currentSlide;u!==void 0&&l!==void 0&&(typeof a=="function"&&a(u,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:l,currentSlide:u},function(){typeof s=="function"&&(i.afterChangeTimeout=setTimeout(function(){s(d,e.getState())},e.props.transitionDuration||P))}))}},i.prototype.previous=function(t){var e=this;t===void 0&&(t=0);var r=this.props,s=r.afterChange,a=r.beforeChange;if(!v.notEnoughChildren(this.state)){var n=v.populatePreviousSlides(this.state,this.props,t),u=n.nextSlides,l=n.nextPosition;if(u!==void 0&&l!==void 0){var d=this.state.currentSlide;typeof a=="function"&&a(u,this.getState()),this.isAnimationAllowed=!0,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({transform:l,currentSlide:u},function(){typeof s=="function"&&(i.afterChangeTimeout2=setTimeout(function(){s(d,e.getState())},e.props.transitionDuration||P))})}}},i.prototype.resetAutoplayInterval=function(){this.props.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed))},i.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onResize),this.props.keyBoardControl&&window.removeEventListener("keyup",this.onKeyUp),this.props.autoPlay&&this.autoPlay&&(clearInterval(this.autoPlay),this.autoPlay=void 0),this.itemsToShowTimeout&&clearTimeout(this.itemsToShowTimeout),i.clonesTimeout&&clearTimeout(i.clonesTimeout),i.isInThrottleTimeout&&clearTimeout(i.isInThrottleTimeout),i.transformTimeout&&clearTimeout(i.transformTimeout),i.afterChangeTimeout&&clearTimeout(i.afterChangeTimeout),i.afterChangeTimeout2&&clearTimeout(i.afterChangeTimeout2),i.afterChangeTimeout3&&clearTimeout(i.afterChangeTimeout3)},i.prototype.resetMoveStatus=function(){this.onMove=!1,this.initialX=0,this.lastX=0,this.direction="",this.initialY=0},i.prototype.getCords=function(t){var e=t.clientX,r=t.clientY;return{clientX:B.parsePosition(this.props,e),clientY:B.parsePosition(this.props,r)}},i.prototype.handleDown=function(t){if(!(!R.isMouseMoveEvent(t)&&!this.props.swipeable||R.isMouseMoveEvent(t)&&!this.props.draggable||this.isInThrottle)){var e=this.getCords(R.isMouseMoveEvent(t)?t:t.touches[0]),r=e.clientX,s=e.clientY;this.onMove=!0,this.initialX=r,this.initialY=s,this.lastX=r,this.isAnimationAllowed=!1}},i.prototype.handleMove=function(t){if(!(!R.isMouseMoveEvent(t)&&!this.props.swipeable||R.isMouseMoveEvent(t)&&!this.props.draggable||v.notEnoughChildren(this.state))){var e=this.getCords(R.isMouseMoveEvent(t)?t:t.touches[0]),r=e.clientX,s=e.clientY,a=this.initialX-r,n=this.initialY-s;if(this.onMove){if(!(Math.abs(a)>Math.abs(n)))return;var u=v.populateSlidesOnMouseTouchMove(this.state,this.props,this.initialX,this.lastX,r,this.transformPlaceHolder),l=u.direction,d=u.nextPosition,c=u.canContinue;l&&(this.direction=l,c&&d!==void 0&&this.setTransformDirectly(d)),this.lastX=r}}},i.prototype.handleOut=function(t){this.props.autoPlay&&!this.autoPlay&&(this.autoPlay=setInterval(this.next,this.props.autoPlaySpeed));var e=t.type==="touchend"&&!this.props.swipeable,r=(t.type==="mouseleave"||t.type==="mouseup")&&!this.props.draggable;if(!e&&!r&&this.onMove){if(this.setAnimationDirectly(!0),this.direction==="right")if(this.initialX-this.lastX>=this.props.minimumTouchDrag){var s=Math.round((this.initialX-this.lastX)/this.state.itemWidth);this.next(s)}else this.correctItemsPosition(this.state.itemWidth,!0,!0);this.direction==="left"&&(this.lastX-this.initialX>this.props.minimumTouchDrag?(s=Math.round((this.lastX-this.initialX)/this.state.itemWidth),this.previous(s)):this.correctItemsPosition(this.state.itemWidth,!0,!0)),this.resetMoveStatus()}},i.prototype.isInViewport=function(t){var e=t.getBoundingClientRect(),r=e.top,s=r===void 0?0:r,a=e.left,n=a===void 0?0:a,u=e.bottom,l=u===void 0?0:u,d=e.right,c=d===void 0?0:d;return 0<=s&&0<=n&&l<=(window.innerHeight||document.documentElement.clientHeight)&&c<=(window.innerWidth||document.documentElement.clientWidth)},i.prototype.isChildOfCarousel=function(t){return!!(t instanceof Element&&this.listRef&&this.listRef.current)&&this.listRef.current.contains(t)},i.prototype.onKeyUp=function(t){var e=t.target;switch(t.keyCode){case 37:if(this.isChildOfCarousel(e))return this.previous();break;case 39:if(this.isChildOfCarousel(e))return this.next();break;case 9:if(this.isChildOfCarousel(e)&&e instanceof HTMLInputElement&&this.isInViewport(e))return this.next()}},i.prototype.handleEnter=function(t){R.isMouseMoveEvent(t)&&this.autoPlay&&this.props.autoPlay&&this.props.pauseOnHover&&(clearInterval(this.autoPlay),this.autoPlay=void 0)},i.prototype.goToSlide=function(t,e,r){var s=this;if(r===void 0&&(r=!0),!this.isInThrottle){var a=this.state.itemWidth,n=this.props,u=n.afterChange,l=n.beforeChange,d=this.state.currentSlide;typeof l!="function"||e&&(typeof e!="object"||e.skipBeforeChange)||l(t,this.getState()),this.isAnimationAllowed=r,this.props.shouldResetAutoplay&&this.resetAutoplayInterval(),this.setState({currentSlide:t,transform:-a*t},function(){s.props.infinite&&s.correctClonesPosition({domLoaded:!0}),typeof u!="function"||e&&(typeof e!="object"||e.skipAfterChange)||(i.afterChangeTimeout3=setTimeout(function(){u(d,s.getState())},s.props.transitionDuration||P))})}},i.prototype.getState=function(){return this.state},i.prototype.renderLeftArrow=function(t){var e=this,r=this.props,s=r.customLeftArrow,a=r.rtl;return w.createElement(nt.LeftArrow,{customLeftArrow:s,getState:function(){return e.getState()},previous:this.previous,disabled:t,rtl:a})},i.prototype.renderRightArrow=function(t){var e=this,r=this.props,s=r.customRightArrow,a=r.rtl;return w.createElement(nt.RightArrow,{customRightArrow:s,getState:function(){return e.getState()},next:this.next,disabled:t,rtl:a})},i.prototype.renderButtonGroups=function(){var t=this,e=this.props.customButtonGroup;return e?w.cloneElement(e,{previous:function(){return t.previous()},next:function(){return t.next()},goToSlide:function(r,s){return t.goToSlide(r,s)},carouselState:this.getState()}):null},i.prototype.renderDotsList=function(){var t=this;return w.createElement(Ht.default,{state:this.state,props:this.props,goToSlide:this.goToSlide,getState:function(){return t.getState()}})},i.prototype.renderCarouselItems=function(){var t=[];if(this.props.infinite){var e=w.Children.toArray(this.props.children);t=v.getClones(this.state.slidesToShow,e)}return w.createElement(te.default,{clones:t,goToSlide:this.goToSlide,state:this.state,notEnoughChildren:v.notEnoughChildren(this.state),props:this.props})},i.prototype.render=function(){var t=this.props,e=t.deviceType,r=t.arrows,s=t.renderArrowsWhenDisabled,a=t.removeArrowOnDeviceType,n=t.infinite,u=t.containerClass,l=t.sliderClass,d=t.customTransition,c=t.additionalTransfrom,h=t.renderDotsOutside,p=t.renderButtonGroupOutside,f=t.className,g=t.rtl;process.env.NODE_ENV!=="production"&&v.throwError(this.state,this.props);var b=v.getInitialState(this.state,this.props),_=b.shouldRenderOnSSR,C=b.shouldRenderAtAll,y=v.isInLeftEnd(this.state),M=v.isInRightEnd(this.state),I=r&&!(a&&(e&&-1<a.indexOf(e)||this.state.deviceType&&-1<a.indexOf(this.state.deviceType)))&&!v.notEnoughChildren(this.state)&&C,O=!n&&y,W=!n&&M,j=B.getTransform(this.state,this.props);return w.createElement(w.Fragment,null,w.createElement("div",{className:"react-multi-carousel-list "+u+" "+f,dir:g?"rtl":"ltr",ref:this.containerRef},w.createElement("ul",{ref:this.listRef,className:"react-multi-carousel-track "+l,style:{transition:this.isAnimationAllowed?d||st:"none",overflow:_?"hidden":"unset",transform:"translate3d("+(j+c)+"px,0,0)"},onMouseMove:this.handleMove,onMouseDown:this.handleDown,onMouseUp:this.handleOut,onMouseEnter:this.handleEnter,onMouseLeave:this.handleOut,onTouchStart:this.handleDown,onTouchMove:this.handleMove,onTouchEnd:this.handleOut},this.renderCarouselItems()),I&&(!O||s)&&this.renderLeftArrow(O),I&&(!W||s)&&this.renderRightArrow(W),C&&!p&&this.renderButtonGroups(),C&&!h&&this.renderDotsList()),C&&h&&this.renderDotsList(),C&&p&&this.renderButtonGroups())},i.defaultProps={slidesToSlide:1,infinite:!1,draggable:!0,swipeable:!0,arrows:!0,renderArrowsWhenDisabled:!1,containerClass:"",sliderClass:"",itemClass:"",keyBoardControl:!0,autoPlaySpeed:3e3,showDots:!1,renderDotsOutside:!1,renderButtonGroupOutside:!1,minimumTouchDrag:80,className:"",dotListClass:"",focusOnSelect:!1,centerMode:!1,additionalTransfrom:0,pauseOnHover:!0,shouldResetAutoplay:!0,rewind:!1,rtl:!1,rewindWithAnimation:!1},i}(w.Component);K.default=ee;Object.defineProperty(q,"__esModule",{value:!0});var ie=K;q.default=ie.default;var oe=q;const re=k.getDefaultExportFromCjs(oe),ne=at.styled.div`
|
|
2
2
|
&:hover {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
|
|
@@ -174,4 +174,4 @@
|
|
|
174
174
|
aspect-ratio: 1 / 1;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
`,ae=({keyPrefix:o})=>S.jsx(se,{noGradient:!0,children:S.jsx(lt.SkeletonLinePlaceholder,{keyPrefix:`${o}-1`,height:"22.5rem"})}),le=({keyPrefix:o,isLoading:i=!1,fallbackComponent:t=S.jsx(S.Fragment,{}),children:e})=>S.jsx(E.Suspense,{fallbackComponent:t,children:i===!0?S.jsx(ae,{keyPrefix:o}):e}),mt=E.forwardRef(({items:o=[],isLoading:i=!1,fallbackComponent:
|
|
177
|
+
`,ae=({keyPrefix:o})=>S.jsx(se,{noGradient:!0,children:S.jsx(lt.SkeletonLinePlaceholder,{keyPrefix:`${o}-1`,height:"22.5rem"})}),le=({keyPrefix:o,isLoading:i=!1,fallbackComponent:t=S.jsx(S.Fragment,{}),children:e})=>S.jsx(E.Suspense,{fallbackComponent:t,children:i===!0?S.jsx(ae,{keyPrefix:o}):e}),mt=E.forwardRef(({items:o=[],isLoading:i=!1,deviceType:t,fallbackComponent:e=S.jsx(S.Fragment,{}),onSelectItem:r=()=>{},onButtonAction:s=()=>{}},a)=>{const n={desktop:{breakpoint:{max:3e3,min:1024},items:1,partialVisibilityGutter:0},tablet:{breakpoint:{max:1024,min:464},items:1,partialVisibilityGutter:0},mobile:{breakpoint:{max:464,min:0},items:1,partialVisibilityGutter:64}},u=gt.useDetectMobile();return S.jsx(ne,{ref:a,children:S.jsx(le,{fallbackComponent:e,keyPrefix:"banner-carousel-skeleton",isLoading:i,children:S.jsx(re,{responsive:n,deviceType:t,removeArrowOnDeviceType:["tablet","mobile"],infinite:!u,keyBoardControl:!0,autoPlay:!0,partialVisible:!0,customTransition:"transform 500ms ease-in-out",sliderClass:"carousel-slider",itemClass:"carousel-item",containerClass:"carousel-container",rewind:!0,rewindWithAnimation:!0,children:o==null?void 0:o.map((l,d)=>S.jsxs("div",{className:"section__card",onClick:()=>r(l),children:[S.jsx("img",{src:l==null?void 0:l.imageUrl,alt:`Slide ${d+1}`,className:"section__image"}),S.jsxs("div",{className:"card__content",children:[S.jsxs("div",{className:"card__text",children:[(l==null?void 0:l.title)&&S.jsx("div",{className:"card__title",children:l==null?void 0:l.title}),(l==null?void 0:l.title)&&S.jsx("div",{className:"card__description",children:l==null?void 0:l.description})]}),(l==null?void 0:l.buttonText)&&S.jsx(vt,{text:l==null?void 0:l.buttonText,className:"card__action",size:"medium",onClick:c=>{c==null||c.stopPropagation(),s(l)}})]})]},`banner-section-carousel-item__${d+1}`))})})},`banner-section-carousel__${u}`)});mt.propTypes={items:D.PropTypes.array,isLoading:D.PropTypes.bool,fallbackComponent:D.PropTypes.any,onSelectItem:D.PropTypes.func,onButtonAction:D.PropTypes.func};module.exports=mt;
|
|
@@ -9,33 +9,33 @@ import { S as wt, b as bt } from "./style-CXMUA6cI.js";
|
|
|
9
9
|
import { M as _t } from "./consts-BuFChS64.js";
|
|
10
10
|
var Z = {}, q = {}, m = {}, F = {};
|
|
11
11
|
(function(o) {
|
|
12
|
-
function i(
|
|
13
|
-
var
|
|
14
|
-
return
|
|
12
|
+
function i(a, n, u) {
|
|
13
|
+
var l = n.slidesToShow, h = n.currentSlide;
|
|
14
|
+
return u.length > 2 * l ? a + 2 * l : h >= u.length ? u.length + a : a;
|
|
15
15
|
}
|
|
16
|
-
function t(
|
|
17
|
-
if (n.length > 2 *
|
|
18
|
-
for (var
|
|
19
|
-
var p = n.length + h, f = p + n.slice(0, 2 *
|
|
20
|
-
for (d = p; d <= f; d++)
|
|
16
|
+
function t(a, n) {
|
|
17
|
+
if (n.length > 2 * a) {
|
|
18
|
+
for (var u = {}, l = n.length - 2 * a, h = n.length - l, c = l, d = 0; d < h; d++) u[d] = c, c++;
|
|
19
|
+
var p = n.length + h, f = p + n.slice(0, 2 * a).length, g = 0;
|
|
20
|
+
for (d = p; d <= f; d++) u[d] = g, g++;
|
|
21
21
|
var w = p, b = 0;
|
|
22
|
-
for (d = h; d < w; d++)
|
|
23
|
-
return
|
|
22
|
+
for (d = h; d < w; d++) u[d] = b, b++;
|
|
23
|
+
return u;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
u = {};
|
|
26
26
|
var _ = 3 * n.length, y = 0;
|
|
27
|
-
for (d = 0; d < _; d++)
|
|
28
|
-
return
|
|
27
|
+
for (d = 0; d < _; d++) u[d] = y, ++y === n.length && (y = 0);
|
|
28
|
+
return u;
|
|
29
29
|
}
|
|
30
|
-
function e(
|
|
31
|
-
return n.length <
|
|
30
|
+
function e(a, n) {
|
|
31
|
+
return n.length < a ? n : n.length > 2 * a ? n.slice(n.length - 2 * a, n.length).concat(n, n.slice(0, 2 * a)) : n.concat(n, n);
|
|
32
32
|
}
|
|
33
|
-
function r(
|
|
34
|
-
return n.length > 2 *
|
|
33
|
+
function r(a, n) {
|
|
34
|
+
return n.length > 2 * a ? 2 * a : n.length;
|
|
35
35
|
}
|
|
36
|
-
function s(
|
|
37
|
-
var
|
|
38
|
-
return n.length < c ? (g = f = 0, w =
|
|
36
|
+
function s(a, n, u) {
|
|
37
|
+
var l, h = a.currentSlide, c = a.slidesToShow, d = a.itemWidth, p = a.totalItems, f = 0, g = 0, w = h === 0, b = n.length - (n.length - 2 * c);
|
|
38
|
+
return n.length < c ? (g = f = 0, w = l = !1) : n.length > 2 * c ? ((l = h >= b + n.length) && (g = -d * (f = h - n.length)), w && (g = -d * (f = b + (n.length - 2 * c)))) : ((l = h >= 2 * n.length) && (g = -d * (f = h - n.length)), w && (g = u.showDots ? -d * (f = n.length) : -d * (f = p / 3))), { isReachingTheEnd: l, isReachingTheStart: w, nextSlide: f, nextPosition: g };
|
|
39
39
|
}
|
|
40
40
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.getOriginalCounterPart = i, o.getOriginalIndexLookupTableByClones = t, o.getClones = e, o.getInitialSlideInInfiniteMode = r, o.checkClonesPosition = s;
|
|
41
41
|
})(F);
|
|
@@ -62,10 +62,10 @@ function J(o) {
|
|
|
62
62
|
return o.totalItems < i;
|
|
63
63
|
}
|
|
64
64
|
function Pt(o, i) {
|
|
65
|
-
var t, e = o.domLoaded, r = o.slidesToShow, s = o.containerWidth,
|
|
66
|
-
|
|
67
|
-
var p = !!(
|
|
68
|
-
return { shouldRenderOnSSR: p, flexBisis: t, domFullyLoaded: d, partialVisibilityGutter: K.getPartialVisibilityGutter(
|
|
65
|
+
var t, e = o.domLoaded, r = o.slidesToShow, s = o.containerWidth, a = o.itemWidth, n = i.deviceType, u = i.responsive, l = i.ssr, h = i.partialVisbile, c = i.partialVisible, d = !!(e && r && s && a);
|
|
66
|
+
l && n && !d && (t = K.getWidthFromDeviceType(n, u));
|
|
67
|
+
var p = !!(l && n && !d && t);
|
|
68
|
+
return { shouldRenderOnSSR: p, flexBisis: t, domFullyLoaded: d, partialVisibilityGutter: K.getPartialVisibilityGutter(u, h || c, n, o.deviceType), shouldRenderAtAll: p || d };
|
|
69
69
|
}
|
|
70
70
|
function Et(o, i) {
|
|
71
71
|
var t = i.currentSlide, e = i.slidesToShow;
|
|
@@ -84,27 +84,27 @@ function dt(o) {
|
|
|
84
84
|
}
|
|
85
85
|
function ct(o, i, t, e) {
|
|
86
86
|
i === void 0 && (i = 0);
|
|
87
|
-
var r = o.currentSlide, s = o.slidesToShow,
|
|
88
|
-
if (J(o)) return
|
|
89
|
-
var
|
|
90
|
-
return n ?
|
|
87
|
+
var r = o.currentSlide, s = o.slidesToShow, a = dt(o), n = !t.infinite && a, u = e || o.transform;
|
|
88
|
+
if (J(o)) return u;
|
|
89
|
+
var l = u + r * i;
|
|
90
|
+
return n ? l + (o.containerWidth - (o.itemWidth - i) * s) : l;
|
|
91
91
|
}
|
|
92
92
|
function pt(o, i) {
|
|
93
93
|
return o.rtl ? -1 * i : i;
|
|
94
94
|
}
|
|
95
95
|
function xt(o, i, t) {
|
|
96
|
-
var e = i.partialVisbile, r = i.partialVisible, s = i.responsive,
|
|
97
|
-
return pt(i, r || e ? ct(o,
|
|
96
|
+
var e = i.partialVisbile, r = i.partialVisible, s = i.responsive, a = i.deviceType, n = i.centerMode, u = t || o.transform, l = K.getPartialVisibilityGutter(s, e || r, a, o.deviceType);
|
|
97
|
+
return pt(i, r || e ? ct(o, l, i, t) : n ? ht(o, i, t) : u);
|
|
98
98
|
}
|
|
99
99
|
function Ot(o, i) {
|
|
100
|
-
var t = o.domLoaded, e = o.slidesToShow, r = o.containerWidth, s = o.itemWidth,
|
|
101
|
-
return i.ssr && i.deviceType && !
|
|
100
|
+
var t = o.domLoaded, e = o.slidesToShow, r = o.containerWidth, s = o.itemWidth, a = i.deviceType, n = i.responsive, u = i.slidesToSlide || 1, l = !!(t && e && r && s);
|
|
101
|
+
return i.ssr && i.deviceType && !l && Object.keys(n).forEach(function(h) {
|
|
102
102
|
var c = n[h].slidesToSlide;
|
|
103
|
-
|
|
104
|
-
}),
|
|
103
|
+
a === h && c && (u = c);
|
|
104
|
+
}), l && Object.keys(n).forEach(function(h) {
|
|
105
105
|
var c = n[h], d = c.breakpoint, p = c.slidesToSlide, f = d.max, g = d.min;
|
|
106
|
-
p && window.innerWidth >= g && window.innerWidth <= f && (
|
|
107
|
-
}),
|
|
106
|
+
p && window.innerWidth >= g && window.innerWidth <= f && (u = p);
|
|
107
|
+
}), u;
|
|
108
108
|
}
|
|
109
109
|
S.notEnoughChildren = J, S.getInitialState = Pt, S.getIfSlideIsVisbile = Et, S.getTransformForCenterMode = ht, S.isInLeftEnd = Rt, S.isInRightEnd = dt, S.getTransformForPartialVsibile = ct, S.parsePosition = pt, S.getTransform = xt, S.getSlidesToSlide = Ot;
|
|
110
110
|
var Q = {};
|
|
@@ -122,10 +122,10 @@ Q.default = At;
|
|
|
122
122
|
var ft = {};
|
|
123
123
|
(function(o) {
|
|
124
124
|
function i(t, e) {
|
|
125
|
-
var r = e.partialVisbile, s = e.partialVisible,
|
|
126
|
-
if ((r || s) &&
|
|
127
|
-
if (!
|
|
128
|
-
if (
|
|
125
|
+
var r = e.partialVisbile, s = e.partialVisible, a = e.centerMode, n = e.ssr, u = e.responsive;
|
|
126
|
+
if ((r || s) && a) throw new Error("center mode can not be used at the same time with partialVisible");
|
|
127
|
+
if (!u) throw n ? new Error("ssr mode need to be used in conjunction with responsive prop") : new Error("Responsive prop is needed for deciding the amount of items to show on the screen");
|
|
128
|
+
if (u && typeof u != "object") throw new Error("responsive prop must be an object");
|
|
129
129
|
}
|
|
130
130
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.default = i;
|
|
131
131
|
})(ft);
|
|
@@ -134,8 +134,8 @@ Object.defineProperty(H, "__esModule", { value: !0 });
|
|
|
134
134
|
var Wt = S;
|
|
135
135
|
function Dt(o, i, t) {
|
|
136
136
|
t === void 0 && (t = 0);
|
|
137
|
-
var e, r, s = o.slidesToShow,
|
|
138
|
-
return r = h <=
|
|
137
|
+
var e, r, s = o.slidesToShow, a = o.currentSlide, n = o.itemWidth, u = o.totalItems, l = Wt.getSlidesToSlide(o, i), h = a + 1 + t + s + (0 < t ? 0 : l);
|
|
138
|
+
return r = h <= u ? -n * (e = a + t + (0 < t ? 0 : l)) : u < h && a !== u - s ? -n * (e = u - s) : e = void 0, { nextSlides: e, nextPosition: r };
|
|
139
139
|
}
|
|
140
140
|
H.populateNextSlides = Dt;
|
|
141
141
|
var tt = {};
|
|
@@ -143,20 +143,20 @@ Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
|
143
143
|
var Lt = A, kt = S, Vt = S;
|
|
144
144
|
function jt(o, i, t) {
|
|
145
145
|
t === void 0 && (t = 0);
|
|
146
|
-
var e, r, s = o.currentSlide,
|
|
147
|
-
return r = 0 <= d ? (e = d,
|
|
146
|
+
var e, r, s = o.currentSlide, a = o.itemWidth, n = o.slidesToShow, u = i.children, l = i.showDots, h = i.infinite, c = kt.getSlidesToSlide(o, i), d = s - t - (0 < t ? 0 : c), p = (Lt.Children.toArray(u).length - n) % c;
|
|
147
|
+
return r = 0 <= d ? (e = d, l && !h && 0 < p && Vt.isInRightEnd(o) && (e = s - p), -a * e) : e = d < 0 && s !== 0 ? 0 : void 0, { nextSlides: e, nextPosition: r };
|
|
148
148
|
}
|
|
149
149
|
tt.populatePreviousSlides = jt;
|
|
150
150
|
var mt = {};
|
|
151
151
|
(function(o) {
|
|
152
|
-
function i(t, e, r, s,
|
|
153
|
-
var
|
|
154
|
-
if (
|
|
155
|
-
|
|
156
|
-
var y = Math.abs(-h * (d - c)), M = n - (s -
|
|
157
|
-
(Math.abs(M) <= y || I && f) && (
|
|
152
|
+
function i(t, e, r, s, a, n) {
|
|
153
|
+
var u, l, h = t.itemWidth, c = t.slidesToShow, d = t.totalItems, p = t.currentSlide, f = e.infinite, g = !1, w = Math.round((r - s) / h), b = Math.round((s - r) / h), _ = r < a;
|
|
154
|
+
if (a < r && w <= c) {
|
|
155
|
+
u = "right";
|
|
156
|
+
var y = Math.abs(-h * (d - c)), M = n - (s - a), I = p === d - c;
|
|
157
|
+
(Math.abs(M) <= y || I && f) && (l = M, g = !0);
|
|
158
158
|
}
|
|
159
|
-
return _ && b <= c && (
|
|
159
|
+
return _ && b <= c && (u = "left", ((M = n + (a - s)) <= 0 || p === 0 && f) && (g = !0, l = M)), { direction: u, nextPosition: l, canContinue: g };
|
|
160
160
|
}
|
|
161
161
|
Object.defineProperty(o, "__esModule", { value: !0 }), o.populateSlidesOnMouseTouchMove = i;
|
|
162
162
|
})(mt);
|
|
@@ -210,26 +210,26 @@ Object.defineProperty(it, "__esModule", { value: !0 });
|
|
|
210
210
|
var Kt = F, Zt = S;
|
|
211
211
|
function qt(o, i, t, e) {
|
|
212
212
|
var r = {}, s = Zt.getSlidesToSlide(i, t);
|
|
213
|
-
return Array(o).fill(0).forEach(function(
|
|
214
|
-
var
|
|
215
|
-
if (n === 0) r[0] =
|
|
213
|
+
return Array(o).fill(0).forEach(function(a, n) {
|
|
214
|
+
var u = Kt.getOriginalCounterPart(n, i, e);
|
|
215
|
+
if (n === 0) r[0] = u;
|
|
216
216
|
else {
|
|
217
|
-
var
|
|
218
|
-
r[n] =
|
|
217
|
+
var l = r[n - 1] + s;
|
|
218
|
+
r[n] = l;
|
|
219
219
|
}
|
|
220
220
|
}), r;
|
|
221
221
|
}
|
|
222
222
|
it.getLookupTableForNextSlides = qt;
|
|
223
223
|
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
224
224
|
var L = A, Jt = F, Qt = it, nt = S, Ht = function(o) {
|
|
225
|
-
var i = o.props, t = o.state, e = o.goToSlide, r = o.getState, s = i.showDots,
|
|
225
|
+
var i = o.props, t = o.state, e = o.goToSlide, r = o.getState, s = i.showDots, a = i.customDot, n = i.dotListClass, u = i.infinite, l = i.children;
|
|
226
226
|
if (!s || nt.notEnoughChildren(t)) return null;
|
|
227
|
-
var h, c = t.currentSlide, d = t.slidesToShow, p = nt.getSlidesToSlide(t, i), f = L.Children.toArray(
|
|
228
|
-
h =
|
|
227
|
+
var h, c = t.currentSlide, d = t.slidesToShow, p = nt.getSlidesToSlide(t, i), f = L.Children.toArray(l);
|
|
228
|
+
h = u ? Math.ceil(f.length / p) : Math.ceil((f.length - d) / p) + 1;
|
|
229
229
|
var g = Qt.getLookupTableForNextSlides(h, t, i, f), w = Jt.getOriginalIndexLookupTableByClones(d, f), b = w[c];
|
|
230
230
|
return L.createElement("ul", { className: "react-multi-carousel-dot-list " + n }, Array(h).fill(0).map(function(_, y) {
|
|
231
231
|
var M, I;
|
|
232
|
-
if (
|
|
232
|
+
if (u) {
|
|
233
233
|
I = g[y];
|
|
234
234
|
var x = w[I];
|
|
235
235
|
M = b === x || x <= b && b < x + p;
|
|
@@ -237,7 +237,7 @@ var L = A, Jt = F, Qt = it, nt = S, Ht = function(o) {
|
|
|
237
237
|
var W = f.length - d, k = y * p;
|
|
238
238
|
M = (I = W < k ? W : k) === c || I < c && c < I + p && c < f.length - d;
|
|
239
239
|
}
|
|
240
|
-
return
|
|
240
|
+
return a ? L.cloneElement(a, { index: y, active: M, key: y, onClick: function() {
|
|
241
241
|
return e(I);
|
|
242
242
|
}, carouselState: r() }) : L.createElement("li", { "data-index": y, key: y, className: "react-multi-carousel-dot " + (M ? "react-multi-carousel-dot--active" : "") }, L.createElement("button", { "aria-label": "Go to slide " + (y + 1), onClick: function() {
|
|
243
243
|
return e(I);
|
|
@@ -252,8 +252,8 @@ var N = A, te = function(o) {
|
|
|
252
252
|
if (i) return N.cloneElement(i, { onClick: function() {
|
|
253
253
|
return e();
|
|
254
254
|
}, carouselState: t(), disabled: r, rtl: s });
|
|
255
|
-
var
|
|
256
|
-
return N.createElement("button", { "aria-label": "Go to previous slide", className: "react-multiple-carousel__arrow react-multiple-carousel__arrow--left " +
|
|
255
|
+
var a = s ? "rtl" : "";
|
|
256
|
+
return N.createElement("button", { "aria-label": "Go to previous slide", className: "react-multiple-carousel__arrow react-multiple-carousel__arrow--left " + a, onClick: function() {
|
|
257
257
|
return e();
|
|
258
258
|
}, type: "button", disabled: r });
|
|
259
259
|
};
|
|
@@ -263,8 +263,8 @@ var ee = function(o) {
|
|
|
263
263
|
if (i) return N.cloneElement(i, { onClick: function() {
|
|
264
264
|
return e();
|
|
265
265
|
}, carouselState: t(), disabled: r, rtl: s });
|
|
266
|
-
var
|
|
267
|
-
return N.createElement("button", { "aria-label": "Go to next slide", className: "react-multiple-carousel__arrow react-multiple-carousel__arrow--right " +
|
|
266
|
+
var a = s ? "rtl" : "";
|
|
267
|
+
return N.createElement("button", { "aria-label": "Go to next slide", className: "react-multiple-carousel__arrow react-multiple-carousel__arrow--right " + a, onClick: function() {
|
|
268
268
|
return e();
|
|
269
269
|
}, type: "button", disabled: r });
|
|
270
270
|
};
|
|
@@ -272,11 +272,11 @@ z.RightArrow = ee;
|
|
|
272
272
|
var ot = {};
|
|
273
273
|
Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
274
274
|
var j = A, Y = m, ie = function(o) {
|
|
275
|
-
var i = o.props, t = o.state, e = o.goToSlide, r = o.clones, s = o.notEnoughChildren,
|
|
276
|
-
return p.shouldRenderAtAll ? (c && console.warn('WARNING: Please correct props name: "partialVisible" as old typo will be removed in future versions!'), j.createElement(j.Fragment, null, (
|
|
275
|
+
var i = o.props, t = o.state, e = o.goToSlide, r = o.clones, s = o.notEnoughChildren, a = t.itemWidth, n = i.children, u = i.infinite, l = i.itemClass, h = i.itemAriaLabel, c = i.partialVisbile, d = i.partialVisible, p = Y.getInitialState(t, i), f = p.flexBisis, g = p.shouldRenderOnSSR, w = p.domFullyLoaded, b = p.partialVisibilityGutter;
|
|
276
|
+
return p.shouldRenderAtAll ? (c && console.warn('WARNING: Please correct props name: "partialVisible" as old typo will be removed in future versions!'), j.createElement(j.Fragment, null, (u ? r : j.Children.toArray(n)).map(function(_, y) {
|
|
277
277
|
return j.createElement("li", { key: y, "data-index": y, onClick: function() {
|
|
278
278
|
i.focusOnSelect && e(y);
|
|
279
|
-
}, "aria-hidden": Y.getIfSlideIsVisbile(y, t) ? "false" : "true", "aria-label": h || (_.props.ariaLabel ? _.props.ariaLabel : null), style: { flex: g ? "1 0 " + f + "%" : "auto", position: "relative", width: w ? ((c || d) && b && !s ?
|
|
279
|
+
}, "aria-hidden": Y.getIfSlideIsVisbile(y, t) ? "false" : "true", "aria-label": h || (_.props.ariaLabel ? _.props.ariaLabel : null), style: { flex: g ? "1 0 " + f + "%" : "auto", position: "relative", width: w ? ((c || d) && b && !s ? a - b : a) + "px" : "auto" }, className: "react-multi-carousel-item " + (Y.getIfSlideIsVisbile(y, t) ? "react-multi-carousel-item--active" : "") + " " + l }, _);
|
|
280
280
|
}))) : null;
|
|
281
281
|
};
|
|
282
282
|
ot.default = ie;
|
|
@@ -318,25 +318,25 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
318
318
|
}, i.prototype.componentDidMount = function() {
|
|
319
319
|
this.setState({ domLoaded: !0 }), this.setItemsToShow(), window.addEventListener("resize", this.onResize), this.onResize(!0), this.props.keyBoardControl && window.addEventListener("keyup", this.onKeyUp), this.props.autoPlay && (this.autoPlay = setInterval(this.next, this.props.autoPlaySpeed));
|
|
320
320
|
}, i.prototype.setClones = function(t, e, r, s) {
|
|
321
|
-
var
|
|
321
|
+
var a = this;
|
|
322
322
|
s === void 0 && (s = !1), this.isAnimationAllowed = !1;
|
|
323
|
-
var n = T.Children.toArray(this.props.children),
|
|
324
|
-
this.setState({ totalItems:
|
|
325
|
-
|
|
323
|
+
var n = T.Children.toArray(this.props.children), u = v.getInitialSlideInInfiniteMode(t || this.state.slidesToShow, n), l = v.getClones(this.state.slidesToShow, n), h = n.length < this.state.slidesToShow ? 0 : this.state.currentSlide;
|
|
324
|
+
this.setState({ totalItems: l.length, currentSlide: r && !s ? h : u }, function() {
|
|
325
|
+
a.correctItemsPosition(e || a.state.itemWidth);
|
|
326
326
|
});
|
|
327
327
|
}, i.prototype.setItemsToShow = function(t, e) {
|
|
328
328
|
var r = this, s = this.props.responsive;
|
|
329
|
-
Object.keys(s).forEach(function(
|
|
330
|
-
var n = s[
|
|
329
|
+
Object.keys(s).forEach(function(a) {
|
|
330
|
+
var n = s[a], u = n.breakpoint, l = n.items, h = u.max, c = u.min, d = [window.innerWidth];
|
|
331
331
|
window.screen && window.screen.width && d.push(window.screen.width);
|
|
332
332
|
var p = Math.min.apply(Math, d);
|
|
333
|
-
c <= p && p <= h && (r.setState({ slidesToShow:
|
|
333
|
+
c <= p && p <= h && (r.setState({ slidesToShow: l, deviceType: a }), r.setContainerAndItemWidth(l, t, e));
|
|
334
334
|
});
|
|
335
335
|
}, i.prototype.setContainerAndItemWidth = function(t, e, r) {
|
|
336
336
|
var s = this;
|
|
337
337
|
if (this.containerRef && this.containerRef.current) {
|
|
338
|
-
var
|
|
339
|
-
this.setState({ containerWidth:
|
|
338
|
+
var a = this.containerRef.current.offsetWidth, n = v.getItemClientSideWidth(this.props, t, a);
|
|
339
|
+
this.setState({ containerWidth: a, itemWidth: n }, function() {
|
|
340
340
|
s.props.infinite && s.setClones(t, n, e, r);
|
|
341
341
|
}), e && this.correctItemsPosition(n);
|
|
342
342
|
}
|
|
@@ -348,29 +348,29 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
348
348
|
var e;
|
|
349
349
|
e = !!this.props.infinite && (typeof t != "boolean" || !t), this.setItemsToShow(e);
|
|
350
350
|
}, i.prototype.componentDidUpdate = function(t, e) {
|
|
351
|
-
var r = this, s = t.keyBoardControl,
|
|
352
|
-
if (this.containerRef && this.containerRef.current && this.containerRef.current.offsetWidth !==
|
|
351
|
+
var r = this, s = t.keyBoardControl, a = t.autoPlay, n = t.children, u = e.containerWidth, l = e.domLoaded, h = e.currentSlide;
|
|
352
|
+
if (this.containerRef && this.containerRef.current && this.containerRef.current.offsetWidth !== u && (this.itemsToShowTimeout && clearTimeout(this.itemsToShowTimeout), this.itemsToShowTimeout = setTimeout(function() {
|
|
353
353
|
r.setItemsToShow(!0);
|
|
354
|
-
}, this.props.transitionDuration || P)), s && !this.props.keyBoardControl && window.removeEventListener("keyup", this.onKeyUp), !s && this.props.keyBoardControl && window.addEventListener("keyup", this.onKeyUp),
|
|
354
|
+
}, this.props.transitionDuration || P)), s && !this.props.keyBoardControl && window.removeEventListener("keyup", this.onKeyUp), !s && this.props.keyBoardControl && window.addEventListener("keyup", this.onKeyUp), a && !this.props.autoPlay && this.autoPlay && (clearInterval(this.autoPlay), this.autoPlay = void 0), a || !this.props.autoPlay || this.autoPlay || (this.autoPlay = setInterval(this.next, this.props.autoPlaySpeed)), n.length !== this.props.children.length ? i.clonesTimeout = setTimeout(function() {
|
|
355
355
|
r.props.infinite ? r.setClones(r.state.slidesToShow, r.state.itemWidth, !0, !0) : r.resetTotalItems();
|
|
356
|
-
}, this.props.transitionDuration || P) : this.props.infinite && this.state.currentSlide !== h && this.correctClonesPosition({ domLoaded:
|
|
356
|
+
}, this.props.transitionDuration || P) : this.props.infinite && this.state.currentSlide !== h && this.correctClonesPosition({ domLoaded: l }), this.transformPlaceHolder !== this.state.transform && (this.transformPlaceHolder = this.state.transform), this.props.autoPlay && this.props.rewind && !this.props.infinite && v.isInRightEnd(this.state)) {
|
|
357
357
|
var c = this.props.transitionDuration || P;
|
|
358
358
|
i.isInThrottleTimeout = setTimeout(function() {
|
|
359
359
|
r.setIsInThrottle(!1), r.resetAutoplayInterval(), r.goToSlide(0, void 0, !!r.props.rewindWithAnimation);
|
|
360
360
|
}, c + this.props.autoPlaySpeed);
|
|
361
361
|
}
|
|
362
362
|
}, i.prototype.correctClonesPosition = function(t) {
|
|
363
|
-
var e = this, r = t.domLoaded, s = T.Children.toArray(this.props.children),
|
|
364
|
-
this.state.domLoaded && r && (n ||
|
|
365
|
-
e.setState({ transform: h, currentSlide:
|
|
363
|
+
var e = this, r = t.domLoaded, s = T.Children.toArray(this.props.children), a = v.checkClonesPosition(this.state, s, this.props), n = a.isReachingTheEnd, u = a.isReachingTheStart, l = a.nextSlide, h = a.nextPosition;
|
|
364
|
+
this.state.domLoaded && r && (n || u) && (this.isAnimationAllowed = !1, i.transformTimeout = setTimeout(function() {
|
|
365
|
+
e.setState({ transform: h, currentSlide: l });
|
|
366
366
|
}, this.props.transitionDuration || P));
|
|
367
367
|
}, i.prototype.next = function(t) {
|
|
368
368
|
var e = this;
|
|
369
369
|
t === void 0 && (t = 0);
|
|
370
|
-
var r = this.props, s = r.afterChange,
|
|
370
|
+
var r = this.props, s = r.afterChange, a = r.beforeChange;
|
|
371
371
|
if (!v.notEnoughChildren(this.state)) {
|
|
372
|
-
var n = v.populateNextSlides(this.state, this.props, t),
|
|
373
|
-
|
|
372
|
+
var n = v.populateNextSlides(this.state, this.props, t), u = n.nextSlides, l = n.nextPosition, h = this.state.currentSlide;
|
|
373
|
+
u !== void 0 && l !== void 0 && (typeof a == "function" && a(u, this.getState()), this.isAnimationAllowed = !0, this.props.shouldResetAutoplay && this.resetAutoplayInterval(), this.setState({ transform: l, currentSlide: u }, function() {
|
|
374
374
|
typeof s == "function" && (i.afterChangeTimeout = setTimeout(function() {
|
|
375
375
|
s(h, e.getState());
|
|
376
376
|
}, e.props.transitionDuration || P));
|
|
@@ -379,12 +379,12 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
379
379
|
}, i.prototype.previous = function(t) {
|
|
380
380
|
var e = this;
|
|
381
381
|
t === void 0 && (t = 0);
|
|
382
|
-
var r = this.props, s = r.afterChange,
|
|
382
|
+
var r = this.props, s = r.afterChange, a = r.beforeChange;
|
|
383
383
|
if (!v.notEnoughChildren(this.state)) {
|
|
384
|
-
var n = v.populatePreviousSlides(this.state, this.props, t),
|
|
385
|
-
if (
|
|
384
|
+
var n = v.populatePreviousSlides(this.state, this.props, t), u = n.nextSlides, l = n.nextPosition;
|
|
385
|
+
if (u !== void 0 && l !== void 0) {
|
|
386
386
|
var h = this.state.currentSlide;
|
|
387
|
-
typeof
|
|
387
|
+
typeof a == "function" && a(u, this.getState()), this.isAnimationAllowed = !0, this.props.shouldResetAutoplay && this.resetAutoplayInterval(), this.setState({ transform: l, currentSlide: u }, function() {
|
|
388
388
|
typeof s == "function" && (i.afterChangeTimeout2 = setTimeout(function() {
|
|
389
389
|
s(h, e.getState());
|
|
390
390
|
}, e.props.transitionDuration || P));
|
|
@@ -407,11 +407,11 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
407
407
|
}
|
|
408
408
|
}, i.prototype.handleMove = function(t) {
|
|
409
409
|
if (!(!R.isMouseMoveEvent(t) && !this.props.swipeable || R.isMouseMoveEvent(t) && !this.props.draggable || v.notEnoughChildren(this.state))) {
|
|
410
|
-
var e = this.getCords(R.isMouseMoveEvent(t) ? t : t.touches[0]), r = e.clientX, s = e.clientY,
|
|
410
|
+
var e = this.getCords(R.isMouseMoveEvent(t) ? t : t.touches[0]), r = e.clientX, s = e.clientY, a = this.initialX - r, n = this.initialY - s;
|
|
411
411
|
if (this.onMove) {
|
|
412
|
-
if (!(Math.abs(
|
|
413
|
-
var
|
|
414
|
-
|
|
412
|
+
if (!(Math.abs(a) > Math.abs(n))) return;
|
|
413
|
+
var u = v.populateSlidesOnMouseTouchMove(this.state, this.props, this.initialX, this.lastX, r, this.transformPlaceHolder), l = u.direction, h = u.nextPosition, c = u.canContinue;
|
|
414
|
+
l && (this.direction = l, c && h !== void 0 && this.setTransformDirectly(h)), this.lastX = r;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
}, i.prototype.handleOut = function(t) {
|
|
@@ -425,8 +425,8 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
425
425
|
this.direction === "left" && (this.lastX - this.initialX > this.props.minimumTouchDrag ? (s = Math.round((this.lastX - this.initialX) / this.state.itemWidth), this.previous(s)) : this.correctItemsPosition(this.state.itemWidth, !0, !0)), this.resetMoveStatus();
|
|
426
426
|
}
|
|
427
427
|
}, i.prototype.isInViewport = function(t) {
|
|
428
|
-
var e = t.getBoundingClientRect(), r = e.top, s = r === void 0 ? 0 : r,
|
|
429
|
-
return 0 <= s && 0 <= n &&
|
|
428
|
+
var e = t.getBoundingClientRect(), r = e.top, s = r === void 0 ? 0 : r, a = e.left, n = a === void 0 ? 0 : a, u = e.bottom, l = u === void 0 ? 0 : u, h = e.right, c = h === void 0 ? 0 : h;
|
|
429
|
+
return 0 <= s && 0 <= n && l <= (window.innerHeight || document.documentElement.clientHeight) && c <= (window.innerWidth || document.documentElement.clientWidth);
|
|
430
430
|
}, i.prototype.isChildOfCarousel = function(t) {
|
|
431
431
|
return !!(t instanceof Element && this.listRef && this.listRef.current) && this.listRef.current.contains(t);
|
|
432
432
|
}, i.prototype.onKeyUp = function(t) {
|
|
@@ -446,25 +446,25 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
446
446
|
}, i.prototype.goToSlide = function(t, e, r) {
|
|
447
447
|
var s = this;
|
|
448
448
|
if (r === void 0 && (r = !0), !this.isInThrottle) {
|
|
449
|
-
var
|
|
450
|
-
typeof
|
|
451
|
-
s.props.infinite && s.correctClonesPosition({ domLoaded: !0 }), typeof
|
|
452
|
-
|
|
449
|
+
var a = this.state.itemWidth, n = this.props, u = n.afterChange, l = n.beforeChange, h = this.state.currentSlide;
|
|
450
|
+
typeof l != "function" || e && (typeof e != "object" || e.skipBeforeChange) || l(t, this.getState()), this.isAnimationAllowed = r, this.props.shouldResetAutoplay && this.resetAutoplayInterval(), this.setState({ currentSlide: t, transform: -a * t }, function() {
|
|
451
|
+
s.props.infinite && s.correctClonesPosition({ domLoaded: !0 }), typeof u != "function" || e && (typeof e != "object" || e.skipAfterChange) || (i.afterChangeTimeout3 = setTimeout(function() {
|
|
452
|
+
u(h, s.getState());
|
|
453
453
|
}, s.props.transitionDuration || P));
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}, i.prototype.getState = function() {
|
|
457
457
|
return this.state;
|
|
458
458
|
}, i.prototype.renderLeftArrow = function(t) {
|
|
459
|
-
var e = this, r = this.props, s = r.customLeftArrow,
|
|
459
|
+
var e = this, r = this.props, s = r.customLeftArrow, a = r.rtl;
|
|
460
460
|
return T.createElement(st.LeftArrow, { customLeftArrow: s, getState: function() {
|
|
461
461
|
return e.getState();
|
|
462
|
-
}, previous: this.previous, disabled: t, rtl:
|
|
462
|
+
}, previous: this.previous, disabled: t, rtl: a });
|
|
463
463
|
}, i.prototype.renderRightArrow = function(t) {
|
|
464
|
-
var e = this, r = this.props, s = r.customRightArrow,
|
|
464
|
+
var e = this, r = this.props, s = r.customRightArrow, a = r.rtl;
|
|
465
465
|
return T.createElement(st.RightArrow, { customRightArrow: s, getState: function() {
|
|
466
466
|
return e.getState();
|
|
467
|
-
}, next: this.next, disabled: t, rtl:
|
|
467
|
+
}, next: this.next, disabled: t, rtl: a });
|
|
468
468
|
}, i.prototype.renderButtonGroups = function() {
|
|
469
469
|
var t = this, e = this.props.customButtonGroup;
|
|
470
470
|
return e ? T.cloneElement(e, { previous: function() {
|
|
@@ -487,10 +487,10 @@ var T = A, v = m, R = $, re = et, st = z, ne = ot, B = S, P = 400, at = "transfo
|
|
|
487
487
|
}
|
|
488
488
|
return T.createElement(ne.default, { clones: t, goToSlide: this.goToSlide, state: this.state, notEnoughChildren: v.notEnoughChildren(this.state), props: this.props });
|
|
489
489
|
}, i.prototype.render = function() {
|
|
490
|
-
var t = this.props, e = t.deviceType, r = t.arrows, s = t.renderArrowsWhenDisabled,
|
|
490
|
+
var t = this.props, e = t.deviceType, r = t.arrows, s = t.renderArrowsWhenDisabled, a = t.removeArrowOnDeviceType, n = t.infinite, u = t.containerClass, l = t.sliderClass, h = t.customTransition, c = t.additionalTransfrom, d = t.renderDotsOutside, p = t.renderButtonGroupOutside, f = t.className, g = t.rtl;
|
|
491
491
|
process.env.NODE_ENV !== "production" && v.throwError(this.state, this.props);
|
|
492
|
-
var w = v.getInitialState(this.state, this.props), b = w.shouldRenderOnSSR, _ = w.shouldRenderAtAll, y = v.isInLeftEnd(this.state), M = v.isInRightEnd(this.state), I = r && !(
|
|
493
|
-
return T.createElement(T.Fragment, null, T.createElement("div", { className: "react-multi-carousel-list " +
|
|
492
|
+
var w = v.getInitialState(this.state, this.props), b = w.shouldRenderOnSSR, _ = w.shouldRenderAtAll, y = v.isInLeftEnd(this.state), M = v.isInRightEnd(this.state), I = r && !(a && (e && -1 < a.indexOf(e) || this.state.deviceType && -1 < a.indexOf(this.state.deviceType))) && !v.notEnoughChildren(this.state) && _, x = !n && y, W = !n && M, k = B.getTransform(this.state, this.props);
|
|
493
|
+
return T.createElement(T.Fragment, null, T.createElement("div", { className: "react-multi-carousel-list " + u + " " + f, dir: g ? "rtl" : "ltr", ref: this.containerRef }, T.createElement("ul", { ref: this.listRef, className: "react-multi-carousel-track " + l, style: { transition: this.isAnimationAllowed ? h || at : "none", overflow: b ? "hidden" : "unset", transform: "translate3d(" + (k + c) + "px,0,0)" }, onMouseMove: this.handleMove, onMouseDown: this.handleDown, onMouseUp: this.handleOut, onMouseEnter: this.handleEnter, onMouseLeave: this.handleOut, onTouchStart: this.handleDown, onTouchMove: this.handleMove, onTouchEnd: this.handleOut }, this.renderCarouselItems()), I && (!x || s) && this.renderLeftArrow(x), I && (!W || s) && this.renderRightArrow(W), _ && !p && this.renderButtonGroups(), _ && !d && this.renderDotsList()), _ && d && this.renderDotsList(), _ && p && this.renderButtonGroups());
|
|
494
494
|
}, i.defaultProps = { slidesToSlide: 1, infinite: !1, draggable: !0, swipeable: !0, arrows: !0, renderArrowsWhenDisabled: !1, containerClass: "", sliderClass: "", itemClass: "", keyBoardControl: !0, autoPlaySpeed: 3e3, showDots: !1, renderDotsOutside: !1, renderButtonGroupOutside: !1, minimumTouchDrag: 80, className: "", dotListClass: "", focusOnSelect: !1, centerMode: !1, additionalTransfrom: 0, pauseOnHover: !0, shouldResetAutoplay: !0, rewind: !1, rtl: !1, rewindWithAnimation: !1 }, i;
|
|
495
495
|
}(T.Component);
|
|
496
496
|
q.default = se;
|
|
@@ -683,13 +683,14 @@ const ue = /* @__PURE__ */ yt(le), he = ut.div`
|
|
|
683
683
|
({
|
|
684
684
|
items: o = [],
|
|
685
685
|
isLoading: i = !1,
|
|
686
|
-
|
|
687
|
-
|
|
686
|
+
deviceType: t,
|
|
687
|
+
fallbackComponent: e = /* @__PURE__ */ C(lt, {}),
|
|
688
|
+
onSelectItem: r = () => {
|
|
688
689
|
},
|
|
689
|
-
onButtonAction:
|
|
690
|
+
onButtonAction: s = () => {
|
|
690
691
|
}
|
|
691
|
-
},
|
|
692
|
-
const
|
|
692
|
+
}, a) => {
|
|
693
|
+
const n = {
|
|
693
694
|
desktop: {
|
|
694
695
|
breakpoint: { max: 3e3, min: 1024 },
|
|
695
696
|
items: 1,
|
|
@@ -705,19 +706,20 @@ const ue = /* @__PURE__ */ yt(le), he = ut.div`
|
|
|
705
706
|
items: 1,
|
|
706
707
|
partialVisibilityGutter: 64
|
|
707
708
|
}
|
|
708
|
-
},
|
|
709
|
-
return /* @__PURE__ */ C(he, { ref:
|
|
709
|
+
}, u = Tt();
|
|
710
|
+
return /* @__PURE__ */ C(he, { ref: a, children: /* @__PURE__ */ C(
|
|
710
711
|
pe,
|
|
711
712
|
{
|
|
712
|
-
fallbackComponent:
|
|
713
|
+
fallbackComponent: e,
|
|
713
714
|
keyPrefix: "banner-carousel-skeleton",
|
|
714
715
|
isLoading: i,
|
|
715
716
|
children: /* @__PURE__ */ C(
|
|
716
717
|
ue,
|
|
717
718
|
{
|
|
718
|
-
responsive:
|
|
719
|
+
responsive: n,
|
|
720
|
+
deviceType: t,
|
|
719
721
|
removeArrowOnDeviceType: ["tablet", "mobile"],
|
|
720
|
-
infinite: !
|
|
722
|
+
infinite: !u,
|
|
721
723
|
keyBoardControl: !0,
|
|
722
724
|
autoPlay: !0,
|
|
723
725
|
partialVisible: !0,
|
|
@@ -727,45 +729,45 @@ const ue = /* @__PURE__ */ yt(le), he = ut.div`
|
|
|
727
729
|
containerClass: "carousel-container",
|
|
728
730
|
rewind: !0,
|
|
729
731
|
rewindWithAnimation: !0,
|
|
730
|
-
children: o == null ? void 0 : o.map((
|
|
732
|
+
children: o == null ? void 0 : o.map((l, h) => /* @__PURE__ */ X(
|
|
731
733
|
"div",
|
|
732
734
|
{
|
|
733
735
|
className: "section__card",
|
|
734
|
-
onClick: () =>
|
|
736
|
+
onClick: () => r(l),
|
|
735
737
|
children: [
|
|
736
738
|
/* @__PURE__ */ C(
|
|
737
739
|
"img",
|
|
738
740
|
{
|
|
739
|
-
src:
|
|
740
|
-
alt: `Slide ${
|
|
741
|
+
src: l == null ? void 0 : l.imageUrl,
|
|
742
|
+
alt: `Slide ${h + 1}`,
|
|
741
743
|
className: "section__image"
|
|
742
744
|
}
|
|
743
745
|
),
|
|
744
746
|
/* @__PURE__ */ X("div", { className: "card__content", children: [
|
|
745
747
|
/* @__PURE__ */ X("div", { className: "card__text", children: [
|
|
746
|
-
(
|
|
747
|
-
(
|
|
748
|
+
(l == null ? void 0 : l.title) && /* @__PURE__ */ C("div", { className: "card__title", children: l == null ? void 0 : l.title }),
|
|
749
|
+
(l == null ? void 0 : l.title) && /* @__PURE__ */ C("div", { className: "card__description", children: l == null ? void 0 : l.description })
|
|
748
750
|
] }),
|
|
749
|
-
(
|
|
751
|
+
(l == null ? void 0 : l.buttonText) && /* @__PURE__ */ C(
|
|
750
752
|
St,
|
|
751
753
|
{
|
|
752
|
-
text:
|
|
754
|
+
text: l == null ? void 0 : l.buttonText,
|
|
753
755
|
className: "card__action",
|
|
754
756
|
size: "medium",
|
|
755
|
-
onClick: (
|
|
756
|
-
|
|
757
|
+
onClick: (c) => {
|
|
758
|
+
c == null || c.stopPropagation(), s(l);
|
|
757
759
|
}
|
|
758
760
|
}
|
|
759
761
|
)
|
|
760
762
|
] })
|
|
761
763
|
]
|
|
762
764
|
},
|
|
763
|
-
`banner-section-carousel-item__${
|
|
765
|
+
`banner-section-carousel-item__${h + 1}`
|
|
764
766
|
))
|
|
765
767
|
}
|
|
766
768
|
)
|
|
767
769
|
}
|
|
768
|
-
) }, `banner-section-carousel__${
|
|
770
|
+
) }, `banner-section-carousel__${u}`);
|
|
769
771
|
}
|
|
770
772
|
);
|
|
771
773
|
fe.propTypes = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";const t=require("react/jsx-runtime"),c=require("react"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),E=require("./consts-goSZX3xP.cjs"),F=require("./Button.cjs"),l=require("./utils-RnrgDDZP.cjs"),B=require("./useDetectMobile-zkbzoOGV.cjs"),R=require("./style-CkcozOY6.cjs"),w=require("./index-BeVjdODO.cjs"),I=require("./index-CSNxZFTX.cjs"),Q=T.styled.div`
|
|
2
2
|
display: grid;
|
|
3
|
-
grid-template-columns: ${
|
|
3
|
+
grid-template-columns: ${a=>`repeat(${a.limit}, minmax(0, 1fr))`};
|
|
4
4
|
gap: 1.25rem;
|
|
5
5
|
|
|
6
6
|
& .button-link {
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
/* Safari and Chrome */
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((
|
|
29
|
+
`,j=c.memo(w.DetailedProductCard),_=c.forwardRef((a,P)=>{const{icon:d,title:v,buttonLink:u,items:i,buttonText:m,limit:n=4,onSelectCard:g=()=>{},onButtonAction:D=()=>{},isLoading:p=!1,getImage:b=()=>{},negotiableText:k,freeText:y,options:o,onSelectOption:C=()=>{},productsToolbarName:U="All",sponsoredText:f,onBookmark:h=()=>{},actionComponent:S,componentName:N}=a,q=B.useDetectMobile(),L=c.useMemo(()=>t.jsx(t.Fragment,{children:q===!0?i==null?void 0:i.map((e,r)=>t.jsx(j,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),sellerName:e==null?void 0:e.sellerName,imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:f,onBookmark:h,actionComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N}},r)):i==null?void 0:i.slice(0,n).map((e,r)=>t.jsx(j,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,currency:e==null?void 0:e.currency,image:e==null?void 0:e.image,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,imageComponent:e==null?void 0:e.imageComponent,onSelectCard:(M,s)=>g({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:s}),imageUrl:b(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,negotiableText:k,freeText:y,tags:e==null?void 0:e.tags,categoryCode:e==null?void 0:e.categoryCode,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:f,onBookmark:h,actionComponent:S,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{accessor:e==null?void 0:e.accessor,name:N},sellerName:e==null?void 0:e.sellerName},r))}),[i,q,n]);return t.jsxs(R.TitleWithOptionsSectionWrapper,{ref:P,children:[t.jsxs("div",{className:"regular-title",children:[t.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(d)&&t.jsx("i",{className:d}),t.jsx("span",{children:v})]}),l.isDefinedNotEmptyString(u)&&l.isDefinedNotEmptyString(m)&&!p&&t.jsx(F,{type:"button",btnType:"tinted",color:"neutral",onClick:e=>{var r;(r=e==null?void 0:e.target)==null||r.blur(),D(u)},borderRadius:"curved",className:"button-link",children:m})]}),(o==null?void 0:o.length)>0&&t.jsx(I.SelectBar,{items:o,onRemove:e=>{C(e)},onSelect:e=>{C(e)},labelKey:"name",valueKey:"code",noMargin:!0,productsToolbarName:U}),t.jsx(w.SuspenseDetailedProductCard,{isLoading:p,keyPrefix:"detailed-products-skeleton",children:t.jsx(Q,{limit:n,children:L})})]})});module.exports=_;
|
|
@@ -10,7 +10,7 @@ import { D as $, S as j } from "./index-DrtxDu6u.js";
|
|
|
10
10
|
import { S as z } from "./index-BGiZlEQt.js";
|
|
11
11
|
const A = I.div`
|
|
12
12
|
display: grid;
|
|
13
|
-
grid-template-columns: ${(
|
|
13
|
+
grid-template-columns: ${(i) => `repeat(${i.limit}, minmax(0, 1fr))`};
|
|
14
14
|
gap: 1.25rem;
|
|
15
15
|
|
|
16
16
|
& .button-link {
|
|
@@ -36,7 +36,7 @@ const A = I.div`
|
|
|
36
36
|
/* Safari and Chrome */
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`, P = B($), ee = q((
|
|
39
|
+
`, P = B($), ee = q((i, v) => {
|
|
40
40
|
const {
|
|
41
41
|
icon: d,
|
|
42
42
|
title: T,
|
|
@@ -53,16 +53,16 @@ const A = I.div`
|
|
|
53
53
|
},
|
|
54
54
|
negotiableText: k,
|
|
55
55
|
freeText: f,
|
|
56
|
-
options:
|
|
56
|
+
options: a,
|
|
57
57
|
onSelectOption: y = () => {
|
|
58
58
|
},
|
|
59
59
|
productsToolbarName: L = "All",
|
|
60
|
-
sponsoredText:
|
|
61
|
-
onBookmark:
|
|
60
|
+
sponsoredText: C,
|
|
61
|
+
onBookmark: h = () => {
|
|
62
62
|
},
|
|
63
|
-
actionComponent:
|
|
63
|
+
actionComponent: S,
|
|
64
64
|
componentName: N
|
|
65
|
-
} =
|
|
65
|
+
} = i, w = R(), M = E(() => /* @__PURE__ */ t(F, { children: w === !0 ? o == null ? void 0 : o.map((e, r) => /* @__PURE__ */ t(
|
|
66
66
|
P,
|
|
67
67
|
{
|
|
68
68
|
name: e == null ? void 0 : e.name,
|
|
@@ -92,15 +92,16 @@ const A = I.div`
|
|
|
92
92
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
93
93
|
status: e == null ? void 0 : e.status,
|
|
94
94
|
trade: e == null ? void 0 : e.trade,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
96
|
+
sponsoredText: C,
|
|
97
|
+
onBookmark: h,
|
|
98
|
+
actionComponent: S,
|
|
98
99
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
99
100
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
100
101
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N }
|
|
101
102
|
},
|
|
102
|
-
|
|
103
|
-
)) : o == null ? void 0 : o.slice(0, n).map((e,
|
|
103
|
+
r
|
|
104
|
+
)) : o == null ? void 0 : o.slice(0, n).map((e, r) => /* @__PURE__ */ t(
|
|
104
105
|
P,
|
|
105
106
|
{
|
|
106
107
|
name: e == null ? void 0 : e.name,
|
|
@@ -130,15 +131,16 @@ const A = I.div`
|
|
|
130
131
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
131
132
|
status: e == null ? void 0 : e.status,
|
|
132
133
|
trade: e == null ? void 0 : e.trade,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
135
|
+
sponsoredText: C,
|
|
136
|
+
onBookmark: h,
|
|
137
|
+
actionComponent: S,
|
|
136
138
|
bookmarked: e == null ? void 0 : e.bookmarked,
|
|
137
139
|
bookmarkLists: e == null ? void 0 : e.bookmarkLists,
|
|
138
140
|
metadata: { accessor: e == null ? void 0 : e.accessor, name: N },
|
|
139
141
|
sellerName: e == null ? void 0 : e.sellerName
|
|
140
142
|
},
|
|
141
|
-
|
|
143
|
+
r
|
|
142
144
|
)) }), [o, w, n]);
|
|
143
145
|
return /* @__PURE__ */ l(W, { ref: v, children: [
|
|
144
146
|
/* @__PURE__ */ l("div", { className: "regular-title", children: [
|
|
@@ -153,8 +155,8 @@ const A = I.div`
|
|
|
153
155
|
btnType: "tinted",
|
|
154
156
|
color: "neutral",
|
|
155
157
|
onClick: (e) => {
|
|
156
|
-
var
|
|
157
|
-
(
|
|
158
|
+
var r;
|
|
159
|
+
(r = e == null ? void 0 : e.target) == null || r.blur(), U(c);
|
|
158
160
|
},
|
|
159
161
|
borderRadius: "curved",
|
|
160
162
|
className: "button-link",
|
|
@@ -162,10 +164,10 @@ const A = I.div`
|
|
|
162
164
|
}
|
|
163
165
|
)
|
|
164
166
|
] }),
|
|
165
|
-
(
|
|
167
|
+
(a == null ? void 0 : a.length) > 0 && /* @__PURE__ */ t(
|
|
166
168
|
z,
|
|
167
169
|
{
|
|
168
|
-
items:
|
|
170
|
+
items: a,
|
|
169
171
|
onRemove: (e) => {
|
|
170
172
|
y(e);
|
|
171
173
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),s=require("react"),_=require("./emotion-styled.browser.esm-BtEseadx.cjs"),w=require("./consts-goSZX3xP.cjs"),$=require("./useDetectMobile-zkbzoOGV.cjs"),T=require("./Button.cjs"),N=require("./index-BeVjdODO.cjs"),F=_.styled.div`
|
|
2
2
|
padding: 1.75rem 3rem;
|
|
3
3
|
display: grid;
|
|
4
4
|
grid-template-columns: ${a=>`repeat(${a.limit||5}, minmax(0, 1fr))`};
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
@media (max-width: ${
|
|
57
|
+
@media (max-width: ${w.MOBILE_SIZE_PX+"px"}) {
|
|
58
58
|
grid-template-columns: repeat(2, 1fr);
|
|
59
59
|
padding: 2rem 1.25rem;
|
|
60
60
|
gap: 1.19rem;
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
@media (max-width: ${
|
|
70
|
+
@media (max-width: ${w.SMALL_MOBILE_SIZE_PX+"px"}) {
|
|
71
71
|
display: flex;
|
|
72
72
|
flex-direction: column;
|
|
73
73
|
}
|
|
74
|
-
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:
|
|
74
|
+
`,S=s.memo(N.DetailedProductCard),I=s.forwardRef((a,P)=>{const{items:r,limit:n=5,limitMobile:l=4,onSelectCard:u=()=>{},title:j="Urgent sale",showLessText:q="Show less",showMoreText:L="Show more",isLoading:g=!1,getImage:p=()=>{},negotiableText:f,freeText:b,onBookmark:h=()=>{},actionComponent:k,componentName:y,sponsoredText:C}=a,d=$.useDetectMobile(),[i,M]=s.useState(!1),U=s.useMemo(()=>{var o;return t.jsx(t.Fragment,{children:d===!0?(o=r==null?void 0:r.slice(0,i===!0?r==null?void 0:r.length:l))==null?void 0:o.map((e,m)=>t.jsx(S,{sellerName:e==null?void 0:e.sellerName,name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:f,freeText:b,onBookmark:h,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C},m)):r==null?void 0:r.slice(0,n).map((e,m)=>t.jsx(S,{name:e==null?void 0:e.name,price:e==null?void 0:e.price,sellingPrice:e==null?void 0:e.sellingPrice,isFree:e==null?void 0:e.isFree,isNegotiable:e==null?void 0:e.isNegotiable,currency:e==null?void 0:e.currency,categoryCode:e==null?void 0:e.categoryCode,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,location:e==null?void 0:e.location,sponsored:e==null?void 0:e.sponsored,onSelectCard:(v,c)=>u({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug,cardRef:c}),image:e==null?void 0:e.image,imageUrl:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null,imageComponent:e==null?void 0:e.imageComponent,negotiableText:f,freeText:b,onBookmark:h,actionComponent:k,bookmarked:e==null?void 0:e.bookmarked,bookmarkLists:e==null?void 0:e.bookmarkLists,metadata:{name:y,accessor:e==null?void 0:e.accessor},tags:e==null?void 0:e.tags,condition:e==null?void 0:e.condition,quantity:e==null?void 0:e.quantity,hasQuantities:e==null?void 0:e.hasQuantities,status:e==null?void 0:e.status,trade:e==null?void 0:e.trade,forCart:e==null?void 0:e.forCart,sponsoredText:C,sellerName:e==null?void 0:e.sellerName},m))})},[r,d,n,l,i]);return t.jsx(N.SuspenseDetailedProductCard,{isLoading:g,keyPrefix:"urgent-sale-products-skeleton",children:t.jsxs(F,{ref:P,limit:n,children:[t.jsxs("div",{className:"urgent-tag",children:[t.jsx("i",{className:"mng mng-lnc-bolt-filled"}),t.jsx("span",{children:j})]})," ",U," ",d===!0&&l<(r==null?void 0:r.length)&&!g&&t.jsx(T,{className:"show-more",btnType:"basic",type:"button",color:"neutral",onClick:o=>{var e;(e=o==null?void 0:o.target)==null||e.blur(),M(!i)},children:i===!0?q:L})]})})});module.exports=I;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as o, Fragment as $, jsxs as
|
|
1
|
+
import { jsx as o, Fragment as $, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import { memo as T, forwardRef as F, useState as I, useMemo as _ } from "react";
|
|
3
3
|
import { s as q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
4
4
|
import { M as B, S as D } from "./consts-BuFChS64.js";
|
|
@@ -97,7 +97,7 @@ const A = q.div`
|
|
|
97
97
|
},
|
|
98
98
|
actionComponent: b,
|
|
99
99
|
componentName: k,
|
|
100
|
-
sponsoredText:
|
|
100
|
+
sponsoredText: C
|
|
101
101
|
} = r, l = E(), [i, M] = I(!1), U = _(() => {
|
|
102
102
|
var t;
|
|
103
103
|
return /* @__PURE__ */ o($, { children: l === !0 ? (t = a == null ? void 0 : a.slice(0, i === !0 ? a == null ? void 0 : a.length : n)) == null ? void 0 : t.map((e, m) => /* @__PURE__ */ o(
|
|
@@ -135,7 +135,8 @@ const A = q.div`
|
|
|
135
135
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
136
136
|
status: e == null ? void 0 : e.status,
|
|
137
137
|
trade: e == null ? void 0 : e.trade,
|
|
138
|
-
|
|
138
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
139
|
+
sponsoredText: C
|
|
139
140
|
},
|
|
140
141
|
m
|
|
141
142
|
)) : a == null ? void 0 : a.slice(0, s).map((e, m) => /* @__PURE__ */ o(
|
|
@@ -173,7 +174,8 @@ const A = q.div`
|
|
|
173
174
|
hasQuantities: e == null ? void 0 : e.hasQuantities,
|
|
174
175
|
status: e == null ? void 0 : e.status,
|
|
175
176
|
trade: e == null ? void 0 : e.trade,
|
|
176
|
-
|
|
177
|
+
forCart: e == null ? void 0 : e.forCart,
|
|
178
|
+
sponsoredText: C,
|
|
177
179
|
sellerName: e == null ? void 0 : e.sellerName
|
|
178
180
|
},
|
|
179
181
|
m
|
|
@@ -184,8 +186,8 @@ const A = q.div`
|
|
|
184
186
|
{
|
|
185
187
|
isLoading: u,
|
|
186
188
|
keyPrefix: "urgent-sale-products-skeleton",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ y(A, { ref: w, limit: s, children: [
|
|
190
|
+
/* @__PURE__ */ y("div", { className: "urgent-tag", children: [
|
|
189
191
|
/* @__PURE__ */ o("i", { className: "mng mng-lnc-bolt-filled" }),
|
|
190
192
|
/* @__PURE__ */ o("span", { children: N })
|
|
191
193
|
] }),
|