define("wGooglePlusOne",["lodash","react","core","reactDOM","santaProps"],function(a,b,c,d,e){"use strict";var f=c.compMixins;function g(a){var b=a.compProp.size+"_"+a.compProp.annotation;switch(b){case"small_bubble":return{width:70,height:15};case"small_none":return{width:24,height:15};case"small_inline":return{width:250,height:15};case"medium_bubble":return{width:90,height:20};case"medium_none":return{width:32,height:20};case"medium_inline":return{width:250,height:20};case"standard_bubble":return{width:106,height:24};case"standard_none":return{width:38,height:24};case"standard_inline":return{width:250,height:24};case"tall_bubble":return{width:50,height:60};case"tall_none":return{width:50,height:20};case"tall_inline":return{width:250,height:20};default:return{width:50,height:60}}}return{displayName:"WGooglePlusOne",mixins:[f.skinBasedComp],propTypes:{externalScriptLoader:e.Types.SiteAspects.externalScriptLoader.isRequired,cookie:e.Types.RequestModel.cookie,currentUrl:e.Types.currentUrl,compProp:e.Types.Component.compProp.isRequired},static:{useSantaTypes:true},componentWillMount:function(){this.props.externalScriptLoader.loadScript("GOOGLE",this.renderTag,{cookie:this.props.cookie,currentUrl:this.props.currentUrl})},componentDidMount:function(){if(window.gapi){this.renderTag()}},componentDidUpdate:function(b){var c=["annotation","size"];if(!a.isEqual(a.pick(this.props.compProp,c),a.pick(b.compProp,c))){this.renderTag()}},renderTag:function(){var b=this.refs.googlePlus||this.refs[""];var c=g(this.props);if(a.get(window,"gapi.plusone")){window.gapi.plusone.render(d.findDOMNode(b),{size:this.props.compProp.size,annotation:this.props.compProp.annotation,width:c.width})}},componentWillUnmount:function(){this.props.externalScriptLoader.unsubscribe("GOOGLE",this.renderTag)},getSkinProperties:function(){return{googlePlus:{children:b.DOM.div({className:"g-plusone"}),ref:"googlePlus"},"":{style:g(this.props)}}}}});