{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/explore/components/story.jsx","webpack:///./app/javascript/mastodon/features/explore/links.jsx","webpack:///./app/javascript/mastodon/features/explore/statuses.jsx","webpack:///./app/javascript/mastodon/features/explore/components/card.jsx","webpack:///./app/javascript/mastodon/features/explore/suggestions.jsx","webpack:///./app/javascript/mastodon/features/explore/tags.jsx","webpack:///./app/javascript/mastodon/features/explore/index.tsx","webpack:///./app/javascript/material-icons/400-24px/find_in_page.svg","webpack:///./app/javascript/mastodon/features/search/components/search_section.tsx","webpack:///./app/javascript/mastodon/features/search/index.tsx"],"names":["sharesCountRenderer","displayNumber","pluralReady","_jsx","FormattedMessage","id","defaultMessage","values","count","counter","Story","_ref","url","title","lang","publisher","publishedAt","author","authorAccount","sharedTimes","thumbnail","thumbnailDescription","blurhash","expanded","thumbnailLoaded","setThumbnailLoaded","useState","handleImageLoad","useCallback","className","classNames","Skeleton","width","_jsxs","_Fragment","children","RelativeTimestamp","timestamp","href","target","rel","name","AuthorLink","accountId","Link","to","encodeURIComponent","ShortNumber","value","renderer","Blurhash","hash","src","onLoad","alt","Links","PureComponent","componentDidMount","dispatch","links","history","this","props","action","size","fetchTrendingLinks","render","isLoading","banner","DismissableBanner","isEmpty","LoadingIndicator","map","link","i","get","getIn","connect","state","withRouter","Statuses","constructor","arguments","_defineProperty","_debounce","expandTrendingStatuses","leading","statusIds","fetchTrendingStatuses","hasMore","multiColumn","emptyMessage","StatusList","trackScroll","prepend","alwaysPrepend","timelineId","scrollKey","onLoadMore","handleLoadMore","bindToDocument","withCounters","getStatusList","messages","defineMessages","dismiss","Card","source","intl","useIntl","account","useSelector","useDispatch","handleDismiss","dismissSuggestion","label","domain","Avatar","DisplayName","IconButton","iconComponent","CloseIcon","onClick","formatMessage","FollowButton","Suggestions","suggestions","length","fetchSuggestions","suggestion","account_id","sources","items","Tags","hashtags","fetchTrendingHashtags","hashtag","Hashtag","isLoadingHashtags","Explore","signedIn","useIdentity","columnRef","useRef","handleHeaderClick","_columnRef$current","current","scrollTop","Column","ref","ColumnHeader","icon","ExploreIcon","Search","singleColumn","NavLink","exact","tagName","Switch","Route","path","component","Helmet","content","_path","_extends","Object","assign","bind","n","e","t","r","hasOwnProperty","call","apply","titleId","xmlns","height","viewBox","d","SearchSection","onClickMore","hidePeek","list","slice","SearchResults","_q$trim","q","useSearchParam","type","setType","useAppSelector","search","loading","results","useAppDispatch","mappedType","param","includes","trimmedValue","trim","useEffect","submitSearch","undefined","handleSelectAll","handleSelectAccounts","handleSelectHashtags","handleSelectStatuses","expandSearch","filteredResults","accounts","statuses","Icon","PeopleIcon","Account","TagIcon","FindInPageIcon","Status","accountIds","SearchIcon","initialValue","ScrollableList","showLoading"],"mappings":"6UAiBA,MAAMA,EAAsBA,CAACC,EAAeC,IAC1CC,YAACC,IAAgB,CACfC,GAAE,sBACFC,eAAe,gEACfC,OAAQ,CACNC,MAAON,EACPO,QAASN,YAAA,mBAASF,MAKXS,EAAQC,IAad,IAbe,IACpBC,EAAG,MACHC,EAAK,KACLC,EAAI,UACJC,EAAS,YACTC,EAAW,OACXC,EAAM,cACNC,EAAa,YACbC,EAAW,UACXC,EAAS,qBACTC,EAAoB,SACpBC,EAAQ,SACRC,GACDZ,EACC,MAAOa,EAAiBC,GAAsBC,oBAAS,GAEjDC,EAAkBC,uBAAY,KAClCH,GAAmB,EAAK,GACvB,CAACA,IAEJ,OACEtB,YAAA,OAAK0B,UAAWC,IAAW,QAAS,CAAEP,mBAAY,EAChDpB,YAAA,OAAK0B,UAAU,uBAAgB,EAC7B1B,YAAA,OAAK0B,UAAU,kCAA2B,EACvCd,EAAYZ,YAAA,QAAMW,KAAMA,QAAK,EAAEC,GAAoBZ,YAAC4B,IAAQ,CAACC,MAAO,KAAQhB,GAAeiB,eAAAC,WAAA,CAAAC,SAAA,CAAE,MAAGhC,YAACiC,IAAiB,CAACC,UAAWrB,QAGjIb,YAAA,KAAG0B,UAAU,wBAAwBf,KAAMA,EAAMwB,KAAM1B,EA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AgB,CACfC,GAAE,+BACFC,eAAe,mDAIrB8F,gBAAc,UAEb8G,IAIL/M,YAAC+J,IAAM,UACL/J,YAAA,kBAAQyG,EAAKe,cAAcpB,EAAS1F,MAAO,CAAE+K,OAC7CzL,YAAA,QAAMsC,KAAK,SAAS0H,QAAQ,eAEvB,EAKEuB,W","file":"js/features/explore-c8baed8650d391f8da8b.chunk.js","sourcesContent":["import PropTypes from 'prop-types';\nimport { useState, useCallback } from 'react';\n\nimport { FormattedMessage } from 'react-intl';\n\nimport classNames from 'classnames';\nimport { Link } from 'react-router-dom';\n\n\n\nimport { Blurhash } from 'mastodon/components/blurhash';\nimport { RelativeTimestamp } from 'mastodon/components/relative_timestamp';\nimport { ShortNumber } from 'mastodon/components/short_number';\nimport { Skeleton } from 'mastodon/components/skeleton';\n\nimport { AuthorLink } from './author_link';\n\nconst sharesCountRenderer = (displayNumber, pluralReady) => (\n  <FormattedMessage\n    id='link_preview.shares'\n    defaultMessage='{count, plural, one {{counter} post} other {{counter} posts}}'\n    values={{\n      count: pluralReady,\n      counter: <strong>{displayNumber}</strong>,\n    }}\n  />\n);\n\nexport const Story = ({\n  url,\n  title,\n  lang,\n  publisher,\n  publishedAt,\n  author,\n  authorAccount,\n  sharedTimes,\n  thumbnail,\n  thumbnailDescription,\n  blurhash,\n  expanded\n}) => {\n  const [thumbnailLoaded, setThumbnailLoaded] = useState(false);\n\n  const handleImageLoad = useCallback(() => {\n    setThumbnailLoaded(true);\n  }, [setThumbnailLoaded]);\n\n  return (\n    <div className={classNames('story', { expanded })}>\n      <div className='story__details'>\n        <div className='story__details__publisher'>\n          {publisher ? <span lang={lang}>{publisher}</span> : <Skeleton width={50} />}{publishedAt && <> · <RelativeTimestamp timestamp={publishedAt} /></>}\n        </div>\n\n        <a className='story__details__title' lang={lang} href={url} target='blank' rel='noopener'>\n          {title ? title : <Skeleton />}\n        </a>\n\n        <div className='story__details__shared'>\n          {author ? <FormattedMessage id='link_preview.author' className='story__details__shared__author' defaultMessage='By {name}' values={{ name: authorAccount ? <AuthorLink accountId={authorAccount} /> : <strong>{author}</strong> }} /> : <span />}\n          {typeof sharedTimes === 'number' ? <Link className='story__details__shared__pill' to={`/links/${encodeURIComponent(url)}`}><ShortNumber value={sharedTimes} renderer={sharesCountRenderer} /></Link> : <Skeleton width='10ch' />}\n        </div>\n      </div>\n\n      <a className='story__thumbnail' href={url} target='blank' rel='noopener'>\n        {thumbnail ? (\n          <>\n            <div className={classNames('story__thumbnail__preview', { 'story__thumbnail__preview--hidden': thumbnailLoaded })}><Blurhash hash={blurhash} /></div>\n            <img src={thumbnail} onLoad={handleImageLoad} alt={thumbnailDescription} title={thumbnailDescription} lang={lang} />\n          </>\n        ) : <Skeleton />}\n      </a>\n    </div>\n  );\n};\n\nStory.propTypes = {\n  url: PropTypes.string,\n  title: PropTypes.string,\n  lang: PropTypes.string,\n  publisher: PropTypes.string,\n  publishedAt: PropTypes.string,\n  author: PropTypes.string,\n  authorAccount: PropTypes.string,\n  sharedTimes: PropTypes.number,\n  thumbnail: PropTypes.string,\n  thumbnailDescription: PropTypes.string,\n  blurhash: PropTypes.string,\n  expanded: PropTypes.bool,\n};\n","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { FormattedMessage } from 'react-intl';\n\nimport { withRouter } from 'react-router-dom';\n\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\nimport { fetchTrendingLinks } from 'mastodon/actions/trends';\nimport { DismissableBanner } from 'mastodon/components/dismissable_banner';\nimport { LoadingIndicator } from 'mastodon/components/loading_indicator';\nimport { WithRouterPropTypes } from 'mastodon/utils/react_router';\n\nimport { Story } from './components/story';\n\nconst mapStateToProps = state => ({\n  links: state.getIn(['trends', 'links', 'items']),\n  isLoading: state.getIn(['trends', 'links', 'isLoading']),\n});\n\nclass Links extends PureComponent {\n\n  static propTypes = {\n    links: ImmutablePropTypes.list,\n    isLoading: PropTypes.bool,\n    dispatch: PropTypes.func.isRequired,\n    ...WithRouterPropTypes,\n  };\n\n  componentDidMount () {\n    const { dispatch, links, history } = this.props;\n\n    // If we're navigating back to the screen, do not trigger a reload\n    if (history.action === 'POP' && links.size > 0) {\n      return;\n    }\n\n    dispatch(fetchTrendingLinks());\n  }\n\n  render () {\n    const { isLoading, links } = this.props;\n\n    const banner = (\n      <DismissableBanner id='explore/links'>\n        <FormattedMessage id='dismissable_banner.explore_links' defaultMessage='These news stories are being shared the most on the fediverse today. Newer news stories posted by more different people are ranked higher.' />\n      </DismissableBanner>\n    );\n\n    if (!isLoading && links.isEmpty()) {\n      return (\n        <div className='explore__links scrollable scrollable--flex'>\n          {banner}\n\n          <div className='empty-column-indicator'>\n            <FormattedMessage id='empty_column.explore_statuses' defaultMessage='Nothing is trending right now. Check back later!' />\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className='explore__links scrollable' data-nosnippet>\n        {banner}\n\n        {isLoading ? (<LoadingIndicator />) : links.map((link, i) => (\n          <Story\n            key={link.get('id')}\n            expanded={i === 0}\n            lang={link.get('language')}\n            url={link.get('url')}\n            title={link.get('title')}\n            publisher={link.get('provider_name')}\n            publishedAt={link.get('published_at')}\n            author={link.get('author_name')}\n            authorAccount={link.getIn(['authors', 0, 'account', 'id'])}\n            sharedTimes={link.getIn(['history', 0, 'accounts']) * 1 + link.getIn(['history', 1, 'accounts']) * 1}\n            thumbnail={link.get('image')}\n            thumbnailDescription={link.get('image_description')}\n            blurhash={link.get('blurhash')}\n          />\n        ))}\n      </div>\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps)(withRouter(Links));\n","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { FormattedMessage } from 'react-intl';\n\nimport { withRouter } from 'react-router-dom';\n\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\nimport { debounce } from 'lodash';\n\n\nimport { fetchTrendingStatuses, expandTrendingStatuses } from 'mastodon/actions/trends';\nimport { DismissableBanner } from 'mastodon/components/dismissable_banner';\nimport StatusList from 'mastodon/components/status_list';\nimport { getStatusList } from 'mastodon/selectors';\nimport { WithRouterPropTypes } from 'mastodon/utils/react_router';\n\nconst mapStateToProps = state => ({\n  statusIds: getStatusList(state, 'trending'),\n  isLoading: state.getIn(['status_lists', 'trending', 'isLoading'], true),\n  hasMore: !!state.getIn(['status_lists', 'trending', 'next']),\n});\n\nclass Statuses extends PureComponent {\n\n  static propTypes = {\n    statusIds: ImmutablePropTypes.list,\n    isLoading: PropTypes.bool,\n    hasMore: PropTypes.bool,\n    multiColumn: PropTypes.bool,\n    dispatch: PropTypes.func.isRequired,\n    ...WithRouterPropTypes,\n  };\n\n  componentDidMount () {\n    const { dispatch, statusIds, history } = this.props;\n\n    // If we're navigating back to the screen, do not trigger a reload\n    if (history.action === 'POP' && statusIds.size > 0) {\n      return;\n    }\n\n    dispatch(fetchTrendingStatuses());\n  }\n\n  handleLoadMore = debounce(() => {\n    const { dispatch } = this.props;\n    dispatch(expandTrendingStatuses());\n  }, 300, { leading: true });\n\n  render () {\n    const { isLoading, hasMore, statusIds, multiColumn } = this.props;\n\n    const emptyMessage = <FormattedMessage id='empty_column.explore_statuses' defaultMessage='Nothing is trending right now. Check back later!' />;\n\n    return (\n      <StatusList\n        trackScroll\n        prepend={<DismissableBanner id='explore/statuses'><FormattedMessage id='dismissable_banner.explore_statuses' defaultMessage='These posts from across the fediverse are gaining traction today. Newer posts with more boosts and favorites are ranked higher.' /></DismissableBanner>}\n        alwaysPrepend\n        timelineId='explore'\n        statusIds={statusIds}\n        scrollKey='explore-statuses'\n        hasMore={hasMore}\n        isLoading={isLoading}\n        onLoadMore={this.handleLoadMore}\n        emptyMessage={emptyMessage}\n        bindToDocument={!multiColumn}\n        withCounters\n      />\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps)(withRouter(Statuses));\n","import PropTypes from 'prop-types';\nimport { useCallback } from 'react';\n\nimport { FormattedMessage, useIntl, defineMessages } from 'react-intl';\n\nimport { Link } from 'react-router-dom';\n\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport CloseIcon from '@/material-icons/400-24px/close.svg?react';\nimport { dismissSuggestion } from 'mastodon/actions/suggestions';\nimport { Avatar } from 'mastodon/components/avatar';\nimport { DisplayName } from 'mastodon/components/display_name';\nimport { FollowButton } from 'mastodon/components/follow_button';\nimport { IconButton } from 'mastodon/components/icon_button';\nimport { domain } from 'mastodon/initial_state';\n\nconst messages = defineMessages({\n  dismiss: { id: 'follow_suggestions.dismiss', defaultMessage: \"Don't show again\" },\n});\n\nexport const Card = ({ id, source }) => {\n  const intl = useIntl();\n  const account = useSelector(state => state.getIn(['accounts', id]));\n  const dispatch = useDispatch();\n\n  const handleDismiss = useCallback(() => {\n    dispatch(dismissSuggestion(id));\n  }, [id, dispatch]);\n\n  let label;\n\n  switch (source) {\n  case 'friends_of_friends':\n    label = <FormattedMessage id='follow_suggestions.friends_of_friends_longer' defaultMessage='Popular among people you follow' />;\n    break;\n  case 'similar_to_recently_followed':\n    label = <FormattedMessage id='follow_suggestions.similar_to_recently_followed_longer' defaultMessage='Similar to profiles you recently followed' />;\n    break;\n  case 'featured':\n    label = <FormattedMessage id='follow_suggestions.featured_longer' defaultMessage='Hand-picked by the {domain} team' values={{ domain }} />;\n    break;\n  case 'most_followed':\n    label = <FormattedMessage id='follow_suggestions.popular_suggestion_longer' defaultMessage='Popular on {domain}' values={{ domain }} />;\n    break;\n  case 'most_interactions':\n    label = <FormattedMessage id='follow_suggestions.popular_suggestion_longer' defaultMessage='Popular on {domain}' values={{ domain }} />;\n    break;\n  }\n\n  return (\n    <div className='explore__suggestions__card'>\n      <div className='explore__suggestions__card__source'>\n        {label}\n      </div>\n\n      <div className='explore__suggestions__card__body'>\n        <Link to={`/@${account.get('acct')}`} data-hover-card-account={account.id}><Avatar account={account} size={48} /></Link>\n\n        <div className='explore__suggestions__card__body__main'>\n          <div className='explore__suggestions__card__body__main__name-button'>\n            <Link className='explore__suggestions__card__body__main__name-button__name' to={`/@${account.get('acct')}`} data-hover-card-account={account.id}><DisplayName account={account} /></Link>\n            <IconButton iconComponent={CloseIcon} onClick={handleDismiss} title={intl.formatMessage(messages.dismiss)} />\n            <FollowButton accountId={account.get('id')} />\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n};\n\nCard.propTypes = {\n  id: PropTypes.string.isRequired,\n  source: PropTypes.oneOf(['friends_of_friends', 'similar_to_recently_followed', 'featured', 'most_followed', 'most_interactions']),\n};\n","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { FormattedMessage } from 'react-intl';\n\nimport { withRouter } from 'react-router-dom';\n\nimport { connect } from 'react-redux';\n\nimport { fetchSuggestions } from 'mastodon/actions/suggestions';\nimport { LoadingIndicator } from 'mastodon/components/loading_indicator';\nimport { WithRouterPropTypes } from 'mastodon/utils/react_router';\n\nimport { Card } from './components/card';\n\nconst mapStateToProps = state => ({\n  suggestions: state.suggestions.items,\n  isLoading: state.suggestions.isLoading,\n});\n\nclass Suggestions extends PureComponent {\n\n  static propTypes = {\n    isLoading: PropTypes.bool,\n    suggestions: PropTypes.array,\n    dispatch: PropTypes.func.isRequired,\n    ...WithRouterPropTypes,\n  };\n\n  componentDidMount () {\n    const { dispatch, suggestions, history } = this.props;\n\n    // If we're navigating back to the screen, do not trigger a reload\n    if (history.action === 'POP' && suggestions.length > 0) {\n      return;\n    }\n\n    dispatch(fetchSuggestions());\n  }\n\n  render () {\n    const { isLoading, suggestions } = this.props;\n\n    if (!isLoading && suggestions.length === 0) {\n      return (\n        <div className='explore__suggestions scrollable scrollable--flex'>\n          <div className='empty-column-indicator'>\n            <FormattedMessage id='empty_column.explore_statuses' defaultMessage='Nothing is trending right now. Check back later!' />\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className='explore__suggestions scrollable' data-nosnippet>\n        {isLoading ? <LoadingIndicator /> : suggestions.map(suggestion => (\n          <Card\n            key={suggestion.account_id}\n            id={suggestion.account_id}\n            source={suggestion.sources[0]}\n          />\n        ))}\n      </div>\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps)(withRouter(Suggestions));\n","import PropTypes from 'prop-types';\nimport { PureComponent } from 'react';\n\nimport { FormattedMessage } from 'react-intl';\n\nimport { withRouter } from 'react-router-dom';\n\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\n\nimport { fetchTrendingHashtags } from 'mastodon/actions/trends';\nimport { DismissableBanner } from 'mastodon/components/dismissable_banner';\nimport { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';\nimport { LoadingIndicator } from 'mastodon/components/loading_indicator';\nimport { WithRouterPropTypes } from 'mastodon/utils/react_router';\n\nconst mapStateToProps = state => ({\n  hashtags: state.getIn(['trends', 'tags', 'items']),\n  isLoadingHashtags: state.getIn(['trends', 'tags', 'isLoading']),\n});\n\nclass Tags extends PureComponent {\n\n  static propTypes = {\n    hashtags: ImmutablePropTypes.list,\n    isLoading: PropTypes.bool,\n    dispatch: PropTypes.func.isRequired,\n    ...WithRouterPropTypes,\n  };\n\n  componentDidMount () {\n    const { dispatch, history, hashtags } = this.props;\n\n    // If we're navigating back to the screen, do not trigger a reload\n    if (history.action === 'POP' && hashtags.size > 0) {\n      return;\n    }\n\n    dispatch(fetchTrendingHashtags());\n  }\n\n  render () {\n    const { isLoading, hashtags } = this.props;\n\n    const banner = (\n      <DismissableBanner id='explore/tags'>\n        <FormattedMessage id='dismissable_banner.explore_tags' defaultMessage='These hashtags are gaining traction on the fediverse today. Hashtags that are used by more different people are ranked higher.' />\n      </DismissableBanner>\n    );\n\n    if (!isLoading && hashtags.isEmpty()) {\n      return (\n        <div className='explore__links scrollable scrollable--flex'>\n          {banner}\n\n          <div className='empty-column-indicator'>\n            <FormattedMessage id='empty_column.explore_statuses' defaultMessage='Nothing is trending right now. Check back later!' />\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className='scrollable explore__links' data-nosnippet>\n        {banner}\n\n        {isLoading ? (<LoadingIndicator />) : hashtags.map(hashtag => (\n          <Hashtag key={hashtag.get('name')} hashtag={hashtag} />\n        ))}\n      </div>\n    );\n  }\n\n}\n\nexport default connect(mapStateToProps)(withRouter(Tags));\n","import { useCallback, useRef } from 'react';\n\nimport { defineMessages, useIntl, FormattedMessage } from 'react-intl';\n\nimport { Helmet } from 'react-helmet';\nimport { NavLink, Switch, Route } from 'react-router-dom';\n\nimport ExploreIcon from '@/material-icons/400-24px/explore.svg?react';\nimport { Column } from 'mastodon/components/column';\nimport type { ColumnRef } from 'mastodon/components/column';\nimport { ColumnHeader } from 'mastodon/components/column_header';\nimport { Search } from 'mastodon/features/compose/components/search';\nimport { useIdentity } from 'mastodon/identity_context';\n\nimport Links from './links';\nimport Statuses from './statuses';\nimport Suggestions from './suggestions';\nimport Tags from './tags';\n\nconst messages = defineMessages({\n  title: { id: 'explore.title', defaultMessage: 'Explore' },\n});\n\nconst Explore: React.FC<{ multiColumn: boolean }> = ({ multiColumn }) => {\n  const { signedIn } = useIdentity();\n  const intl = useIntl();\n  const columnRef = useRef<ColumnRef>(null);\n\n  const handleHeaderClick = useCallback(() => {\n    columnRef.current?.scrollTop();\n  }, []);\n\n  return (\n    <Column\n      bindToDocument={!multiColumn}\n      ref={columnRef}\n      label={intl.formatMessage(messages.title)}\n    >\n      <ColumnHeader\n        icon={'explore'}\n        iconComponent={ExploreIcon}\n        title={intl.formatMessage(messages.title)}\n        onClick={handleHeaderClick}\n        multiColumn={multiColumn}\n      />\n\n      <div className='explore__search-header'>\n        <Search singleColumn />\n      </div>\n\n      <div className='account__section-headline'>\n        <NavLink exact to='/explore'>\n          <FormattedMessage\n            tagName='div'\n            id='explore.trending_statuses'\n            defaultMessage='Posts'\n          />\n        </NavLink>\n\n        <NavLink exact to='/explore/tags'>\n          <FormattedMessage\n            tagName='div'\n            id='explore.trending_tags'\n            defaultMessage='Hashtags'\n          />\n        </NavLink>\n\n        {signedIn && (\n          <NavLink exact to='/explore/suggestions'>\n            <FormattedMessage\n              tagName='div'\n              id='explore.suggested_follows'\n              defaultMessage='People'\n            />\n          </NavLink>\n        )}\n\n        <NavLink exact to='/explore/links'>\n          <FormattedMessage\n            tagName='div'\n            id='explore.trending_links'\n            defaultMessage='News'\n          />\n        </NavLink>\n      </div>\n\n      <Switch>\n        <Route path='/explore/tags' component={Tags} />\n        <Route path='/explore/links' component={Links} />\n        <Route path='/explore/suggestions' component={Suggestions} />\n        <Route exact path={['/explore', '/explore/posts']}>\n          <Statuses multiColumn={multiColumn} />\n        </Route>\n      </Switch>\n\n      <Helmet>\n        <title>{intl.formatMessage(messages.title)}</title>\n        <meta name='robots' content='all' />\n      </Helmet>\n    </Column>\n  );\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default Explore;\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgFindInPage(_ref) {\n  let {\n    title,\n    titleId,\n    ...props\n  } = _ref;\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    xmlns: \"http://www.w3.org/2000/svg\",\n    height: 24,\n    viewBox: \"0 -960 960 960\",\n    width: 24,\n    \"aria-labelledby\": titleId\n  }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n    id: titleId\n  }, title) : null, _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n    d: \"m590-160 80 80H240q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h360l200 240v480q0 20-8.5 36.5T768-96L560-302q-17 11-37 16.5t-43 5.5q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 23-5.5 43T618-360l102 104v-356L562-800H240v640h350ZM480-360q33 0 56.5-23.5T560-440q0-33-23.5-56.5T480-520q-33 0-56.5 23.5T400-440q0 33 23.5 56.5T480-360Zm0-80Zm0 0Z\"\n  })));\n}\nexport default SvgFindInPage;","import { FormattedMessage } from 'react-intl';\n\nexport const SearchSection: React.FC<{\n  title: React.ReactNode;\n  onClickMore?: () => void;\n  children: React.ReactNode;\n}> = ({ title, onClickMore, children }) => (\n  <div className='search-results__section'>\n    <div className='search-results__section__header'>\n      <h3>{title}</h3>\n      {onClickMore && (\n        <button onClick={onClickMore}>\n          <FormattedMessage\n            id='search_results.see_all'\n            defaultMessage='See all'\n          />\n        </button>\n      )}\n    </div>\n\n    {children}\n  </div>\n);\n","import { useCallback, useEffect, useRef } from 'react';\n\nimport { useIntl, defineMessages, FormattedMessage } from 'react-intl';\n\nimport { Helmet } from 'react-helmet';\n\nimport FindInPageIcon from '@/material-icons/400-24px/find_in_page.svg?react';\nimport PeopleIcon from '@/material-icons/400-24px/group.svg?react';\nimport SearchIcon from '@/material-icons/400-24px/search.svg?react';\nimport TagIcon from '@/material-icons/400-24px/tag.svg?react';\nimport { submitSearch, expandSearch } from 'mastodon/actions/search';\nimport type { ApiSearchType } from 'mastodon/api_types/search';\nimport { Account } from 'mastodon/components/account';\nimport { Column } from 'mastodon/components/column';\nimport type { ColumnRef } from 'mastodon/components/column';\nimport { ColumnHeader } from 'mastodon/components/column_header';\nimport { CompatibilityHashtag as Hashtag } from 'mastodon/components/hashtag';\nimport { Icon } from 'mastodon/components/icon';\nimport ScrollableList from 'mastodon/components/scrollable_list';\nimport Status from 'mastodon/containers/status_container';\nimport { Search } from 'mastodon/features/compose/components/search';\nimport { useSearchParam } from 'mastodon/hooks/useSearchParam';\nimport type { Hashtag as HashtagType } from 'mastodon/models/tags';\nimport { useAppDispatch, useAppSelector } from 'mastodon/store';\n\nimport { SearchSection } from './components/search_section';\n\nconst messages = defineMessages({\n  title: { id: 'search_results.title', defaultMessage: 'Search for \"{q}\"' },\n});\n\nconst INITIAL_PAGE_LIMIT = 10;\nconst INITIAL_DISPLAY = 4;\n\nconst hidePeek = <T,>(list: T[]) => {\n  if (\n    list.length > INITIAL_PAGE_LIMIT &&\n    list.length % INITIAL_PAGE_LIMIT === 1\n  ) {\n    return list.slice(0, -2);\n  } else {\n    return list;\n  }\n};\n\nconst renderAccounts = (accountIds: string[]) =>\n  hidePeek<string>(accountIds).map((id) => <Account key={id} id={id} />);\n\nconst renderHashtags = (hashtags: HashtagType[]) =>\n  hidePeek<HashtagType>(hashtags).map((hashtag) => (\n    <Hashtag key={hashtag.name} hashtag={hashtag} />\n  ));\n\nconst renderStatuses = (statusIds: string[]) =>\n  hidePeek<string>(statusIds).map((id) => (\n    // @ts-expect-error inferred props are wrong\n    <Status key={id} id={id} />\n  ));\n\ntype SearchType = 'all' | ApiSearchType;\n\nconst typeFromParam = (param?: string): SearchType => {\n  if (param && ['all', 'accounts', 'statuses', 'hashtags'].includes(param)) {\n    return param as SearchType;\n  } else {\n    return 'all';\n  }\n};\n\nexport const SearchResults: React.FC<{ multiColumn: boolean }> = ({\n  multiColumn,\n}) => {\n  const columnRef = useRef<ColumnRef>(null);\n  const intl = useIntl();\n  const [q] = useSearchParam('q');\n  const [type, setType] = useSearchParam('type');\n  const isLoading = useAppSelector((state) => state.search.loading);\n  const results = useAppSelector((state) => state.search.results);\n  const dispatch = useAppDispatch();\n  const mappedType = typeFromParam(type);\n  const trimmedValue = q?.trim() ?? '';\n\n  useEffect(() => {\n    if (trimmedValue.length > 0) {\n      void dispatch(\n        submitSearch({\n          q: trimmedValue,\n          type: mappedType === 'all' ? undefined : mappedType,\n        }),\n      );\n    }\n  }, [dispatch, trimmedValue, mappedType]);\n\n  const handleHeaderClick = useCallback(() => {\n    columnRef.current?.scrollTop();\n  }, []);\n\n  const handleSelectAll = useCallback(() => {\n    setType(null);\n  }, [setType]);\n\n  const handleSelectAccounts = useCallback(() => {\n    setType('accounts');\n  }, [setType]);\n\n  const handleSelectHashtags = useCallback(() => {\n    setType('hashtags');\n  }, [setType]);\n\n  const handleSelectStatuses = useCallback(() => {\n    setType('statuses');\n  }, [setType]);\n\n  const handleLoadMore = useCallback(() => {\n    if (mappedType !== 'all') {\n      void dispatch(expandSearch({ type: mappedType }));\n    }\n  }, [dispatch, mappedType]);\n\n  // We request 1 more result than we display so we can tell if there'd be a next page\n  const hasMore =\n    mappedType !== 'all' && results\n      ? results[mappedType].length > INITIAL_PAGE_LIMIT &&\n        results[mappedType].length % INITIAL_PAGE_LIMIT === 1\n      : false;\n\n  let filteredResults;\n\n  if (results) {\n    switch (mappedType) {\n      case 'all':\n        filteredResults =\n          results.accounts.length +\n            results.hashtags.length +\n            results.statuses.length >\n          0 ? (\n            <>\n              {results.accounts.length > 0 && (\n                <SearchSection\n                  key='accounts'\n                  title={\n                    <>\n                      <Icon id='users' icon={PeopleIcon} />\n                      <FormattedMessage\n                        id='search_results.accounts'\n                        defaultMessage='Profiles'\n                      />\n                    </>\n                  }\n                  onClickMore={handleSelectAccounts}\n                >\n                  {results.accounts.slice(0, INITIAL_DISPLAY).map((id) => (\n                    <Account key={id} id={id} />\n                  ))}\n                </SearchSection>\n              )}\n\n              {results.hashtags.length > 0 && (\n                <SearchSection\n                  key='hashtags'\n                  title={\n                    <>\n                      <Icon id='hashtag' icon={TagIcon} />\n                      <FormattedMessage\n                        id='search_results.hashtags'\n                        defaultMessage='Hashtags'\n                      />\n                    </>\n                  }\n                  onClickMore={handleSelectHashtags}\n                >\n                  {results.hashtags.slice(0, INITIAL_DISPLAY).map((hashtag) => (\n                    <Hashtag key={hashtag.name} hashtag={hashtag} />\n                  ))}\n                </SearchSection>\n              )}\n\n              {results.statuses.length > 0 && (\n                <SearchSection\n                  key='statuses'\n                  title={\n                    <>\n                      <Icon id='quote-right' icon={FindInPageIcon} />\n                      <FormattedMessage\n                        id='search_results.statuses'\n                        defaultMessage='Posts'\n                      />\n                    </>\n                  }\n                  onClickMore={handleSelectStatuses}\n                >\n                  {results.statuses.slice(0, INITIAL_DISPLAY).map((id) => (\n                    // @ts-expect-error inferred props are wrong\n                    <Status key={id} id={id} />\n                  ))}\n                </SearchSection>\n              )}\n            </>\n          ) : (\n            []\n          );\n        break;\n      case 'accounts':\n        filteredResults = renderAccounts(results.accounts);\n        break;\n      case 'hashtags':\n        filteredResults = renderHashtags(results.hashtags);\n        break;\n      case 'statuses':\n        filteredResults = renderStatuses(results.statuses);\n        break;\n    }\n  }\n\n  return (\n    <Column\n      bindToDocument={!multiColumn}\n      ref={columnRef}\n      label={intl.formatMessage(messages.title, { q })}\n    >\n      <ColumnHeader\n        icon={'search'}\n        iconComponent={SearchIcon}\n        title={intl.formatMessage(messages.title, { q })}\n        onClick={handleHeaderClick}\n        multiColumn={multiColumn}\n      />\n\n      <div className='explore__search-header'>\n        <Search singleColumn initialValue={trimmedValue} />\n      </div>\n\n      <div className='account__section-headline'>\n        <button\n          onClick={handleSelectAll}\n          className={mappedType === 'all' ? 'active' : undefined}\n        >\n          <FormattedMessage id='search_results.all' defaultMessage='All' />\n        </button>\n        <button\n          onClick={handleSelectAccounts}\n          className={mappedType === 'accounts' ? 'active' : undefined}\n        >\n          <FormattedMessage\n            id='search_results.accounts'\n            defaultMessage='Profiles'\n          />\n        </button>\n        <button\n          onClick={handleSelectHashtags}\n          className={mappedType === 'hashtags' ? 'active' : undefined}\n        >\n          <FormattedMessage\n            id='search_results.hashtags'\n            defaultMessage='Hashtags'\n          />\n        </button>\n        <button\n          onClick={handleSelectStatuses}\n          className={mappedType === 'statuses' ? 'active' : undefined}\n        >\n          <FormattedMessage\n            id='search_results.statuses'\n            defaultMessage='Posts'\n          />\n        </button>\n      </div>\n\n      <div className='explore__search-results' data-nosnippet>\n        <ScrollableList\n          scrollKey='search-results'\n          isLoading={isLoading}\n          showLoading={isLoading && !results}\n          onLoadMore={handleLoadMore}\n          hasMore={hasMore}\n          emptyMessage={\n            trimmedValue.length > 0 ? (\n              <FormattedMessage\n                id='search_results.no_results'\n                defaultMessage='No results.'\n              />\n            ) : (\n              <FormattedMessage\n                id='search_results.no_search_yet'\n                defaultMessage='Try searching for posts, profiles or hashtags.'\n              />\n            )\n          }\n          bindToDocument\n        >\n          {filteredResults}\n        </ScrollableList>\n      </div>\n\n      <Helmet>\n        <title>{intl.formatMessage(messages.title, { q })}</title>\n        <meta name='robots' content='noindex' />\n      </Helmet>\n    </Column>\n  );\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default SearchResults;\n"],"sourceRoot":""}