{"version":3,"file":"504.604c907508090262a36e.js","mappings":"yHA8CA,UA9CA,MACEA,WAAAA,GACEC,KAAKC,WAAaC,MAAMC,KAAKC,SAASC,iBAAiB,mBAEnDL,KAAKC,WAAWK,OAAS,GAC3BN,KAAKC,WAAWM,QAAQP,KAAKQ,UAAUC,KAAKT,OAE9CU,OAAOC,iBAAiB,UAAU,KAC5BD,OAAOE,WAAa,KACtBZ,KAAKC,WAAWM,QAAQP,KAAKQ,UAAUC,KAAKT,MAC9C,GAEJ,CAEAQ,SAAAA,CAAUK,GACR,MAAMC,EAAaD,EAAUR,iBAAiB,0BAC9C,IAAIU,EAAe,GAGnB,IAAK,IAAIC,EAAI,EAAGA,EAAIF,EAAWR,OAAQU,GAAK,EAAG,CAC7C,MAAMC,EAAKH,EAAWE,GAChBE,EAAQD,EAAGE,cAAc,2BAC/B,IAAIC,EAAc,EACdF,IACFE,EAAcF,EAAMG,cAEtB,MAAMC,EAASL,EAAGE,cAAc,+BAChC,IAAII,EAAe,EACfD,IACFC,EAAeD,EAAOD,cAExB,MAAMG,EAASJ,EAAcG,EAAe,GACxCC,EAAST,IACXA,EAAeS,EAEnB,CAEA,MAAMC,EAAaZ,EAAUR,iBAAiB,qBAE9C,IAAK,IAAIW,EAAI,EAAGA,EAAIS,EAAWnB,OAAQU,GAAK,EAC/BS,EAAWT,GACnBU,MAAMC,iBAAmB,OAASZ,KAEzC,E","sources":["webpack://pratt-parent/./static/js/components/work-block.js"],"sourcesContent":["class WorkBlock {\n constructor() {\n this.containers = Array.from(document.querySelectorAll('.js-work-block'));\n\n if (this.containers.length > 0) {\n this.containers.forEach(this.workBlock.bind(this));\n }\n window.addEventListener('resize', () => {\n if (window.innerWidth > 767) {\n this.containers.forEach(this.workBlock.bind(this));\n }\n });\n }\n\n workBlock(container) {\n const workTitles = container.querySelectorAll('.js-work-block-content');\n let tallestTitle = 50;\n\n // Loop over workTitles and get tallest.\n for (let i = 0; i < workTitles.length; i += 1) {\n const el = workTitles[i];\n const title = el.querySelector('.work-block__item-title');\n let titleHeight = 0;\n if (title) {\n titleHeight = title.offsetHeight;\n }\n const people = el.querySelector('.work-block__related-people');\n let peopleHeight = 0;\n if (people) {\n peopleHeight = people.offsetHeight;\n }\n const height = titleHeight + peopleHeight + 10;\n if (height > tallestTitle) {\n tallestTitle = height;\n }\n }\n\n const workBlocks = container.querySelectorAll('.work-block__item');\n // Loop over workBlocks and set grid rows.\n for (let i = 0; i < workBlocks.length; i += 1) {\n const el = workBlocks[i];\n el.style.gridTemplateRows = `1fr ${ tallestTitle }px`;\n }\n }\n}\n\nexport default WorkBlock;\n"],"names":["constructor","this","containers","Array","from","document","querySelectorAll","length","forEach","workBlock","bind","window","addEventListener","innerWidth","container","workTitles","tallestTitle","i","el","title","querySelector","titleHeight","offsetHeight","people","peopleHeight","height","workBlocks","style","gridTemplateRows"],"sourceRoot":""}