import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./timezone-keeL11Io.mjs";const r=async r=>({title:`拜仁慕尼黑俱乐部中文官方网站 - 新闻`,link:`https://www.fcbayern.cn/news`,item:(await e(`https://www.fcbayern.cn/api2018/news/list`,{method:`POST`,headers:{accept:`application/json`,"content-type":`application/x-www-form-urlencoded`},body:new URLSearchParams({page:`1`,pageSize:String(r),totalPage:`1`,tagId:``,year:`-1`,month:`-1`,type:`1`})})).data.map(e=>({title:e.title,link:e.url,pubDate:n(t(e.time),8),image:e.pic?.split(`?`)[0]}))}),i={en:`fcbayern.com-en-gb`,es:`fcbayern.com-es-es`,de:`fcbayern.com-de-de`},a={path:`/news/:language?`,categories:[`sport`],example:`/fcbayern/news`,parameters:{language:{description:`Language`,options:[{value:`en`,label:`English`},{value:`es`,label:`Español`},{value:`de`,label:`Deutsch`},{value:`zh`,label:`中文`}],default:`en`}},radar:[{source:[`fcbayern.com/:language/news`,`fcbayern.com/:language`],target:`/news/:language`},{source:[`www.fcbayern.cn/news`,`www.fcbayern.cn`],target:`/news/zh`}],name:`News`,maintainers:[`TonyRL`],handler:o,url:`fcbayern.com`};async function o(n){let{language:a=`en`}=n.req.param(),o=n.req.query(`limit`)?Number.parseInt(n.req.query(`limit`),10):20;if(a===`zh`)return r(o);let s=`https://fcbayern.com`,c=i[a]??i.en,l=(await e(`${s}/graphql`,{method:`POST`,query:{client:`fcbwebsite`},body:{operationName:`Web_NewsSearch`,variables:{query:``,filterTags:[`tag_club`,`tag_team_women`,`tag_team_campus`,`tag_article_news`,`tag_competitions_bundesliga`,`tag_competitions_champions-league`,`tag_column_saebener-stories`,`tag_club_magazin-51`],offset:0,count:o,channelId:c,filterSections:[`section_professionals`,`section_club`,`section_women`,`section_campus`,`section_aroundtheworld`],filterTypes:[`fcbhippo:ArticleDocument`,`fcbhippo:ImageGalleryDocument`,`fcbhippo:TeaserDocument`]},query:`
    query Web_NewsSearch($channelId: String!, $query: String!, $filterTags: [String!], $filterSections: [String!], $filterTypes: [String!], $count: Int!, $offset: Int, $excludeHeroStageResultFromPageId: String) {
        newsSearch(
            channelId: $channelId
            query: $query
            filterTags: $filterTags
            filterSections: $filterSections
            filterTypes: $filterTypes
            count: $count
            offset: $offset
            excludeHeroStageResultFromPageId: $excludeHeroStageResultFromPageId
        ) {
            total
            offset
            count
            results {
                ...Teaser
                __typename
            }
            __typename
        }
    }
    fragment Teaser on Teaser {
        __typename
        id
        pageType
        teaserTitle
        teaserShortTitle
        teaserSubtitle
        teaserText
        tag
        publicationDate
        teaserImage {
            ...ImageFragment
            __typename
        }
        teaserLink {
            ...Link
            __typename
        }
        teamEmblems {
            ...TeamEmblems
            __typename
        }
        teaserAppendix {
            ... on GalleryTeaserAppendix {
                galleryImages {
                    ...ImageFragment
                    __typename
                }
                __typename
            }
            ... on VideoTeaserAppendix {
                documentId
                kalturaId
                __typename
            }
            __typename
        }
        markers
        adMarker
        channelId
    }
    fragment Link on Link {
        __typename
        newTabOrWindow
        title
        target {
            ... on ExternalLink {
                url
                __typename
            }
            ... on InternalLink {
                id
                path
                channelId
                channelPath
                differentChannelDomain
                locale
                pageType
                __typename
            }
            __typename
        }
    }
    fragment ImageFragment on ImageFragment {
        __typename
        url
        alt
        caption
        copyright
        origWidth
        origHeight
        aspectRatioImageOverrides {
            ...AspectRatioImageOverride
            __typename
        }
    }
    fragment AspectRatioImageOverride on AspectRatioImageOverride {
        aspectRatio
        url
        __typename
    }
    fragment TeamEmblems on TeamEmblems {
        ownTeam
        emblem {
            ...ImageFragment
            __typename
        }
        __typename
    }
`}})).data.newsSearch.results.map(e=>({title:e.teaserTitle,description:e.teaserText,link:`${s}${e.teaserLink.target.path}`,pubDate:e.publicationDate?t(e.publicationDate):void 0,image:e.teaserImage?.url,category:e.tag?[e.tag]:void 0}));return{title:`FC Bayern München - News`,link:`${s}/${a}/news`,language:a,image:`${s}/favicon.ico`,item:l}}export{a as route};