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qH,WAAYrH,IAAAA,MAAgB,CAC5BP,QAASO,IAAAA,MAAgB,CACzBf,SAAUe,IAAAA,IAAc,CAACyH,UAAU,ECnCvC,IAAAC,EDsCe/C,wJEnCf,IAAMuB,EAAS,OAAC,CAAEC,MAAAA,EAAQ,EAAE,CAAE,CAAA9G,EACpBI,EAAUC,IAAW6H,IAAAA,MAAgB,CAAE,CACzC,CAACA,GAAM,CAAC,WAAiB3H,MAAA,CAANuG,GAAQ,CAAC,CAAEA,CAClC,GACA,MAAO,GAAA7G,EAAAC,GAAA,EAACsF,MAAAA,CAAIzF,UAAWK,GAC3B,CAEAyG,CAAAA,EAAOnG,SAAS,CAAG,CACfoG,MAAOnG,IAAAA,MAAgB,ECX3B,IAAA2H,EDcezB,oBEff0B,EAAAC,OAAA,EAAkB,iDCAlBD,EAAAC,OAAA,EAAkB,izBCAlBD,EAAAC,OAAA,EAAkB,0kBCAlBD,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/./components/AnchorLink/AnchorLink.js","webpack://_N_E/./components/AnchorLink/index.js","webpack://_N_E/./components/CampaignDupes/CampaignDupes.js","webpack://_N_E/./components/CampaignDupes/index.js","webpack://_N_E/./components/CampaignSection/CampaignSection.js","webpack://_N_E/./components/CampaignSection/index.js","webpack://_N_E/./components/Loader/Loader.js","webpack://_N_E/./components/Loader/index.js","webpack://_N_E/./components/AnchorLink/AnchorLink.module.scss","webpack://_N_E/./components/CampaignDupes/CampaignDupes.module.scss","webpack://_N_E/./components/CampaignSection/CampaignSection.module.scss","webpack://_N_E/./components/Loader/Loader.module.scss"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport s from './AnchorLink.module.scss';\n\nconst AnchorLink = ({ children, title, id, className = '' }) => {\n    if (!id) {\n        return <span>{title || children}</span>;\n    }\n\n    const classes = classNames(s['Root'], 'Anchor', {\n        [`${className}`]: className,\n    });\n    return (\n        <a className={classes} href={`#${id}`} id={id}>\n            <span>{title || children}</span>\n        </a>\n    );\n};\n\nAnchorLink.propTypes = {\n    title: PropTypes.string,\n    id: PropTypes.string,\n    className: PropTypes.string,\n};\n\nexport default AnchorLink;\n","import AnchorLink from './AnchorLink';\n\nexport default AnchorLink;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useTranslation } from 'next-i18next';\nimport classNames from 'classnames';\nimport * as api from '../../utils/api';\nimport CampaignSection from '../CampaignSection';\nimport Button from '../Button';\nimport Loader from '../Loader';\nimport ShareButton from '../ShareButton';\nimport s from './CampaignDupes.module.scss';\n\nconst CampaignDupes = ({\n    colors = 'BlackOnYellow',\n    title = '',\n    defaultQuery = '',\n    nonce = '',\n    apiBase, // Do not add default\n}) => {\n    const { t } = useTranslation('common');\n\n    const blueButtonColors = ['BlackOnWhite', 'WhiteOnBlue'];\n    const buttonColor = blueButtonColors.includes(colors)\n        ? 'YellowOnBlue'\n        : 'SecondaryBlue';\n    const loaderColor = colors === 'WhiteOnBlue' ? '' : 'Blue';\n\n    const [isInitialLoad, setIsInitialLoad] = useState(true);\n    const [isLoading, setIsLoading] = useState(false);\n    const [query, setQuery] = useState(defaultQuery);\n    const [searchValue, setSearchValue] = useState(defaultQuery);\n    const [result, setResult] = useState(null);\n    const [error, setError] = useState('');\n    const [honeypotValue, setHoneypotValue] = useState('');\n\n    const fetchResult = (query) => {\n        setIsLoading(true);\n        setResult(null);\n        setError('');\n\n        if (honeypotValue !== '') {\n            setIsLoading(false);\n            setError(t('campaignDupes.error'));\n            return;\n        }\n\n        const startTime = new Date().getTime();\n        api.sendSearchDupes(query, honeypotValue, nonce, apiBase)\n            .then((data) => {\n                // Delay showing result if request too fast\n                const finishedTime = new Date().getTime();\n                const timeout = Math.max(1000 - (finishedTime - startTime), 0);\n                setTimeout(() => {\n                    if (data?.result) {\n                        setResult(data?.result);\n                    } else {\n                        setResult({});\n                    }\n\n                    if (data?.debug) {\n                        console.log(data?.debug);\n                    }\n\n                    setIsLoading(false);\n                }, timeout);\n            })\n            .catch((e) => {\n                console.error(\"Couldn't collect dupes\");\n                setResult(null);\n                setIsLoading(false);\n                setError(t('campaignDupes.error'));\n            });\n    };\n\n    const updateURLWithQuery = (keyword) => {\n        const params = new URLSearchParams(window.location.search);\n        params.set('keyword', keyword);\n        const newUrl = `${window.location.pathname}?${params.toString()}`;\n        window.history.pushState({ path: newUrl }, '', newUrl);\n    };\n\n    const submitHandler = (e) => {\n        e.preventDefault();\n        if (searchValue === '') {\n            setError(t('campaignDupes.required'));\n        } else {\n            setQuery(searchValue);\n            updateURLWithQuery(searchValue);\n\n            if (typeof window !== 'undefined' && window.gtag) {\n                window.gtag('event', 'campaignDupes.submit', {\n                    search_term: searchValue,\n                    title: title,\n                });\n            }\n        }\n    };\n\n    useEffect(() => {\n        if (typeof window !== 'undefined') {\n            const params = new URLSearchParams(window.location.search);\n            const initialQuery = params.get('dupes', '');\n            if (!!initialQuery) {\n                setSearchValue(initialQuery);\n                setQuery(initialQuery);\n            }\n        }\n    }, []);\n\n    useEffect(() => {\n        if (isInitialLoad) {\n            setIsInitialLoad(false);\n        } else if (query !== '') {\n            fetchResult(query);\n        }\n    }, [query, isInitialLoad]);\n\n    let totalCount = 0;\n    const resultList =\n        result &&\n        Object.keys(result).map((key) => {\n            totalCount += result[key];\n            return { country: key, count: result[key] };\n        });\n    resultList && resultList.sort((a, b) => (a.count < b.count ? 1 : -1));\n\n    const showError = !isLoading && !!error;\n    const hasResult = resultList && resultList.length > 0;\n    const showEmpty = !isLoading && query && !showError && !hasResult;\n    const showResult = !isLoading && query && !showError && hasResult;\n\n    const classes = classNames(s.Root, { [s[`Root--${colors}`]]: colors });\n\n    return (\n        <CampaignSection colors={colors} classes={classes}>\n            <div className={s['Root__Container']}>\n                <h3 className={s['Root__Title']}>{title}</h3>\n                <form className={s['Root__Form']} onSubmit={submitHandler}>\n                    <div className={s['Root__NameContainer']}>\n                        <input\n                            type=\"text\"\n                            name=\"extra_field_name\"\n                            id=\"extra_field_name\"\n                            className={s['Root__NameInput']}\n                            placeholder=\"Leave this field empty\"\n                            autoComplete=\"off\"\n                            tabIndex=\"-1\"\n                            onChange={(e) => setHoneypotValue(e.target.value)}\n                            value={honeypotValue}\n                        />\n                    </div>\n                    <div className={s['Root__Field']}>\n                        <label htmlFor=\"dupes-search\" className=\"sr-only\">\n                            {t('campaignDupes.label')}\n                        </label>\n                        <input\n                            className={s['Root__Input']}\n                            type=\"text\"\n                            name=\"search\"\n                            id=\"dupes-search\"\n                            value={searchValue}\n                            placeholder={t('campaignDupes.placeholder')}\n                            onChange={(e) => setSearchValue(e.target.value)}\n                        />\n                    </div>\n                    <Button\n                        className={s['Root__Submit']}\n                        type={buttonColor}\n                        attrs={{ type: 'submit' }}>\n                        {t('campaignDupes.submit')}\n                    </Button>\n                </form>\n\n                {isLoading && (\n                    <div className={s['Root__Loader']}>\n                        <Loader color={loaderColor} />\n                    </div>\n                )}\n\n                {showError && <div className={s['Root__Message']}>{error}</div>}\n\n                {showEmpty && (\n                    <div className={s['Root__Message']}>\n                        {t('campaignDupes.empty')}\n                    </div>\n                )}\n\n                {showResult && (\n                    <div className={s['Root__Result']}>\n                        <ul className={s['Root__List']}>\n                            <Item\n                                isWorld={true}\n                                count={totalCount}\n                                query={query}\n                            />\n                            {resultList.map((item, index) => (\n                                <Item key={index} {...item} query={query} />\n                            ))}\n                        </ul>\n                    </div>\n                )}\n                {showResult && (\n                    <div className={s['Root__Share']}>\n                        <ShareButton title={t('sharebutton.share')} />\n                    </div>\n                )}\n            </div>\n        </CampaignSection>\n    );\n};\n\nCampaignDupes.propTypes = {\n    title: PropTypes.string,\n    apiBase: PropTypes.string,\n    colors: PropTypes.string,\n};\n\nconst Item = ({ isWorld = false, country = '', count = 0, query = '' }) => {\n    const { t, i18n } = useTranslation('common');\n    const isSwedenSearch = query.toLowerCase() === 'sweden';\n\n    const translationGroup = isWorld ? 'total' : 'country';\n    const translationKey = count > 1 ? 'plural' : 'single';\n    const countryKey = `campaignDupes.countryNames.${country}`;\n\n    const countryName =\n        isSwedenSearch && i18n.exists(countryKey) ? t(countryKey) : country;\n    let copy = t(`campaignDupes.${translationGroup}.${translationKey}`, {\n        country: countryName,\n        count: count,\n        query: query,\n    });\n\n    if (isSwedenSearch && isWorld) {\n        copy = t('campaignDupes.sweden', { query: query });\n    }\n\n    return <li className={s['Root__Item']}>{copy}</li>;\n};\n\nItem.propTypes = {\n    isWorld: PropTypes.bool,\n    country: PropTypes.string,\n    count: PropTypes.number,\n    query: PropTypes.string,\n};\n\nexport default CampaignDupes;\n","import CampaignDupes from './CampaignDupes';\n\nexport default CampaignDupes;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport AnchorLink from '../AnchorLink';\n\nimport styles from './CampaignSection.module.scss';\n\nconst CampaignSection = ({\n    colors = null,\n    heading = '',\n    anchorLink = '',\n    classes = '',\n    children = null,\n}) => (\n    <section\n        className={classNames(styles['CampaignSection'], classes, {\n            [styles[`CampaignSection--${colors}`]]: !!colors,\n        })}>\n        {heading && (\n            <h2 className={styles['CampaignSection__Heading']}>\n                {anchorLink ? (\n                    <AnchorLink title={heading} id={anchorLink} />\n                ) : (\n                    heading\n                )}\n            </h2>\n        )}\n        {children}\n    </section>\n);\n\nCampaignSection.propTypes = {\n    colors: PropTypes.string,\n    heading: PropTypes.string,\n    anchorLink: PropTypes.string,\n    classes: PropTypes.string,\n    children: PropTypes.node.isRequired,\n};\n\nexport default CampaignSection;\n","import CampaignSection from './CampaignSection';\n\nexport default CampaignSection;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport styles from './Loader.module.scss';\n\nconst Loader = ({ color = '' }) => {\n    const classes = classNames(styles['Loader'], {\n        [styles[`Loader--${color}`]]: color,\n    });\n    return <div className={classes} />;\n};\n\nLoader.propTypes = {\n    color: PropTypes.string,\n};\n\nexport default Loader;\n","import Loader from './Loader';\n\nexport default Loader;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root\":\"AnchorLink_Root__gIFSV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Root__Container\":\"CampaignDupes_Root__Container__j3okw\",\"Root__Title\":\"CampaignDupes_Root__Title__A5G_7\",\"Root\":\"CampaignDupes_Root__e129C\",\"Root--BlackOnYellow\":\"CampaignDupes_Root--BlackOnYellow__RTfRJ\",\"Root__Form\":\"CampaignDupes_Root__Form__NDpCy\",\"Root__NameContainer\":\"CampaignDupes_Root__NameContainer__qN4jn\",\"Root__Field\":\"CampaignDupes_Root__Field__Jw8Ds\",\"Root__Input\":\"CampaignDupes_Root__Input__XlnLb\",\"Root__Submit\":\"CampaignDupes_Root__Submit__O9_Ix\",\"Root__Loader\":\"CampaignDupes_Root__Loader__vma3p\",\"Root__Message\":\"CampaignDupes_Root__Message__x_JG8\",\"Root__Result\":\"CampaignDupes_Root__Result__GPY09\",\"Root__List\":\"CampaignDupes_Root__List__kakxl\",\"Root__Item\":\"CampaignDupes_Root__Item__nzO_Q\",\"Root__Share\":\"CampaignDupes_Root__Share__SQtw9\",\"Root--WhiteOnBlue\":\"CampaignDupes_Root--WhiteOnBlue__4wba1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"CampaignSection__Heading\":\"CampaignSection_CampaignSection__Heading__qWfXv\",\"CampaignSection\":\"CampaignSection_CampaignSection__d6O_t\",\"CampaignSection--BlackOnWhite\":\"CampaignSection_CampaignSection--BlackOnWhite__7G85o\",\"CampaignSection--BlackOnYellow\":\"CampaignSection_CampaignSection--BlackOnYellow__zRUYZ\",\"CampaignSection--WhiteOnBlue\":\"CampaignSection_CampaignSection--WhiteOnBlue__hHoZ5\",\"CampaignSection--YellowOnBlue\":\"CampaignSection_CampaignSection--YellowOnBlue__hCyMA\",\"CampaignSection--BlueOnYellow\":\"CampaignSection_CampaignSection--BlueOnYellow__AC3dm\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"Loader\":\"Loader_Loader__DH5Uk\",\"Loader--Blue\":\"Loader_Loader--Blue__e_qRt\",\"Loader--Yellow\":\"Loader_Loader--Yellow__1Hz8L\",\"load7\":\"Loader_load7__0Z4DX\"};"],"names":["AnchorLink","children","title","id","className","param","jsx_runtime","jsx","span","classes","classNames","s","concat","a","href","propTypes","PropTypes","components_AnchorLink","CampaignDupes","colors","defaultQuery","nonce","apiBase","t","useTranslation","buttonColor","blueButtonColors","includes","loaderColor","isInitialLoad","setIsInitialLoad","useState","isLoading","setIsLoading","query","setQuery","searchValue","setSearchValue","result","setResult","error","setError","honeypotValue","setHoneypotValue","fetchResult","startTime","Date","getTime","api","then","setTimeout","data","debug","console","log","Math","max","finishedTime","catch","updateURLWithQuery","params","URLSearchParams","window","location","search","set","keyword","newUrl","pathname","toString","history","pushState","path","useEffect","initialQuery","get","totalCount","resultList","Object","keys","map","key","country","count","sort","b","showError","hasResult","length","showEmpty","showResult","CampaignSection","jsxs","div","h3","form","onSubmit","e","preventDefault","gtag","search_term","input","type","name","placeholder","autoComplete","tabIndex","onChange","target","value","label","htmlFor","Button","attrs","Loader","color","ul","Item","isWorld","item","index","ShareButton","i18n","isSwedenSearch","toLowerCase","countryKey","countryName","exists","copy","translationKey","li","components_CampaignDupes","heading","anchorLink","section","styles","h2","isRequired","components_CampaignSection","components_Loader","module","exports"],"sourceRoot":""}