!function(){"use strict";!function(e,t){if(!t||"function"!=typeof t.Text._)throw new Error("core.js was not properly initialised");e.addEventListener("DOMContentLoaded",(function(){e.getElementById("toolbar-load").addEventListener("click",(function(){var r=e.getElementById("toolbar-load");if(!r.disabled){var i=e.querySelectorAll('input[id*="cb"]:checked');if(1===i.length){var l=r.childNodes[1].getAttribute("data-url")+"&version_id="+i[0].value;window.parent&&l&&(window.parent.location=l)}else alert(t.Text._("COM_CONTENTHISTORY_BUTTON_SELECT_ONE_VERSION"))}return!1})),e.getElementById("toolbar-preview").addEventListener("click",(function(){var r=e.getElementById("toolbar-preview");if(!r.disabled){var i=e.querySelectorAll('input[id*="cb"]:checked');if(1===i.length){var l=r.childNodes[1].getAttribute("data-url")+"&version_id="+i[0].value;window.parent&&l&&window.open(l,"",["width=800, height=600, resizable=yes, scrollbars=yes"].toString())}else alert(t.Text._("COM_CONTENTHISTORY_BUTTON_SELECT_ONE_VERSION"))}return!1})),e.getElementById("toolbar-compare").addEventListener("click",(function(){var r=e.getElementById("toolbar-compare");if(!r.disabled){var i=e.querySelectorAll('input[id*="cb"]:checked');if(0===i.length)alert(t.Text._("JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST"));else if(2===i.length){var l=r.childNodes[1].getAttribute("data-url")+"&id1="+i[0].value+"&id2="+i[1].value;window.parent&&l&&window.open(l,"",["width=1000, height=600, resizable=yes, scrollbars=yes"].toString())}else alert(t.Text._("COM_CONTENTHISTORY_BUTTON_SELECT_TWO_VERSIONS"))}return!1}))}))}(document,Joomla)}();