if (self.CavalryLogger) { CavalryLogger.start_js(["3hYMG"]); } __d("ImmutableValue",["invariant","isNode"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h="_DONT_EVER_TYPE_THIS_SECRET_KEY";function i(a){a===i[h]||g(0,5608)}i.mergeAllPropertiesInto=function(a,b){var c=b.length;for(var d=0;dc&&(this.isLoadingContent=!0,this.$3())};a.prototype.$3=function(){__p&&__p();var a=b("XPluginTabAsyncRendererController").getURIBuilder().getURI(),c=this.props.tab.configData;new(b("AsyncRequest"))().setURI(a).setMethod("POST").setData({cursor:this.cursor,config_json:JSON.stringify(c),key:this.props.tab.key}).setHandler(function(a){this.setState({isFetchingComponent:!1,asyncContentLoaded:!0},function(){var c=a.payload;this.isLoadingContent=!1;if(this.hasMoreContent){var d=b("DOMQuery").scry(this.refs.container,"._1_lk");d=d[d.length-1];b("DOM").appendContent(d,c.content.markup)}}.bind(this))}.bind(this)).send()};a.prototype.$4=function(){this.scrollListener=b("Event").listen(this.refs.container,"scroll",function(){this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.scrollTimeout=setTimeout(function(){return this.$2()}.bind(this),250)}.bind(this));var a=b("DOMQuery").find(this.refs.container,"._10b6");b("Event").listen(a,"noMoreContent",function(){this.hasMoreContent=!1,this.scrollListener.remove()}.bind(this));b("Event").listen(a,"setCursor",function(a){this.cursor=a.getData()}.bind(this))};a.prototype.$1=function(){if(!this.state.asyncContentLoaded&&!this.state.isFetchingComponent){this.setState({isFetchingComponent:!0});var a=b("XPluginTabAsyncRendererController").getURIBuilder().getURI();new(b("AsyncRequest"))().setURI(a).setMethod("POST").setData({config_json:JSON.stringify(this.props.tab.configData),key:this.props.tab.key}).setHandler(function(a){this.setState({isFetchingComponent:!1,asyncContentLoaded:!0},function(){var c=a.payload;b("DOM").setContent(b("ReactDOM").findDOMNode(this.refs.container),c.content.markup);this.props.tab.canLoadMore&&(this.cursor="",this.$4())}.bind(this))}.bind(this)).send()}};a.prototype.render=function(){return b("React").createElement("div",{className:this.props.isActive?"":"hidden_elem"},b("React").createElement("div",{style:{maxHeight:this.props.tabHeight+"px"},className:"_10b4"+(this.state.isFetchingComponent?" hidden_elem":""),ref:"container"}),b("React").createElement("div",{className:"_10b5"+(this.state.isFetchingComponent?"":" hidden_elem")},b("React").createElement(b("XUISpinner.react"),{className:"_4g7o",size:"large"})))};e.exports=a}),null); __d("PluginTabContainer.react",["cx","PluginTabControl.react","PluginTabFetcher.react","React"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h;c=babelHelpers.inherits(a,b("React").Component);h=c&&c.prototype;function a(a,b){h.constructor.call(this,a,b),this.state={activeTabKey:this.props.activeTabKey}}a.prototype.componentDidMount=function(){this.props.tabs.map(function(a){return this.onTabLoaded(a)}.bind(this))};a.prototype.onTabLoaded=function(a){};a.prototype.onTabSelected=function(a){this.setState({activeTabKey:a})};a.prototype.render=function(){var a=this.props.tabs.length;return a===0?null:b("React").createElement("div",null,a>1?b("React").createElement(b("PluginTabControl.react"),{tabs:this.props.tabs,activeTabKey:this.state.activeTabKey,onTabSelected:function(a){return this.onTabSelected(a)}.bind(this)}):null,b("React").createElement("div",{className:"_2hkj"},this.props.tabs.map(function(a){return b("React").createElement(b("PluginTabFetcher.react"),{key:a.key,tab:a,isActive:a.key===this.state.activeTabKey,tabHeight:this.props.tabHeight})}.bind(this))))};e.exports=a}),null); __d("PagePluginTabContainer.react",["PagePluginEvents","PagePluginLogger","PluginTabContainer.react"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g;c=babelHelpers.inherits(a,b("PluginTabContainer.react"));g=c&&c.prototype;function a(a,c){g.constructor.call(this,a,c),this.$PagePluginTabContainer1=new(b("PagePluginLogger"))(a.pageID,a.refererURI)}a.prototype.onTabLoaded=function(a){this.$PagePluginTabContainer1.notify(b("PagePluginEvents").page_plugin.tab.configured,a.key)};a.prototype.onTabSelected=function(a){this.$PagePluginTabContainer1.notify(b("PagePluginEvents").page_plugin.tab.click,a),g.onTabSelected.call(this,a)};e.exports=a}),null);