-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path59098-ed1d6923c12ba1f.js.download
1 lines (1 loc) · 26.4 KB
/
59098-ed1d6923c12ba1f.js.download
1
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59098],{92521:function(e,t,n){var r,i;r=function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function i(e,n,i){var s;return(s="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"}).transition="all "+n+"ms "+i,s}e.configure=function(e){var n,r;for(n in e)void 0!==(r=e[n])&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var l=e.render(!o),u=l.querySelector(t.barSelector),d=t.speed,f=t.easing;return l.offsetWidth,s((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),a(u,i(r,d,f)),1===r?(a(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout((function(){a(l,{transition:"all "+d+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),d)}),d)):setTimeout(n,d)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){0===--n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var i=document.createElement("div");i.id="nprogress",i.innerHTML=t.template;var s,o=i.querySelector(t.barSelector),u=n?"-100":r(e.status||0),d=document.querySelector(t.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),t.showSpinner||(s=i.querySelector(t.spinnerSelector))&&f(s),d!=document.body&&l(d,"nprogress-custom-parent"),d.appendChild(i),i},e.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,i=e.length,s=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+s)in n)return r;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function s(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,r,i=arguments;if(2==i.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&s(e,n,r);else s(e,i[1],i[2])}}();function o(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function l(e,t){var n=d(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function u(e,t){var n,r=d(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e},void 0===(i="function"===typeof r?r.call(t,n,t,e):r)||(e.exports=i)},38926:function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=n(2784)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultWrapperStyle=t.defaultProps=t.defaultMenuStyle=void 0;var r={alignItems:"center",display:"flex",userSelect:"none"};t.defaultMenuStyle=r;var i={overflow:"hidden",userSelect:"none"};t.defaultWrapperStyle=i;var s={alignCenter:!0,alignOnResize:!0,arrowClass:"scroll-menu-arrow",arrowDisabledClass:"scroll-menu-arrow--disabled",arrowLeft:null,arrowRight:null,clickWhenDrag:!1,data:[],dragging:!0,hideArrows:!1,hideSingleArrow:!1,inertiaScrolling:!1,inertiaScrollingSlowdown:.25,innerWrapperClass:"menu-wrapper--inner",innerWrapperStyle:{textAlign:"left"},itemClass:"menu-item-wrapper",itemClassActive:"active",itemStyle:{display:"inline-block"},menuClass:"horizontal-menu",menuStyle:r,onFirstItemVisible:function(){return!1},onLastItemVisible:function(){return!1},onSelect:function(){return!1},onUpdate:function(){return!1},scrollBy:0,scrollToSelected:!1,selected:"",transition:.4,translate:0,useButtonRole:!0,wrapperClass:"menu-wrapper",wrapperStyle:i,wheel:!0,xPoint:0,disableTabindex:!1,rtl:!1};t.defaultProps=s},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(3));t.default=i.default},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&s(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollMenu=void 0;var l=o(n(0)),u=n(1),d=n(4),f=n(5),c=function(e){function t(t){var n=e.call(this,t)||this;return n.ref={},n.menuWrapper=null,n.menuInner=null,n.mounted=!1,n.needUpdate=!1,n.allItemsWidth=0,n.menuPos=0,n.menuWidth=0,n.wWidth=0,n.firstPageOffset=0,n.lastPageOffset=0,n.lastTranslateUpdate=0,n.menuItems=[],n.onLoadTimer=0,n.rafTimer=0,n.resizeTimer=0,n.frameId=0,n.data=null,n.dragHistory=[],n.state={dragging:!1,firstItemVisible:!0,lastItemVisible:!1,leftArrowVisible:!1,rightArrowVisible:!0,startDragTranslate:0,translate:n.props.translate,xDraggedDistance:0,xPoint:0},n.setRef=function(e){var t=Object.entries(e)[0],r=t[0],i=t[1];i.elem&&(n.ref[r]=i)},n.setMenuInnerRef=function(e){n.menuInner=e},n.setWrapperRef=function(e){n.menuWrapper=e},n.checkFirstLastItemVisibility=function(e){var t=e.translate,r=void 0===t?n.state.translate:t,i=n.menuItems,s=!0,a=!1;if(i){var o=n.getVisibleItems({offset:r});s=o.includes(i[0]),a=o.includes(i.slice(-1)[0])}return{firstItemVisible:s,lastItemVisible:a}},n.setFirstLastItemVisibility=function(){var e=n.state,t=e.firstItemVisible,r=e.lastItemVisible,i=n.checkFirstLastItemVisibility({}),s=i.firstItemVisible,a=i.lastItemVisible;if(t!==s||r!==a){var o=!s,l=!a;n.setState({firstItemVisible:s,lastItemVisible:a,leftArrowVisible:o,rightArrowVisible:l})}},n.onLoad=function(){n.setInitial(),n.mounted=!0},n.resizeHandler=function(){if(!n.props.alignOnResize)return!1;clearTimeout(n.resizeTimer),n.resizeTimer=setTimeout((function(){return n.resize()}),250)},n.resize=function(){var e=n.props.alignCenter;n.updateWidth({});var t=n.getVisibleItems({}),r=n.getOffsetToItemByIndex({index:t[0]&&t[0][1].index||0}),i=e?n.getCenterOffset({items:t}):0;n.setState({translate:-r+i}),n.setFirstLastItemVisibility()},n.setInitial=function(){var e=n.props,t=e.selected,r=e.data,s=e.translate,a=e.scrollToSelected,o=e.alignCenter,l=e.hideSingleArrow,f=n.state.translate;if(!r||!r.length)return!1;n.menuItems.length&&r===n.data||(n.menuItems=n.getMenuItems(),n.data=r),n.updateWidth({});var c=i({},n.state);(!n.mounted&&s===u.defaultProps.translate||!d.translateIsValid(s)&&!d.translateIsValid(f))&&(c.translate=o?n.firstPageOffset:u.defaultProps.translate);var m=n.checkFirstLastItemVisibility({translate:s}),p=m.firstItemVisible,g=m.lastItemVisible;c.firstItemVisible=p,c.lastItemVisible=g,c.leftArrowVisible=!l||!p,c.rightArrowVisible=!l||!g,a&&n.isScrollNeeded({itemId:t,translate:c.translate})&&(c.translate=n.getOffsetToItemByKey(t)),n.setState(i({},c))},n.isScrollNeeded=function(e){var t=e.itemId,r=e.translate,i=void 0===r?n.state.translate:r,s=n.getItemByKey(t);return!n.getVisibleItems({offset:i}).includes(s)},n.scrollTo=function(e){var t=n.state.translate,r=n.getOffsetToItemByKey(e);if(n.selected=e,t===r)return!1;n.setState({translate:r})},n.getMenuItems=function(){return Object.entries(n.ref).slice(0,n.props.data.length||0)},n.getItemsWidth=function(e){var t=e.items;return(void 0===t?n.menuItems:t).map((function(e){return e[1].elem})).filter(Boolean).reduce((function(e,t){return e+d.getClientRect(t).width}),0)},n.getWidth=function(e){var t=e.items,r=window&&window.innerWidth,i=d.getClientRect(n.menuWrapper);return{wWidth:r,menuPos:i.x,menuWidth:i.width,allItemsWidth:n.getItemsWidth({items:t})}},n.updateWidth=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=n.getWidth({items:r}),s=i.wWidth,a=i.menuPos,o=i.menuWidth,l=i.allItemsWidth,u=n.getPagesOffsets({allItemsWidth:l,items:r,menuWidth:o}),d=u.firstPageOffset,f=u.lastPageOffset;n.menuPos=a,n.wWidth=s,n.allItemsWidth=l,n.menuWidth=o,n.firstPageOffset=d,n.lastPageOffset=f},n.getFirstPageOffset=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=e.offset,s=void 0===i?n.state.translate:i,a=e.menuWidth,o=void 0===a?n.menuWidth:a,l=n.getVisibleItems({items:r,menuWidth:o,offset:s});return n.getCenterOffset({items:l,menuWidth:o})},n.getLastPageOffset=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=e.allItemsWidth,s=void 0===i?n.allItemsWidth:i,a=e.menuWidth,o=void 0===a?n.menuWidth:a,l=n.props.rtl,u=n.getVisibleItems({items:r,menuWidth:o,offset:l?s-o:-s+o});return n.getCenterOffset({items:u,menuWidth:o})},n.getPagesOffsets=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=e.allItemsWidth,s=void 0===i?n.allItemsWidth:i,a=e.menuWidth,o=void 0===a?n.menuWidth:a,l=e.offset,u=void 0===l?n.state.translate:l;return{firstPageOffset:n.getFirstPageOffset({items:r,menuWidth:o,offset:u}),lastPageOffset:n.getLastPageOffset({allItemsWidth:s,items:r,menuWidth:o})}},n.onItemClick=function(e){var t=n.props,r=t.clickWhenDrag,i=t.onSelect;if(n.state.xDraggedDistance>5&&!r)return!1;n.selected=e,i&&i(e)},n.getVisibleItems=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=e.menuWidth,s=void 0===i?n.menuWidth:i,a=e.offset,o=void 0===a?n.state.translate:a,l=e.translate,f=void 0===l?n.state.translate||u.defaultProps.translate:l;return r.filter((function(e){var t=d.getClientRect(e[1].elem).width,i=n.getItemInd(r,e),a=n.getOffsetToItemByIndex({index:i,menuItems:r,translate:f});return n.elemVisible({elWidth:t,menuWidth:s,offset:o,x:a})}))},n.elemVisible=function(e){var t=e.x,r=e.offset,i=void 0===r?0:r,s=e.elWidth,a=e.menuWidth,o=void 0===a?n.menuWidth:a,l=n.props.rtl,u=l?-(o+1):-1,d=l?1:o+1,f=l?-(t+i):t+i,c=l?f-s:f+s;return l?c>=u&&f<=d:f>=u&&c<=d},n.getItemInd=function(e,t){return void 0===e&&(e=n.menuItems),e&&t?e.findIndex((function(e){return e[0]===t[0]})):0},n.getNextItemInd=function(e,t){var r=n.menuItems;if(e){if(!t.length)return 0}else if(!t.length)return r.length;var i=e?n.getItemInd(r,t[0])-1:n.getItemInd(r,t.slice(-1)[0])+1;return i<0?0:i},n.getOffsetToItemByKey=function(e){var t=n.state.translate,r=n.getItemIndexByKey(e);if(-1===r)return t;var i=n.props,s=i.alignCenter,a=i.rtl;t=n.getOffsetToItemByIndex({index:r});var o=n.getVisibleItems({offset:-t}),l=s?n.getCenterOffset({items:o}):u.defaultProps.translate;return t=-(t-(a?-l:l)),n.itBeforeStart(t)?t=n.getOffsetAtStart():n.itAfterEnd(t)&&(t=n.getOffsetAtEnd()),t},n.getItemByKey=function(e){return n.menuItems.find((function(t){return t[1].key===e}))||["",{key:"n",elem:null,index:-1}]},n.getItemIndexByKey=function(e){return e?n.menuItems.findIndex((function(t){return t[1].key===e})):-1},n.getOffsetToItemByIndex=function(e){var t=e.index,r=e.menuItems,i=void 0===r?n.menuItems:r,s=e.translate,a=void 0===s?n.state.translate:s;if(!i.length)return 0;var o=t>=i.length?i.length-1:t,l=d.getClientRect(i[o][1].elem),u=l.x,f=l.x2;return n.props.rtl?n.menuPos+n.menuWidth-a-f:+u-a-n.menuPos},n.getScrollRightOffset=function(e,t){void 0===t&&(t=n.menuItems);var r=n.props,i=r.scrollBy,s=r.rtl,a=i?e[0][1].index+i:s?n.getPrevItem((e[0]&&e[0][1]||t[0][1]).key)[1].index:n.getNextItem((e.slice(-1)[0]&&e.slice(-1)||t.slice(-1))[0][1].key)[1].index,o=-n.getOffsetToItemByIndex({index:a,menuItems:t});return s?-o:o},n.getScrollLeftOffset=function(e,t){void 0===t&&(t=n.menuItems);var r=n.props,i=r.scrollBy,s=(r.rtl?n.getNextItem((e.slice(-1)[0]&&e.slice(-1)||t.slice(-1))[0][1].key):n.getPrevItem((e[0]&&e[0][1]||t[0][1]).key))[1].index-(i?i-1:e.length);return-n.getOffsetToItemByIndex({index:s<0?0:s,menuItems:t})},n.getNextItem=function(e){var t=n.menuItems;return t[t.findIndex((function(t){return t[1].key===e}))+1]||t.slice(-1)[0]},n.getPrevItem=function(e){var t=n.menuItems;return t[t.findIndex((function(t){return t[1].key===e}))-1]||t[0]},n.getOffset=function(e,t){void 0===t&&(t=n.menuItems),e=n.props.rtl?!e:e;var r=n.getVisibleItems({items:t});return e?n.getScrollLeftOffset(r,t):n.getScrollRightOffset(r,t)},n.getCenterOffset=function(e){var t=e.items,r=void 0===t?n.menuItems:t,i=e.menuWidth,s=void 0===i?n.menuWidth:i;return r.length?(s-n.getItemsWidth({items:r}))/2:0},n.handleWheel=function(e){if(!n.props.wheel)return!1;e.deltaY<0?n.handleArrowClick():n.handleArrowClick(!1)},n.getOffsetAtStart=function(){var e=n.firstPageOffset;return n.props.alignCenter?e:u.defaultProps.translate},n.getOffsetAtEnd=function(){var e=n.props.alignCenter,t=n,r=t.allItemsWidth,i=t.menuWidth,s=t.lastPageOffset,a=r-i;return e?-a-s:-a},n.handleArrowClickRight=function(){n.handleArrowClick(!1)},n.handleArrowClick=function(e){void 0===e&&(e=!0);var t=n.props,r=t.alignCenter,i=t.rtl,s=n,a=s.allItemsWidth,o=s.menuWidth;if(!r&&!e&&a<o)return!1;var l=0,d=n.getVisibleItems({}),f=d[0]&&0===d[0][1].index,c=d.slice(-1)[0]&&d.slice(-1)[0][1].index===n.menuItems.length-1,m=n.getOffset(e);if(e&&(f||n.itBeforeStart(m)))l=n.getOffsetAtStart();else if(e||!c&&!n.itAfterEnd(m)){var p=r?n.getCenterOffset({items:n.getVisibleItems({offset:m})}):0;l=m+(i?e?p+n.menuWidth:-p-n.menuWidth:p)}else l=n.getOffsetAtEnd();n.setState({startDragTranslate:0,translate:l,xDraggedDistance:0,xPoint:u.defaultProps.xPoint})},n.itBeforeStart=function(e){var t=n.props.alignCenter,r=n,i=r.menuWidth,s=r.allItemsWidth,a=r.firstPageOffset;return s<i||(t?e>a:e>u.defaultProps.translate)},n.itAfterEnd=function(e){var t=n.props.alignCenter,r=n,i=r.menuWidth,s=r.allItemsWidth,a=r.lastPageOffset;return s<i||(t?e<u.defaultProps.translate&&Math.abs(e)>s-i+a:e<u.defaultProps.translate&&Math.abs(e)>s-i)},n.getPoint=function(e){return"touches"in e?e.touches[0].clientX:"clientX"in e?e.clientX:0},n.handleDragStart=function(e){if(e&&"buttons"in e&&2===e.buttons)return!1;if(!n.props.dragging)return!1;var t=n.state.translate;n.dragHistory=[{time:Date.now(),position:t}],n.setState({dragging:!0,startDragTranslate:t,xDraggedDistance:0,xPoint:0})},n.handleDragWrapper=function(e){n.handleDrag(e)},n.handleDrag=function(e){var t=n.props,r=t.dragging,i=t.rtl,s=n.state,a=s.translate,o=s.dragging,l=s.xPoint,d=s.xDraggedDistance;if(!r||!o)return!1;var f=n.getPoint(e),c=l===u.defaultProps.xPoint?u.defaultProps.xPoint:l-f,m=a-(i?-c:c);n.itBeforeStart(m)?m-=Math.abs(c)/2:n.itAfterEnd(m)&&(m+=Math.abs(c)/2),0!==c&&n.dragHistory.push({time:Date.now(),position:m});var p=m;n.setState({translate:p,xDraggedDistance:d+Math.abs(c),xPoint:f})},n.handleDragStopWrapper=function(e){n.handleDragStop(e)},n.handleDragStop=function(e){var t=n,r=t.allItemsWidth,i=t.menuWidth,s=n.state,a=s.translate,o=s.xPoint,l=void 0===o?n.getPoint(e):o,d=n.state,f=d.dragging,c=d.startDragTranslate,m=n.props,p=m.dragging,g=m.alignCenter;if(!p||!f)return!1;if(n.props.inertiaScrolling){var h=Date.now(),v=n.dragHistory.filter((function(e){return h-e.time<150}));if(v.length>2){var I=v[0],y=v[v.length-1],b=(y.position-I.position)/(y.time-I.time);a+=(b*=n.props.inertiaScrollingSlowdown)*(1e3*n.props.transition)}}var S=a;n.itBeforeStart(a)?(S=n.getOffsetAtStart(),l=u.defaultProps.xPoint):n.itAfterEnd(a)&&(S=n.getOffsetAtEnd(),l=u.defaultProps.xPoint),!g&&r<=i&&(S=u.defaultProps.translate,l=u.defaultProps.xPoint),n.setState({dragging:!1,translate:S,xPoint:l},(function(){return n.onUpdate({translate:S,translateOld:c})}))},n.isArrowsVisible=function(){var e=n,t=e.allItemsWidth,r=e.menuWidth,i=e.props.hideArrows;return!Boolean(i&&t<=r)},n.onUpdate=function(e){var t=e.translate,r=void 0===t?n.state.translate:t,i=e.translateOld,s=void 0===i?n.state.translate:i,a=n.props.onUpdate,o=n.lastTranslateUpdate;r!==s&&r!==o&&(n.lastTranslateUpdate=r,"function"==typeof a&&a({translate:r}))},n.selected=String(t.selected)||"",n}return r(t,e),t.prototype.componentDidCatch=function(e,t){console.log("ScrollMenu catched error: ",e,t)},t.prototype.componentDidMount=function(){var e=this;this.setInitial(),window.requestAnimationFrame=window.requestAnimationFrame||function(){return!1},window.addEventListener("load",this.onLoad),window.addEventListener("resize",this.resizeHandler),document.addEventListener("mousemove",this.handleDragWrapper),document.addEventListener("mouseup",this.handleDragStopWrapper),this.onLoadTimer=setTimeout((function(){return e.onLoad(),e.forceUpdate()}),0)},t.prototype.shouldComponentUpdate=function(e,t){var n=this.state,r=n.translate,i=n.dragging,s=n.firstItemVisible,a=n.lastItemVisible,o=t.translate,l=t.dragging,u=t.firstItemVisible,f=t.lastItemVisible,c=this.props,m=c.translate,p=c.selected,g=c.scrollToSelected,h=e.translate,v=e.selected,I=d.notUndefOrNull(h)&&m!==h,y=h!==o||r!==o||I,b=d.notUndefOrNull(v)&&p!==v,S=b||this.selected!==v,W=y||S,w=s!==u,P=a!==f,O=o,C=this.props.data!==e.data||this.props.data.length!==e.data.length,x=d.translateIsValid(h)&&I&&!C;return(C||g&&b)&&(this.needUpdate=!0),W&&(b&&(this.selected=v),x&&(O=h)),x&&this.setState({translate:+O}),C||y||i!==l||W||w||P},t.prototype.componentDidUpdate=function(e,t){var n=this;this.needUpdate&&(this.needUpdate=!1,this.onLoad());var r=t.translate,i=this.state,s=i.translate;i.dragging||r===s||this.onUpdate({translate:s,translateOld:r});var a=this.checkFirstLastItemVisibility({translate:s}),o=a.firstItemVisible,l=a.lastItemVisible,u=this.props,d=u.onFirstItemVisible,f=u.onLastItemVisible;o&&d(),l&&f();var c=this.props,m=c.hideSingleArrow,p=c.transition;m&&(cancelAnimationFrame(this.frameId),clearTimeout(this.rafTimer),this.frameId=requestAnimationFrame(this.setFirstLastItemVisibility),this.rafTimer=setTimeout((function(){cancelAnimationFrame(n.frameId),n.frameId=requestAnimationFrame(n.setFirstLastItemVisibility)}),1e3*p+10))},t.prototype.componentWillUnmount=function(){window.removeEventListener("load",this.onLoad),window.removeEventListener("resize",this.resizeHandler),document.removeEventListener("mousemove",this.handleDragWrapper),document.removeEventListener("mouseup",this.handleDragStopWrapper),clearTimeout(this.rafTimer),clearTimeout(this.onLoadTimer),clearTimeout(this.resizeTimer),cancelAnimationFrame(this.frameId)},t.prototype.render=function(){var e=this.props,t=e.arrowClass,n=e.arrowDisabledClass,r=e.arrowLeft,s=e.arrowRight,a=e.data,o=e.inertiaScrolling,d=e.innerWrapperStyle,c=e.innerWrapperClass,m=e.itemStyle,p=e.itemClass,g=e.itemClassActive,h=e.menuStyle,v=e.menuClass,I=e.transition,y=e.useButtonRole,b=e.wrapperClass,S=e.wrapperStyle,W=e.disableTabindex,w=e.rtl,P=this.state,O=P.translate,C=P.dragging,x=P.leftArrowVisible,T=P.rightArrowVisible,_=this.selected,k=this.mounted;if(!a||!a.length)return null;var V=!k||this.isArrowsVisible(),A=i(i({},u.defaultMenuStyle),h),D=i(i({},u.defaultWrapperStyle),S),M=i(i({},u.defaultProps.itemStyle),m),E={className:t,disabledClass:n};return l.createElement("div",{className:v,style:A,onWheel:this.handleWheel},r&&l.createElement(f.ArrowWrapper,i({},E,{isDisabled:!V||!x,onClick:this.handleArrowClick}),r),l.createElement("div",{className:b,style:D,ref:this.setWrapperRef,onMouseDown:this.handleDragStart,onTouchStart:this.handleDragStart,onTouchEnd:this.handleDragStop,onMouseMove:this.handleDrag,onTouchMove:this.handleDrag},l.createElement(f.InnerWrapper,{disableTabindex:W,data:a,translate:O,dragging:C,mounted:k,transition:k?I:0,selected:_,setRef:this.setRef,setMenuInnerRef:this.setMenuInnerRef,onClick:this.onItemClick,innerWrapperStyle:d,innerWrapperClass:c,itemStyle:M,itemClass:p,itemClassActive:g,inertiaScrolling:o,useButtonRole:y,rtl:w})),s&&l.createElement(f.ArrowWrapper,i({},E,{isDisabled:!V||!T,onClick:this.handleArrowClickRight}),s))},t.defaultProps=u.defaultProps,t}(l.Component);t.ScrollMenu=c,t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTranslate=t.translateIsValid=t.validateTranslate=t.getClientRect=t.notUndefOrNull=void 0,t.notUndefOrNull=function(e){return void 0!==e&&null!==e},t.getClientRect=function(e){if(!e||!e.getBoundingClientRect||"function"!=typeof e.getBoundingClientRect)return{width:0,x:0,x2:0};var t=e.getBoundingClientRect(),n=t.left,r=void 0===n?0:n,i=t.width,s=void 0===i?0:i,a=t.right;return{width:s,x:+r,x2:+(void 0===a?0:a)}},t.formatTranslate=function(e){return+e.toFixed(0)};var r=function(e){return"number"==typeof e&&!isNaN(+e)};t.translateIsValid=r,t.validateTranslate=function(e,t){return r(e)?+e:t}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InnerWrapper=t.innerStyle=t.ArrowWrapper=void 0;var a=s(n(0)),o=n(1),l={disabledClass:o.defaultProps.arrowDisabledClass},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.isDisabled,n=e.className,r=e.disabledClass,i=e.onClick,s=e.children,o=n+" "+(t?r:"");return a.default.createElement("div",{className:o,onClick:function(){return i()}},a.default.cloneElement(s,s.props))},t.defaultProps=l,t}(a.default.PureComponent);t.ArrowWrapper=u,t.innerStyle=function(e){var t=e.translate,n=e.dragging,r=e.mounted,i=e.transition,s=e.inertiaScrolling;return{transform:"translate3d("+(e.rtl?-t:t)+"px, 0, 0)",transition:"transform "+(n||!r?"0":i)+"s"+(s?" ease-out":""),width:"990000px"}};var d=function(e){function n(t){var n=e.call(this,t)||this;return n.setMenuInnerRef=function(e){(0,n.props.setMenuInnerRef)({menuInner:{key:"menuInner",elem:e}})},n.setRef=function(e,t,r,i){var s;(0,n.props.setRef)(((s={})[e]={index:r,key:t,elem:i},s))},n.state={data:[],items:[],selected:""},n}return r(n,e),n.getDerivedStateFromProps=function(e,t){return t.data!==e.data||t.selected!==e.selected?{data:e.data,items:n.setItems(e.data,e.selected,e.onClick),selected:e.selected}:null},n.prototype.render=function(){var e=this,n=this.props,r=n.translate,s=n.dragging,o=n.mounted,l=n.transition,u=n.innerWrapperStyle,d=n.innerWrapperClass,f=n.itemStyle,c=n.itemClass,m=n.itemClassActive,p=n.inertiaScrolling,g=n.useButtonRole,h=n.disableTabindex,v=n.rtl,I=t.innerStyle({dragging:s,inertiaScrolling:p,mounted:o,rtl:v,transition:l,translate:r}),y=i(i({},I),u);return a.default.createElement("div",{className:d,style:y,ref:function(t){return e.setMenuInnerRef(t)}},this.state.items.map((function(t,n){return a.default.createElement("div",{ref:function(r){return e.setRef("menuitem-"+n,String(t.key||""),n,r)},className:c+" "+(t.props.selected?m:""),key:"menuItem-"+t.key,style:f,onClick:t.props.onClick(),tabIndex:h?void 0:0,role:g?"button":void 0},t)})))},n.defaultProps={data:[],dragging:!0,mounted:!1,selected:o.defaultProps.selected,transition:o.defaultProps.transition,translate:o.defaultProps.translate},n.isElementActive=function(e,t){return String(e)===String(t)},n.setItems=function(e,t,r){return e.map((function(e){var i=e.props.onClick,s=void 0===i?function(){return!1}:i,o={onClick:function(){return n.forwardClickHandler(e.key,s,r)},selected:n.isElementActive(e.key,t)};return a.default.cloneElement(e,o)}))},n.forwardClickHandler=function(e,t,n){return void 0===t&&(t=function(){return!1}),function(){t(),n(e)}},n}(a.default.PureComponent);t.InnerWrapper=d}])},32228:function(e,t){"use strict";t.Z=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}},53733:function(e,t,n){"use strict";var r=n(32228),i=n(56493),s=n(64644),a=(0,i.Z)((function(e,t,n){return(0,r.Z)(e,(0,s.Z)(t)||0,n)}));t.Z=a}}]);