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AAgC,CAClC,IAAMhB,EAAMgB,EAA+Bf,qBAAqB,OAC5DD,GACFgB,EAA+Bd,YAAYF,EAAI,IAEjDgB,EAA+Bb,YAAYpB,EAAmBqB,KAAK,IACjDY,EAA+BX,mBACvCC,MAAMC,QAAU,EAC5B,CACF,C","sources":["webpack://app/./app/javascript/collapse.ts"],"sourcesContent":["import { icon } from '@fortawesome/fontawesome-svg-core'\nimport { faChevronRight, faChevronDown } from '@fortawesome/free-solid-svg-icons'\n\nconst faChevronRightIcon = icon(faChevronRight)\nconst faChevronDownIcon = icon(faChevronDown)\n\nconst setupToggleCollapse = (button: string, target: string): void => {\n const button_item = document.getElementById(button)\n const target_item = document.getElementById(target)\n if (button_item && target_item) {\n button_item.addEventListener('click', () => {\n if (target_item.className.indexOf('show') >= 0) {\n // close\n target_item.classList.remove('show')\n const svg = button_item.getElementsByTagName('svg')\n if (svg) {\n button_item.removeChild(svg[0])\n }\n button_item.appendChild(faChevronRightIcon.node[0])\n const next_item = button_item.nextElementSibling as HTMLElement\n next_item.style.display = ''\n } else {\n // open\n target_item.classList.add('show')\n const svg = button_item.getElementsByTagName('svg')\n if (svg) {\n button_item.removeChild(svg[0])\n }\n button_item.appendChild(faChevronDownIcon.node[0])\n const next_item = button_item.nextElementSibling as HTMLElement\n next_item.style.display = 'none'\n }\n })\n button_item.appendChild(faChevronDownIcon.node[0])\n }\n}\nsetupToggleCollapse('switchCollapseTop', 'collapseTop')\nsetupToggleCollapse('switchCollapsePrecision', 'collapsePrecision')\nif (location.search.indexOf(\"collapse=true\") >= 0) {\n const collapse_items = document.querySelectorAll('.collapse')\n if (collapse_items) {\n collapse_items.forEach(item => item.classList.remove('show'))\n }\n const switch_collapse_top_item = document.getElementById('switchCollapseTop')\n if (switch_collapse_top_item) {\n const svg = switch_collapse_top_item.getElementsByTagName('svg')\n if (svg) {\n switch_collapse_top_item.removeChild(svg[0])\n }\n switch_collapse_top_item.appendChild(faChevronRightIcon.node[0])\n const next_item = switch_collapse_top_item.nextElementSibling as HTMLElement\n next_item.style.display = ''\n }\n const switch_collapse_precision_item = document.getElementById('switchCollapsePrecision')\n if (switch_collapse_precision_item) {\n const svg = switch_collapse_precision_item.getElementsByTagName('svg')\n if (svg) {\n switch_collapse_precision_item.removeChild(svg[0])\n }\n switch_collapse_precision_item.appendChild(faChevronRightIcon.node[0])\n const next_item = switch_collapse_precision_item.nextElementSibling as HTMLElement\n next_item.style.display = ''\n }\n}"],"names":["faChevronRightIcon","icon","faChevronRight","faChevronDownIcon","faChevronDown","setupToggleCollapse","button","target","button_item","document","getElementById","target_item","addEventListener","className","indexOf","classList","remove","svg","getElementsByTagName","removeChild","appendChild","node","nextElementSibling","style","display","add","location","search","collapse_items","querySelectorAll","forEach","item","switch_collapse_top_item","switch_collapse_precision_item"],"sourceRoot":""}