{"version":3,"file":"unfold_plan_courses-FX0nH1kF.js","sources":["../../../app/frontend/entrypoints/legacy/unfold_plan_courses.js"],"sourcesContent":["import $ from \"jquery\";\n\nconst unfoldPlanCourses = () => {\n\n const planSections = document.querySelectorAll(\"#plan-section\");\n Array.from(planSections).forEach((section) => {\n section.addEventListener(\"click\", function (event) {\n if (event.target.tagName == \"H2\" && section.classList.contains(\"toggle-off\")) {\n section.classList.replace('toggle-off', 'toggle-on')\n Array.from(section.children).forEach((exercice) => {\n if (exercice.classList.contains('toggle-name-off')) {\n exercice.classList.replace('toggle-name-off', 'toggle-name-on')\n } \n }) \n } else if (event.target.tagName == \"H2\" && section.classList.contains(\"toggle-on\")) {\n section.classList.replace('toggle-on', 'toggle-off')\n Array.from(section.children).forEach((exercice) => {\n if (exercice.classList.contains('toggle-name-on')) {\n exercice.classList.replace('toggle-name-on', 'toggle-name-off')\n } \n })\n }\n });\n });\n\n const exercices = document.querySelectorAll(\"#exercice\");\n Array.from(exercices).forEach((exercice) => {\n exercice.addEventListener(\"click\", function (event) {\n if (event.target.tagName == \"H3\" && exercice.classList.contains(\"toggle-off\")) {\n exercice.classList.replace('toggle-off', 'toggle-on')\n Array.from(exercice.children).forEach((description) => {\n if (description.classList.contains('toggle-description-off')) {\n description.classList.replace('toggle-description-off', 'toggle-description-on')\n } \n }) \n } else if (event.target.tagName == \"H3\" && exercice.classList.contains(\"toggle-on\")) {\n exercice.classList.replace('toggle-on', 'toggle-off')\n Array.from(exercice.children).forEach((description) => {\n if (description.classList.contains('toggle-description-on')) {\n description.classList.replace('toggle-description-on', 'toggle-description-off')\n } \n }) \n }\n });\n});\n};\nexport { unfoldPlanCourses };\n"],"names":["unfoldPlanCourses","planSections","section","event","exercice","exercices","description"],"mappings":"6BAEK,MAACA,EAAoB,IAAM,CAE9B,MAAMC,EAAe,SAAS,iBAAiB,eAAe,EAC9D,MAAM,KAAKA,CAAY,EAAE,QAASC,GAAY,CAC5CA,EAAQ,iBAAiB,QAAU,SA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