"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6410],{6410:function(e,t,n){n.d(t,{YD:function(){return useInView},df:function(){return c}});var r=n(4194);function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i=new Map,o=new WeakMap,s=0,a=void 0;function observe(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=a),void 0===window.IntersectionObserver&&void 0!==r){var u=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:u,intersectionRect:u,rootBounds:u}),function(){}}var c=function(e){var t=Object.keys(e).sort().filter(function(t){return void 0!==e[t]}).map(function(t){var n;return t+"_"+("root"===t?(n=e.root)?(o.has(n)||(s+=1,o.set(n,s.toString())),o.get(n)):"0":e[t])}).toString(),n=i.get(t);if(!n){var r,a=new Map,u=new IntersectionObserver(function(t){t.forEach(function(t){var n,i=t.isIntersecting&&r.some(function(e){return t.intersectionRatio>=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=a.get(t.target))||n.forEach(function(e){e(i,t)})})},e);r=u.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:u,elements:a},i.set(t,n)}return n}(n),l=c.id,h=c.observer,d=c.elements,p=d.get(e)||[];return d.has(e)||d.set(e,p),p.push(t),h.observe(e),function(){p.splice(p.indexOf(t),1),0===p.length&&(d.delete(e),h.unobserve(e)),0===d.size&&(h.disconnect(),i.delete(l))}}var u=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function isPlainChildren(e){return"function"!=typeof e.children}var c=function(e){function InView(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){!n.node||(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),isPlainChildren(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}InView.prototype=Object.create(e.prototype),InView.prototype.constructor=InView,_setPrototypeOf(InView,e);var t=InView.prototype;return t.componentDidUpdate=function(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=observe(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o},s)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!isPlainChildren(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var i=this.props,o=i.children,s=i.as,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,u);return r.createElement(s||"div",_extends({ref:this.handleNode},a),o)},InView}(r.Component);function useInView(e){var t=void 0===e?{}:e,n=t.threshold,i=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,u=t.triggerOnce,c=t.skip,l=t.initialInView,h=t.fallbackInView,d=r.useRef(),p=r.useState({inView:!!l}),f=p[0],v=p[1],b=r.useCallback(function(e){void 0!==d.current&&(d.current(),d.current=void 0),!c&&e&&(d.current=observe(e,function(e,t){v({inView:e,entry:t}),t.isIntersecting&&u&&d.current&&(d.current(),d.current=void 0)},{root:a,rootMargin:s,threshold:n,trackVisibility:o,delay:i},h))},[Array.isArray(n)?n.toString():n,a,s,u,c,o,h,i]);(0,r.useEffect)(function(){d.current||!f.entry||u||c||v({inView:!!l})});var y=[b,f.inView,f.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}c.displayName="InView",c.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1}}}]);