{"version":3,"file":"teaser-secondary-article.js","names":["SesoCopy","constructor","selector","this","el","container","HTMLElement","document","getElementById","querySelector","button","undefined","init","addEventListener","event","copyText","target","getAttribute","navigator","clipboard","writeText","copyTextElem","nextElementSibling","style","opacity","setTimeout","window","a1LinkCopy","querySelectorAll","forEach","fragment"],"sources":["teaser-secondary-article.js"],"mappings":"AAAA,GAAwB,oBAAbA,SAA0B,CACjC,MAAMA,EAAW,MACbC,YAAYC,GACRC,KAAKC,GAAK,CAAC,EACXD,KAAKC,GAAGC,UAAYH,aAAoBI,YAClCJ,EAEEK,SAASC,eAAeN,IACrBK,SAASE,cAAcP,GAGlCC,KAAKC,GAAGM,OAASP,KAAKC,GAAGC,UAAUI,cAAc,wBAA0BN,KAAKC,GAAGC,UAAUI,cAAc,6BACrGE,EAENR,KAAKS,MACT,CAEAA,OACIT,KAAKC,GAAGM,OAAOG,iBAAiB,SAAUC,IACtC,MAAMC,EAAWD,EAAME,OAAOC,aAAa,gBAC3CC,UAAUC,UAAUC,UAAUL,GAE9B,MAAMM,EAAeP,EAAME,OAAOM,mBAClCD,EAAaE,MAAMC,QAAU,EAE7BC,YAAW,WACPJ,EAAaE,MAAMC,QAAU,CACjC,GAAG,IAAI,GAEf,GAIkB,oBAAXE,SACPA,OAAOC,WAAa3B,GAGxB0B,OAAOb,iBAAiB,QAAQ,KAC5BN,SAASqB,iBAAiB,gDAAgDC,SAAQ,SAASC,GACvFJ,OAAOC,WAAa,IAAI3B,EAAS8B,EAASrB,cAAc,gCAC5D,GAAE,GAEV","sourcesContent":["if (typeof SesoCopy === 'undefined') {\n const SesoCopy = class {\n constructor(selector) {\n this.el = {};\n this.el.container = selector instanceof HTMLElement\n ? selector\n : (\n document.getElementById(selector) ||\n document.querySelector(selector)\n );\n\n this.el.button = this.el.container.querySelector('.js-meta-social-copy') ? this.el.container.querySelector('.js-meta-social-copy')\n : undefined;\n\n this.init();\n }\n\n init() {\n this.el.button.addEventListener('click', (event) => {\n const copyText = event.target.getAttribute('data-copyurl');\n navigator.clipboard.writeText(copyText);\n\n const copyTextElem = event.target.nextElementSibling;\n copyTextElem.style.opacity = 1;\n\n setTimeout(function() {\n copyTextElem.style.opacity = 0;\n }, 720);\n });\n }\n };\n\n\n if (typeof window !== 'undefined') {\n window.a1LinkCopy = SesoCopy;\n }\n\n window.addEventListener('load', () => {\n document.querySelectorAll('a1-fragment[name=\"teaser-secondary-article\"]').forEach(function(fragment) {\n window.a1LinkCopy = new SesoCopy(fragment.querySelector('.a1-teaser-secondary-article'));\n });\n });\n}\n"]}