(function () { "use strict"; const u = window.matchMedia("(max-width: 734px)"), s = window.matchMedia("(min-width: 735px) and (max-width: 1068px)"), m = [window.matchMedia("(min-width: 1069px)"), s, u], n = () => { document.querySelectorAll("[data-column-group]").forEach(e => { const r = Array.from(e.children), t = e.querySelector(".compare-rowheader"); r.filter(c => window.getComputedStyle(c).display === "flex").sort((c, h) => { const a = Number(window.getComputedStyle(c).order), i = Number(window.getComputedStyle(h).order); return a < i ? 1 : a > i ? -1 : 0 }).forEach(c => { e.prepend(c) }), e.prepend(t) }) }, l = () => { let o = document.querySelectorAll("[compare-column-header-static]"); if (o.length === 0) return; let e = document.querySelectorAll("[compare-header-row]"); if (e.length === 0) return; let r = '
'; o.forEach(t => { t.offsetParent !== null && (r += `${t.textContent}
`) }), e[0].innerHTML = r }; m.forEach((o, e) => { function r(t) { let d = window.getComputedStyle(document.querySelector(".channel-compare")).getPropertyValue("--static-enabled"); d && n(), d && l() } try { typeof o.addEventListener != "function" ? o.addListener(r) : o.addEventListener("change", t => { let d = window.getComputedStyle(document.querySelector(".channel-compare")).getPropertyValue("--static-enabled"); d && n(), d && l() }) } catch (t) { console.log("The Error is: ", t) } }); const p = () => { document.querySelectorAll(".selector-dropdown").forEach((e, r) => { e.addEventListener("change", t => n()) }), n() }; document.reorderDOM = n, typeof module == "object" && module.exports ? module.exports = { reorderDOM: n, updateColumnHeader: l } : p() })();