1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2f3ca27c-c4f9-4736-a45f-3df64b7495d3",e._sentryDebugIdIdentifier="sentry-dbid-2f3ca27c-c4f9-4736-a45f-3df64b7495d3")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"8dbdb72816d38fa443a02727531c938bf6407cc9"},(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1093],{70353:(e,t,s)=>{s.d(t,{Z:()=>_});var i=s(19845),n=s.n(i),r=s(45697),o=s.n(r),a=s(70982),l=s(42827),c=s(61845);var u=s(85893),d=n().bind({"new-stories-btn":"styles-module__new-stories-btn___vSMmi",text:"styles-module__text___ihkv1"}),m=function(e){var t=e.className,s=e.onClick,i=e.style;return(0,u.jsxs)("button",{type:"button",className:"".concat(d("new-stories-btn")," ").concat(t),onClick:s,style:i,children:[(0,u.jsx)(a.G,{icon:l.XS}),(0,u.jsx)("span",{className:d("text"),children:"See New Stories"})]})};m.displayName="NewStoriesButton",m.defaultProps={className:o().string,onClick:o().func,style:o().object},m.defaultProps={className:"",onClick:function(){},style:{}};const _=(0,c.Z)(m)},29987:(e,t,s)=>{s.d(t,{Z:()=>K});var i=s(70885),n=s(67294),r=s(19845),o=s.n(r),a=s(89424),l=s(54458),c=s(45987),u=s(4942),d=s(15861),m=s(156
171),_=s(43144),p=s(82963),h=s(61120),f=s(60136),y=s(64687),v=s.n(y),b=s(45697),g=s.n(b),w=s(73207),S=s.n(w),T=s(23450),k=s.n(T),x=s(67936),j=s(73727),O=s(92875),N=s(61845);const Z={"topics-group":"styles-module__topics-group___OLlPt",no_sentiment:"styles-module__no_sentiment___BSzNU",title:"styles-module__title___Xy7YF",topic:"styles-module__topic___dV_tI","show-more":"styles-module__show-more___YvPYG"};var C=s(85893),P=o().bind(Z);function F(e){var t=e.group,s=e.showMoreButton,i=e.hideSentiment,n=t.name,r=t.showMorePath,o=t.topics,a=o.length;return s&&(o=o.slice(0,5)),(0,C.jsxs)("section",{className:P("topics-group",{no_sentiment:i}),children:[(0,C.jsx)("h1",{className:Z.title,children:n}),o.map((function(e){return(0,C.jsx)(j.rU,{to:e.path,className:Z.topic,children:e.name},e.id)})),s&&a>=O.H8&&(0,C.jsx)(j.rU,{to:r,className:P("topic","show-more"),children:"Show More"})]})}F.displayName="TopicsGroup",F.defaultProps={showMoreButton:!0},F.propTypes={group:g().shape({name:g().string,showMorePath:g().string,topics:g().arrayOf(g().shape({id:g().number,name:g().string,path:g().string}))}).isRequired,showMoreButton:g().bool};const A=(0,N.Z)(F);var B=s(20564),L=s(96012),R=s(12759);const D={"included-topics":"styles-module__included-topics___Fyy3L",no_sentiment:"styles-module__no_sentiment___B9Qvs",title:"styles-module__title___skzX7",loading:"styles-module__loading___s1rvU"};var I=["done"];function E(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function U(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?E(Object(s),!0).forEach((function(t){(0,u.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):E(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var q=o().bind(D),V=function(e){function t(e){var s,i,n,r;return(0,m.Z)(this,t),i=this,n=t,r=[e],n=(0,h.Z)(n),s=(0,p.Z)(i,function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(n,r||[],(0,h.Z)(i).constructor):n.apply(i,r)),S()(s),s.state={subContinents:null,countries:null,states:null,cities:null,areas:null,places:null,stocks:null,private_companies:null,products:null,indices:null,done:!1},s.mounted=!1,s.selectedTopics=["stocks","private-companies","products","indices"],s}return(0,f.Z)(t,e),(0,_.Z)(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.prepareData()}},{key:"componentDidUpdate",value:function(e){var t=this.props.slugType;e.slugType!==t&&this.prepareData()}},{key:"componentDidCatch",value:function(){var e;(e=console).error.apply(e,arguments)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"getTopicClass",value:(n=(0,d.Z)(v().mark((function e(t){var s,i,n,r,o=arguments;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=o.length>1&&void 0!==o[1]?o[1]:O.H8,i=this.props.slugType,e.next=4,x.Z.getTopicClassBySlug(t).then((function(e){return e?x.Z.getTopicClassSlugs({id:e.topicId||e.id,per_page:s}):null})).catch((function(){return null}));case 4:return n=e.sent,r=Boolean(n&&n.slug)&&(i===a.Yx?"".concat(O.aY,"/").concat(n.slug.slug):"".concat((0,R.gA)(window.location.pathname),"/topic-class/").concat(n.slug.slug)),e.abrupt("return",n&&n.slug?{name:n.slug.title,showMorePath:r,topics:n.assets.map((function(e){return U(U({},e),{},{path:"".concat(O.aY,"/").concat(n.slug.slug,"/").concat(e.slug)})}))}:null);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getIncludedLocationsGroup",value:function(e,t,s,i){return e&&e.length?{showMorePath:"".concat(O.DP,"/").concat(s,"/").concat(i,"/").concat(k()(t)),topics:e.map((function(e){return U(U({},e),{},{path:"".concat(O.DP,"/").concat(t,"/").concat(e.slug,"/news")})}
1))}:null}},{key:"prepareData",value:(s=(0,d.Z)(v().mark((function e(){var t,s,n,r,o=this;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props,s=t.slugType,n=t.topic,r=[],e.t0=s,e.next=e.t0===a.YM?5:e.t0===a.mP?7:e.t0===a.si?9:e.t0===a.ed?11:e.t0===a.Or?13:15;break;case 5:return r.push({subContinents:this.getIncludedLocationsGroup(n.subcontinents,"subcontinent","continent",n.slug),areas:this.getIncludedLocationsGroup(n.areas,"area","continent",n.slug)}),e.abrupt("break",17);case 7:return r.push({countries:this.getIncludedLocationsGroup(n.countries,"country","subcontinent",n.slug),areas:this.getIncludedLocationsGroup(n.areas,"area","subcontinent",n.slug)}),e.abrupt("break",17);case 9:return r.push({countries:this.getIncludedLocationsGroup(n.countries,"country","country",n.slug),states:this.getIncludedLocationsGroup(n.states,"state","country",n.slug),cities:this.getIncludedLocationsGroup(n.cities,"city","country",n.slug),areas:this.getIncludedLocationsGroup(n.areas,"area","country",n.slug)}),e.abrupt("break",17);case 11:return r.push({cities:this.getIncludedLocationsGroup(n.cities,"city","state",n.slug),areas:this.getIncludedLocationsGroup(n.areas,"area","state",n.slug)}),e.abrupt("break",17);case 13:return r.push({places:this.getIncludedLocationsGroup(n.places,"place","city",n.slug),areas:this.getIncludedLocationsGroup(n.areas,"area","city",n.slug)}),e.abrupt("break",17);case 15:return r.push({}),e.abrupt("break",17);case 17:a.Bq.includes(s)||this.selectedTopics.forEach((function(e){var t=n.asset_class&&n.asset_class.slug||"";s!==a.Yx||t!==e?r.push(o.getTopicClass(e)):r.push(null)})),Promise.all(r).then((function(e){var t=o.props.onComplete,s=(0,i.Z)(e,5),n=s[0],r=n.subContinents,a=n.countries,l=n.states,c=n.cities,u=n.areas,d=n.places,m=s[1],_=s[2],p=s[3],h=s[4];o.mounted&&o.setState({subContinents:r||null,countries:a||null,states:l||null,cities:c||null,areas:u||null,places:d||null,stocks:m||null,private_companies:_||null,products:p||null,indices:h||null,done:!0},(function(){var e=(0,L.J)(o.state);delete e.done,t(e)}))}));case 19:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"render",value:function(){var e=this.props.hideSentiment,t=this.state,s=t.done,i=(0,c.Z)(t,I);return Object.values(i).some(Boolean)?s?(0,C.jsx)("section",{className:q("included-topics",{no_sentiment:e}),children:O.yU.map((function(t){return Boolean(i[t.name]&&i[t.name].topics.length)&&(0,C.jsx)(A,{group:{name:t.title,showMorePath:i[t.name].showMorePath,topics:i[t.name].topics.map((function(e){return{id:e.id,name:e.name,path:e.path}}))},showMoreButton:t.showMoreButton,hideSentiment:e},t.name)}))}):(0,C.jsx)("div",{className:D.loading,children:(0,C.jsx)(B.default,{loading:!0})}):null}}]);var s,n}(n.Component);V.displayName="IncludedTopics",V.propTypes={topic:g().object.isRequired,slugType:g().oneOf([a.Yx,a.YM,a.mP,a.si,a.ed,a.Or,a.q1,a.IS]).isRequired};const G=(0,N.Z)(V),Y={slug_news_rightside:"styles-module__slug_news_rightside___CGFA9",has_no_tab:"styles-module__has_no_tab___XdFT_",slug_tabs:"styles-module__slug_tabs___m7DGt",slug_tab:"styles-module__slug_tab___XfrQF",active:"styles-module__active___nw7qg",tab_title:"styles-module__tab_title___iiftF",slug_body:"styles-module__slug_body___A0WGU",tablet_view:"styles-module__tablet_view___QL2WB","included-topics":"styles-module__included-topics___TVfyj",metadata:"styles-module__metadata___AoRhQ",full_width:"styles-module__full_width___frQA_"};var H=o().bind(Y),M=["foreign-exchange","commodities","indices"],z=function(e){var t=(0,n.useState)("sentiment"),s=(0,i.Z)(t,2),r=s[0],o=s[1],c=function(e){o(e)},u=e.slug,d=e.parentActiveTab,m=e.isSummary,_=e.width,p=e.topic,h=e.slugType,f=e.onComplete,y=e.isTabletViewWhileChatbotIsOpened,v=[{name:"Sentiment",value:"sentiment"},{name:a.Bq.includes(h)?"Included Locations":"".concat(h===a.Yx?"Relevant":"Included"," Topics"),value:"topics"}],b=(u||{}).asset_class,g=!1;h===a.Yx&&M.includes((b||{}).slug)&&(g=!0);var w=_<=1170,S=H("slug_news_rightside",{full_width:w&&("sentiment"===d||"topics"===d),has_no_tab:m||g,tablet_view:y});return(0,C.jsxs)("div",{className:S,children:[(0,C.jsx)("div",{className:Y.slug_tabs,children:v.map((function(e){var t=e.name,s=e.value;return(0,C.jsx)(J,{name:t,value:s,activeTab:r,onSelect:c},s)}))}),(0,C.jsxs)("div",{className:Y.slug_body,children:[(!w&&"sentiment"===r||w&&"sentiment"===d)&&(0,C.jsx)("div",{className:Y.slug_sentiment,children:(0,C.jsx)(l.Z,{isFullWidth:!0,isTopic:!0,topic:p,slugType:m?"summary":h,isTabView:w})}),!m&&!g&&(0,C.jsx)("section",{hidden:!(!w&&"topics"===r||w&&"topics"===d),className:Y["included-topics"],children:h===a.Yx?(0,C.jsxs)("section",{className:Y.metadata,children:[Boolean(u.tickers&&u.tickers.length)&&(0,C.jsxs)("div",{children:[(0,C.jsx)("h2",{children:"TICKER(S)"}),(0,C.jsx)("p",{children:u.tickers.map((function(e){return e.name})).join(", ")})]}),Boolean(u.resident_countries&&u.resident_countries.length)&&(0,C.jsxs)("div",{children:[(0,C.jsx)("h2",{children:"HQ COUNTRY"}),(0,C.jsx)("p",{children:u.resident_countries.map((function(e){return e.name})).join(", ")})]})]}):(0,C.jsx)(G,{topic:u,slugType:h,onComplete:f})})]})]})};z.displayName="TopicSlugNewsSentiment";var J=function(e){var t=e.name,s=e.value,i=e.activeTab,n=e.onSelect;return(0,C.jsx)("div",{className:H("slug_tab",{active:s===i}),onClick:function(){n(s)},children:(0,C.jsx)("div",{className:Y.tab_title,children:t})})};J.displayName="SlugTabRow";const K=z},54927:(e,t,s)=>{s.r(t),s.d(t,{default:()=>me});var i=s(71002),n=s(42982),r=s(4942),o=s(15861),a=s(15671),l=s(43144),c=s(82963),u=s(61120),d=s(60136),m=s(64687),_=s.n(m),p=s(67294),h=s(45697),f=s.n(h),y=s(19845),v=s.n(y),b=s(97779),g=s(86706),w=s(16550),S=s(73207),T=s.n(S),k=s(238),x=s(85518),j=s(24412),O=s(99929),N=s(31300),Z=s(37431),C=s(52381),P=s(12759),F=s(68042),A=s(89424),B=s(1072),L=s(72451),R=s(10080),D=s(61845),I=s(30996
1),E=s(32141),U=s(94903),q=s(20564),V=s(21954),G=s(70353),Y=s(83792),H=s(43190),M=s(29987),z=s(57447),J=s(98206),K=s(53136),W=s(59498),X=s(79542),Q=s(34770),$=s(63143),ee=s(97554),te=s(78909),se=s(85893);function ie(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function ne(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(s),!0).forEach((function(t){(0,r.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):ie(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function re(e,t,s){return t=(0,u.Z)(t),(0,c.Z)(e,function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){return!1}}()?Reflect.construct(t,s||[],(0,u.Z)(e).constructor):t.apply(e,s))}var oe=(0,j.Z)({resolved:{},chunkName:function(){return"react-masonry-component"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!s.m[t]},importAsync:function(){return s.e(7638).then(s.t.bind(s,79566,23))},requireAsync:function(e){var t=this,s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then((function(e){return t.resolved[s]=!0,e}))},requireSync:function e(t){var i=this.resolve(t);return s(i)},resolve:function e(){return 79566}}),ae=(0,j.Z)({resolved:{},chunkName:function(){return"MainTrending-TrendingFilters-TrendingPersonalisationFilter"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!s.m[t]},importAsync:function(){return s.e(9386).then(s.bind(s,95020))},requireAsync:function(e){var t=this,s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then((function(e){return t.resolved[s]=!0,e}))},requireSync:function e(t){var i=this.resolve(t);return s(i)},resolve:function e(){return 95020}}),le=v().bind(z.Z),ce=function(e){function t(e){var s;(0,a.Z)(this,t),s=re(this,t,[e]),T()(s),s.state={activeTab:"stories",selectedTab:null,initialStoriesLoaded:!1,newStoriesAvailable:!1,showIncluded:!1,initialLoaded:!1,pageToken:null,summaryRequestMethod:null,isSummaryHidden:!1,activeOrderTab:"top",activeSentimentTab:"all",isAdvancedView:!0,scrollPosition:0},s.isTabActive=!1,s.timer=0,s.isScrolling=0,s.newStoriesFetching=!1,s.storyUpdateTimer=0,s.storiesRef=(0,p.createRef)(),s.mobileNewStoriesRef=(0,p.createRef)(),s.tabsBar=(0,p.createRef)(),s.isScrolling=0,s.cancelToken=k.default.CancelToken,s.sourceCancelToken=s.cancelToken.source();try{s.userSimplifiedView=JSON.parse($.Z.getItem("userSimplifiedView"))}catch(i){s.userSimplifiedView=!1}return s}return(0,d.Z)(t,e),(0,l.Z)(t,[{key:"componentDidMount",value:(u=(0,o.Z)(_().mark((function e(){var t,s,i,n,r,o,a=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.isTabActive=!0,setTimeout(this.prepareData),t=this.props,s=t.storyFilters,i=t.isLocationsTab,n=t.history,r=t.actions,e.next=5,this.fetchSelectedTabs();case 5:o=n.location.pathname.split("/").reverse()[0],this.setState({isAdvancedView:["all","very_positive","positive","neutral","negative","very_negative"].includes(o)||this.userSimplifiedView},(function(){var e=a.state,t=e.isAdvancedView,s=e.activeSentimentTab;$.Z.setItem("selectedSentimentTab",JSON.stringify({activeSentimentTab:s})),r.setSentimentTab(s),t?["all","very_positive","positive","neutral","negative","very_negative"].includes(o)?n.push("".concat((0,P.gA)(n.location.pathname),"/").concat(s)):n.push("".concat(n.location.pathname,"/").concat(s)):t||n.push((0,P.gA)(n.location.pathname))})),i&&this.fetchStories(s),window.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onResize,{passive:!0}),window.addEventListener("focus",this.onFocus,{passive:!0}),window.addEventListener("visibilitychange",this.onVisibilityChange),this.onResize();case 13:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"getSnapshotBeforeUpdate",value:function(e){var t=this.props.storyFilters;return!(0,L.oc)(t,e.storyFilters)}},{key:"componentDidUpdate",value:function(e,t,s){var i=this,n=this.props,r=n.storyFilters,o=n.slugType,a=n.slug,l=n.scrollUpPressed,c=n.actions,u=n.stories,d=n.token,m=n.orderTab,_=n.filterOpened;s&&this.setState({newStoriesAvailable:!1,initialStoriesLoaded:Boolean(u.length),activeTab:"stories"},(function(){i.scrollToStart(!1),i.fetchStories(r)})),e.slugType===o&&e.slug===a||this.prepareData(),l&&(c.toggleScrollUpState(!1),this.scrollToStart(!1)),d||(0,L.j)(r,e.storyFilters)||this.forceUpdate(),m!==e.orderTab&&this.setState({activeOrderTab:m},(function(){var e=i.state.activeOrderTab;i.handleOrderTabClick(e)})),e.filterOpened===_||_||this.setState((function(){return{selectedTab:null}}))}},{key:"componentWillUnmount",value:function(){this.stopTimer(),this.isTabActive=!1,clearTimeout(this.loadStoriesTimeout),clearTimeout(this.storyUpdateTimer),this.sourceCancelToken&&this.sourceCancelToken.cancel(),window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onResize),window.removeEventListener("focus",this.onFocus),window.removeEventListener("visibilitychange",this.onVisibilityChange);var e=this.props.actions;e.resetStoriesReduxData(),e.freezeStories(!1),e.toggleStoryFilters(!1),clearTimeout(this.timer)}},{key:"handleOrderTabClick",value:function(e){var t=this,s=this.props,i=s.actions,n=s.token,r=s.piwikEnabled;$.Z.setItem("selectedOrderTab",JSON.stringify({activeOrderTab:e})),r&&_paq.push(["trackEvent","Filters","Story order",e]),this.setState({activeOrderTab:e},(function(){var e=t.state.activeOrderTab;i.filterByStoryOrder(e,n)}))}},{key:"handleSentimentTabClick",value:function(e){var t=this,s=this.props,i=s.actions,n=s.history;i.setSentimentTab(e),$.Z.setItem("selectedSentimentTab",JSON.stringify({activeSentimentTab:e})),this.setState({activeSentimentTab:e},(function(){var e=t.state.activeSentimentTab,s=n.location.pathname.split("/").reverse();e&&(["all","very_positive","positive","neutral","negative","very_negative"].includes(s[0])?n.push("".concat((0,P.gA)(n.location.pathname),"/").concat(e)):n.push("".concat(n.location.pathname,"/").concat(e)),i.setSentimentTab(e))}))}},{key:"handleSimplifiedViewTabsClick",value:function(e){var t=this;this.fetchSelectedTabs();var s=this.props,i=s.history,n=s.actions,r=s.token;this.setState({isAdvancedView:e},(function(){var e=t.state,s=e.isAdvancedView,o=e.activeSentimentTab,a=e.activeOrderTab,l=i.location.pathname.split("/").reverse();s?(["all","very_positive","positive","neutral","negative","very_negative"].includes(l[0])?i.push("".concat((0,P.gA)(i.location.pathname),"/").concat(o)):i.push("".concat(i.location.pathname,"/").concat(o)),n.filterByStoryOrder(a,r),$.Z.setItem("selectedOrderTab",JSON.stringify({activeOrderTab:a}))):s||(["all","very_positive","positive","neutral","negative","very_negative"].includes(l[0])?i.push((0,P.gA)(i.location.pathname)):i.push(i.location.pathname))}))}},{key:"onVisibilityChange",value:function(){if(document.hidden)this.sourceCancelToken&&this.sourceCancelToken.cancel(),clearTimeout(this.timer),this.isTabActive=!1;else{this.sourceCancelToken||(this.sourceCancelToken=this.cancelToken.source()),this.isTabActive=!0,clearTimeout(this.storyUpdateTimer),this.storyUpdateTimer=0;var e=this.props.storyFilters;this.fetchStories(e)}}},{key:"onResize",value:function(){this.setState({width:window.innerWidth})}},{key:"onScroll",value:function(){var e=this,t=this.props,s=t.promobarHeight,i=t.freezeStories,n=t.actions,r=this.state.scrollPosition,o=this.storiesRef.current.offsetTop,a=this.storiesRef.current.offsetHeight,l=void 0===window.innerHeight?document.documentElement.clientHeight:window.innerHeight,c=void 0===window.scrollY?window.document.documentElement.scrollTop:window.scrollY,u=this.storiesRef.current.getBoundingClientRect().top-s<=0,d=this.mobileNewStoriesRef.current.getBoundingClientRect().top-s<=0;clearTimeout(this.isScrolling),this.isScrolling=setTimeout((function(){Math.abs(r-window.scrollY)>250&&i&&n.freezeStories(!1),e.setState({scrollPosition:window.scrollY})}),100),this.setState({isFilterFixed:u,isNewStoriesFixed:d}),c+l>=a+o&&this.onScrollLoadData()}},{key:"onFocus",value:function(){var e=this;this.state.hasStoryError&&this.setState({pageToken:null,newStoriesAvailable:!1},(function(){var t=e.props.storyFilters;e.loadStories(t)}))}},{key:"onScrollLoadData",value:(c=(0,o.Z)(_().mark((function e(){var t,s,i,n,r,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,s=t.loading,i=t.storyFilters,n=this.state,r=n.initialStoriesLoaded,o=n.pageToken,!this.newStoriesFetching&&!s&&r){e.next=4;break}return e.abrupt("return");case 4:if("EOD"===o){e.next=9;break}return this.newStoriesFetching=!0,e.next=8,this.fetchStories(i,!0);case 8:this.newStoriesFetching=!1;case 9:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"onIncludedTopicsComplete",value:function(e){this.setState({showIncluded:Object.values(e).some(Boolean)})}},{key:"getParams",value:function(e){var t=this.props.accessLevels,s=this.state,i=(s.isAdvancedView,s.activeSentimentTab,t.includes(W.Uq),(0,R.FI)(ne({},e),"categories","order_by","languages","min_score","translate_to","fold_similar_stories","query","all_languages","languages","asset_classes","sectors","industries","subindustries","startup_categories","isRefresh"));return e.all_languages?delete i.languages:i.languages="en",i.order_by="latest",i.selected_time_filter="predefined",i.time_filter="month1",i.domains_filtering_mode="all",i.all_languages=Boolean(e.all_languages),i.fold_similar_stories=e.group_similar_stories,i.query=(0,L.ZZ)(i.query),i}},{key:"stopTimer",value:function(){clearTimeout(this.timer)}},{key:"fetchStories",value:(r=(0,o.Z)(_().mark((function e(t){var s,i,r,o,a,l,c,u,d,m,p,h,f,y,v,b,g,w,S,T,x,j=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=j.length>1&&void 0!==j[1]&&j[1],i=this.props,r=i.stories,o=i.actions,a=i.freezeStories,l=i.storyFilters,c=i.earliestSearchDate,u=i.slug,d=i.slugType,m=i.isSummary,p=this.state,h=p.initialStoriesLoaded,f=p.pageToken,l.conflictsChecked){e.next=5;break}return e.abrupt("return");case 5:if(this.stopTimer(),!["asset_classes","sectors","industries","subindustries","startup_categories","query"].every((function(e){return!t[e]}))){e.next=9;break}return e.abrupt("return");case 9:if(y=ne(ne({},this.getParams(t)),s&&{page_token:f}),a){e.next=29;break}return r.length&&o.fetchTrendingStoriesBegin(),s||(clearTimeout(this.loadStoriesTimeout),clearTimeout(this.storyUpdateTimer),v=d===A.Yx&&m?"AssetClass":d.toLowerCase().replace(/^./,(function(e){return e.toUpperCase()})),this.setState({summaryRequestMethod:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return I.Z.getStories(ne(ne({},y),{},{only_summaries:!0,number_of_summaries:e,summarization_coverage:"".concat(v,"#").concat(u.id)},t),c)}})),this.sourceCancelToken&&this.sourceCancelToken.cancel(),this.cancelToken=k.default.CancelToken,this.sourceCancelToken=this.cancelToken.source(),e.next=18,I.Z.getStories(y,c,{token:this.sourceCancelToken.token,skipSmallList:!0});case 18:if(b=e.sent,g=b.stories,w=b.nextPageToken,S=b.cancelled,T=b.error,this.setState({hasStoryError:T&&!S}),!S){e.next=26;break}return e.abrupt("return");case 26:o.fetchTrendingStoriesSuccess(s?[].concat((0,n.Z)(r),(0,n.Z)(g)):g),h||this.setState({initialStoriesLoaded:!0}),this.setState({pageToken:w,isSummaryHidden:!g.length});case 29:"never"!==t.refresh_rate&&Number(t.refresh_rate)&&this.isTabActive&&(x=this.state.isFilterFixed,s||x?this.storyUpdateTimer||(this.storyUpdateTimer=setTimeout(this.checkForUpdate,t.refresh_rate)):(clearTimeout(this.storyUpdateTimer),this.storyUpdateTimer=0,this.timer=setTimeout(this.fetchStories,t.refresh_rate,l))),this.setState({initialLoaded:!0});case 31:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"checkForUpdate",value:(i=(0,o.Z)(_().mark((function e(){var t,s,i,r,o,a,l;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,s=t.storyFilters,i=t.stories,r=t.earliestSearchDate,o=this.getParams(s),e.next=4,I.Z.getStories(o,r,{token:this.sourceCancelToken.token,skipSmallList:!0});case 4:if(a=e.sent,l=a.stories,!a.cancelled){e.next=9;break}return e.abrupt("return");case 9:new Set([].concat((0,n.Z)(i.slice(0,B.aw).map((function(e){return e.id}))),(0,n.Z)(l.map((function(e){return e.id}))))).size>B.aw?this.setState({newStoriesAvailable:!0}):this.storyUpdateTimer=setTimeout(this.checkForUpdate,s.refresh_rate);case 11:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"changeTab",value:function(e){this.setState({activeTab:e})}},{key:"fetchSelectedTabs",value:(s=(0,o.Z)(_().mark((function e(){var t,s,i,n,r,o,a,l=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props,s=t.history,i=t.actions,n=t.token,r=JSON.parse($.Z.getItem("selectedOrderTab")),o=JSON.parse($.Z.getItem("selectedSentimentTab")),a=s.location.pathname.split("/").reverse()[0],null!==r&&void 0!==r&&r.activeOrderTab&&this.setState({activeOrderTab:(null===r||void 0===r?void 0:r.activeOrderTab)||"top"},(function(){var e=l.state.activeOrderTab;i.filterByStoryOrder(e,n)})),["all","very_positive","positive","neutral","negative","very_negative"].includes(a)?this.setState({activeSentimentTab:a},(function(){var e=l.state.activeSentimentTab;$.Z.setItem("selectedSentimentTab",JSON.stringify({activeSentimentTab:e}))})):null!==o&&void 0!==o&&o.activeSentimentTab&&this.setState({activeSentimentTab:(null===o||void 0===o?void 0:o.activeSentimentTab)||"all"});case 6:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"prepareData",value:function(){var e=this.props,t=e.slug,s=e.isSummary,i=e.slugType,n=e.actions,r=e.setAssetClass;switch(i){case A.Yx:s&&r(String(t.id));break;case A.SZ:n.filterBySectors(String(t.id));break;case A.J3:n.filterByIndustries(String(t.id));break;case A.$j:n.filterBySubindustries(String(t.id));break;case A.En:n.filterByStartupCategories(String(t.id))}}},{key:"openOptions",value:function(e){var t=this;this.setState((function(t){var s=t.selectedTab;return{selectedTab:s&&s.type===e.type?null:e}}),(function(){var e=t.props.actions,s=t.state.selectedTab;e.toggleStoryFilters((null===s||void 0===s?void 0:s.type)===V.Z)}))}},{key:"scrollToStart",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.props.storyFilters;window.scrollTo({top:0,behavior:"smooth"}),this.setState({newStoriesAvailable:!1}),e&&this.fetchStories(t)}},{key:"handleRefreshEvent",value:function(){var e=this,t=this.props,s=t.storyFilters,i=t.stories;this.setState({newStoriesAvailable:!1,initialStoriesLoaded:Boolean(i.length),activeTab:"stories"},(function(){e.scrollToStart(!1),e.fetchStories(ne(ne({},s),{},{isRefresh:!0}))}
1))}},{key:"render",value:function(){var e,t=this,s=this.props,i=s.stories,n=s.mode,r=s.user,o=s.slugType,a=s.loading,l=s.isSummary,c=s.actions,u=s.storyFilters,d=s.slug,m=s.piwikEnabled,_=s.parents,p=s.promobarHeight,h=s.hideSentiment,f=s.isSEOPage,y=s.isTabletViewWhileChatbotIsOpened,v=s.slugName,b=s.assetType,g=this.state,w=g.activeTab,S=g.selectedTab,T=g.initialStoriesLoaded,k=g.newStoriesAvailable,j=g.showIncluded,O=g.initialLoaded,N=g.width,Z=g.isFilterFixed,C=g.isNewStoriesFixed,P=g.pageToken,R=(g.summaryRequestMethod,g.isSummaryHidden,g.activeOrderTab),D=g.activeSentimentTab,I=g.isAdvancedView,H=x.UA?u.user_newsfeed_compactview:u.user_newsfeed_compactview_web,J="tiles"===(x.UA?u.user_newsfeed_view:u.user_newsfeed_view_web)&&!H,K=le("filters-container",{fixed:Z&&N>767,hasTab:N<=1170,tiles:J}),W=le("stories",{"stories-not-tiles":!J,tablet_view:y}),Q=J&&N>767,$=Q?oe:"div",ie=ne({className:le({tiles_wrapper:J,without_tiles:!J,without_compact:!H})},Q&&{disableImagesLoaded:!0,options:{gutter:10,percentPosition:!0,resize:!1,isResizeBound:!1,transitionDuration:0},ref:function(e){t.masonry=t.masonry||e.masonry}}),re=[te._H,te.Rj,te.tT,te.uG,te.bQ,te.xm,te.yT,te.AO,te.rh,te.Tq,te.My,te.T_,te.oB,te.FP,te.At,te.Mu].includes(b);return e=A.Bq.includes(o)?"Included Locations":"".concat(o===A.Yx?"Relevant":"Included"," Topics"),(0,se.jsxs)("article",{className:le("topics-body",{tablet_view:y}),ref:this.storiesRef,children:[(0,se.jsxs)("div",{className:le("simplifiedview__Tabs",{show:I}),children:[(0,se.jsx)(ee.Z,{tabs:B.rs,onTabClick:this.handleOrderTabClick,classname:"topics-slug__subTab",ref:this.tabsBar,activeTab:R,show:I}),(0,se.jsx)(ee.Z,{tabs:B.gG,onTabClick:this.handleSentimentTabClick,classname:"topics-slug__subTab",ref:this.tabsBar,activeTab:D,show:I})]}),(0,se.jsxs)("nav",{className:z.Z.tabs,children:[(0,se.jsx)("div",{className:le("tab",{active:"stories"===w}),onClick:function(){return t.changeTab("stories")},children:"Stories"}),re&&(0,se.jsx)("div",{className:le("tab",{active:"sentiment"===w}),onClick:function(){return t.changeTab("sentiment")},children:"Sentiment"}),(0,se.jsx)("div",{className:le("tab",{active:"topics"===w}),onClick:function(){return t.changeTab("topics")},hidden:!j,children:e})]}),(0,se.jsxs)("section",{hidden:n!==F.ln&&"stories"!==w,className:K,children:[(0,se.jsx)(X.Z,{clickEvent:function(){return t.openOptions((0,se.jsx)(V.Z,{onSimplifiedViewTabsClick:t.handleSimplifiedViewTabsClick,isSimpleLayout:I}))},className:le("story-filters-wrapper"),refreshEvent:this.handleRefreshEvent,hasFilterPersonalisation:!1,mode:n,clickTrendingEvent:function(){return t.openOptions((0,se.jsx)(ae,{user:r}))},activeTrendingEvent:(null===S||void 0===S?void 0:S.type)===ae,onSimplifiedViewTabsClick:this.handleSimplifiedViewTabsClick,isSimpleLayout:I,slugName:d.slug.toLowerCase()}),(0,se.jsx)(G.Z,{className:le("new-stories-btn",{visible:k,fixed:Z&&N>767}),onClick:this.scrollToStart,style:{top:"".concat(Z&&N>767?p+15:0,"px")}})]}),(0,se.jsx)("section",{ref:this.mobileNewStoriesRef,hidden:n!==F.ln&&"stories"!==w,className:le("new-stories-btn_mobile",{show:k}),children:(0,se.jsx)(G.Z,{className:le("new-stories-btn",{visible:k,fixed:C}),onClick:this.scrollToStart})}),(0,se.jsxs)("div",{className:z.Z.content,children:[(0,se.jsxs)("section",{hidden:n!==F.ln&&"stories"!==w,className:W,children:[S&&(0,se.jsx)("section",{className:le("options-container","opened",{"story-filter":(null===S||void 0===S?void 0:S.type)===V.Z,trendingFilter:(null===S||void 0===S?void 0:S.type)===ae}),children:S}),(0,se.jsx)("div",{hidden:!k,className:le("new-stories-btn-wrapper"),children:(0,se.jsx)(G.Z,{className:le("new-stories-btn",{visible:k}),onClick:this.scrollToStart})}),(0,se.jsxs)("section",{className:le("stories-cards",{"stories-loading":a&&!this.newStoriesFetching,tiles:J}),children:[T||this.newStoriesFetching?(0,se.jsx)($,ne(ne({},ie),{},{children:i.map((function(e,s){return(0,se.jsx)(E.Z,{user:r,type:e.type,story:e,onHide:c.hideStory,onFreezeStories:c.freezeStories,onLikeChanged:c.updateStoriesInfo,onBookmarkClick:c.updateStoriesBookmark,piwikEnabled:m,loading:a,masonryObj:t.masonry,index:s,isSEOPage:f,slugName:v,slugType:o,hasBigScreenDesign:!0},e.id)}))})):(0,se.jsx)(q.default,{loading:!0}),a&&this.newStoriesFetching&&(0,se.jsx)(q.default,{loading:!0,static:!0,centered:!0}),i.length<20&&"EOD"===P&&T&&O&&(0,se.jsx)(U.Z,{locations:A.Bq.includes(o),seo:!0,query:(0,L.ZZ)(u.query),seoTopic:d,loadingStories:a,storiesLength:i.length,parents:_,isAdvancedView:I,oldStories:i,slugName:v,isSEOPage:f,slugType:o}),i.length>=30&&"EOD"===P&&(0,se.jsx)(Y.Z,{hideButton:!0})]})]}),re&&(0,se.jsx)(M.Z,{hideSentiment:h,width:N,mode:n,topic:d,slug:d,slugType:o,parentActiveTab:w,isSummary:l,onComplete:this.onIncludedTopicsComplete,query:u.query,isTabletViewWhileChatbotIsOpened:y})]})]})}}]);var s,i,r,c,u}(p.Component);function ue(e){return ne(ne({},e),{}
1,{loading:e.stories.loading,token:e.watchlistReducer.userToken,storyFilters:e.storyFilters,freezeStories:e.stories.freeze_stories,items:e.searchReducers.searchItems,earliestSearchDate:e.subscriptions.permissions.earliest_search_date,stories:e.storyFilters.categories?I.Z.filterStories(e.stories.cards,e.storyFilters):[],scrollUpPressed:e.common.scrollUpPressed,promobarHeight:e.promobar.height,accessLevels:e.subscriptions.permissions.access_levels,orderTab:e.storyFilters.order_by,filterOpened:e.userPreferencesReducer.filterOpened})}function de(e){return{actions:(0,b.DE)(ne(ne(ne(ne(ne({},O),N),Z),C),Q),e),setAssetClass:function(t){return e(Z.filterByAdvancedSettings({asset_classes:t}))}}}ce.displayName="TopicSlugBody",ce.propTypes={isSummary:f().bool,mode:f().number,slug:f().object.isRequired,parents:f().arrayOf(f().string),slugType:f().oneOf([A.Yx,A.SZ,A.J3,A.$j,A.En,A.YM,A.mP,A.si,A.ed,A.Or,A.q1,A.IS]).isRequired,user:function(e,t,s){return"object"!==(0,i.Z)(e[t])?new TypeError("Invalid prop `".concat(t,"` supplied to `").concat(s,"`. Validation failed.")):null}},ce.defaultProps={isSummary:!1,parents:[],mode:F.ln,user:null};const me=(0,D.Z)((0,g.$j)(ue,de)((0,w.withRouter)(ce)))},32712:(e,t,s)=>{s.d(t,{Z:()=>m});var i=s(67294),n=s(19845),r=s.n(n),o=s(45697),a=s.n(o),l=s(61845);var c=s(85893),u=r().bind({"tab-item":"styles-module__tab-item___PoYwL",active:"styles-module__active___l3ppB",big_screen:"styles-module__big_screen___JbfYL"}),d=(0,i.memo)((function(e){var t=e.className,s=e.active,i=e.children,n=e.onClick,r=e.hasBigScreenDesign,o=e.style;return(0,c.jsx)("button",{type:"button",className:"".concat(u("tab-item",{active:s,big_screen:r})," ").concat(t),onClick:n,style:o,children:i})}));d.propTypes={className:a().string,onClick:a().func,active:a().bool},d.defaultProps={className:"",onClick:function(){},active:!1};const m=(0,l.Z)(d)},14041:(e,t,s)=>{s.d(t,{Z:()=>T});var i=s(70885),n=s(67294),r=s(19845),o=s.n(r),a=s(86706),l=s(45697),c=s.n(l),u=s(85518),d=s(70982),m=s(39575),_=s(40853),p=s(32712),h=s(61845),f=s(24412),y=s(56512),v=s(85893),b=o().bind(y.Z),g=(0,f.Z)({resolved:{},chunkName:function(){return"react-horizontal-scrolling-menu"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!s.m[t]},importAsync:function(){return s.e(7962).then(s.t.bind(s,6426,23))},requireAsync:function(e){var t=this,s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then((function(e){return t.resolved[s]=!0,e}))},requireSync:function e(t){var i=this.resolve(t);return s(i)},resolve:function e(){return 6426}}),w=(0,n.memo)((function(e){var t=e.direction,s=e.arrowClassName;return(0,v.jsx)("div",{className:"".concat(b("arrow",t,s)," ").concat(t),children:(0,v.jsx)(d.G,{icon:"left"===t?m.A3:_._t})})})),S=(0,n.memo)((function(e){var t=e.data,s=e.onClick,r=e.scrollBy,o=e.className,l=e.itemClassName,c=e.arrowClassName,d=e.withUnderline,m=e.dragging,_=e.theme,h=e.scrollToSelected,f=e.skipTabGap,y=e.chatbotWindow,S=(0,n.useRef)(),T=(0,n.useState)(!1),k=(0,i.Z)(T,2),x=k[0],j=k[1],O=(0,n.useState)(!0),N=(0,i.Z)(O,2),Z=N[0],C=N[1],P=(0,n.useState)(0),F=(0,i.Z)(P,2),A=F[0],B=F[1],L=(0,n.useRef)(null),R=(0,n.useRef)(null),D=(0,a.v9)((function(e){return e.chatbot.isChatbotOpened})),I=(0,a.v9)((function(e){return e.common.width>1024})),E=D&&I,U=(0,n.useState)([]),q=(0,i.Z)(U,2),V=q[0],G=q[1],Y=function(e){var t=E||null!==L&&void 0!==L&&L.current?1e3:0;setTimeout((function(){var t;if("left"===e)j(null===S||void 0===S||null===(t=S.current)||void 0===t||null===(t=t.state)||void 0===t?void 0:t.leftArrowVisible);else if("right"===e){var s;C(null===S||void 0===S||null===(s=S.current)||void 0===s||null===(s=s.state)||void 0===s?void 0:s.rightArrowVisible)}else{var i,n;C(null===S||void 0===S||null===(i=S.current)||void 0===i||null===(i=i.state)||void 0===i?void 0:i.rightArrowVisible),j(null===S||void 0===S||null===(n=S.current)||void 0===n||null===(n=n.state)||void 0===n?void 0:n.leftArrowVisible)}}),t)};(0,n.useEffect)((function(){var e=E||null!==L&&void 0!==L&&L.current?800:0,i=setTimeout((function(){var e,i,n=t.map((function(e,i){return(0,v.jsx)(p.Z,{className:b("item",l,e.className,_,{first:f&&0===i,last:i===t.length-1,active:e.active}),style:e.style,active:e.active,onClick:function(){e.isDisable||s(e.id)},hasBigScreenDesign:!0,children:e.content},e.id)}));L.current=E,G(n),(null===(e=R.current)||void 0===e?void 0:e.clientWidth)>(null===(i=S.current)||void 0===i?void 0:i.allItemsWidth)&&S.current.menuInner&&(S.current.menuInner.menuInner.elem.style.transform="translate3d(0px, 0px, 0px)")}),e);return function(){return clearTimeout(i)}}),[t,s,_,l,E]);var H=t.find((function(e){return e.active}));return(0,n.useEffect)((function(){if(h){var e=setTimeout((function(){B(V.length)}),500);return function(){clearTimeout(e)}}}),[V.length,h]),(0,v.jsx)("div",{ref:R,className:b("items-scroll-bar",o,_,{"with-underline":d}),children:(0,v.jsx)(g,{hideArrows:!0,hideSingleArrow:!0,alignCenter:!1,arrowDisabledClass:"d-none",translate:1,transition:h&&A!==V.length?0:.4,data:V,arrowLeft:(0,v.jsx)(w,{direction:"left",arrowClassName:c}),arrowRight:(0,v.jsx)(w,{direction:"right",arrowClassName:c}),scrollBy:r,dragging:null!==m&&void 0!==m?m:(u.tq||y)&&(x||Z),ref:S,onFirstItemVisible:function(){u.tq||y||Y("left")},onLastItemVisible:function(){u.tq||y||Y("right")}
1,onUpdate:function(){u.tq||y||Y()},selected:H&&String(H.id),scrollToSelected:h})})}));S.propTypes={data:c().arrayOf(c().shape({id:c().oneOfType([c().string,c().number]),content:c().node,active:c().bool,className:c().string})).isRequired,onClick:c().func,scrollBy:c().number,className:c().string,itemClassName:c().string,arrowClassName:c().string,withUnderline:c().bool,dragging:c().bool,theme:c().oneOf(["default","black"]),scrollToSelected:c().bool,skipTabGap:c().bool},S.defaultProps={onClick:function(){},scrollBy:3,className:"",itemClassName:"",arrowClassName:"",withUnderline:!1,dragging:null,theme:"default",scrollToSelected:!1,skipTabGap:!1};const T=(0,h.Z)(S)},97554:(e,t,s)=>{s.d(t,{Z:()=>y});var i=s(4942),n=s(67294),r=s(86706),o=s(19845),a=s.n(o);var l=s(61370),c=s(34770),u=s(14041),d=s(63143),m=s(85893);function _(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function p(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?_(Object(s),!0).forEach((function(t){(0,i.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):_(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var h=a().bind({scrollable_tabs_container:"styles-module__scrollable_tabs_container___Vrrbh",subTab:"styles-module__subTab___XPKDl","topics-body__subTab":"styles-module__topics-body__subTab___HpIyn","topics-slug__subTab":"styles-module__topics-slug__subTab___w310Z",publicationTabs:"styles-module__publicationTabs___ws6NX",scrollable_tabs_item:"styles-module__scrollable_tabs_item___da5ch",scrollable_tabs_arrow:"styles-module__scrollable_tabs_arrow___fXsKZ","topics-crypto__subTab":"styles-module__topics-crypto__subTab___GwwWs"}),f=function(e,t){var s=e.tabs,i=e.activeTab,o=e.onTabClick,a=e.className,_=e.withUnderline,f=void 0!==_&&_,y=e.classname,v=e.arrowClassName,b=void 0===v?"":v,g=e.mainClassName,w=void 0===g?"":g,S=e.itemClassName,T=void 0===S?"":S,k=(0,l.Z)().width,x=(0,r.v9)((function(e){return e.promobar})).height,j=(0,r.I0)(),O=(0,n.useRef)(),N=(0,n.useMemo)((function(){return s.map((function(e){return p(p({},e),{},{active:i===e.id})}))}),[s,i]),Z=(0,n.useCallback)((function(e){var t=O.current.getBoundingClientRect().top;if(t<=0){var s=window.pageYOffset+t;o(e,s)}else o(e);j((0,c.toggleStoryFilters)(!1))}),[j,o]);return(0,n.useEffect)((function(){"function"===typeof t?t(O.current):t instanceof Object&&"current"in t&&(t.current=O.current)}),[t]),(0,n.useEffect)((function(){(k>767||d.Z.getItem("mobilePopupSeen"))&&document.querySelector(":root").style.setProperty("--promobar-height","".concat(x,"px"))}),[k,x]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{ref:O,id:"watchlists_tab_bar_holder"}),(0,m.jsx)("div",{className:h("scrollable_tabs",a),children:(0,m.jsx)(u.Z,{onClick:Z,data:N,scrollToSelected:!0,withUnderline:f,arrowClassName:h("scrollable_tabs_arrow",b),className:h("scrollable_tabs_container",y,w),itemClassName:h("scrollable_tabs_item",T)})})]})};const y=(0,n.memo)((0,n.forwardRef)(f))},43190:(e,t,s)=>{var i=s(42982),n=s(15861),r=s(4942),o=s(70885),a=s(64687),l=s.n(a),c=s(67294),u=s(19845),d=s.n(u),m=s(45697),_=s.n(m),p=s(86706),h=s(70982),f=s(1028),y=s(13910),v=s(51968),b=s(86057),g=s(55437),w=s(20564),S=s(85890),T=s(94829),k=s(59498),x=s(39771),j=s(44660),O=s(37431),N=s(24412),Z=s(61370),C=s(31590),P=s(30996),F=s(61845),A=s(18928),B=s(9881),L=s(87949),R=s(85893);function D(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function I(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?D(Object(s),!0).forEach((function(t){(0,r.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):D(Object(s)).forEac
1h((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var E=(0,N.Z)({resolved:{},chunkName:function(){return"Modals-SummarisationHideModal"},isReady:function(e){var t=this.resolve(e);return!0===this.resolved[t]&&!!s.m[t]},importAsync:function(){return s.e(1174).then(s.bind(s,27528))},requireAsync:function(e){var t=this,s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then((function(e){return t.resolved[s]=!0,e}))},requireSync:function e(t){var i=this.resolve(t);return s(i)},resolve:function e(){return 27528}}),U=d().bind(L.Z),q=function(e){var t=e.className,s=e.storiesEndpoint,r=e.page,a=e.isTilesView,u=e.isHidden,d=e.isHomePage,m=e.hasBigScreenDesign,_=e.history,N=(e.isWatchlist,e.directlyData),F=e.chatbot,A=(0,c.useState)({summaries:[],loading:!0}),B=(0,o.Z)(A,2),D=B[0],q=D.summaries,V=D.loading,G=B[1],Y=(0,c.useState)(!1),H=(0,o.Z)(Y,2),M=H[0],z=H[1],J=(0,c.useState)(!1),K=(0,o.Z)(J,2),W=K[0],X=K[1],Q=(0,c.useRef)(!0),$=(0,Z.Z)().width,ee=(0,C.Z)().isFinpromptPages,te=(0,p.v9)((function(e){var t;return null===(t=e.storyFilters.summarization_enabled)||void 0===t||t})),se=(0,p.v9)((function(e){var t=e.storyFilters;return Boolean(t.languages&&t.languages.split(",").includes("en"))})),ie=(0,p.v9)((function(e){var t=e.subscriptions;return t.permissionsInitialized&&t.permissions.features.includes(T.nF)})),ne=(0,p.v9)((function(e){return e.subscriptions.permissions.max_summary_size})),re=(0,p.v9)((function(e){return e.subscriptions.permissions.access_levels.includes(k.dP)})),oe=(0,p.v9)((function(e){return e.watchlistReducer.userToken})),ae=(0,p.v9)((function(e){return e.chatbot.isChatbotOpened})),le=(0,p.v9)((function(e){return e.chatbot.expanded})),ce=(0,p.I0)(),ue=(0,c.useCallback)((function(e){z(!1),ce((0,O.toggleSummarisation)(e,oe))}),[ce,oe]),de=ie&&(te||F)&&!u;(0,c.useEffect)((function(){if(de&&se){if(s||null!==N&&void 0!==N&&N.length){var e=!0,t=null;if(G((function(e){return I(I({},e),{},{loading:!0})})),re){var r;if(s)null===(r=s(ne,{limit:500,fold_similar_stories:!1,languages:"en",all_languages:!1}))||void 0===r||r.then(function(){var s=(0,n.Z)(l().mark((function s(i){var n;return l().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(e){s.next=2;break}return s.abrupt("return");case 2:if(!i.summariesKey){s.next=10;break}return t=P.Z.waitSummaries(i.summariesKey,i.cacheType,i.isRefresh),s.next=6,t.promise;case 6:n=s.sent,G({loading:!1,summaries:n}),s.next=11;break;case 10:G({loading:!1,summaries:[]});case 11:case"end":return s.stop()}}),s)})));return function(e){return s.apply(this,arguments)}}());else if(null!==N&&void 0!==N&&N.length){if(!e)return;G({loading:!1,summaries:(0,i.Z)(N)})}return function(){var s,i;e=!1,null===(s=t)||void 0===s||null===(i=s.cancel)||void 0===i||i.call(s)}}G({loading:!1,summaries:x.Z})}}else G(re?{loading:!1,summaries:[]}:{loading:!1,summaries:x.Z})}),[s,ne,de,se,re]),(0,c.useEffect)((function(){Q.current&&(Q.current=!1)}),[]);return de?(0,R.jsxs)("section",{className:"".concat(U("summarisation",r,{tiles:a,big_screen:m,"summarisation-gold":re&&se,"summarisation-with-loading":V,"chatbot--small":F&&ae&&!le,chatbot:F})," ").concat(t),children:[!F&&(0,R.jsx)(h.G,{icon:f.faXmark,className:U("summarisation-close"),onClick:function(){return z(!0)}}),V&&(Q.current||$<=1024||$>1024&&!W)?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(w.default,{loading:!0,static:!0,centered:!0,className:U("summarisation-preloader")}),(0,R.jsx)("div",{className:U("summarisation-loading-text"),children:"Key Headlines are loading\u2026"})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{className:U("summarisation-container",{"summarisation-full":re}),children:[(0,R.jsxs)("header",{className:U("summarisation-header"),children:[(0,R.jsx)("h3",{className:U("summarisation-header-title"),children:"Key Headlines"}),(0,R.jsx)(b.default,{className:U("summarisation-header-tooltip",{homePageTooltip:d}),hasBigScreenDesign:m,children:d?(0,R.jsxs)(R.Fragment,{children:["A machine-learning-driven set of key headlines of relevant content. \xa0",(0,R.jsx)(g.Z,{to:"https://www.cityfalcon.ai/features/summarisation",external:!0,children:"Learn more"})]}):(0,R.jsxs)(R.Fragment,{children:["A machine-learning-driven set of key headlines for this feed. Not to be used as the sole basis for investments. \xa0",(0,R.jsx)(g.Z,{to:"https://www.cityfalcon.ai/features/summarisation",external:!0,children:"Learn more about Key Headlines."})]})}),(0,R.jsx)(S.Z,{videoLink:"https://cityfalcon.wistia.com/medias/k5usrkqi3k",videoLinkMobile:"https://cityfalcon.wistia.com/medias/2eznzz1ra6",additionalStyles:U("summary_play_icon"),tooltipAdditionalContentStyle:U("summary_play_icon_tooltip")})]}),(0,R.jsx)(v.Z,{summaries:q,blurred:!re,collapsed:re&&W,loading:V&&!Q.current&&W,hasBigScreenDesign:m}),(0,R.jsxs)("footer",{className:U("summarisation-footer",{"summarisation-gold-footer":re&&se,"summarisation-gold-colapsed-footer":W}),children:[(0,R.jsx)("div",{className:U("summarisation-footer-collapse",{collapsed:W}),onClick:function(){return X((function(e){return!e}))},children:re&&q.length>2&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("span",{children:["Show\xa0",W?"Less":"More"]}),(0,R.jsx)(h.G,{icon:y.pt})]})}),"watchlist"===r&&re&&W&&(0,R.jsxs)("div",{className:U("summarisation-footer-help"),children:[(0,R.jsx)("span",{children:"Some topics are missing?\xa0"}),(0,R.jsx)(g.Z,{to:"https://help.cityfalcon.com/hc/en-us/articles/360006073397#missingtopics",external:!0,children:"Find out why"})]})]})]}),!re&&(0,R.jsxs)("div",{className:U("summarisation-premium"),children:[(0,R.jsxs)(b.default,{icon:(0,R.jsx)("span",{className:L.Z["summarisation-premium-badge"],children:"GOLD"}),className:U("summarisation-premium-tooltip",{"summarisation-premium-tooltip-no-stories":!q.length}),onClick:function(){var e,t;ee?null===(e=window.open("".concat(j.Dy,"/pricing"),"_blank"))||void 0===e||null===(t=e.focu
1s)||void 0===t||t.call(e):_.replace("/pricing")},hasBigScreenDesign:m,children:[(0,R.jsx)(g.Z,{to:ee?"".concat(j.Dy,"/pricing"):"/pricing",external:ee,children:"Upgrade to Gold"}),"to see the full summary"]}),(0,R.jsxs)("div",{className:L.Z["summarisation-premium-message"],children:["Understand more in less time.\xa0",(0,R.jsx)("br",{}),(0,R.jsx)(g.Z,{to:ee?"".concat(j.Dy,"/pricing"):"/pricing",external:ee,children:"Upgrade"}),"\xa0for access or\xa0",(0,R.jsx)(g.Z,{to:"https://help.cityfalcon.com/hc/en-us/articles/360006073397",external:!0,children:"see examples"}),"\xa0first."]})]})]}),(0,R.jsx)(E,{show:M,closeModal:function(){return z(!1)},onConfirm:function(){return ue(!1)},hasBigScreenDesign:m})]}):null};q.displayName="Summarisation",q.propTypes={className:_().string,storiesEndpoint:_().func,page:_().string},q.defaultProps={className:"",storiesEndpoint:null,page:""};var V=(0,A.Z)((0,F.Z)((0,B.Z)(q)))},61370:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(86706);const n=function(){return{width:(0,i.v9)((function(e){return e.common.width})),height:(0,i.v9)((function(e){return e.common.height}))}}},57447:(e,t,s)=>{s.d(t,{Z:()=>i});const i={"topics-body":"styles-module__topics-body___GPt3e",simplifiedview__Tabs:"styles-module__simplifiedview__Tabs___yAbPL",show:"styles-module__show___Rz0uM",tabs:"styles-module__tabs___lxky6",tab:"styles-module__tab___yvItH",active:"styles-module__active___UF6aW","filters-container":"styles-module__filters-container___i74aH",button:"styles-module__button____igWq",tiles:"styles-module__tiles___qsVhd","options-container":"styles-module__options-container___K3wUw",opened:"styles-module__opened___qTUCJ","story-filter":"styles-module__story-filter___NFbwr",trendingFilter:"styles-module__trendingFilter___XqASw",content:"styles-module__content___CJf3G",stories:"styles-module__stories___BB_zr","stories-not-tiles":"styles-module__stories-not-tiles___ny_AQ","stories-cards":"styles-module__stories-cards___UTcDf","stories-loading":"styles-module__stories-loading___Yyw5L",tablet_view:"styles-module__tablet_view___uhZPW","included-topics":"styles-module__included-topics___srK2A",metadata:"styles-module__metadata___AwprS","new-stories-btn":"styles-module__new-stories-btn___NJ5gI",fixed:"styles-module__fixed___X4lNn",visible:"styles-module__visible___qjlqB","new-stories-btn_mobile":"styles-module__new-stories-btn_mobile___SQsLU",without_tiles:"styles-module__without_tiles___uVHH7",tiles_wrapper:"styles-module__tiles_wrapper___yDFF_",hasTab:"styles-module__hasTab___Lr0dC","story-filters-wrapper":"styles-module__story-filters-wrapper___HYBkX","new-stories-btn-wrapper":"styles-module__new-stories-btn-wrapper___LR7oj",without_compact:"styles-module__without_compact___MKX79"}},56512:(e,t,s)=>{s.d(t,{Z:()=>i});const i={"items-scroll-bar":"styles-module__items-scroll-bar___zq1Ly",item:"styles-module__item___GeYeB",first:"styles-module__first___qYJUB",last:"styles-module__last___mvQDH",black:"styles-module__black___Ugy_I",active:"styles-module__active___qeYl7",disable:"styles-module__disable___cYZjX",arrow:"styles-module__arrow___Pj8h_",left:"styles-module__left___xzHC7",right:"styles-module__right___yNbtx","with-underline":"styles-module__with-underline___PlI2u"}},87949:(e,t,s)=>{s.d(t,{Z:()=>i});const i={summarisation:"styles-module__summarisation___p38Ec",tiles:"styles-module__tiles___MR5Cd",watchlist:"styles-module__watchlist___UwS6e","summarisation-preloader":"styles-module__summarisation-preloader___qyGJy","summarisation-loading-text":"styles-module__summarisation-loading-text___FwTFY","summarisation-close":"styles-module__summarisation-close___hUre5","summarisation-container":"styles-module__summarisation-container___QYVuN","summarisation-header":"styles-module__summarisation-header___RGlbE","summarisation-header-title":"styles-module__summarisation-header-title___FciSQ","summarisation-header-tooltip":"styles-module__summarisation-header-tooltip___PIYSK",homePageTooltip:"styles-module__homePageTooltip___SLFyV","summarisation-premium":"styles-module__summarisation-premium___BXHhg","summarisation-premium-badge":"styles-module__summarisation-premium-badge___TbR89","summarisation-premium-message":"styles-module__summarisation-premium-message___EB0yB","summarisation-premium-tooltip":"styles-module__summarisation-premium-tooltip___TizBu","summarisation-premium-tooltip-no-stories":"styles-module__summarisation-premium-tooltip-no-stories___IUY1z","summarisation-footer":"styles-module__summarisation-footer___HZp8S","summarisation-footer-collapse":"styles-module__summarisation-footer-collapse___cyKLk",collapsed:"styles-module__collapsed___EJq_H","summarisation-footer-help":"styles-module__summarisation-footer-help___AgjwO","summarisation-gold":"styles-module__summarisation-gold____pfR4","summarisation-gold-footer":"styles-module__summarisation-gold-footer___Ea7JH","summarisation-gold-colapsed-footer":"styles-module__summarisation-gold-colapsed-footer___idl3B",chatbot:"styles-module__chatbot___Kmlhp","chatbot--small":"styles-module__chatbot--small___Za5qp",summary_play_icon:"styles-module__summary_play_icon___Ihs64",summary_play_icon_tooltip:"styles-module__summary_play_icon_tooltip___tG1j3","summarisation-gold-styles":"styles-module__summarisation-gold-styles___JmoiK",not_wl:"styles-module__not_wl___P7Tfy",big_screen:"styles-module__big_screen___Mw8lF","summarisation-badge":"styles-module__summarisation-badge___OlG1g","summarisation-with-loading":"styles-module__summarisation-with-loading___fm8zh","summarisation-full":"styles-module__summarisation-full___qNj8A"}}}]); 2//# sourceMappingURL=TopicSlugBody-bcca898473438805c907.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.