{"version":3,"file":"script.min.js","sources":["../../../../block-editor/blocks/interactive-media/script.js"],"sourcesContent":["function calcSticky(node) {\r\n\tconst header = document.getElementById('header');\r\n\tconst adminbar = document.querySelector('admin-bar');\r\n\tconst nodes = document.querySelectorAll('.interactive-media__left');\r\n\tlet offset = 0;\r\n\r\n\tif ( header ) {\r\n\t\toffset += header.offsetHeight;\r\n\t}\r\n\r\n\tif ( adminbar ) {\r\n\t\toffset += adminbar.offsetHeight;\r\n\t}\r\n\r\n\tnodes.forEach( node => node.style.top = `calc( 50% - ${node.offsetHeight / 2}px + ${offset}px)` );\r\n}\r\n\r\ndocument.addEventListener('DOMContentLoaded', calcSticky);\r\nwindow.addEventListener('resize', calcSticky);\r\nwindow.addEventListener('scroll', calcSticky);\r\n"],"names":["calcSticky","node","header","document","getElementById","adminbar","querySelector","nodes","querySelectorAll","offset","offsetHeight","forEach","style","top","concat","addEventListener","window"],"mappings":"yBAAA,SAASA,EAAWC,GACnB,IAAMC,EAAWC,SAASC,eAAe,UACnCC,EAAWF,SAASG,cAAc,aAClCC,EAAWJ,SAASK,iBAAiB,4BACrCC,EAAW,EAEZP,IACJO,GAAUP,EAAOQ,cAGbL,IACJI,GAAUJ,EAASK,cAGpBH,EAAMI,SAAS,SAAAV,GAAI,OAAIA,EAAKW,MAAMC,IAAX,eAAAC,OAAgCb,EAAKS,aAAe,EAApD,SAAAI,OAA6DL,EAAjE,UAGpBN,SAASY,iBAAiB,mBAAoBf,GAC9CgB,OAAOD,iBAAiB,SAAUf,GAClCgB,OAAOD,iBAAiB,SAAUf"}