define("htmlComponent",["lodash","react","core","utils","santaProps"],function(a,b,c,d,e){"use strict";var f=c.compMixins;var g=d.urlUtils;function h(){var a=this.props.compData.url;var b=this.props.compData.sourceType==="external";var c=this.props.serviceTopologyStaticHTMLComponentUrl;if(!b&&d.stringUtils.startsWith(a,"html/")){a=c+a}a=g.addProtocolIfMissing(a);c=g.addProtocolIfMissing(c);if(!b){a=a.replace("//static.wixstatic.com",c)}return a}function i(a){return!!a.url}function j(){var b={sandbox:"allow-same-origin allow-forms allow-popups allow-scripts allow-pointer-lock"};var c={width:"100%",height:"100%",ref:"iframe",onLoad:this.onLoad,src:i(this.props.compData)?h.call(this):""};return k.call(this)?a.assign(c,b):c}function k(){return this.props.useSandboxInHTMLComp}return{displayName:"HtmlComponent",mixins:[f.skinBasedComp],propTypes:{compData:e.Types.Component.compData,serviceTopologyStaticHTMLComponentUrl:e.Types.ServiceTopology.staticHTMLComponentUrl,useSandboxInHTMLComp:e.Types.RendererModel.useSandboxInHTMLComp,os:e.Types.Browser.os.isRequired,htmlAspect:e.Types.SiteAspects.htmlPostMessageAspect},statics:{useSantaTypes:true},onLoad:function(){this.props.htmlAspect.registerComponent(this.props.id,this.refs.iframe.contentWindow)},getInitialState:function(){return{$content:i(this.props.compData)?"hasContent":"noContent"}},componentWillUnmount:function(){this.props.htmlAspect.unRegisterComponent(this.props.id)},componentWillReceiveProps:function(){this.setState({$content:i(this.props.compData)?"hasContent":"noContent"})},getSkinProperties:function(){var c={};if(this.props.os.ios===true){a.assign(c,{overflow:"scroll","-webkit-overflow-scrolling":"touch"})}return{"":{style:c},iFrameHolder:{children:[b.DOM.iframe(j.call(this))]}}}}});