"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[623],{23357:function(e,r,t){t.d(r,{a:function(){return o}});var o='.autoplay-video-util-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.autoplay-video{position:relative}.autoplay-video:before{content:"";display:block;padding-top:var(--aspect-ratio, 56.25%)}.autoplay-video__media{position:absolute}.autoplay-video__media,.autoplay-video__media img{height:100%;left:0;object-fit:cover;top:0;width:100%}\n'},29650:function(e,r,t){t.d(r,{o:function(){return h}});var o=t(2784);function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a,i={exports:{}},s={};i.exports=function(){if(a)return s;a=1;var e=o,r=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function p(e,t,o){var a,s={},p=null,c=null;for(a in void 0!==o&&(p=""+o),void 0!==t.key&&(p=""+t.key),void 0!==t.ref&&(c=t.ref),t)n.call(t,a)&&!u.hasOwnProperty(a)&&(s[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps)void 0===s[a]&&(s[a]=t[a]);return{$$typeof:r,type:e,key:p,ref:c,props:s,_owner:i.current}}return s.Fragment=t,s.jsx=p,s.jsxs=p,s}();var u=i.exports,p={exports:{}};var c,l,d,f;function y(){if(l)return c;l=1;return c="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}p.exports=function(){if(f)return d;f=1;var e=y();function r(){}function t(){}return t.resetWarningCache=r,d=function(){function o(r,t,o,n,a,i){if(i!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return o}o.isRequired=o;var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:n,element:o,elementType:o,instanceOf:n,node:o,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:t,resetWarningCache:r};return a.PropTypes=a,a}}()();const _=n(p.exports);(0,o.createContext)({});const v=(e=[])=>{if(!e||!Array.isArray(e)||!e.length)return null;let r=[];return e.forEach((e=>{"string"==typeof e&&r.push(e)})),r.join(" ")},h=(0,o.forwardRef)((({className:e,description:r,paused:t,posterImg:n,prefersReducedMotion:a,renderReducedMotionFallback:i,src:s,loop:p=!0},c)=>{const[l,d]=(0,o.useState)(!1),[f,y]=function(e=.3,r=!0,t=!1){const[n,a]=(0,o.useState)(!1),[i,s]=(0,o.useState)(),u=(0,o.useRef)(),p=(0,o.useCallback)((([e],o)=>{const n=e.isIntersecting||t&&e.boundingClientRect.top<0;a(n),r&&n&&o.unobserve(e.target)}),[r,t]);return(0,o.useEffect)((()=>{if(u.current||!i)return;const r="number"==typeof e?{threshold:e}:e;return u.current=new IntersectionObserver(p,r),u.current.observe(i),()=>{u.current&&u.current.unobserve(i)}}),[p,i,e]),[s,n,i]}(0),_=r?`autoplay-video-desc-${(e=>{let r,t,o=0;if(0===e.length)return o;for(r=0;r{b.current&&b.current.pause()};return(0,o.useEffect)((()=>{y&&d(!0)}),[y]),(0,o.useEffect)((()=>{l&&(t?m():y&&!t?!b.current||t||b.current.play():m())}),[y,l,t,a]),u.jsx("div",{ref:f,className:v(["autoplay-video",e]),children:a&&i?u.jsx("div",{className:"autoplay-video__media",children:i()}):u.jsxs(u.Fragment,{children:[_&&u.jsx("p",{id:_,className:"autoplay-video-util-visually-hidden",children:r}),u.jsx("video",{"aria-describedby":_,autoPlay:!0,className:"autoplay-video__media",loop:p,muted:!0,playsInline:!0,poster:n,ref:b,src:l?s:null})]})})}));h.defaultProps={description:"",inViewRootMargin:"0px 0px 400px 0px",paused:!1,prefersReducedMotion:!1,loop:!0},h.propTypes={className:_.string,description:_.string,paused:_.bool,posterImg:_.string,prefersReducedMotion:_.bool.isRequired,renderReducedMotionFallback:_.func,src:_.string,loop:_.bool},h.displayName="AutoplayVideo"}}]);