1(window.webpackJsonp=window.webpackJsonp||[]).push([[440],{1636:function(t,e,a){"use strict";a.r(e),a.d(e,"default",(function(){return v}));var o=a(0),n=a(2),i=a(1),s=a(67),d=a(5),l=a(239),c=a(383),r=a(540),u=a(519),m=a(141),h=a(280),p=a(537),b=a(69),g=a(102),O=a(475),j=a(4);const C={MediaGallery:c.default,Video:b.default,Card:h.a,Poll:u.a,Hashtag:l.b,Audio:m.default};class v extends i.PureComponent{constructor(){super(...arguments),Object(n.a)(this,"state",{media:null,index:null,lang:null,time:null,backgroundColor:null,options:null}),Object(n.a)(this,"handleOpenMedia",((t,e,a)=>{document.body.classList.add("with-modals--active"),document.documentElement.style.marginRight=`${Object(O.a)()}px`,this.setState({media:t,index:e,lang:a})})),Object(n.a)(this,"handleOpenVideo",((t,e)=>{const{components:a}=this.props,{media:o}=JSON.parse(a[e.componentIndex].getAttribute("data-props")),n=Object(d.fromJS)(o);document.body.classList.add("with-modals--active"),document.documentElement.style.marginRight=`${Object(O.a)()}px`,this.setState({media:n,lang:t,options:e})})),Object(n.a)(this,"handleCloseMedia",(()=>{document.body.classList.remove("with-modals--active"),document.documentElement.style.marginRight="0",this.setState({media:null,index:null,time:null,backgroundColor:null,options:null})})),Object(n.a)(this,"setBackgroundColor",(t=>{this.setState({backgroundColor:t})}))}render(){var t,e,a;const{components:n}=this.props;let l;return window.self===window.top&&(l=this.handleOpenVideo),Object(o.a)(g.a,{},void 0,Object(j.jsxs)(j.Fragment,{children:[Array.from(n).map(((t,e)=>{const a=t.getAttribute("data-component"),o=C[a],{media:n,card:c,poll:r,hashtag:u,...m}=JSON.parse(t.getAttribute("data-props"));return Object.assign(m,{...n?{media:Object(d.fromJS)(n)}:{},...c?{card:Object(d.fromJS)(c)}:{},...r?{poll:Object(d.fromJS)(r)}:{},...u?{hashtag:Object(d.fromJS)(u)}:{},..."Video"===a?{componentIndex:e,onOpenVideo:l}:{onOpenMedia:this.handleOpenMedia}}),Object(s.createPortal)(Object(i.createElement)(o,{...m,key:`media-${e}`}),t)})),Object(o.a)(r.a,{backgroundColor:this.state.backgroundColor,onClose:this.handleCloseMedia},void 0,this.state.media&&Object(o.a)(p.a,{media:this.state.media,index:this.state.index||0,lang:this.state.lang,currentTime:null===(t=this.state.options)||void 0===t?void 0:t.startTime,autoPlay:null===(e=this.state.options)||void 0===e?void 0:e.autoPlay,volume:null===(a=this.state.options)||void 0===a?void 0:a.defaultVolume,onClose:this.handleCloseMedia,onChangeBackgroundColor:this.setBackgroundColor}))]}))}}}}]); 2//# sourceMappingURL=media_container-e1b6f318ae015e362ec1.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.