{"version":3,"sources":["webpack:///./app/javascript/packs/frontpage/team_description.js"],"names":["addClassesToTeam","position","position2","position3","removeClassHidden","teamDescriptions","addClassHidden","teamMembers","calculateExpansion","startPosition","endPosition","i","teamElement","classList","add","remove","window","expandMemberDescription","document","querySelectorAll","parseInt","seeMore","querySelector","calculateExpansionForDesktop","expandMemberDescriptionTeam","calculateExpansionForDesktopTeam","expandMemberDescriptionTablet","includes","expandMemberDescriptionMobile","teamMembersMobile","teamDescriptionsMobile","forEach","teamDescriptionMobile","collapseMemberDescriptionMobile","collapseMemberDescription","teamMembersTablet","teamDescriptionsTablet","seeMores","teamMember","teamMemberTablet","teamDescription","teamDescriptionTablet","memberPosition","teamMemberMobile"],"mappings":"4EA6HA,SAASA,EAAiBC,EAAUC,EAAWC,GAC7CC,EAAkBC,iBAAiBJ,IACnCK,EAAeC,YAAYL,IAC3BI,EAAeC,YAAYJ,IAG7B,SAASK,EAAmBP,EAAUQ,EAAeC,GAEnD,IADAN,EAAkBC,iBAAiBJ,IAC9BU,EAAIF,EAAeE,EAAID,EAAaC,IACvCL,EAAeC,YAAYI,IAI/B,SAASL,EAAeM,GACtBA,EAAYC,UAAUC,IAAI,UAG5B,SAASV,EAAkBQ,GACzBA,EAAYC,UAAUE,OAAO,UA9I/BC,OAAOC,wBAA0B,SAAShB,GACxCM,YAAcW,SAASC,iBAAiB,0BACxCd,iBAAmBa,SAASC,iBAC1B,yCAEFlB,EAAWmB,SAASnB,GACpBoB,QAAUH,SAASI,cAAc,4BAE7BD,UACW,IAAbpB,EAAiBK,EAAee,SAAWjB,EAAkBiB,UAwIjE,SAAsCpB,GAChCA,EAAW,EAAI,EACjBO,EAAmBP,EAAUA,EAAW,EAAGA,EAAW,GAEtDO,EAAmBP,EAAUA,EAAW,EAAGA,GA1I7CsB,CAA6BtB,IAG/Be,OAAOQ,4BAA8B,SAASvB,GAC5CM,YAAcW,SAASC,iBAAiB,0BACxCd,iBAAmBa,SAASC,iBAC1B,yCAwIJ,SAA0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AkBmC,MAEpBlC,iBAAiB0B,SAAQ,SAASS,GAChClC,EAAekC,MAEjBJ,uBAAuBL,SAAQ,SAASU,GACtCnC,EAAemC,OAInBzB,OAAOiB,gCAAkC,SAAShC,EAAUyC,GAC1Db,kBAAkBE,SAAQ,SAASY,GAC7Bd,kBAAkB5B,KAAc0C,GAClCA,EAAiB9B,UAAUC,IAAI,UAC/B6B,EAAiB9B,UAAUE,OAAO,SACX,KAAnB2B,GACFpC,EAAeuB,kBAAkBa,MAEnCC,EAAiB9B,UAAUE,OAAO,UAClC4B,EAAiB9B,UAAUC,IAAI,SAC/BV,EAAkBuC,U","file":"js/frontpage/team_description-60364233380cdc15d3cc.chunk.js","sourcesContent":["//Expand for desktop\nwindow.expandMemberDescription = function(position) {\n teamMembers = document.querySelectorAll(\".homepage--team--image\");\n teamDescriptions = document.querySelectorAll(\n \".col-lg-6.homepage--team--description\"\n );\n position = parseInt(position);\n seeMore = document.querySelector(\".homepage-team--see-more\");\n\n if (seeMore) {\n position === 8 ? addClassHidden(seeMore) : removeClassHidden(seeMore);\n }\n calculateExpansionForDesktop(position);\n};\n\nwindow.expandMemberDescriptionTeam = function(position) {\n teamMembers = document.querySelectorAll(\".homepage--team--image\");\n teamDescriptions = document.querySelectorAll(\n \".col-lg-6.homepage--team--description\"\n );\n position = parseInt(position);\n\n calculateExpansionForDesktopTeam(position);\n};\n\n// Expand for tablet - always put first in the row the one you just clicked\nwindow.expandMemberDescriptionTablet = function(position) {\n teamMembers = document.querySelectorAll(\".homepage--team--image-tablet\");\n teamDescriptions = document.querySelectorAll(\n \".homepage--team--description-tablet\"\n );\n position = parseInt(position);\n seeMore = document.querySelector(\".homepage-team--see-more-tablet\");\n\n if (seeMore) {\n [9, 10].includes(position)\n ? addClassHidden(seeMore)\n : removeClassHidden(seeMore);\n }\n\n if (position % 3 === 0) {\n addClassesToTeam(position, position + 1, position + 2);\n } else if (position % 3 === 1) {\n addClassesToTeam(position, position - 1, position + 1);\n } else {\n addClassesToTeam(position, position - 1, position - 2);\n }\n};\n\n// Expand for mobile\nwindow.expandMemberDescriptionMobile = function(position) {\n teamMembersMobile = document.querySelectorAll(\n \".homepage--team--image-mobile\"\n );\n teamDescriptionsMobile = document.querySelectorAll(\n \".homepage--team--description-mobile\"\n );\n position = parseInt(position);\n\n seeMore = document.querySelector(\".homepage-team--see-more-mobile\");\n\n teamDescriptionsMobile.forEach(function(teamDescriptionMobile) {\n if (teamDescriptionsMobile[position] === teamDescriptionMobile) {\n removeClassHidden(teamDescriptionMobile);\n } else {\n addClassHidden(teamDescriptionMobile);\n }\n });\n\n if (position % 2 === 0 && position !== 10) {\n window.collapseMemberDescriptionMobile(position, position + 1);\n addClassHidden(seeMore);\n } else if (position === 10) {\n window.collapseMemberDescriptionMobile(position, position + 1);\n addClassHidden(seeMore);\n } else {\n window.collapseMemberDescriptionMobile(position, position - 1);\n removeClassHidden(seeMore);\n }\n};\n\n// Revert the expanding of the member description section\nwindow.collapseMemberDescription = function() {\n teamMembers = document.querySelectorAll(\".homepage--team--image\");\n teamMembersTablet = document.querySelectorAll(\n \".homepage--team--image-tablet\"\n );\n teamDescriptions = document.querySelectorAll(\".homepage--team--description\");\n teamDescriptionsTablet = document.querySelectorAll(\n \".homepage--team--description-tablet\"\n );\n seeMores = document.querySelectorAll(\".homepage-team--see-more\");\n\n seeMores.forEach(function(seeMore) {\n removeClassHidden(seeMore);\n });\n teamMembers.forEach(function(teamMember) {\n removeClassHidden(teamMember);\n });\n teamMembersTablet.forEach(function(teamMemberTablet) {\n removeClassHidden(teamMemberTablet);\n });\n teamDescriptions.forEach(function(teamDescription) {\n addClassHidden(teamDescription);\n });\n teamDescriptionsTablet.forEach(function(teamDescriptionTablet) {\n addClassHidden(teamDescriptionTablet);\n });\n};\n\nwindow.collapseMemberDescriptionMobile = function(position, memberPosition) {\n teamMembersMobile.forEach(function(teamMemberMobile) {\n if (teamMembersMobile[position] === teamMemberMobile) {\n teamMemberMobile.classList.add(\"col-12\");\n teamMemberMobile.classList.remove(\"col-6\");\n if (memberPosition !== 11)\n addClassHidden(teamMembersMobile[memberPosition]);\n } else {\n teamMemberMobile.classList.remove(\"col-12\");\n teamMemberMobile.classList.add(\"col-6\");\n removeClassHidden(teamMemberMobile);\n }\n });\n};\n\nfunction addClassesToTeam(position, position2, position3) {\n removeClassHidden(teamDescriptions[position]);\n addClassHidden(teamMembers[position2]);\n addClassHidden(teamMembers[position3]);\n}\n\nfunction calculateExpansion(position, startPosition, endPosition) {\n removeClassHidden(teamDescriptions[position]);\n for (i = startPosition; i < endPosition; i++) {\n addClassHidden(teamMembers[i]);\n }\n}\n\nfunction addClassHidden(teamElement) {\n teamElement.classList.add(\"hidden\");\n}\n\nfunction removeClassHidden(teamElement) {\n teamElement.classList.remove(\"hidden\");\n}\n\nfunction calculateExpansionForDesktop(position) {\n if (position % 6 < 3) {\n calculateExpansion(position, position + 1, position + 4);\n } else {\n calculateExpansion(position, position - 3, position);\n }\n}\n\nfunction calculateExpansionForDesktopTeam(position) {\n if (position % 4 < 2) {\n calculateExpansion(position, position + 1, position + 3);\n } else {\n calculateExpansion(position, position - 2, position);\n }\n}\n"],"sourceRoot":""}