!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f4319448-d7d7-4791-bd7e-4853ef4f0581",e._sentryDebugIdIdentifier="sentry-dbid-f4319448-d7d7-4791-bd7e-4853ef4f0581")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"imgur@0470099"},(self.webpackChunkimgur_web=self.webpackChunkimgur_web||[]).push([[5994],{hyL7:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var a=n("pVnL"),o=n.n(a),r=n("QILm"),i=n.n(r),s=n("q1tI"),l=(n("17x9"),n("/MKj"));function u(e){var t=e.innerRef,n=e.to,a=(e.isLoggedIn,e.isPostPageBeta,e.children),r=(e.dispatch,e.isExternalAd,e.state,i()(e,["innerRef","to","isLoggedIn","isPostPageBeta","children","dispatch","isExternalAd","state"]));return s.createElement("a",o()({draggable:"false",href:n,ref:t},r),a)}u.defaultProps={state:{}};u.__docgenInfo={description:"",methods:[],displayName:"PostLinkComponent",props:{state:{defaultValue:{value:"{}",computed:!1},type:{name:"object"},required:!1,description:""},innerRef:{type:{name:"object"},required:!1,description:""},to:{type:{name:"string"},required:!0,description:""},isLoggedIn:{type:{name:"bool"},required:!1,description:""},isPostPageBeta:{type:{name:"bool"},required:!1,description:""},children:{type:{name:"node"},required:!0,description:""},dispatch:{type:{name:"func"},required:!0,description:""},isExternalAd:{type:{name:"bool"},required:!1,description:""}}};const c=(0,l.$j)((function(e){var t=e.user;return{isLoggedIn:t.get("isLoggedIn"),isPostPageBeta:t.get("flags").get("desktopPostPageBeta")}}))(u)},JmyK:(e,t,n)=>{"use strict";n.d(t,{Z:()=>q});var a=n("lwsE"),o=n.n(a),r=n("W8MJ"),i=n.n(r),s=n("PJYZ"),l=n.n(s),u=n("7W2i"),c=n.n(u),d=n("a1gu"),m=n.n(d),p=n("Nsbk"),h=n.n(p),f=n("lSNA"),y=n.n(f),v=n("q1tI"),b=n("P5Jw"),g=n("/MKj"),S=(n("17x9"),n("Txp7")),E=n("+qrI"),P=n("umEE"),T=n("sCW7"),A=n("oIX6"),k=n("puhG"),V=n("VGss"),N=n("MHWf"),I=n("Qii0"),M=n("g1ek");function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return m()(this,n)}}var D=function(e){c()(n,e);var t=C(n);function n(){var e;o()(this,n);for(var a=arguments.length,r=new Array(a),i=0;i{"use strict";n.d(t,{Vf:()=>w,ZP:()=>_});var a=n("pVnL"),o=n.n(a),r=n("lwsE"),i=n.n(r),s=n("W8MJ"),l=n.n(s),u=n("PJYZ"),c=n.n(u),d=n("7W2i"),m=n.n(d),p=n("a1gu"),h=n.n(p),f=n("Nsbk"),y=n.n(f),v=n("lSNA"),b=n.n(v),g=(n("4cSd"),n("q1tI")),S=(n("17x9"),n("/MKj")),E=n("TSYQ"),P=n.n(E),T=n("MHWf"),A=n("tKQO"),k=n("bY2E"),V=n("e1IN"),N=n("Td6y"),I=n("IH2l"),M=n("IO3d"),C=n("JmyK");function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return h()(this,n)}}var U=function(e){m()(n,e);var t=D(n);function n(e){var a;return i()(this,n),a=t.call(this,e),b()(c()(a),"movementStartPos",0),b()(c()(a),"volumeStart",0),b()(c()(a),"stateIndicator",g.createRef()),b()(c()(a),"time",g.createRef()),b()(c()(a),"scrubber",g.createRef()),b()(c()(a),"bar",g.createRef()),b()(c()(a),"audioIndicator",g.createRef()),b()(c()(a),"volume",g.createRef()),b()(c()(a),"updateDimensionsFromScrubber",(function(){var e=a.scrubber.current.offsetWidth;e||(e=1),a.updateDimensions(e,a.scrubber.current.getBoundingClientRect().left)})),b()(c()(a),"handleMouseDown",(function(){(0,T.kZ)("mouseup",a.handleMouseUp),(0,T.kZ)("mousemove",a.handleMouseMove),(0,T.A4)("body").style.userSelect="none",a.setState({dragging:!0})})),b()(c()(a),"handleTouchStart",(function(){a.scrubber.current.addEventListener("touchend",a.handleTouchEnd),a.scrubber.current.addEventListener("touchmove",a.handleMouseMove),(0,T.A4)("body").style.userSelect="none",a.setState({dragging:!0})})),b()(c()(a),"handleTouchEnd",(function(){a.scrubber.current.removeEventListener("touchend",a.handleTouchEnd),a.scrubber.current.removeEventListener("touchmove",a.handleMouseMove),a.handleMouseUp()})),b()(c()(a),"handleMouseUp",(function(){var e=a.props.onTimeChange;(0,T.KZ)("mouseup",a.handleMouseUp),(0,T.KZ)("mousemove",a.handleMouseMove),(0,T.A4)("body").style.userSelect="auto",a.setState((function(t){return{scrubPauseWait:e(t.playedPercentModifier),dragging:!1}}))})),b()(c()(a),"handleMouseMove",(function(e){var t=a.props.onScrubbing,n=a.state.scrubberWidth;t();var o=a.movementStartPos,r=n,i=e.pageX||e.changedTouches[0].pageX;a.setState({playedPercentModifier:a.getPlayedPercentModifier(i,o,r)})})),b()(c()(a),"handleMouseDownVolume",(function(){(0,T.kZ)("mouseup",a.handleMouseUpVolume),(0,T.kZ)("mousemove",a.handleMouseMoveVolume),(0,T.A4)("body").style.userSelect="none",a.volumeStart=a.volume.current.getBoundingClientRect().bottom})),b()(c()(a),"handleMouseUpVolume",(function(e){(0,T.KZ)("mouseup",a.handleMouseUpVolume),(0,T.KZ)("mousemove",a.handleMouseMoveVolume),(0,T.A4)("body").style.userSelect="auto",a.setVolumeFromCoordinates(e.pageY)})),b()(c()(a),"handleMouseMoveVolume",(function(e){a.setVolumeFromCoordinates(e.pageY)})),b()(c()(a),"handleScrubberBarClick",(function(e){var t=a.props.onTimeChange,n=a.state.scrubberWidth,o=a.movementStartPos,r=n;t(a.getPlayedPercentModifier(e.pageX,o,r))})),a.state={scrubPauseWait:0,playedPercentModifier:null,scrubberWidth:1,dragging:!1,volume:e.volume},a}return l()(n,[{key:"componentDidMount",value:function(){var e=this;this.updateDimensionsFromScrubber(),(0,T.kZ)("resize",this.updateDimensionsFromScrubber),["mozfullscreenchange","webkitfullscreenchange","fullscreenchange"].forEach((function(t){return(0,T._E)(t,e.updateDimensionsFromScrubber)}))}},{key:"componentWillUnmount",value:function(){var e=this;(0,T.KZ)("resize",this.updateDimensionsFromScrubber),["mozfullscreenchange","webkitfullscreenchange","fullscreenchange"].forEach((function(t){return(0,T.II)(t,e.updateDimensionsFromScrubber)}))}},{key:"updateDimensions",value:function(e,t){this.setState({scrubberWidth:e}),this.movementStartPos=t}},{key:"setVolumeFromCoordinates",value:function(e){var t=this.props.onVolumeChange,n=1-Math.min(Math.max((104-this.volumeStart-(0,T.uI)("scrollY")+e)/104,0),1);t(n),this.setState({volume:n})}},{key:"getPlayedPercentModifier",value:function(e,t,n){var a=(e-t)/n;return a<0?0:a>1?1:a}},{key:"pad",value:function(e){var t=e.toString();return t.length<2&&(t="0".concat(t)),t}},{key:"slide",value:function(e,t){isNaN(e)&&(e=0),e=Math.max(Math.min(100*e/t,100),1);for(var n=[[0,[27,183,110]],[44,[58,221,214]],[100,[123,133,247]]],a=[],o=0;o0&&n&&i(n)})),r(e),o(k.uT.AUDIO_STATE.PRESENT_ON)}})),b()(c()(a),"handleTimeUpdate",(function(e){if(!a.isVideoElementUnavailable()){var t=a.state.progressVisible;a.videoInterval(e),t&&a.setState({playedPercent:a.video.current.currentTime/a.video.current.duration,currentTime:Math.floor(a.video.current.currentTime)})}})),b()(c()(a),"handleMetadata",(function(){if(!a.isVideoElementUnavailable()){var e=a.state.currentTime;a.video.current.currentTime=e,a.setState((function(e){return{playedPercent:e.currentTime/a.video.current.duration,duration:Math.floor(a.video.current.duration)}}))}})),b()(c()(a),"handleData",(function(e){if(!a.isVideoElementUnavailable()){var t=!1;(void 0!==e.target.webkitAudioDecodedByteCount&&e.target.webkitAudioDecodedByteCount>0||void 0!==e.target.mozHasAudio&&e.target.mozHasAudio||void 0!==e.target.audioTracks&&e.target.audioTracks.length>0)&&(t=!0);var n=a.state.volume;a.video.current.volume=n,a.setState((function(e){return{playedPercent:e.currentTime/a.video.current.duration,duration:Math.floor(a.video.current.duration),hasAudio:t}}))}})),b()(c()(a),"handleCanPlay",(function(e){a.isVideoElementUnavailable()||(a.isPaused()||(1!==a.video.current.readyState&&4!==a.video.current.readyState||a.play(),(0,a.props.handleCanPlay)(e)))})),b()(c()(a),"handleVideoSourceError",(function(e){!a.video.current||0!==a.video.current.readyState&&3!==a.video.current.networkState||(a.setState({isError:!0}),(0,a.props.onError)(e))})),b()(c()(a),"toggleFullscreen",(function(e){a.isVideoElementUnavailable()||(a.supportsFullScreenAPI?a.state.fullscreen||!1===e?((0,T.$w)(),(0,T.A4)("body").classList.remove("video-hidden-body"),a.setState({fullscreen:!1})):(a.videoContainer.current&&(0,T.Se)(a.videoContainer.current),(0,T.A4)("body").classList.add("video-hidden-body"),a.setState({fullscreen:!0})):a.video.current.webkitSupportsFullscreen&&a.video.current.webkitEnterFullscreen())})),b()(c()(a),"videoStartedPlaying",(function(){a.setState({playState:k.uT.PLAY_STATE.PRESENT_PLAYING}),a.props.promoted&&(a.timeStarted=(new Date).getTime()/1e3)})),b()(c()(a),"videoInterval",(function(e){if(!a.isVideoElementUnavailable()){var t=a.props,n=t.promoted,o=t.controls,r=t.trackPromotedPostVideo,i=t.hash,s=t.postId;if(n&&!a.video.current.paused&&o){var l=a.state.duration;if(l){if(a.timeStarted>0){var u=(new Date).getTime()/1e3-a.timeStarted;a.timeStarted=-1,a.timePlayed+=u}"timeupdate"===e.type&&(a.timeStarted=(new Date).getTime()/1e3),r({timePlayed:a.timePlayed,albumHash:s,duration:l,hash:i}),a.timePlayed=0}}}})),b()(c()(a),"handleSeek",(function(e){a.isVideoElementUnavailable()||(a.video.current.currentTime=e)})),b()(c()(a),"handleMouseOver",(function(){a.setState({progressVisible:!0})})),b()(c()(a),"handleMouseOut",(function(){a.setState({progressVisible:!1})}));var o=e.playAudioIfAvailable&&e.isFirst&&void 0!==e.handleCanPlay?k.uT.AUDIO_STATE.PRESENT_ON:k.uT.AUDIO_STATE.PRESENT_MUTED;return e.playState===k.uT.PLAY_STATE.PRESENT_PAUSED&&e.audioState&&(o=e.audioState),a.state={playedPercent:0,playState:e.playVideo?k.uT.PLAY_STATE.PRESENT_PLAYING:k.uT.PLAY_STATE.PRESENT_PAUSED,currentTime:e.currentTime||0,duration:0,fullscreen:!1,hasAudio:!1,progressVisible:!1,audioState:o,isError:!1,volume:e.volume},a}return l()(n,[{key:"componentWillUnmount",value:function(){var e=this,t=this.props.intersectionObserver;this.unmount=!0,["mozfullscreenchange","webkitfullscreenchange","fullscreenchange"].forEach((function(t){return(0,T.II)(t,e.changeEvent)})),this.srcmp4.current&&this.srcmp4.current.removeAttribute("src"),this.video.current&&this.video.current.load(),t&&this.video.current&&t.unobserve(this.video.current)}},{key:"componentDidUpdate",value:function(e){if(!this.state.isError){var t=this.props,n=t.playVideo,a=t.playVideoByOne,o=t.hashWithAudioOn,r=t.hashWithVideoOn;e.playVideo!==n&&(e.playVideo&&this.pause(),n&&this.play()),e.hashWithAudioOn!==o&&this.handleGlobalUnmute(o),this.updateAudioState(e),a&&e.hashWithVideoOn!==r&&this.handleGlobalPlay(r)}}},{key:"componentDidMount",value:function(){var e=this,t=this.props.intersectionObserver;!function(e){if("function"!=typeof e)return!1;var t=document.createElement("video");t.pause();var n="play"in t&&t.play();e(!t.paused||"Promise"in window&&n instanceof Promise)}((function(t){e.supportsAutoPlay=t})),this.srcmp4.current&&(this.srcmp4.current.onerror=this.handleVideoSourceError),["mozfullscreenchange","webkitfullscreenchange","fullscreenchange"].forEach((function(t){return(0,T._E)(t,e.changeEvent)})),this.video.current&&this.video.current.addEventListener("webkitendfullscreen",(function(){e.setState({playState:k.uT.PLAY_STATE.PRESENT_PAUSED})})),this.supportsFullScreenAPI=(0,T.T2)(),t&&t.observe(this.video.current)}},{key:"handleGlobalUnmute",value:function(e){var t=this.props.hash;this.unmount||this.setState({audioState:e===t?k.uT.AUDIO_STATE.PRESENT_ON:k.uT.AUDIO_STATE.PRESENT_MUTED})}},{key:"handleGlobalPlay",value:function(e){var t=this.props.hash;this.unmount||(e===t?(this.video.current.play(),this.setState({playState:k.uT.PLAY_STATE.PRESENT_PLAYING})):(this.video.current.pause(),this.setState({playState:k.uT.PLAY_STATE.PRESENT_PAUSED})))}},{key:"play",value:function(){var e=this;if(!this.isVideoElementUnavailable()){var t=this.video.current.play();void 0!==t?t.then((function(){e.setState({playState:k.uT.PLAY_STATE.PRESENT_PLAYING})})).catch((function(){e.setState({playState:k.uT.PLAY_STATE.PRESENT_PAUSED})})):this.setState({playState:k.uT.PLAY_STATE.PRESENT_PLAYING})}}},{key:"pause",value:function(){this.isVideoElementUnavailable()||(this.video.current.pause(),this.setState({playState:k.uT.PLAY_STATE.PRESENT_PAUSED}))}},{key:"isPlaying",value:function(){return this.state.playState===k.uT.PLAY_STATE.PRESENT_PLAYING}},{key:"isPaused",value:function(){return this.state.playState===k.uT.PLAY_STATE.PRESENT_PAUSED}},{key:"render",value:function(){var e=this.props,t=e.animationType,n=e.src,a=e.hash,r=e.width,i=e.height,s=e.playVideoByOne,l=e.dataURL,u=e.controls,c=e.classNames,d=e.fallbackMedia,m=e.maxHeight,p=e.title,h=e.index,f=e.postTitle,y=e.postDescription,v=e.mediaDescription,b=e.tags,S=e.isMobileSafari,E=e.seoPostId,T=e.postInGallery,V=e.postIsAlbum,N=this.state,I=N.isError,C=N.audioState,D=N.fullscreen,q=N.playedPercent,_=N.currentTime,w=N.duration,O=N.playState,R=N.hasAudio,L=N.volume;if(I)return d(n);var F={key:a,style:{width:r,height:m||i},draggable:!1,playsInline:"playsInline",controls:!1};C===k.uT.AUDIO_STATE.PRESENT_MUTED&&(F.muted=!0),this.isPlaying()?F.autoPlay="autoplay":F.preload=s?"auto":"metadata",t===A.TH&&(F.loop="loop"),l&&(F["data-url"]=l);var x=P()({PostVideo:!0,fullscreen:D}),W=P()({"PostVideo-video-wrapper":!0,"PostVideo-video-wrapper--safari":this.useSafariNativeFullscreen()}),Y=(0,M.W)(b,v,y,f),Z="".concat(n.video).concat(S?"#t=0.001":"");return g.createElement("div",{className:x,ref:this.videoContainer,onMouseOver:this.handleMouseOver,onFocus:this.handleMouseOver,onMouseOut:this.handleMouseOut,onBlur:this.handleMouseOut},u&&this.isPaused()&&g.createElement("span",{title:"Play video",className:"video-play pointer",onClick:this.onPlayToggle}),g.createElement("div",{className:W},g.createElement("video",o()({},F,{onPlay:this.videoStartedPlaying,onPlaying:this.videoStartedPlaying,onEnded:this.videoInterval,onPause:this.videoInterval,onTimeUpdate:this.handleTimeUpdate,onLoadedMetadata:this.handleMetadata,onLoadedData:this.handleData,onCanPlay:this.handleCanPlay,className:D?"fullscreen":c,ref:this.video,hash:a,title:Y}),g.createElement("source",{ref:this.srcmp4,type:"video/mp4",src:Z}))),u&&g.createElement(U,{playedPercent:q,time:_,onScrubbing:this.onScrubbing,duration:w,onTimeChange:this.onTimeChange,onVolumeChange:this.onVolumeChange,audioState:C,onAudioToggle:this.onAudioToggle,playState:O,onPlayToggle:this.onPlayToggle,onSeek:this.handleSeek,fullscreen:D,toggleFullscreen:this.toggleFullscreen,hasAudio:R,volume:L,id:"PostVideoControls-".concat(a),hash:a,title:p,index:h,tags:b,seoPostId:E,postInGallery:T,postIsAlbum:V}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.volume;return n!==t.volume?{volume:n}:null}}]),n}(g.Component);_.defaultProps={animationType:A.TH,controls:!1,src:{image:"",video:""},playState:k.uT.PLAY_STATE.PRESENT_PAUSED,currentTime:0,volume:k.Qx,handleCanPlay:function(){},fallbackMedia:function(e){var t=e.webPImage;return g.createElement("img",{src:t,"data-url":t})},dataUrl:"",promoted:!1,classNames:"",playVideo:!0,playVideoByOne:!1,onError:function(){},updateAudioState:function(){},updateAudioVolume:function(){},setHashWithAudioOn:function(){},isFirst:!1,globalAudioState:k.uT.AUDIO_STATE.PRESENT_MUTED,postTitle:"",mediaDescription:"",postDescription:"",tags:[],isMobileSafari:!1};var w=(0,S.$j)((function(e){var t=e.video,n=e.postsData,a=e.agent,o=n.get("currentPost");return{playAudioIfAvailable:t.get("audioState")===k.uT.AUDIO_STATE.PRESENT_ON,hashWithAudioOn:t.get("hashWithAudioOn"),hashWithVideoOn:t.get("hashWithVideoOn"),volume:t.get("volume"),postId:o&&o.get("id"),promoted:o&&!!o.get("isAd"),globalAudioState:t.get("audioState"),isMobileSafari:a.get(V.EX)&&a.get(V.vw)}}),{updateAudioState:I.Oz,updateAudioVolume:I.U$,setHashWithAudioOn:I.sg,addVideoToViewList:I.$S,removeVideoFromViewList:I.kh,trackPromotedPostVideo:N.nV})(_);_.__docgenInfo={description:"",methods:[{name:"updateAudioState",docblock:null,modifiers:[],params:[{name:"prevProps",type:null}],returns:null},{name:"changeEvent",docblock:null,modifiers:[],params:[],returns:null},{name:"useSafariNativeFullscreen",docblock:null,modifiers:[],params:[],returns:null},{name:"isVideoElementUnavailable",docblock:null,modifiers:[],params:[],returns:null},{name:"handleGlobalUnmute",docblock:null,modifiers:[],params:[{name:"hashWithAudioOn",type:null}],returns:null},{name:"handleGlobalPlay",docblock:null,modifiers:[],params:[{name:"hashWithVideoOn",type:null}],returns:null},{name:"onPlayToggle",docblock:null,modifiers:[],params:[],returns:null},{name:"onAudioToggle",docblock:null,modifiers:[],params:[],returns:null},{name:"onScrubbing",docblock:null,modifiers:[],params:[],returns:null},{name:"onTimeChange",docblock:null,modifiers:[],params:[{name:"offset",type:null}],returns:null},{name:"onVolumeChange",docblock:null,modifiers:[],params:[{name:"volume",type:null}],returns:null},{name:"handleTimeUpdate",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"handleMetadata",docblock:null,modifiers:[],params:[],returns:null},{name:"handleData",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"handleCanPlay",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"handleVideoSourceError",docblock:null,modifiers:[],params:[{name:"e",type:null}],returns:null},{name:"play",docblock:null,modifiers:[],params:[],returns:null},{name:"pause",docblock:null,modifiers:[],params:[],returns:null},{name:"toggleFullscreen",docblock:null,modifiers:[],params:[{name:"state",type:null}],returns:null},{name:"videoStartedPlaying",docblock:null,modifiers:[],params:[],returns:null},{name:"videoInterval",docblock:null,modifiers:[],params:[{name:"event",type:null}],returns:null},{name:"handleSeek",docblock:null,modifiers:[],params:[{name:"time",type:null}],returns:null},{name:"handleMouseOver",docblock:null,modifiers:[],params:[],returns:null},{name:"handleMouseOut",docblock:null,modifiers:[],params:[],returns:null},{name:"isPlaying",docblock:null,modifiers:[],params:[],returns:null},{name:"isPaused",docblock:null,modifiers:[],params:[],returns:null}],displayName:"PostVideoComponent",props:{animationType:{defaultValue:{value:"POST_LOOP",computed:!0},type:{name:"number"},required:!1,description:""},controls:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},src:{defaultValue:{value:"{\n image: '',\n video: '',\n}",computed:!1},type:{name:"shape",value:{image:{name:"string",required:!1},video:{name:"string",required:!1}}},required:!1,description:""},playState:{defaultValue:{value:"VIDEO_CONTROLS.PLAY_STATE.PRESENT_PAUSED",computed:!0},type:{name:"string"},required:!1,description:""},currentTime:{defaultValue:{value:"0",computed:!1},type:{name:"number"},required:!1,description:""},volume:{defaultValue:{value:"DEFAULT_VOLUME",computed:!0},type:{name:"number"},required:!1,description:""},handleCanPlay:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},fallbackMedia:{defaultValue:{value:"function FallbackMedia({ webPImage }) {\n return ;\n}",computed:!1},type:{name:"func"},required:!1,description:""},dataUrl:{defaultValue:{value:"''",computed:!1},required:!1},promoted:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},classNames:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},playVideo:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},playVideoByOne:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},onError:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},updateAudioState:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},updateAudioVolume:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},setHashWithAudioOn:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},isFirst:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},globalAudioState:{defaultValue:{value:"VIDEO_CONTROLS.AUDIO_STATE.PRESENT_MUTED",computed:!0},type:{name:"enum",computed:!0,value:"Object.values(VIDEO_CONTROLS.AUDIO_STATE)"},required:!1,description:""},postTitle:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},mediaDescription:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},postDescription:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},tags:{defaultValue:{value:"[]",computed:!1},type:{name:"arrayOf",value:{name:"object"}},required:!1,description:""},isMobileSafari:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},height:{type:{name:"number"},required:!1,description:""},width:{type:{name:"number"},required:!1,description:""},maxHeight:{type:{name:"number"},required:!1,description:""},playAudioIfAvailable:{type:{name:"bool"},required:!1,description:""},audioState:{type:{name:"string"},required:!1,description:""},hash:{type:{name:"string"},required:!1,description:""},dataURL:{type:{name:"string"},required:!1,description:""},postId:{type:{name:"string"},required:!1,description:""},addVideoToViewList:{type:{name:"func"},required:!1,description:""},removeVideoFromViewList:{type:{name:"func"},required:!1,description:""},trackPromotedPostVideo:{type:{name:"func"},required:!1,description:""},hashWithAudioOn:{type:{name:"string"},required:!1,description:""},hashWithVideoOn:{type:{name:"string"},required:!1,description:""},title:{type:{name:"string"},required:!1,description:""},index:{type:{name:"number"},required:!1,description:""},intersectionObserver:{type:{name:"object"},required:!1,description:""},seoPostId:{type:{name:"string"},required:!1,description:""},postInGallery:{type:{name:"bool"},required:!1,description:""},postIsAlbum:{type:{name:"bool"},required:!1,description:""}}}},gEGH:(e,t,n)=>{"use strict";n.d(t,{w:()=>Z,Y:()=>H});var a,o,r,i,s=n("lwsE"),l=n.n(s),u=n("W8MJ"),c=n.n(u),d=n("PJYZ"),m=n.n(d),p=n("7W2i"),h=n.n(p),f=n("a1gu"),y=n.n(f),v=n("Nsbk"),b=n.n(v),g=n("lSNA"),S=n.n(g),E=n("q1tI"),P=(n("17x9"),n("VlfM")),T=n("MHWf"),A="UploadSpinner",k="Wrapper",V="Pose",N="container",I="giraffe",M="upvote",C="heart",D="drop",U="shadow",q="default",_="rotate",w="show",O="preJump",R="jump",L="land",F="postLand",x=[M,C,I],W=n("S2q1");function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return y()(this,n)}}var Z=function(e){h()(n,e);var t=Y(n);function n(e){var a,o;return l()(this,n),o=t.call(this,e),S()(m()(o),"activeItem",0),S()(m()(o),"isUnmounted",!1),S()(m()(o),"timerId",null),S()(m()(o),"animationFrame",(function(){o.bounce(),o.splash()})),S()(m()(o),"nextItem",(function(){return o.activeItem++,o.activeItem>2&&(o.activeItem=0),o.activeItem})),S()(m()(o),"bounce",(function(){var e=o.nextItem();o.bounceAnim(x[e])})),S()(m()(o),"bounceAnim",(function(e){var t,n=(t={},S()(t,N+V,O),S()(t,U+V,R),t);(0,T.iK)((function(){var e;!o.isUnmounted&&o.setState((e={},S()(e,M+V,_),S()(e,I+V,_),S()(e,C+V,_),e))}),150),(0,T.iK)((function(){var t,n=(t={},S()(t,M+k+V,q),S()(t,I+k+V,q),S()(t,C+k+V,q),S()(t,e+k+V,w),t);!o.isUnmounted&&o.setState(n)}),250),(0,T.iK)((function(){!o.isUnmounted&&o.setState(S()({},U+V,L))}),400),o.setState(n)})),S()(m()(o),"splash",(function(){for(var e={},t=1;t<=3;t++){var n=0;n=1===t?o.randomNumber(-80,-65):2===t?o.randomNumber(-80,80):o.randomNumber(65,80),e["".concat(D).concat(t).concat(V)]=L,e["".concat(D).concat(t,"-y")]=o.randomNumber(-32,-40),e["".concat(D).concat(t,"-rotate")]=n}(0,T.iK)((function(){var t;!o.isUnmounted&&o.setState((t={},S()(t,"".concat(D,"1").concat(V),R),S()(t,"".concat(D,"2").concat(V),R),S()(t,"".concat(D,"3").concat(V),R),t)),(0,T.iK)((function(){!o.isUnmounted&&o.setState(e)}),10),(0,T.iK)((function(){var e;!o.isUnmounted&&o.setState((e={},S()(e,"".concat(D,"1").concat(V),F),S()(e,"".concat(D,"2").concat(V),F),S()(e,"".concat(D,"3").concat(V),F),e))}),150),(0,T.iK)((function(){var e;!o.isUnmounted&&o.setState((e={},S()(e,"".concat(D,"1").concat(V),q),S()(e,"".concat(D,"2").concat(V),q),S()(e,"".concat(D,"3").concat(V),q),e))}),500)}),520)})),S()(m()(o),"randomNumber",(function(e,t){return Math.floor(Math.random()*(t-e+1))+e})),o.state=(a={},S()(a,I+V,q),S()(a,I+k+V,q),S()(a,M+V,q),S()(a,M+k+V,q),S()(a,C+V,q),S()(a,C+k+V,w),S()(a,N+V,q),S()(a,U+V,q),S()(a,D+1+V,q),S()(a,D+2+V,q),S()(a,D+3+V,q),a),o}return c()(n,[{key:"componentDidUpdate",value:function(){var e=this;this.state[N+V]===O&&(0,T.iK)((function(){!e.isUnmounted&&e.setState(S()({},N+V,R))}),100),this.state[N+V]===R&&(0,T.iK)((function(){!e.isUnmounted&&e.setState(S()({},N+V,L))}),250),this.state[N+V]===L&&(0,T.iK)((function(){!e.isUnmounted&&e.setState(S()({},N+V,F))}),100),this.state[N+V]===F&&(0,T.iK)((function(){!e.isUnmounted&&e.setState(S()({},N+V,q))}),150)}},{key:"componentDidMount",value:function(){var e=this;this.isUnmounted=!1,this.animationFrame(),this.timerId=(0,T.Zi)((function(){e.animationFrame()}),1800)}},{key:"componentWillUnmount",value:function(){(0,T.cv)(this.timerId),this.isUnmounted=!0}},{key:"render",value:function(){var e=this,t="".concat(A," ").concat(this.props.className||"");return E.createElement("div",{style:this.props.style,className:t},E.createElement(G,{pose:this.state[N+V],key:"container-".concat(this.props.uid),className:"".concat(A,"-spinner is").concat(this.props.size,"px")},E.createElement("div",{key:"".concat(I+k,"-").concat(this.props.uid),className:"wrapper ".concat(this.state[I+k+V])},E.createElement(K,{className:"".concat(A,"-icon ").concat(A,"-icon-").concat(I),pose:this.state[I+V],key:"".concat(I,"-").concat(this.props.uid),onPoseComplete:function(t){t===_&&e.setState(S()({},I+V,q))}})),E.createElement("div",{key:"".concat(M+k,"-").concat(this.props.uid),className:"wrapper ".concat(this.state[M+k+V])},E.createElement(K,{className:"".concat(A,"-icon ").concat(A,"-icon-").concat(M),pose:this.state[M+V],key:"".concat(M,"-").concat(this.props.uid),onPoseComplete:function(t){t===_&&e.setState(S()({},M+V,q))}})),E.createElement("div",{key:"".concat(C+k,"-").concat(this.props.uid),className:"wrapper ".concat(this.state[C+k+V])},E.createElement(K,{className:"".concat(A,"-icon ").concat(A,"-icon-").concat(C),pose:this.state[C+V],key:"".concat(C,"-").concat(this.props.uid),onPoseComplete:function(t){t===_&&e.setState(S()({},C+V,q))}}))),E.createElement("div",{className:"splash"},E.createElement("div",{className:D+k,style:{transform:"rotate(".concat(this.state["".concat(D+1,"-rotate")],"deg)")}},E.createElement(j,{className:D,pose:this.state[D+1+V],key:"".concat(D+1,"-").concat(this.props.uid),y:this.state["".concat(D+1,"-y")],rotate:this.state["".concat(D+1,"-rotate")]})),E.createElement("div",{className:D+k,style:{transform:"rotate(".concat(this.state["".concat(D+2,"-rotate")],"deg)")}},E.createElement(j,{className:D,pose:this.state[D+2+V],key:"".concat(D+2,"-").concat(this.props.uid),y:this.state["".concat(D+2,"-y")],rotate:this.state["".concat(D+2,"-rotate")]})),E.createElement("div",{className:D+k,style:{transform:"rotate(".concat(this.state["".concat(D+3,"-rotate")],"deg)")}},E.createElement(j,{className:D,pose:this.state[D+3+V],key:"".concat(D+3,"-").concat(this.props.uid),y:this.state["".concat(D+3,"-y")],rotate:this.state["".concat(D+3,"-rotate")]})),E.createElement(B,{className:U,pose:this.state[U+V],key:"".concat(U,"-").concat(this.props.uid),onPoseComplete:function(t){t===L&&e.setState(S()({},U+V,q))}})))}}]),n}(E.Component),G=P.ZP.div((a={},S()(a,q,{scaleY:1,scaleX:1,originY:1,originX:.5,transition:{type:"spring",damping:50,stiffness:200,duration:1e3}}),S()(a,O,{scaleY:.75,transition:{type:"spring",damping:50,stiffness:200,duration:500}}),S()(a,R,{scaleY:1,scaleX:.9,y:"-74px",transition:{type:"spring",damping:50,stiffness:200,duration:500}}),S()(a,L,{scaleX:1.2,y:0,transition:{type:"spring",damping:50,stiffness:200,duration:750}}),S()(a,F,{scaleY:.65,scaleX:1,transition:{type:"spring",damping:0,duration:500,stiffness:150}}),a)),K=P.ZP.div((o={},S()(o,q,{rotate:0,transition:{duration:10}}),S()(o,_,{rotate:360,transition:{duration:350}}),o)),j=P.ZP.div((r={},S()(r,q,{opacity:0,scaleY:1,y:0,transition:{duration:0}}),S()(r,R,{opacity:1,transition:{duration:0}}),S()(r,L,{scaleY:1.5,y:function(e){var t=e.y;return"".concat(t,"px")},transition:{type:"spring",damping:80,stiffness:200,duration:500}}),S()(r,F,{opacity:0,transition:{duration:250}}),r)),B=P.ZP.div((i={},S()(i,q,{opacity:1,scaleX:1,transition:{duration:250}}),S()(i,R,{scaleX:.5,transition:{duration:500}}),S()(i,L,{scaleX:1.25,transition:{duration:250}}),i));function H(e){var t=e.children,n=e.isLoading,a=e.isScrollSpinner,o=E.createElement(Z,{size:W.$initialSpinnerSize,uid:"7"});return E.createElement(E.Fragment,null,n&&!a&&E.createElement("div",{className:"UploadSpinner-initial"},o),E.createElement("div",{className:"UploadSpinner-contentWrapper"},t),n&&a&&E.createElement("div",{className:"UploadSpinner-scroll"},o))}Z.__docgenInfo={description:"",methods:[{name:"animationFrame",docblock:null,modifiers:[],params:[],returns:null},{name:"nextItem",docblock:null,modifiers:[],params:[],returns:null},{name:"bounce",docblock:null,modifiers:[],params:[],returns:null},{name:"bounceAnim",docblock:null,modifiers:[],params:[{name:"activeItem",type:null}],returns:null},{name:"splash",docblock:null,modifiers:[],params:[],returns:null},{name:"randomNumber",docblock:null,modifiers:[],params:[{name:"min",type:null},{name:"max",type:null}],returns:null}],displayName:"UploadSpinner",props:{size:{type:{name:"number"},required:!1,description:""},className:{type:{name:"string"},required:!1,description:""},style:{type:{name:"object"},required:!1,description:""},uid:{type:{name:"string"},required:!0,description:""}}},H.__docgenInfo={description:"",methods:[],displayName:"UploadSpinnerWrapper",props:{children:{type:{name:"object"},required:!0,description:""},isLoading:{type:{name:"bool"},required:!1,description:""},isScrollSpinner:{type:{name:"bool"},required:!1,description:""}}}},hdW1:(e,t,n)=>{"use strict";n.d(t,{F3:()=>o,V5:()=>s,mt:()=>a,oL:()=>i,qy:()=>r});var a=125,o=["a","an","the","and","it","for","or","but","in","my","your","our","at","their"],r=8388608,i=600,s=315},IO3d:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var a=n("hdW1");function o(e){var t=new RegExp("\\b(".concat(a.F3.join("|"),")\\b"),"gi");return e.replace(t,"").trim()}function r(e,t,n,r){var i=[];if(e.length>0){var s=e.map((function(e){return e.tag})).join();i.push(o(s))}return""!==t&&i.push(o(t)),""!==n&&i.push(o(n)),""!==r&&i.push(o(r)),i.join().replace(/[^A-Z0-9]/gi," ").replace(/(\b\w+\b)(?=.*\b\1\b)/gi,"").replace(/(\W)\1+/g,"$1").trim().split(" ").join("-").slice(0,a.mt)}},"7s1U":()=>{}}]);