-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10-96da8ee5fbb248fed845.js
2 lines (2 loc) · 28.9 KB
/
10-96da8ee5fbb248fed845.js
1
2
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{165:function(e,t,o){"use strict";(function(e){var n=o(0),r=o.n(n),i=o(166),s=o(4),l=o.n(s),a=o(167);function c(e,t){var o,n=(o=e,!isNaN(parseFloat(o))&&isFinite(o)?parseFloat(o):"px"===o.slice(-2)?parseFloat(o.slice(0,-2)):void 0);if("number"==typeof n)return n;var r=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof r?r*t:void 0}var u={above:"above",inside:"inside",below:"below",invisible:"invisible"};var f="<Waypoint> expected to receive a single React element child.\n\nSee https://goo.gl/LrBNgw for more info.";function p(e){if(e)try{r.a.Children.only(e)}catch(t){throw new Error(f)}}function d(e){return"string"==typeof e.type}var h="<Waypoint> needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. <div>) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.";var v=void 0,y=[];function m(e){y.push(e),v||(v=setTimeout(function(){v=null;for(var e=void 0;e=y.shift();)e()},0));var t=!0;return function(){return function(){if(t){t=!1;var o=y.indexOf(e);-1!==o&&(y.splice(o,1),!y.length&&v&&(clearTimeout(v),v=null))}}}()}var b=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var g={topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){return function(){}}(),onLeave:function(){return function(){}}(),onPositionChange:function(){return function(){}}(),fireOnRapidScroll:!0},w=void 0!==r.a.PureComponent?r.a.PureComponent:r.a.Component,S=function(t){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return t.refElement=function(e){return t._ref=e},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,w),b(o,[{key:"componentWillMount",value:function(){return function(){p(this.props.children)}}()},{key:"componentDidMount",value:function(){return function(){var e=this;o.getWindow()&&(this.cancelOnNextTick=m(function(){e.cancelOnNextTick=null,function(e,t){if(e&&!d(e)&&!t)throw new Error(h)}(e.props.children,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=Object(i.a)(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=Object(i.a)(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)}))}}()},{key:"componentWillReceiveProps",value:function(){return function(e){p(e.children)}}()},{key:"componentDidUpdate",value:function(){return function(){var e=this;o.getWindow()&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=m(function(){e.cancelOnNextTick=null,e._handleScroll(null)})))}}()},{key:"componentWillUnmount",value:function(){return function(){o.getWindow()&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())}}()},{key:"_findScrollableAncestor",value:function(){return function(){var t=this.props,o=t.horizontal,n=t.scrollableAncestor;if(n)return function(t){return"window"===t?e.window:t}(n);for(var r=this._ref;r.parentNode;){if((r=r.parentNode)===document.body)return window;var i=window.getComputedStyle(r),s=(o?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===s||"scroll"===s)return r}return window}}()},{key:"_handleScroll",value:function(){return function(e){if(this._ref){var t=this._getBounds(),o=function(e){return e.viewportBottom-e.viewportTop==0?u.invisible:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom?u.inside:e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom?u.inside:e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?u.inside:e.viewportBottom<e.waypointTop?u.below:e.waypointTop<e.viewportTop?u.above:u.invisible}(t),n=this._previousPosition;if(this._previousPosition=o,n!==o){var r={currentPosition:o,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom};this.props.onPositionChange.call(this,r),o===u.inside?this.props.onEnter.call(this,r):n===u.inside&&this.props.onLeave.call(this,r);var i=n===u.below&&o===u.above,s=n===u.above&&o===u.below;this.props.fireOnRapidScroll&&(i||s)&&(this.props.onEnter.call(this,{currentPosition:u.inside,previousPosition:n,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}),this.props.onLeave.call(this,{currentPosition:o,previousPosition:u.inside,event:e,waypointTop:t.waypointTop,waypointBottom:t.waypointBottom,viewportTop:t.viewportTop,viewportBottom:t.viewportBottom}))}}}}()},{key:"_getBounds",value:function(){return function(){var e=this.props.horizontal,t=this._ref.getBoundingClientRect(),o=t.left,n=t.top,r=t.right,i=t.bottom,s=e?o:n,l=e?r:i,a=void 0,u=void 0;this.scrollableAncestor===window?(a=e?window.innerWidth:window.innerHeight,u=0):(a=e?this.scrollableAncestor.offsetWidth:this.scrollableAncestor.offsetHeight,u=e?this.scrollableAncestor.getBoundingClientRect().left:this.scrollableAncestor.getBoundingClientRect().top);var f=this.props,p=f.bottomOffset;return{waypointTop:s,waypointBottom:l,viewportTop:u+c(f.topOffset,a),viewportBottom:u+a-c(p,a)}}}()},{key:"render",value:function(){return function(){var e=this,t=this.props.children;if(!t)return r.a.createElement("span",{ref:this.refElement,style:{fontSize:0}});if(d(t)||Object(a.isForwardRef)(t.type)){var o=function(o){e.refElement(o),t.ref&&("function"==typeof t.ref?t.ref(o):t.ref.current=o)};return r.a.cloneElement(t,{ref:o})}return r.a.cloneElement(t,{innerRef:this.refElement})}}()}]),o}();S.propTypes={children:l.a.node,debug:l.a.bool,onEnter:l.a.func,onLeave:l.a.func,onPositionChange:l.a.func,fireOnRapidScroll:l.a.bool,scrollableAncestor:l.a.any,horizontal:l.a.bool,topOffset:l.a.oneOfType([l.a.string,l.a.number]),bottomOffset:l.a.oneOfType([l.a.string,l.a.number])},S.above=u.above,S.below=u.below,S.inside=u.inside,S.invisible=u.invisible,S.getWindow=function(){if("undefined"!=typeof window)return window},S.defaultProps=g,S.displayName="Waypoint",t.a=S}).call(this,o(74))},166:function(e,t,o){"use strict";o.d(t,"a",function(){return c});var n=!("undefined"==typeof window||!window.document||!window.document.createElement);var r=void 0;function i(){return void 0===r&&(r=function(){if(!n)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),o=function(){};window.addEventListener("testPassiveEventSupport",o,t),window.removeEventListener("testPassiveEventSupport",o,t)}catch(r){}return e}()),r}function s(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function l(e){this.target=e,this.events={}}l.prototype.getEventHandlers=function(){return function(e,t){var o,n=String(e)+" "+String((o=t)?!0===o?100:(o.capture<<0)+(o.passive<<1)+(o.once<<2):0);return this.events[n]||(this.events[n]={handlers:[],handleEvent:void 0},this.events[n].nextHandlers=this.events[n].handlers),this.events[n]}}(),l.prototype.handleEvent=function(){return function(e,t,o){var n=this.getEventHandlers(e,t);n.handlers=n.nextHandlers,n.handlers.forEach(function(e){e&&e(o)})}}(),l.prototype.add=function(){return function(e,t,o){var n=this,r=this.getEventHandlers(e,o);s(r),0===r.nextHandlers.length&&(r.handleEvent=this.handleEvent.bind(this,e,o),this.target.addEventListener(e,r.handleEvent,o)),r.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,s(r);var l=r.nextHandlers.indexOf(t);r.nextHandlers.splice(l,1),0===r.nextHandlers.length&&(n.target&&n.target.removeEventListener(e,r.handleEvent,o),r.handleEvent=void 0)}}}}();var a="__consolidated_events_handlers__";function c(e,t,o,n){e[a]||(e[a]=new l(e));var r=function(e){if(e)return i()?e:!!e.capture}(n);return e[a].add(t,o,r)}},167:function(e,t,o){"use strict";e.exports=o(168)},168:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,l=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,f=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,v=n?Symbol.for("react.memo"):60115,y=n?Symbol.for("react.lazy"):60116;function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case f:case p:case s:case a:case l:case h:return e;default:switch(e=e&&e.$$typeof){case u:case d:case c:return e;default:return t}}case y:case v:case i:return t}}}function b(e){return m(e)===p}t.typeOf=m,t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=u,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=s,t.Lazy=y,t.Memo=v,t.Portal=i,t.Profiler=a,t.StrictMode=l,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===p||e===a||e===l||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===d)},t.isAsyncMode=function(e){return b(e)||m(e)===f},t.isConcurrentMode=b,t.isContextConsumer=function(e){return m(e)===u},t.isContextProvider=function(e){return m(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return m(e)===d},t.isFragment=function(e){return m(e)===s},t.isLazy=function(e){return m(e)===y},t.isMemo=function(e){return m(e)===v},t.isPortal=function(e){return m(e)===i},t.isProfiler=function(e){return m(e)===a},t.isStrictMode=function(e){return m(e)===l},t.isSuspense=function(e){return m(e)===h}},169:function(e,t,o){"use strict";var n=o(8);t.__esModule=!0,t.default=void 0;var r,i=n(o(7)),s=n(o(34)),l=n(o(76)),a=n(o(75)),c=n(o(0)),u=n(o(4)),f=function(e){var t=(0,a.default)({},e);return t.resolutions&&(t.fixed=t.resolutions,delete t.resolutions),t.sizes&&(t.fluid=t.sizes,delete t.sizes),t},p=Object.create({}),d=function(e){var t=f(e),o=t.fluid?t.fluid.src:t.fixed.src;return p[o]||!1},h=new WeakMap;var v=function(e,t){var o=(void 0===r&&"undefined"!=typeof window&&window.IntersectionObserver&&(r=new window.IntersectionObserver(function(e){e.forEach(function(e){if(h.has(e.target)){var t=h.get(e.target);(e.isIntersecting||e.intersectionRatio>0)&&(r.unobserve(e.target),h.delete(e.target),t())}})},{rootMargin:"200px"})),r);return o&&(o.observe(e),h.set(e,t)),function(){o.unobserve(e),h.delete(e)}},y=function(e){var t=e.src?'src="'+e.src+'" ':'src="" ',o=e.sizes?'sizes="'+e.sizes+'" ':"",n=e.srcSetWebp?"<source type='image/webp' srcset=\""+e.srcSetWebp+'" '+o+"/>":"",r=e.srcSet?'srcset="'+e.srcSet+'" ':"",i=e.title?'title="'+e.title+'" ':"",s=e.alt?'alt="'+e.alt+'" ':'alt="" ';return"<picture>"+n+"<img "+(e.width?'width="'+e.width+'" ':"")+(e.height?'height="'+e.height+'" ':"")+o+r+t+s+i+(e.crossOrigin?'crossorigin="'+e.crossOrigin+'" ':"")+'style="position:absolute;top:0;left:0;opacity:1;width:100%;height:100%;object-fit:cover;object-position:center"/></picture>'},m=c.default.forwardRef(function(e,t){var o=e.sizes,n=e.srcSet,r=e.src,i=e.style,s=e.onLoad,u=e.onError,f=(0,l.default)(e,["sizes","srcSet","src","style","onLoad","onError"]);return c.default.createElement("img",(0,a.default)({sizes:o,srcSet:n,src:r},f,{onLoad:s,onError:u,ref:t,style:(0,a.default)({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"},i)}))});m.propTypes={style:u.default.object,onError:u.default.func,onLoad:u.default.func};var b=function(e){function t(t){var o;o=e.call(this,t)||this;var n=!0,r=!1,i=t.fadeIn,l=d(t);!l&&"undefined"!=typeof window&&window.IntersectionObserver&&(n=!1,r=!0),"undefined"==typeof window&&(n=!1),t.critical&&(n=!0,r=!1);var a=!(t.critical&&!t.fadeIn);return o.state={isVisible:n,imgLoaded:!1,imgCached:!1,IOSupported:r,fadeIn:i,hasNoScript:a,seenBefore:l},o.imageRef=c.default.createRef(),o.handleImageLoaded=o.handleImageLoaded.bind((0,s.default)((0,s.default)(o))),o.handleRef=o.handleRef.bind((0,s.default)((0,s.default)(o))),o}(0,i.default)(t,e);var o=t.prototype;return o.componentDidMount=function(){if(this.state.isVisible&&"function"==typeof this.props.onStartLoad&&this.props.onStartLoad({wasCached:d(this.props)}),this.props.critical){var e=this.imageRef.current;e&&e.complete&&this.handleImageLoaded()}},o.componentWillUnmount=function(){this.cleanUpListeners&&this.cleanUpListeners()},o.handleRef=function(e){var t=this;this.state.IOSupported&&e&&(this.cleanUpListeners=v(e,function(){var e=d(t.props);t.state.isVisible||"function"!=typeof t.props.onStartLoad||t.props.onStartLoad({wasCached:e}),t.setState({isVisible:!0},function(){return t.setState({imgLoaded:e,imgCached:!!t.imageRef.current.currentSrc})})}))},o.handleImageLoaded=function(){var e,t,o;e=this.props,t=f(e),o=t.fluid?t.fluid.src:t.fixed.src,p[o]=!0,this.setState({imgLoaded:!0}),this.state.seenBefore&&this.setState({fadeIn:!1}),this.props.onLoad&&this.props.onLoad()},o.render=function(){var e=f(this.props),t=e.title,o=e.alt,n=e.className,r=e.style,i=void 0===r?{}:r,s=e.imgStyle,l=void 0===s?{}:s,u=e.placeholderStyle,p=void 0===u?{}:u,d=e.placeholderClassName,h=e.fluid,v=e.fixed,b=e.backgroundColor,g=e.Tag,w=e.itemProp,S=this.state.imgLoaded||!1===this.state.fadeIn,E=!0===this.state.fadeIn&&!this.state.imgCached,_=(0,a.default)({opacity:S?1:0,transition:E?"opacity 0.5s":"none"},l),T="boolean"==typeof b?"lightgray":b,O={transitionDelay:"0.5s"},L=(0,a.default)({opacity:this.state.imgLoaded?0:1},E&&O,l,p),P={title:t,alt:this.state.isVisible?"":o,style:L,className:d};if(h){var x=h;return c.default.createElement(g,{className:(n||"")+" gatsby-image-wrapper",style:(0,a.default)({position:"relative",overflow:"hidden"},i),ref:this.handleRef,key:"fluid-"+JSON.stringify(x.srcSet)},c.default.createElement(g,{style:{width:"100%",paddingBottom:100/x.aspectRatio+"%"}}),T&&c.default.createElement(g,{title:t,style:(0,a.default)({backgroundColor:T,position:"absolute",top:0,bottom:0,opacity:this.state.imgLoaded?0:1,right:0,left:0},E&&O)}),x.base64&&c.default.createElement(m,(0,a.default)({src:x.base64},P)),x.tracedSVG&&c.default.createElement(m,(0,a.default)({src:x.tracedSVG},P)),this.state.isVisible&&c.default.createElement("picture",null,x.srcSetWebp&&c.default.createElement("source",{type:"image/webp",srcSet:x.srcSetWebp,sizes:x.sizes}),c.default.createElement(m,{alt:o,title:t,sizes:x.sizes,src:x.src,crossOrigin:this.props.crossOrigin,srcSet:x.srcSet,style:_,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:w})),this.state.hasNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:y((0,a.default)({alt:o,title:t},x))}}))}if(v){var k=v,B=(0,a.default)({position:"relative",overflow:"hidden",display:"inline-block",width:k.width,height:k.height},i);return"inherit"===i.display&&delete B.display,c.default.createElement(g,{className:(n||"")+" gatsby-image-wrapper",style:B,ref:this.handleRef,key:"fixed-"+JSON.stringify(k.srcSet)},T&&c.default.createElement(g,{title:t,style:(0,a.default)({backgroundColor:T,width:k.width,opacity:this.state.imgLoaded?0:1,height:k.height},E&&O)}),k.base64&&c.default.createElement(m,(0,a.default)({src:k.base64},P)),k.tracedSVG&&c.default.createElement(m,(0,a.default)({src:k.tracedSVG},P)),this.state.isVisible&&c.default.createElement("picture",null,k.srcSetWebp&&c.default.createElement("source",{type:"image/webp",srcSet:k.srcSetWebp,sizes:k.sizes}),c.default.createElement(m,{alt:o,title:t,width:k.width,height:k.height,sizes:k.sizes,src:k.src,crossOrigin:this.props.crossOrigin,srcSet:k.srcSet,style:_,ref:this.imageRef,onLoad:this.handleImageLoaded,onError:this.props.onError,itemProp:w})),this.state.hasNoScript&&c.default.createElement("noscript",{dangerouslySetInnerHTML:{__html:y((0,a.default)({alt:o,title:t},k))}}))}return null},t}(c.default.Component);b.defaultProps={critical:!1,fadeIn:!0,alt:"",Tag:"div"};var g=u.default.shape({width:u.default.number.isRequired,height:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string}),w=u.default.shape({aspectRatio:u.default.number.isRequired,src:u.default.string.isRequired,srcSet:u.default.string.isRequired,sizes:u.default.string.isRequired,base64:u.default.string,tracedSVG:u.default.string,srcWebp:u.default.string,srcSetWebp:u.default.string});b.propTypes={resolutions:g,sizes:w,fixed:g,fluid:w,fadeIn:u.default.bool,title:u.default.string,alt:u.default.string,className:u.default.oneOfType([u.default.string,u.default.object]),critical:u.default.bool,crossOrigin:u.default.oneOfType([u.default.string,u.default.bool]),style:u.default.object,imgStyle:u.default.object,placeholderStyle:u.default.object,placeholderClassName:u.default.string,backgroundColor:u.default.oneOfType([u.default.string,u.default.bool]),onLoad:u.default.func,onError:u.default.func,onStartLoad:u.default.func,Tag:u.default.string,itemProp:u.default.string};var S=b;t.default=S},170:function(e,t,o){"use strict";var n=o(8);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(75)),i=n(o(36)),s=n(o(171)),l=n(o(175)),a=n(o(176)),c=n(o(178)),u=n(o(34)),f=n(o(179)),p=n(o(180)),d=n(o(4)),h=n(o(0)),v=n(o(182)),y=n(o(183));var m=function(e){function t(e){var o;return(0,l.default)(this,t),(o=(0,a.default)(this,(0,c.default)(t).call(this,e))).state={targetItems:[],inViewState:[],isScrolledPast:[]},o._handleSpy=o._handleSpy.bind((0,u.default)(o)),o}return(0,p.default)(t,e),(0,f.default)(t,null,[{key:"propTypes",get:function(){return{items:d.default.arrayOf(d.default.string).isRequired,currentClassName:d.default.string.isRequired,scrolledPastClassName:d.default.string,style:d.default.object,componentTag:d.default.oneOfType([d.default.string,d.default.func]),offset:d.default.number,rootEl:d.default.string,onUpdate:d.default.func}}},{key:"defaultProps",get:function(){return{items:[],currentClassName:"",style:{},componentTag:"ul",offset:0,onUpdate:function(){}}}}]),(0,f.default)(t,[{key:"_initSpyTarget",value:function(e){return e.map(function(e){return document.getElementById(e)})}},{key:"_fillArray",value:function(e,t){for(var o=[],n=0,r=e.length;n<r;n++)o[n]=t;return o}},{key:"_isScrolled",value:function(){return this._getScrollDimension().scrollTop>0}},{key:"_getScrollDimension",value:function(){var e=document,t=this.props.rootEl;return{scrollTop:t?e.querySelector(t).scrollTop:e.documentElement.scrollTop||e.body.parentNode.scrollTop||e.body.scrollTop,scrollHeight:t?e.querySelector(t).scrollHeight:e.documentElement.scrollHeight||e.body.parentNode.scrollHeight||e.body.scrollHeight}}},{key:"_getElemsViewState",value:function(e){for(var t=[],o=[],n=[],r=e||this.state.targetItems,i=!1,l=0,a=r.length;l<a;l++){var c=r[l],u=!i&&this._isInView(c);u?(i=!0,t.push(c)):o.push(c);var f=l===a-1,p=this._isScrolled();this._isAtBottom()&&this._isInView(c)&&!u&&f&&p&&(o.pop(),o.push.apply(o,(0,s.default)(t)),t=[c],n=this._fillArray(n,!1),u=!0),n.push(u)}return{inView:t,outView:o,viewStatusList:n,scrolledPast:this.props.scrolledPastClassName&&this._getScrolledPast(n)}}},{key:"_isInView",value:function(e){if(!e)return!1;var t,o=this.props,n=o.rootEl,r=o.offset;n&&(t=document.querySelector(n).getBoundingClientRect());var i=e.getBoundingClientRect(),s=n?t.height:window.innerHeight,l=this._getScrollDimension().scrollTop,a=l+s,c=n?i.top+l-t.top+r:i.top+l+r,u=c+e.offsetHeight;return c<a&&u>l}},{key:"_isAtBottom",value:function(){var e=this.props.rootEl,t=this._getScrollDimension(),o=t.scrollTop,n=t.scrollHeight;return o+(e?document.querySelector(e).getBoundingClientRect().height:window.innerHeight)>=n}},{key:"_getScrolledPast",value:function(e){if(!e.some(function(e){return e}))return e;var t=!1;return e.map(function(e){return e&&!t?(t=!0,!1):!t})}},{key:"_spy",value:function(e){var t=this,o=this._getElemsViewState(e),n=this.state.inViewState;this.setState({inViewState:o.viewStatusList,isScrolledPast:o.scrolledPast},function(){t._update(n)})}},{key:"_update",value:function(e){var t,o;(t=this.state.inViewState,o=e,t.length===o.length&&t.every(function(e,t){return e===o[t]}))||this.props.onUpdate(this.state.targetItems[this.state.inViewState.indexOf(!0)])}},{key:"_handleSpy",value:function(){(0,y.default)(this._spy(),100)}},{key:"_initFromProps",value:function(){var e=this._initSpyTarget(this.props.items);this.setState({targetItems:e}),this._spy(e)}},{key:"offEvent",value:function(){(this.props.rootEl?document.querySelector(this.props.rootEl):window).removeEventListener("scroll",this._handleSpy)}},{key:"onEvent",value:function(){(this.props.rootEl?document.querySelector(this.props.rootEl):window).addEventListener("scroll",this._handleSpy)}},{key:"componentDidMount",value:function(){this._initFromProps(),this.onEvent()}},{key:"componentWillUnmount",value:function(){this.offEvent()}},{key:"componentWillReceiveProps",value:function(){this._initFromProps()}},{key:"render",value:function(){var e=this,t=this.props.componentTag,o=this.props,n=o.children,s=o.className,l=o.scrolledPastClassName,a=o.style,c=0,u=h.default.Children.map(n,function(t,o){var n;if(!t)return null;var s=t.type,a=l&&e.state.isScrolledPast[o],u=(0,v.default)((n={},(0,i.default)(n,"".concat(t.props.className),t.props.className),(0,i.default)(n,"".concat(e.props.currentClassName),e.state.inViewState[o]),(0,i.default)(n,"".concat(e.props.scrolledPastClassName),a),n));return h.default.createElement(s,(0,r.default)({},t.props,{className:u,key:c++}),t.props.children)}),f=(0,v.default)((0,i.default)({},"".concat(s),s));return h.default.createElement(t,{className:f,style:a},u)}}]),t}(h.default.Component);t.default=m},171:function(e,t,o){var n=o(172),r=o(173),i=o(174);e.exports=function(e){return n(e)||r(e)||i()}},172:function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,o=new Array(e.length);t<e.length;t++)o[t]=e[t];return o}}},173:function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},174:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},175:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},176:function(e,t,o){var n=o(177),r=o(34);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?r(e):t}},177:function(e,t){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(t){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?e.exports=n=function(e){return o(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)},n(t)}e.exports=n},178:function(e,t){function o(t){return e.exports=o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(t)}e.exports=o},179:function(e,t){function o(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}},180:function(e,t,o){var n=o(181);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},181:function(e,t){function o(t,n){return e.exports=o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(t,n)}e.exports=o},182:function(e,t,o){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var s=r.apply(null,n);s&&e.push(s)}else if("object"===i)for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},183:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){var t,o,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;return function(){var r=+new Date;t&&r<t+n?(clearTimeout(o),o=setTimeout(function(){t=r,e()},n)):(t=r,e())}};t.default=n},184:function(e,t,o){!function(){"use strict";e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var o,n=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||a,scrollIntoView:n.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,l=(o=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var o=function(e){for(;e!==t.body&&!1===p(e);)e=e.parentNode||e.host;return e}(this),n=o.getBoundingClientRect(),r=this.getBoundingClientRect();o!==t.body?(h.call(this,o,o.scrollLeft+r.left-n.left,o.scrollTop+r.top-n.top),"fixed"!==e.getComputedStyle(o).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+l<e.scrollHeight:"X"===t?e.clientWidth+l<e.scrollWidth:void 0}function f(t,o){var n=e.getComputedStyle(t,null)["overflow"+o];return"auto"===n||"scroll"===n}function p(e){var t=u(e,"Y")&&f(e,"Y"),o=u(e,"X")&&f(e,"X");return t||o}function d(t){var o,n,i,l,a=(s()-t.startTime)/r;l=a=a>1?1:a,o=.5*(1-Math.cos(Math.PI*l)),n=t.startX+(t.x-t.startX)*o,i=t.startY+(t.y-t.startY)*o,t.method.call(t.scrollable,n,i),n===t.x&&i===t.y||e.requestAnimationFrame(d.bind(e,t))}function h(o,n,r){var l,c,u,f,p=s();o===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,f=i.scroll):(l=o,c=o.scrollLeft,u=o.scrollTop,f=a),d({scrollable:l,method:f,startTime:p,startX:c,startY:u,x:n,y:r})}}}}()}}]);
//# sourceMappingURL=10-96da8ee5fbb248fed845.js.map