!function(){"use strict";!function(t,e){window.jSelectMenuItem=function(e,a,n,o,r,i){var l="";if(!t.getOptions("xtd-menus"))throw window.parent.Joomla.Modal.getCurrent().close(),new Error("core.js was not properly initialised");var d=t.getOptions("xtd-menus").editor;""!==i&&(l="&lang=");var u='<a href="'+(n+l+i)+'">'+a+"</a>";window.parent.Joomla.editors.instances[d].getSelection()?window.parent.Joomla.editors.instances[d].replaceSelection('<a href="'+(n+l+i)+'">'+window.parent.Joomla.editors.instances[d].getSelection()+"</a>"):window.parent.Joomla.editors.instances[d].replaceSelection(u),window.parent.Joomla&&window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close()},[].slice.call(e.querySelectorAll(".select-link")).forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e=t.target.getAttribute("data-function");"jSelectMenuItem"===e?window[e](t.target.getAttribute("data-id"),t.target.getAttribute("data-title"),t.target.getAttribute("data-uri"),null,null,t.target.getAttribute("data-language")):window.parent[e](t.target.getAttribute("data-id"),t.target.getAttribute("data-title"),null,null,t.target.getAttribute("data-uri"),t.target.getAttribute("data-language"),null),window.parent.Joomla.Modal&&window.parent.Joomla.Modal.getCurrent().close()}))}))}(Joomla,document)}();