2018-06-02 10:45:23 -07:00
|
|
|
webpackJsonp([15,25],{150:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),c=n(4),d=n.n(c),u=n(0),p=n.n(u),h=n(10),f=n.n(h),g=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),c=0;c<o;c++)r[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleClick=function(){i.props.onClick()},a=n,l()(i,a)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.type,i=e.active,o=e.columnHeaderId,s="";return t&&(s=a()("i",{className:"fa fa-fw fa-"+t+" column-header__icon"})),a()("h1",{className:f()("column-header",{active:i}),id:o||null},void 0,a()("button",{onClick:this.handleClick},void 0,s,n))},t}(p.a.PureComponent)},154:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return I});var i,a,o,s,r,l=n(2),c=n.n(l),d=n(1),u=n.n(d),p=n(3),h=n.n(p),f=n(4),g=n.n(f),v=n(0),m=n.n(v),b=n(8),y=(n.n(b),n(23)),_=n(6),k=n(35),C=n(10),M=n.n(C),O=n(12),j=Object(_.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),w=(a=i=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.handleMouseEnter=function(e){i.hoverToPlay()&&e.target.play()},i.handleMouseLeave=function(e){i.hoverToPlay()&&(e.target.pause(),e.target.currentTime=0)},i.handleClick=function(e){var t=i.props,n=t.index,a=t.onClick;0===e.button&&(e.preventDefault(),a(n)),e.stopPropagation()},a=n,h()(i,a)}return g()(t,e),t.prototype.hoverToPlay=function(){var e=this.props.attachment;return!O.a&&"gifv"===e.get("type")},t.prototype.render=function(){var e=this.props,t=e.attachment,n=e.index,i=e.size,a=e.standalone,o=50,s=100,r="auto",l="auto",d="auto",u="auto";1===i&&(o=100),(4===i||3===i&&n>0)&&(s=50),2===i?0===n?u="2px":l="2px":3===i?(0===n?u="2px":n>0&&(l="2px"),1===n?d="2px":n>1&&(r="2px")):4===i&&(0!==n&&2!==n||(u="2px"),1!==n&&3!==n||(l="2px"),n<2?d="2px":r="2px");var p="";if("image"===t.get("type")){var h=t.get("preview_url"),f=t.getIn(["meta","small","width"]),g=t.get("url"),v=t.getIn(["meta","original","width"]),m="number"==typeof v&&"number"==typeof f,b=m?g+" "+v+"w, "+h+" "+f+"w":null,y=m?"(min-width: 1025px) "+o/100*320+"px, "+o+"vw":null,_=t.getIn(["meta","focus","x"])||0,C=t.getIn(["meta","focus","y"])||0,j=100*(_/2+.5),w=100*(C/-2+.5);p=c()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||g,onClick:this.handleClick,target:"_blank"},void 0,c()("img",{src:h,srcSet:b,sizes:y,alt:t.get("description"),title:t.get("description"),style:{objectPosition:j+"% "+w+"%"}}))}else if("gifv"===t.get("type")){var I=!Object(k.a)()&&O.a;p=c()("div",{className:M()("media-gallery__gifv",{autoplay:I})},void 0,c()("video",{className:"media-gallery__item-gifv-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,autoPlay:I,loop:!0,muted:!0}),c()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return c()("div",{className:M()("media-gallery__item",{standalone:a}),style:{left:l,top:r,right:u,bottom:d,width:o+"%",height:s+"%"}},t.get("id"),p)},t}(m.a.PureComponent),i.defaultProps={standalone:!1,index:0,size:1},a),I=Object(_.g)((r=s=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.state={visible:!i.props.sensitive||O.f},i.handleOpen=function(){i.setState({visible:!i.state.visible})},i.handleClick=function(e){i.props.onOpenMedia(i.props.media,e)},i.handleRef=function(e){e&&i.setState({width:e.offsetWidth})},a=n,h()(i,a)}return g()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(b.is)(e.media,this.props.media)||this.setState({visible:!e.sensitive})},t.prototype.isStandaloneEligible=function(){var e=this.props,t=e.media;return e.standalone&&1===t.size&&t.getIn([0,"meta","smal
|