(function(){"use strict";/**
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */Joomla=window.Joomla||{},function(){var d=Joomla.getOptions("menus-edit-modules");d&&(window.viewLevels=d.viewLevels,window.menuId=parseInt(d.itemId,10));var f="index.php?option=com_modules&client_id=0&task=module.edit&tmpl=component&view=module&layout=modal&id=",c=document.getElementById("jform_toggle_modules_assigned1"),r=document.getElementById("jform_toggle_modules_assigned0"),s=document.getElementById("jform_toggle_modules_published1"),u=document.getElementById("jform_toggle_modules_published0"),m=[].slice.call(document.getElementsByClassName("module-edit-link")),v=[].slice.call(document.querySelectorAll("#moduleEditModal .modal-footer .btn"));c&&c.addEventListener("click",function(){var t=[].slice.call(document.querySelectorAll("tr.no"));t.forEach(function(e){e.classList.add("table-row"),e.classList.remove("hidden")})}),r&&r.addEventListener("click",function(){var t=[].slice.call(document.querySelectorAll("tr.no"));t.forEach(function(e){e.classList.add("hidden"),e.classList.remove("table-row")})}),s&&s.addEventListener("click",function(){var t=[].slice.call(document.querySelectorAll(".table tr.unpublished"));t.forEach(function(e){e.classList.add("table-row"),e.classList.remove("hidden")})}),u&&u.addEventListener("click",function(){var t=[].slice.call(document.querySelectorAll(".table tr.unpublished"));t.forEach(function(e){e.classList.add("hidden"),e.classList.remove("table-row")})}),m.length&&m.forEach(function(t){t.addEventListener("click",function(e){var i=e.target,o=f+i.getAttribute("data-module-id"),l=document.getElementById("moduleEditModal"),n=l.querySelector(".modal-body"),a=document.createElement("iframe");a.src=o,a.setAttribute("class",'class="iframe jviewport-height70"'),n.innerHTML="",n.appendChild(a),l.open()})}),v.length&&v.forEach(function(t){t.addEventListener("click",function(e){var i=e.target,o=i.getAttribute("data-bs-target");if(o){var l=document.querySelector("#moduleEditModal iframe"),n=l.contentDocument||l.contentWindow.document;n.querySelector(o).click()}})})}()})();
