{"version":3,"sources":["core/hooks/useScript.js","components/sites/TV2Header.tsx"],"names":["useScript","url","useEffect","script","document","createElement","src","type","async","body","appendChild","removeChild","TV2Wrap","styled","div","TV2Header","process","TV2","window","xmlns","style","position","height","width","id","viewBox","d","className","href","aria-label","alt","target","rel","xlinkHref","aria-controls","onClick","toggleNavigation","action","placeholder","name"],"mappings":"2JAmBeA,EAhBG,SAACC,GACjBC,qBAAU,WACR,IAAMC,EAASC,SAASC,cAAc,UAQtC,OANAF,EAAOG,IAAML,EACbE,EAAOI,KAAO,kBACdJ,EAAOK,OAAQ,EAEfJ,SAASK,KAAKC,YAAYP,GAEnB,WACLC,SAASK,KAAKE,YAAYR,MAE3B,CAACF,K,gBCVAW,EAAUC,UAAOC,IAAV,wEAAGD,CAAH,kEA8JEE,UAtJa,WAC1Bf,EAAU,GAAD,OAAIgB,GAAJ,qBACT,IAAMC,EAAOC,OAAeD,IAC5B,OACE,cAACL,EAAD,UAEE,gCACE,sBACEO,MAAM,6BACNC,MAAO,CAAEC,SAAU,WAAYC,OAAQ,EAAGC,MAAO,GAFnD,UAIE,wBAAQC,GAAG,aAAaC,QAAQ,YAAhC,SACE,sBAAMC,EAAE,gOAEV,wBAAQF,GAAG,YAAYC,QAAQ,YAA/B,SACE,sBAAMC,EAAE,0uBAEV,wBAAQF,GAAG,cAAcC,QAAQ,YAAjC,SACE,sBAAMC,EAAE,sgBAEV,yBAAQF,GAAG,YAAYC,QAAQ,YAA/B,UACE,sBAAMC,EAAE,gsBACR,sBAAMA,EAAE,2DAGZ,8BACE,mBAAGC,UAAU,OAAOC,KAAK,WAAzB,gCAIF,yBAAQD,UAAU,cAAlB,UACE,qBAAKA,UAAU,iBAAf,SACE,qBAAKA,UAAU,iBAAf,SACE,0BAASA,UAAU,SAAnB,UACE,mBACEA,UAAU,eACVC,KAAK,4BACLC,aAAW,eAHb,SAKE,qBACEC,IAAI,YACJxB,IAAI,oGAGR,sBAAMqB,UAAU,kCAAhB,mBACA,qBAAKA,UAAU,mBACf,oBACEA,UAAU,sCACVC,KAAK,uBACLG,OAAO,SACPC,IAAI,aAJN,UAME,8BACE,qBAAKC,UAAU,kBACV,IART,eAWA,wBACEN,UAAU,6CACVE,aAAW,aACXK,gBAAc,kBACdC,QAAS,kBAAMlB,EAAImB,sBAErB,sBACEZ,GAAG,kBACHG,UAAU,UACVE,aAAW,YAHb,UAKE,uBACEF,UAAU,kBACVU,OAAO,yBAFT,UAIE,uBACEb,GAAG,iBACHK,aAAW,SACXtB,KAAK,OACL+B,YAAY,SACZC,KAAK,MAEP,8BACE,qBAAKN,UAAU,sBAGnB,qBAAIN,UAAU,yCAAd,UACE,6BACE,mBAAGC,KAAK,8BAAR,uBAEF,6BACE,mBAAGA,KAAK,4BAAR,qBAEF,6BACE,mBAAGA,KAAK,oCAAR,6BAIF,6BACE,mBAAGA,KAAK,wBAAR,wBAGJ,qBAAID,UAAU,4CAAd,UACE,6BACE,mBAAGC,KAAK,uBAAR,wBAEF,6BACE,mBAAGA,KAAK,4BAAR,qBAEF,6BACE,mBAAGA,KAAK,8BAAR,wBAEF,6BACE,mBAAGA,KAAK,2BAAR,oBAEF,6BACE,mBAAGA,KAAK,gCAAR,yBAEF,6BACE,mBAAGA,KAAK,2BAAR,uBAGJ,sBAAKD,UAAU,4CAAf,UACE,sBAAKA,UAAU,iBAAf,UACE,mBAAGC,KAAK,8BAAR,yBACA,mBAAGA,KAAK,8BAAR,qBACA,mBAAGA,KAAK,uBAAR,sBACA,mBAAGA,KAAK,8BAAR,4BAEF,qBACED,UAAU,gBACVG,IAAI,YACJxB,IAAI,uGAGR,wBACEqB,UAAU,wBACVO,gBAAc,kBAFhB,iCAUR,qBAAKP,UAAU","file":"static/js/3.26f680d0.chunk.js","sourcesContent":["// https://stackoverflow.com/questions/34424845/adding-script-tag-to-react-jsx\nimport { useEffect } from \"react\";\n\nconst useScript = (url) => {\n useEffect(() => {\n const script = document.createElement(\"script\");\n\n script.src = url;\n script.type = \"text/javascript\";\n script.async = true;\n\n document.body.appendChild(script);\n\n return () => {\n document.body.removeChild(script);\n };\n }, [url]);\n};\n\nexport default useScript;\n","import React from \"react\";\nimport styled from \"styled-components/macro\";\nimport useScript from \"../../core/hooks/useScript\";\nimport \"./TV2Header.css\";\n\n// Wrapper adds padding to offset fixed position header\nconst TV2Wrap = styled.div`\n padding-top: 52px;\n\n @media (min-width: 600px) {\n padding-top: 56px;\n }\n`;\n\nconst TV2Header: React.FC = () => {\n useScript(`${process.env.PUBLIC_URL}/js/TV2Header.js`);\n const TV2 = (window as any).TV2;\n return (\n \n {/* Insert TV2 header code here */}\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n \n \n \n Sport\n
\n \n \n \n {\" \"}\n TV 2 Play\n \n TV2.toggleNavigation()}\n >\n \n \n \n \n \n \n \n \n \n \n \n Lukk meny\n \n \n
\n
\n
\n
\n
\n
\n {/* End TV2 header code here */}\n
\n );\n};\n\nexport default TV2Header;\n"],"sourceRoot":""}